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

TokenMod - setting negative values for light/dimlight cumulative (bug)

1587602657

Edited 1587602727
Hey there @TheAaron, I am trying to build out a few macros to help me quickly build up some templated tokens. I noticed that if I set light/dimlight to a value that is negative  (i.e. -5), instead of explicitly setting the value to -5, it cumulatively subtracts 5 from whatever value was previously there... so in the case of setting a "glow" effect of light: 25 and dimlight:  -5, it will set the token properly the first time since there is no value. However, each subsequent call of the macro will subtract another 5 from the value, -10, -15, -20, etc. etc. Is this by design? Is there a way to specify and explicity, fixed negative value that won't cumulatively subtract on subsequent calls (usually used with dimlight in my case)? Please advise.
1587607848
The Aaron
Roll20 Production Team
API Scripter
No problem. To set to an explicit negative value, you just need to preface with an = like this: !token-mod --set bar1_value|=-5 All properties that can take a numeric value support the = so just throw it in there where you need to. 
Perfect! Thanks.