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

Roll Output using Power Cards and Token Mod

I made a really (really) simple macro to be able to roll and apply heals for the four "Cure" spells in D&D. Run macro, click target, select heal spell, done. The macro applies the heal to the token, but there's two things I can't figure out. 1. How to cap the heal at the max health of the target token 2. How to actually show the output in Powercards. !power {{  --name|Cure Spell  --rightsub|Range: Touch  --hroll|[[ [$C1] 1d8 + @{level} ]] [[ [$C2] 2d8 + @{level} ]] [[ [$C3] 3d8 + @{level} ]] [[ [$C4] 4d8 + @{level} ]]   --api_token-mod|_ids @{target|token_id} _set bar1_current|+?{Type?  | Cure Light Wounds,[^C1] | Cure Moderate Wounds,[^C2] | Cure Serious Wounds,[^C3] | Cure Critical Wounds,[^C4] } }} Any assistance would be greatly appreciated. Thanks!
1610986835
Kraynic
Pro
Sheet Author
You should go to the api forum, find the Power Cards thread (which is a pretty active thread) and post there.  Then you know people that use it (including the author/maintainer) will see your question.
Will do, thanks!
1611060054
David M.
Pro
API Scripter
Regarding your first question: TheAaron recently added syntax to token-mod to easily cap bar values to their max. See here for example.