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

Want to Change one or More Token Tint and Name Visible Property

Hi there, completely new to macros and/or APIs in roll20 with no experience in either.  I'm not sure which I need to work with to accomplish the following: After copying a number of tokens from one page to another, I'd like to be able to call a procedure to: 1) turn off (uncheck) the token property "show nameplate"; and 2) change the tint colour.  Ideally, I'd like to do this to selected tokens, but one at a time is OK. The macro development in roll2 is a mystery to me.  If anyone can suggest how I can start working with is, I'd appreciate it very much. As for background, I am not particularly bright, but I've done a lot of work in Oracle SQL and PL/SQL (retired now, last time was 5+ years ago).  I am pretty proficient in VBA/DAO coding in MS Access which I used to use to create native Oracle SQL and PL/SQL to execute in an Oracle back end.  I've done some basic adaptations of APIs in Classes in MS Access and a very little XML.  I don't do macros in MS Access except for autokeys. Thanks very much in advance for any guidance on how to get started.
Hi, Tim, as a pro subscriber you can use the API.  The Aaron is a prolific scripter who has created a great tool to do what you want.  It's called TokenMod and is available from the one-click menu, and it will create a handout in-game with help on how to use it. Go to your game settings and click on API, and then go to the script library and look up TokenMod, you'll be glad you did!
Test - got page missing when I submitted a reply
1589748416

Edited 1589748434
The Aaron
Roll20 Production Team
API Scripter
The basic TokenMod command for your 1 and 2 is: !token-mod --off showname --set tint_color|transparent That assumes you don't want to see the nameplate at all.  If you just want to hide it from players, you can use showplayers_name instead of showname.  Also, it assumes you want to clear the tint color. If you want to set to a specific color, you can change transparent to any HTML style color (#rrggbb) or one using rgb or hsv (see the help). This command affects all selected tokens.
Valerie M. said: Hi, Tim, as a pro subscriber you can use the API.  The Aaron is a prolific scripter who has created a great tool to do what you want.  It's called TokenMod and is available from the one-click menu, and it will create a handout in-game with help on how to use it. Go to your game settings and click on API, and then go to the script library and look up TokenMod, you'll be glad you did! Thanks so much.  I was able to do that.  Had to show my wife your name. :)  One of my little sisters is a Valerie M, too. All the best.
The Aaron said: The basic TokenMod command for your 1 and 2 is: !token-mod --off showname --set tint_color|transparent Thanks so much for helping out, Aaron.  This is everything I wanted and am grateful for your work. I'm finding it to be a bit intermittent in the effect.  I've used bad commands a couple of times - does it get angry with me and stops working?