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 .
×

Token-mod

I have been using this little Restore Tokoen MACRO for some time now and it has suddenly stopped working properly !forselected(^) token-mod {{   --set      showname|off     bar1_value|@{selected|hp|max}     bar1_max|@{selected|hp|max}     bar1_link|none     bar2_link|none     bar2_value|@{selected|npc_ac}     bar3_link|speed     bar3_value|@{selected|npc_speed}     has_bright_light_vision|off     emits_bright_light|off     emits_low_light|off     statusmarkers|= }} Now when a token is restored with this macro I can no longer change the HP value (Bar 1) on the token using the bubble.  2024/2024 by Roll20 Hybrid game, Jumpgate.
1790021176

Edited 1790023607
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Hultz! I was confounded by that this morning.  Try:    bar1_value|@{selected|hp_max}    bar1_max|@{selected|hp_max}
1790042932
timmaugh
Pro
API Scripter
I should also add that the nature of how this is written will work like this: For as many tokens as you have selected... ...TokenMod will update them, one by one... ...setting the bar values of EVERY token to the CURRENT value of the bars from the FIRST selected token. If that is what you want to do (all tokens getting the same values for the bar currents and max-es), you don't need the "forselected(^)" handle. You could just as easily just select the tokens you want, and set TokenMod up to update them all in one go. Alternatively, if you meant for each token to get a different value, you would want to use Fetch constructions for the value retrievals, and break them up with the caret character that you've declared as the deferral character: @^(selected|bar1) @^(selected|bar1|max)
Thanks timmaugh, I didn't understand that part of it. What was/is is that this macro has worked for me for at least 6 months and now suddenly doesn't work.
1790119999
The Aaron
Roll20 Production Team
API Scripter
You could also use bar1_reset| if you just want to set bar1_value to bar1_max for each token.
1790120101
The Aaron
Roll20 Production Team
API Scripter
I suspect that the Beacon sheet has stopped supporting "|hp|max" which is why Keith suggested "|hp_max".  I'll do some digging and report it.
Thank you The Aaron.