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 .
×
Create a free account

Calculation in DMG Mods Attack field

A player has a trait where he gets to add +1 dmg for every 2 damage dice he rolls, with a minimum of +1. I have the macro to calculate the damage as [[{floor(@{damage-dice-num}/2), 1}kh1]] It works fine in the Notes field, but when I put this in the in the DMG Mods field it looks to be ignored. I've tried without the [[ ]], but no luck either. Maybe Macros are not supported in DMG Mods field? Or maybe I am doing something wrong.  Thanks for any help!
1466215773
chris b.
Pro
Sheet Author
API Scripter
In the pathfinder sheet? You have to use "min(floor(@{damage-dice-num}/2), 1)" in beta we have it finally supporting kh1 and kl1, but in prod it is still only min or max
I did try "min(floor(@{damage-dice-num}/2), 1)" also, and still no luck, the calculation doesn't include the damage from the calc.  It actually seems to be tied to the @{damage-dice-num} variable. If I put something like @{class-0-level} into the DMG Mods field, it's resolves fine and the Val calculated field shows a 1. If I put in @{damage-dice-num} variable into the DMG Mods field, it's Val calculated field shows a 0. If I put @{damage-dice-num} into the Notes field, it calculates correctly as a 1. I also @{repeating_weapon_2_damage-dice-num} (2 is the attacks ID) and it also does not work. Any other thoughts?
1466392325
chris b.
Pro
Sheet Author
API Scripter
OH .. sorry I get it now, it's because we need to use the full name of the field: repeating_weapon_<ID>_damage-dice-num Just replacing <ID> with the value of the ID of that row.  You can get the row id by clicking on the "IDs" arrow and it will appear below. if that doesn't work (because it's all lowercase) then you can find the mixed case by hitting F12 on the browser and the ID is on the div surrounding the particular row. VInce has a screenshot somewhere in the Pathfinder V5 sheet.
1466397699

Edited 1466483105
vÍnce
Pro
Sheet Author
Edit/update: ignore the ID posted in the attack notes.  It was pasted in from another attack.  ;-( If you need a case-sensetive ID, you can always grab it from the html.
Thanks! I worked around the issue, but I'll check this out too.