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

Help with healing macro is needed

I am struggling to have my healing macro limit the character healing hp to the maximum value - I am unable to figure it out.  I am using the DnD 2024 character sheet,  jumpgate and I have my API set to experimental.  The macro I have included below works well with applying healing to the selected character.  Suggestions and help would be appreciated. !token-mod {{   --set     bar1_value|-[[?{Healing Amount?|0}*-1]]   --report     all|"{name} gets healed leaving him at {bar1_value}hp out of {bar1_max}hp." }}}}
1757606955
timmaugh
Forum Champion
API Scripter
Hey, Steve... yeah, from the TokenMod help: If you are setting a bar value, you can append a ! to the value to force it to be bounded between 0 and max for the bar. So you can change your command to: !token-mod {{   --set     bar1_value|-[[?{Healing Amount?|0}*-1]]!   --report     all|"{name} gets healed leaving him at {bar1_value}hp out of {bar1_max}hp." }} ...and that should work. Also, you can see the TokenMod help by running: !token-mod --help Or you can build/rebuild the TokenMod help handout (in the Journal) by running: !token-mod --rebuild-help
Thanks Tim.  The information that you provided is a big help. Thank you.  My macro now runs well and exactly he way I wanted to.  Thank you!