Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Advertisement Create a free account

Specific Item Effect DC Formula Question

Yes, I know the topic title reads like word salad.  Basically, I don't know anything about coding, and I wasn't really sure where to look for the answers to this to get starting, but in my Pathfinder game, I have an weapon with an extra effect that has a DC of 10 + the wielder's INT modifier + 1/2 the wielder's level.  How would I express that formula on my character sheet (in the weapon description) so when I roll an attack with the weapon, it displays the DC as just a single number in the description? So the best I could figure out would be something like 10 + INT-mod +  level / 2 ?  I just don't know where all the @'s and brackets and parentheses are supposed to go.  If anyone could help me out with this, I'd really appreciate it.  And maybe I'd be able to reverse-engineer it a bit so I'll be able to figure out at least some on my own in the future.
1526962245

Edited 1527047148
vÍnce
Pro
Sheet Author
Looks like you have the gist of it.  If this is for the PF Community sheet, try this in your weapon notes; Sword's Special Effect: [[ 10 + @{int-mod} + {1,[[ floor(@{level}/2) ]]}kh1 ]] The first section of the macro "should" be fairly self-explanatory.  Whenever you call an attribute use the format @{FOO}.  so int-mod needs to be @{int-mod}. This might look tricky... "{1,[[ floor(@{level}/2) ]]}kh1 ]]".  Basically this snippet of macro guarantees at minimum of 1 at first level while floor handles rounding for the odd levels so you don't end up with fractional bonuses. "kh1" tells the macro to keep the higher value. Cheers
Thanks so much!