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

Dynamic Token Values

I have a conundrum that I'm not sure is supported in Roll20. The issue is that bar1's maximum value is based on bar2's current value. What I want is bar1|max = 20+[[@{bar2|current}*10]]. Normally, I would do this in the character sheet, but this token is for a generic creature instead of a specific creature, and any dynamic changes that would occur on the token would reflect to all instances of that creature.
1643023894
GiGs
Pro
Sheet Author
API Scripter
Unfortunately it's not easily possible to do that. You will need to use a custom API script to set this.
1643034504
timmaugh
Forum Champion
API Scripter
TokenMod can set the value for you, and it can even use the value of bar2 as a starter the way you're asking. What requires a custom script, as GiGs described, is the maintaining of that relationship if you change the bar2 value (having to reset bar1|max). But you are generally in charge of altering bar2 (and, so, know when it is going to change), then you could have a macro to recreate bar1|max based on the new bar2 value.
Ya, unfortunately this is planned to be for a player's token, that I want them to be able to change as necessary, based on events of play. :(