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

Changing the number in bars by macro?

Hi everyone, I have a game that i run with character sheet so the attack rolls are automated. i have made the Bar1 the health, and bar2 and 3 the defense and special defense. Can a macro apply an addition to the number in the bar1? The macro would be something like : bar1 = bar1 - [[?{What's the damage?|0} - @{selected|defense}]] As my understanding of macros, they are only graphicals and can't really interact with attributes but i'm asking to make sure. Also (if a macro can't) is there an API that do that?
Standard roll20 macro. Nope. With an API script, yes.
AlterBar Script - <a href="https://app.roll20.net/forum/permalink/1216260/" rel="nofollow">https://app.roll20.net/forum/permalink/1216260/</a> Alterbar is a simple script to alter the value of the bars on a token. TheAaron's TokenMod script is a much more powerful and complex script that can be used to alter all kinds of attributes and not just the token bars.
Thanks! I will check the alterbar and the tokenMod, the alterbar is maybe better because all my ennemy monsters are from rollable tables so their HP bar is not tied to a character sheet attribute.