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 .
×

TokenMod-Setting Multiple colors on a single target at once

Hello all. I'm not the greatest with coding or macros, but I'm able to figure out simple stuff on my own. I've searched high and low for my own answer to this question for almost a week, but can't find it. Sorry to bother you guys, but can someone help me figure out why one section of my BUFF/DEBUFF macro doesn't work? When I click it, it creates a drop-down menu for every BUFF/DEBUFF that I have on the list, and it will add the appropriate status icon...   EXCEPT the Mirror Image. When my Wizard casts Mirror Image, I give him 3 colors: Red, Yellow, Green. Every time he loses an image, I take a color (Green at first, cuz he's no longer safe. Yellow next cuz he needs to be cautious now. Red last, because he's in danger). My dropdown actually SHOWS the code, rather than executes it (see screenshot). Can someone help me figure out what's wrong with the Mirror Image portion of my macro? Thank you all. !token-mod ?{Status|Readying, --set statusmarkers#!sentry-gun|-, |Mirror Image, --set statusmarkers|!red --set statusmarkers|!yellow --set statusmarkers|!green|Blessed, --set statusmarkers#!angel-outfit|Jump, --set statusmarkers#!tread|Mage Armor, --set statusmarkers#!aura|Shield of Faith, --set statusmarkers#!bolt-shield|Blur, --set statusmarkers#!half-haze|Haste, --set statusmarkers#!stopwatch|Barkskin, --set statusmarkers#!three-leaves|Stoneskin, --set statusmarkers#!fist|Water Breathing, --set statusmarkers#!drink-me|-, |Baned, --set statusmarkers#!broken-skull|Marked, --set statusmarkers#!archery-target|Confused, --set statusmarkers#!scream|Cursed, --set statusmarkers#!bleeding-eye|Slow, --set statusmarkers#!snail}
1774163261

Edited 1774163623
You cannot nest queries inside one another in the way that you're hoping without using HTML entities:&nbsp; <a href="https://wiki.roll20.net/Roll_Query/Nested" rel="nofollow">https://wiki.roll20.net/Roll_Query/Nested</a> You can also move all of the parts of a query that are the same for each answer outside of the query to make it more readable. The '--set statusmarkers#' doesn't need to be in each response.&nbsp; This should be what you're looking for: !token-mod --set statusmarkers#?{Status|Readying,!sentry-gun|-, |Mirror Image,&amp;#63;{How many?&amp;vert;3&amp;comma;+green#-yellow#-red&amp;vert;2&amp;comma;-green#+yellow#-red&amp;vert;1&amp;comma;-green#-yellow#+red&amp;vert;0&amp;comma;-green#-yellow#-red&amp;rbrace;|Blessed,!angel-outfit|Jump,!tread|Mage Armor,!aura|Shield of Faith,!bolt-shield|Blur,!half-haze|Haste,!stopwatch|Barkskin,!three-leaves|Stoneskin,!fist|Water Breathing,!drink-me|-,|Baned,!broken-skull|Marked,!archery-target|Confused,!scream|Cursed,!bleeding-eye|Slow,!snail} Alternatively, if you want to use a single Status Marker for Mirror Image, you can add a number over the Status Marker instead of toggling through Red/Yellow/Green. Simply swap out 'blue' for whatever statusmarker name you want: !token-mod --set statusmarkers#?{Status|Readying,!sentry-gun|-, |Mirror Image,&amp;#63;{How many?&amp;vert;3&amp;comma;blue:3&amp;vert;2&amp;comma;blue:2&amp;vert;1&amp;comma;blue:1&amp;vert;0&amp;comma;-blue&amp;rbrace;|Blessed,!angel-outfit|Jump,!tread|Mage Armor,!aura|Shield of Faith,!bolt-shield|Blur,!half-haze|Haste,!stopwatch|Barkskin,!three-leaves|Stoneskin,!fist|Water Breathing,!drink-me|-,|Baned,!broken-skull|Marked,!archery-target|Confused,!scream|Cursed,!bleeding-eye|Slow,!snail} If you want to go the Chat Menu route instead, you can take a look at these two options as well. They both take a bit of setup, but I find chat menus to be easier to navigate quickly, and I can use my custom Status Markers instead of the default ones.&nbsp; Text chat menu Image chat menu
1774374435

Edited 1774375317
Jarren said: Alternatively, if you want to use a single Status Marker for Mirror Image, you can add a number over the Status Marker instead of toggling through Red/Yellow/Green. Simply swap out 'blue' for whatever statusmarker name you want: !token-mod --set statusmarkers#?{Status|Readying,!sentry-gun|-, |Mirror Image,&amp;#63;{How many?&amp;vert;3&amp;comma;blue:3&amp;vert;2&amp;comma;blue:2&amp;vert;1&amp;comma;blue:1&amp;vert;0&amp;comma;-blue&amp;rbrace;|Blessed,!angel-outfit|Jump,!tread|Mage Armor,!aura|Shield of Faith,!bolt-shield|Blur,!half-haze|Haste,!stopwatch|Barkskin,!three-leaves|Stoneskin,!fist|Water Breathing,!drink-me|-,|Baned,!broken-skull|Marked,!archery-target|Confused,!scream|Cursed,!bleeding-eye|Slow,!snail} @Jarren Wow, that second one is super clever, being able to add a number to a color stack. I did not know that. Thank you for that. I think I am going to incorporate that into the game, to have less icon clutter for the Mirror Image. Genuinely, thank you. That just gave me some great ideas for condensing icons. I am going to use it to track my Fatigue and Exhaustion stacks, too. Just for the record, I genuinely appreciate your assistance here. Truly. Thank you.
GM Chris said: I tried to modify your macro code myself to test it, and it (sorta) works, but as soon as I switch from one number to another (i.e. when I try to bring the count from Radioactive3 to Radioactive2 (to simulate the Wizard getting hit and losing one of his Mirror Images), it doesn't overwrite the old number (3) with the new number (2), it just erases the whole icon, and I have to run the macro a second time and select the new number (2) to make it work. Is there a syntax in the macro somewhere that is causing me to have to run it twice to adjust the number stack? Please post the TokenMod command that you are using.
Jarren said: GM Chris said: I tried to modify your macro code myself to test it, and it (sorta) works, but as soon as I switch from one number to another (i.e. when I try to bring the count from Radioactive3 to Radioactive2 (to simulate the Wizard getting hit and losing one of his Mirror Images), it doesn't overwrite the old number (3) with the new number (2), it just erases the whole icon, and I have to run the macro a second time and select the new number (2) to make it work. Is there a syntax in the macro somewhere that is causing me to have to run it twice to adjust the number stack? Please post the TokenMod command that you are using. I started digging on my own, and found the problem. Fixed it, got it to work as wanted. But seriously, you gave me some GREAT ideas for simplifying and condensing my tracking, and speeding up my game. Thank you, SO much!! =)