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

I just need some real basic help please.

I am following the guide to build new character sheets, and am just trying to figure out some real basic stuff.   I should be able to define an attribute "attr_str" and an attribute "attr_ref" and then create a new attribute "attr_dex" which is an average of the two.   I set up str and ref as follows: <input name="attr_str" value="30" type="number"> <input name="attr_ref" value="30" type="number"> <input name="attr_dex" value="(@{attr_str}+@{attr_ref}/2)" type="number" disabled="true"> Am I just missing something super basic here? Thanks in advance.
1482273156
Finderski
Pro
Sheet Author
Compendium Curator
When referring to the other fields you don't use the 'attr_', so your calculated field should look like this: <input name="attr_dex" value="(@{str}+@{ref})/2" type="number" disabled="true"> Also, note the move in the closing parenthesis, order of operations dictates you need to do your addition first. Also, you'll probably want to use floor or something like that for rounding purposes since it won't always be a nice round number. Something like this: <input name="attr_dex" value="floor((@{str}+@{ref})/2)" type="number" disabled="true"> That's assuming you want to round down...
I knew it was something basic.  Thanks so much for your help! The community here is great.