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

Macro that Selects All of the Same Token

For The Quiet Year, 6 sided dice are used for project counters. Each turn, project dice are decremented by one. I have multi-sided tokens called "Project Die." They are associated with a character called "Project Die". I am using the ClockTokens API to adjust them. If I select the tokens manually, it works properly. However, the game map can get very busy, so selecting the tokens is not always clean. I would like to create a macro to select all the tokens representing the character "Project Die". This is because the Name of the token is changed to the name of the respective project. Ideally, this would select all the Project Die, and I can use the ClockTokens macros to adjust them each turn.
1662089587
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Reporter could do this, I think. It doesn't select tokens (Scripts can't operate the GUI like that), but it could find and list all of the tokens on the board that match your criteria, and each token in the report could have a token-mod macro that would affect only it.
1662089848

Edited 1662090054
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
!report||+c|name|Project Die -- ---[somebuttonname](!token-mod --set ________________) Should do it. Fill in the token mod macro with whatever you want it to do. It will make a button that will only affect that token, and it doesn't have to be selected. If the macros to increment the dice are token action buttons, you might even be able to use: !report||+c|name|Project Die -- ---actions