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

Auto calc bug, sheet limitation, or other?

1435997266

Edited 1435997821
vÍnce
Pro
Sheet Author
I'm trying to add a Flat-Footed condition to the pathfinder sheet. Mark G. helped me out with a formula to use. This seems to work in that it will pass the correct value for @{condition-Flat-Footed}, however the auto-calculated attribute, normally "0", becomes blank as soon as I toggle the @{condition-Flat-Footed} checkbox. Not sure what the issue is. Any suggestions? Thanks simplified code; Checkbox to create the @{condition-Flat-Footed} attribute <input type="checkbox" title="@{condition-Flat-Footed}" name="attr_condition-Flat-Footed" value="[[ {floor(@{DEX-mod}),0 }kh1} ]]"/> This just displays a number to indicate a condition(s) are being applied. Normally this displays "0" if no conditions are checked. <input name="attr_conditions-apply" title="This is the total penalty to various scores you are currently experiencing due to conditions." type="number" value="(@{conditions})" disabled><br>Conditions This is the auto-calculated attribute. <input name="attr_conditions" title="@{conditions}" type="hidden" value="(0 - abs(@{condition-Flat-Footed}) )">
1436020627

Edited 1436020721
vÍnce
Pro
Sheet Author
SOLVED! <a href="https://app.roll20.net/forum/post/2143478/formula-needed-for-character-sheet-value-attribute/#post-2146837" rel="nofollow">https://app.roll20.net/forum/post/2143478/formula-needed-for-character-sheet-value-attribute/#post-2146837</a> Brian said: You can't use a group modifier like kh1 in an autocalc field. You can however use the construction A + B + abs(A - B) / 2 to get max(A, B). See here: <a href="https://app.roll20.net/forum/post/882997/#post-917740" rel="nofollow">https://app.roll20.net/forum/post/882997/#post-917740</a> Vince said: You hit the mark Brian. I changed this value ="[[ {floor(@{DEX-mod}),0 }kh1} ]]" to value="( ((@{DEX-mod} + 0) + abs(@{DEX-mod} - 0)) / 2 )" problem solved! Thank you very much guys. Much appreciated.