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 Alter Bar on TokenScript (Sky)

I've been using Sky's script (found here: <a href="" rel="nofollow"></a>... and run into a problem where I can't add multiplication into the subtraction calculation. Here is what I've been entering: !alter @{target|token_id} 2 -?{Subtract from Bar|1d5+5+@{selected|Ability1}*@{selected|Ability} The numbers pull correctly but then it does some funky math whenever I include the multiplication sign.
Forum Champion
Try this: !alter @{target|token_id} 2 - [[ ?{Subtract from Bar|1d5+5+@{selected|Ability1}*@{selected|Ability}} ]]
Thanks for the response! I tried that but now it doesn't seem to run any calculation.
Forum Champion
Hm, do you have the script's latest version ? If you do, try one of these: !alter --target|@{target|token_id} --bar|2 --amount|-[[?{Subtract from Bar|1d5+5+@{selected|Ability1}*@{selected|Ability}}]] !alter --target|@{target|token_id} --bar|2 --amount|-?{Subtract from Bar|1d5+5+@{selected|Ability1}*@{selected|Ability}}
Try the new version... <a href="" rel="nofollow"></a>... ... and then let us know what's going on with it.
Works great now!! Thank you!!