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

Tokenmod to assign Hex status to target and Concentration status to caster

Hey all, So I am making a token macro that will allow my Warlock player to assign the Skull icon to their hex target and simultaneously give their own token the Concentration icon. I currently have: !token-mod {{ --sel --set statusmarkers|!stopwatch --set statusmarkers|!death-zone --ids @{target|token_id} }} But that sets both the Skull and the Stopwatch to the target. I just can't get the stopwatch on the selected token. Anyone able to help?
1730744910
timmaugh
Pro
API Scripter
Each TokenMod command affects one type of token designation -- by ID, character id, selection status, targeting, etc. And your entire TokenMod verbiage is all one long command (all of the arguments taken together). To get around that, you'll need 2 separate commands. Since the selected tokens is the default token designation, you don't need that for the first one: !token-mod --set statusmarkers|!stopwatch !token-mod --ids @{target|token_id} --set statusmarkers|!death-zone Put that in the same ability or macro and you should be good. Howerver, the above could run afoul of the Dropped Line Bug , where you might not get both commands to fire every time you run that ability/macro. To get around that, you can install the Metascript Toolbox and batch those 2 commands up: !{{   !token-mod --set statusmarkers|!stopwatch   !token-mod --ids @{target|token_id} --set statusmarkers|!death-zone }} However, once you have the Toolbox installed, you can use it to simplify a little of what you're doing. This is the version I would go with: !{{   !token-mod --set statusmarkers|!stopwatch   (^)!token-mod --set statusmarkers|!death-zone {^&select @{target|token_id} } }}
Ah ok I am definitely encountering that bug because that was the initial script that I was using and it would only assign the Skull market to my target. I will try installing the Metascript Toolbox. Thanks so much for the help!
1730748460
timmaugh
Pro
API Scripter
Just to be clear, what you probably had going was another bug where if you have a targeting reference in the line, your message no longer has any selected tokens. That's just the way Roll20 has worked forever. Don't know that they have any intention of fixing that. But the Toolbox will help get you sorted, for sure.
Hmmm, I just installed the Metascript Toolbox and used your last script but it still only assigns the Skull marker to the target :(
Ok I got it to work using the actual character ID instead of selected: !token-mod --ids -NuZmqC-Er3GdvF6vWLH --set statusmarkers|!stopwatch !token-mod --ids @{target|token_id} --set statusmarkers|!death-zone Thanks for the help!