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

Changing Tint and Question about CustomStatusMarkers

Can you change the tint of a token with a macro of like @{selected|tint|#ff0000} or something similar? If not anyone have a script to change a token's tint? I have a button that puts a character in a "dying" state. It toggles a status effect, tied to that status effect is a bleeding Status FX, then it toggles a Custom Status Marker (a heart) with their bar1 (current hp) value over top of it. I want to be able to with this macro also change the tint of the token to red. This is all tied to a button so when a character reaches 0 or lower HP I can select them and toggle "dying state", I also have another button to reset all the set values and markers. Second question: I am using CustomStatusMarkers. I am putting a number on a CustomStatusMarker. The text is REALLY small. Is there a way to make the text on the marker bigger?
Just found out I can change tint with token-mod. Man token-mod rocks! Still wondering about the text size for CustomStatusMarkers though..
I found in the script where the text object is created on the custom status marker:  if(statusMarker.textId) {       // If the text object for the badge already exists, just update it.       let text = getObj('text', statusMarker.textId);       text.set('text', count);     }     else {       // Otherwise, create a new text object for it.       let text = createObj('text', {         _pageid: page,         layer: 'objects',         color: '#0f0',         text: count,         left: -9999,         top: -9999       }); Is it possible to add something to  createObj('text' like "size" to change the size of the text on the marker? Would it be in pixels? To I need to specify "size: 10px," or something?
1523192248

Edited 1523192262
MyRoll20Stuffs
API Scripter
I've read the API documentation and for the text object there are "font_size" fields and "width" and "height" but not sure how to format it in a createObj function... all my attempts have made no changes to the size of the font on the marker.
1523192934
The Aaron
Pro
API Scripter
It’s font_size and you can read about it here: &nbsp; <a href="https://wiki.roll20.net/API:Objects#Text" rel="nofollow">https://wiki.roll20.net/API:Objects#Text</a> try adding: font_size: 26,
The Aaron said: It’s font_size and you can read about it here: &nbsp; <a href="https://wiki.roll20.net/API:Objects#Text" rel="nofollow">https://wiki.roll20.net/API:Objects#Text</a> try adding: font_size: 26, I tried this and it didn't work. I found out what the issue was: font_family "Arial" If this is not set, when later changing the value of the "text" property the font_size will shrink to 8. Possible values (Case is not important): "Arial", "Patrick Hand", "Contrail One", "Shadows Into Light", and "Candal". Specifying an invalid name results in an unnamed, monospaced serif font being used. font_family wasn't set so the font_size was shrinking. Once I set the font_family the font_size attribute started to stick.
1523193818

Edited 1523193855
MyRoll20Stuffs
API Scripter
This is the result that I wanted: Two buttons - 1 to toggle "Dying" state and another to Reset back to "Not Dying"\ It's a GIF - Click on it to view
1523194470
The Aaron
Pro
API Scripter
nice!