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 Mod script help] targeting a token for modification without having it selected

1618497284

Edited 1618497338
This is a very little QOL help request: Is there a way to set a macro with token mod to alter a specific token by name WITHOUT having it selected on the map?  I'm trying something like this: !token-mod --ids @{PageFX1|token_id} --set aura1_color|?{FX|day, transparent|night,003|evening,333|fog,eee} what am I missing? is it even possible to retrieve the ID of a token given its name or even its linked character name?
1618501029
The Aaron
Roll20 Production Team
API Scripter
Character's don't have a token_id, and each Token has a unique one regardless of if they represent the same Character.  You can specify a character_id from a Character, and TokenMod will find all tokens that represent that Character.  You can further refine that by specifying only the current page or active pages: !token-mod --ids @{PageFX1| character_id } --active-pages --set aura1_color|?{FX|day, transparent|night,003|evening,333|fog,eee} !token-mod --ids @{PageFX1| character_id } --current-page --set aura1_color|?{FX|day, transparent|night,003|evening,333|fog,eee}