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

Healing Macro + Token Mod

Hi, i am quite new to Macros and Scripting and Probably there is an easy fix for this, but I somehow could not find one that works for me. I tried to adapt a little Macro which lets players choose a Healing Potion and I want to Adjust the Health accordingly: &{template:default} {{name=Healing Potion}} {{  ?{Potion|  Lesser, **Lesser Healing Potion Used:** [[2d6+ [[@{selected|constitution}]]]]|  Regular, **Regular Healing Potion Used:** [[4d6+ [[@{selected|constitution}]]]]|  Greater, **Greater Healing Potion Used:** [[6d6+[[@{selected|constitution}]]]]|  Potent, **Potent Healing Potion Used:** [[8d6+[[@{selected|constitution}]]]]  }   HP recovered ***Do not forget to remove Potion from Inventory*** }} !token-mod  --set bar1_value|+?{Potion} But Token Mod just deletes the Value in Bar 1 and i can't find a way how to fix this? Maybe I am just overlooking something. A little help would be very much apreciated :) Thanks!
1589622923
GiGs
Pro
Sheet Author
API Scripter
Even if it works, you have two problems here: Your bar1 would not show a number, it will get something like **Lesser Healing Potion Used:** 12 That text is part of the queries value and would be printed. Secondly, the roll part [[8d6}} or whatever, would be rerolled in the second ?{Potion}. It would not be the same total in each potion query.
1589623087
Andrew R.
Pro
Sheet Author
The value of Potion goes away outside the Default Roll Template. You cannot pass it to TokenMod like that.  Use PowerCards instead of the Default Roll Template. You can call TokenMod inside PowerCards and pass it PowerCards values was you want to.
Ok Thank you both!. I suspected something like that but could not find the right solution. I will try to use powercards, or, since i also want to limit the added health by max health, try to learn API scripting :)