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 .
×

Trouble with Modifiers

I'm trying to make a custom sheet and, while it isn't pretty, it works. The only thing that I'm truly struggling with is the ability modifiers. I can't seem to get the formula to convert to HTML correctly. The modifier is supposed to be the score subtract ten then divided by two but I can only get it to work as the score divided by two. I would greatly appreciate the help. Thank you so much in advance ^-^
1538942971
GiGs
Pro
Sheet Author
API Scripter
Can you give an example that you've tried? There are several ways to do this, and i need to see what you are trying to know the proper advice to give.
<input type="number" name="attr_StrMod" value="@{str_score}-10/2" disabled="true" /> Is what I'm using and it works for the divided by 2 but not the subtracting.
Arty said: <input type="number" name="attr_StrMod" value="@{str_score}-10/2" disabled="true" /> Is what I'm using and it works for the divided by 2 but not the subtracting. Not sure but try this: <input type="number" name="attr_StrMod" value="  (   @{str_score}-10  )   /2" disabled="true" />
1538952102
GiGs
Pro
Sheet Author
API Scripter
Arty said: <input type="number" name="attr_StrMod" value="@{str_score}-10/2" disabled="true" /> Is what I'm using and it works for the divided by 2 but not the subtracting. try this: value="floor((@{str_score}-10)/2)" or value="floor(@{str_score}/2)-5" Both are equivalent.
Thank you both so so much! ^-^