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

Token status marker with values greater than 9

I've been using in my scripts for some time the token.set() function to set the status marker and its numeric value. E.g.: token.set("status_half-haze", "10"); If the numeric value used was in 0-9 range it used to show up on the icon itself, if greater than 9 the number didn't show but the status icon appeared correctly and the the numeric value was stored in the statusmarkers  property behind the scenes (I use these values to store the status duration). Now the behaviour has changed and if I set a numeric value greater than 9 the status icon doesn't appear at all. Has the API command behaviour been changed? Is it a bug? Or what else? I've found nothing specific in the API documentation. Any help would be greatly appreciated.
1551199101

Edited 1551199484
Ammo
Pro
Bumping this, since I would like to know the answer also. &nbsp; I went and read the code for TokenMod, figuring if there is any code trickery, The Aaron would know it. &nbsp; Seems like TokenMod clamps status values to max 9, if I read it correctly. &nbsp; So no answer there. PS: &nbsp;The Aaron: &nbsp;this html generation code is beautiful&nbsp; <a href="https://github.com/shdwjk/Roll20API/blob/0e4b693439e8b103368795b78da149701e394eb0/TokenMod/TokenMod.js#L973" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/0e4b693439e8b103368795b78da149701e394eb0/TokenMod/TokenMod.js#L973</a>
1551222883
The Aaron
Roll20 Production Team
API Scripter
Thanks Ammo!&nbsp; I'm pretty proud of that bit, I have to say.&nbsp; I've been slowly moving all my scripts over to using it.&nbsp; I'm intending to make a base script with many of these facilities in it, at some point.&nbsp; I just need to solve the dependency problem (specifically, how to make it easy both for people that use the 1-click and people who don't).&nbsp; Feel free to lift it if you find it useful. =D As to the point of the post, they did change the code for StatusMarkers in the recent update.&nbsp; On the bright side, they added a 0 which is displayed the same as 1-9, in addition to a blank, which is the traditional no-number display.&nbsp; On the downside, there seems to be something odd about the status_XXXX pseudo attributes.&nbsp; You might try: token.set('statusmarkers','half-haze@10') and see if you get the old behavior.&nbsp; My speculation is you won't, but only testing will tell for sure.