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

Autocalculating Bar Fields

1559345596

Edited 1559345754
For a long time, you could auto-calculate expressions in a bar's current and maximum fields. I've come back from a long hiatus and this no longer seems to be the case. As an example, create a character sheet with a single attribute called "Constitution". Create a token for that character sheet. Using bar3 as Health, set the maximum field of bar3 to "(@{Constitution} * 5)". This token's maximum health is equal to their constitution multiplied by five. Prior to whatever update Roll20 rolled out, after clicking "Save Changes", the maximum field would automatically calculate and return a number. If Constitution was 5, bar3's maximum value would now be 25. Now, this is no longer the case. The field does not automatically calculate, it remains as (@{Constitution} * 5). Is there a workaround to this? In my case, I have 50+ character sheets which rely on this trick. For my system, my maximum health formula is very convoluted. Not only that, but each sheet's maximum health has to be updated every session or two. I have automated this process by simply using one Global variable that is called on each character sheet, which requires me to only change one attribute each session. I don't want to manually calculate and change 50~ attributes (more, considering I have to change the current value of the bar as well) every session. There is not much of an alternative because my system requires the 50 sheets to be battle-ready at any time. Is there a non-subscription solution or workaround to this? I am currently thinking about writing a program to evaluate everything, then exporting the values manually, but if everything could be solved within Roll20, that would be nice...
Create an attribute in your character sheet.  Call it whatever, say "max_hp".  In the second input space, type @{Constitution}*5.  In the token setting for bar 3, link it to this attribute.
That works really well, however, I've come across another obstacle. When calling an attribute from another character sheet, the auto-calculation returns nothing, or doesn't perform the calculation at all. All of my character sheets scale off level, which I alter in a separate character sheet named "Global" with the attribute "BaseLevel". Such that hp_max = @{Constitution} * 5 + @{Global|BaseLevel} * 3 Is there a way to call an attribute from another character sheet like this and still perform the bar's auto-calculation?