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

Player Healing macro

Below is the macro I use to heal the PCs. It works perfectly. However, I can't get it to work for the players. I have it on their bar, they get the selection pop-up, can input the HP healed, but the bar doesn't change. Is there a reason that a Player can't move their own bar with a macro? !token-mod --set bar1_value|+[[(?{Damage Healed})]]  --ids @{target|Target 1|token_id} @{target|Target 1|token_name} was healed!
1593195284

Edited 1593201306
The Aaron
Roll20 Production Team
API Scripter
You need to turn on Players Can IDs in the help: !token-mod --help BTW, you might be interested in a change I rolled out last night (should be in one-click Tuesday) which restricts bar values to the bounds between 0 and max, as well as the --report argument which can give you the actual amount applied: !token-mod {{ --set bar1_value|+[[(?{Damage Healed})]] ! --report all|"{name} was healed for {bar1_value:abschange} points." --ids @{target|Target 1|token_id} }} Appending a ! to the end of the value performs the restriction.
1593195352
The Aaron
Roll20 Production Team
API Scripter
By default, players can only run TokenMod on tokens they have selected.  That prevents them from adjusting creatures and other characters.  I wanted to make the ability to change "all the things" opt-in for game masters.
Thanks. I was able to get it to work by turning on Players Can IDs. However the macro you posted doesn't work for me.  As a player, I get  TypeError: c is undefined As the Dm, I get  TypeError: Cannot read property 'substring' of undefined
1593199764
The Aaron
Roll20 Production Team
API Scripter
It won't work until Tuesday unless you manually grab the new code. Still, it shouldn't cause an error, I'll try it out and see. 
1593201318
The Aaron
Roll20 Production Team
API Scripter
Ah, I had a rogue @ in there.  I corrected the above.
Ok, so now, I would like to clean this up. The top two lines are from your Damage Macro. I want the /em. Why do I get the Strahd: (blank) line after it? Even if I remove the /em, I still get the blank line with the name. And the bottom 2 lines are 2 different heals. I always get the : at the beginning of the first heal, but not any consecutive heals. Thoughts? !token-mod  --set bar1_value|-[[(?{Damage})/?{Resistance?|No,1|Yes,2}*?{Vulnerability?|No,1|Yes,2}]]  --ids @{target|Target 1|token_id} /em damaged @{target|Target 1|token_name}. !token-mod {{  --set bar1_value|+[[(?{Damage Healed})]]   --report all|"**{name}** was healed for **{bar1_value:abschange} points.**"   --ids @{target|Target 1|token_id} }}