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 question

I didn't see this specifically in the help file. How do I "target" a token to set a marker on it? This adds a marker to an already selected token: !token-mod --set statusmarkers|Burning Thank you!
Not a pro user, so I can't test this... but it going off <a href="https://wiki.roll20.net/Script:Token_Mod" rel="nofollow">https://wiki.roll20.net/Script:Token_Mod</a> it seems as though you can specify a list of affected ids at the end of the command: !token-mod &lt;--help|--ignore-selected|--config|--on|--off|--flip|--set&gt; &lt;parameter&gt; [&lt;parameter&gt; ...] ... [ --ids &lt;token id&gt; [&lt;token id&gt; ...]] So if you add --ids @{target|token_id} to the end of your command will it prompt you to select a token?
Perfect!&nbsp; Thank you!
1678559546
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You probably also want to throw in --ignore-selected if you are going to use --ids. --ignore-selected can be used when you want to be sure selected tokens are not affected. This is particularly useful when specifying the id of a known token, such as moving a graphic from the gm layer to the objects layer, or coloring an object on the map.
Keithcurtis, So if the script is:&nbsp;!token-mod --set statusmarkers|Burning --ids @{target|token_id} Where is the best place to add&nbsp; &nbsp; --ignore-selected ?
Looks like --ignore-selected is included in the same group as --set.&nbsp; I think you can put it right after !token-mod in which case: !token-mod --ignore-selected --set statusmarkers|Burning --ids @{target|token_id}
1678560859
timmaugh
Pro
API Scripter
Those arguments can come in any order. The full set of parameters you supply are collected, then TokenMod does its thing.
Thank you!
1678565580
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Basically, if the instructions include "--" before a term, that term can go in any order. Terms without "--" need to go directly after the "--" term: !token-mod --set height|70px --ids -1234567890abcdef is the same as !token-mod&nbsp; --ids -1234567890abcdef&nbsp; --set height|70px
1678575592
The Aaron
Roll20 Production Team
API Scripter
Yup, there are only a few things that matters order-wise. --set defaulttoken will set the state of the default token with all the changes beforehand and none of the changes after.&nbsp; &nbsp; Setting represents and bar1_link and the like have some sensible interaction that depends on order.