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

[CUSTOM GAME SHEET] 3 points = 1 stat

Hi there all! I'm fairly new to using HTML in general, but i've been working on a new game to play with a group of friends and im designing my own character sheet. but i hit a problem... It was easy to make it so when a stat was put into HP, it would add 3 hp per level + base: attr_hptotal = Actual HP attr_hp = HP Points but how would could i make it so the reverse happens? for example you need 3 points in HP to upgrade your HP by 1? Any help would be great! thank you!
1470780061
Pat S.
Forum Champion
Sheet Author
Have you tried <input type="number" name-"attr_hptotal" value="9+(@{hp}/3)" disabled="true" />?
yes, but the number it gives is not a whole number. it ends up being 9.33 instead of just 9 on 1 point.
1470840630
Ziechael
Forum Champion
Sheet Author
API Scripter
Add a  rounding function (I assume this will work for html values too).
Perfect! Works a treat! This means every 2 points, the DEF will go up by 1. Thank you!