View Single Post
ploturo
Member
 
Join Date: May 2021
Posts: 84

Old May 9th, 2022, 09:30 PM
So the lines

Code:
stat = "#attrmod[" & stat & "]"
bonus = stat
are making a string, and then converting that string to a value (which is 0, since there isn't a number in the string).

You aren't actually using the #attrmod macro, it's just text in the string.



The field might be different for d20, but in Pathfinder I would change those lines to be something like this instead:
Code:
~ make a tag expression to match the right attribute
stat = "thingid." & stat

~ get the current bonus/modifier for that attribute
bonus = hero.firstchild[stat].field[aModBonus].value
ploturo is offline   #3 Reply With Quote