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 .
Advertisement Create a free account Compendium in Game, Join Today

Error with token-mod and delay script

1605639287
I don't know if it's a syntax error but I can't get the token-mod to send the selected token to the gm layer when I use it in conjunction with delay, follow the commands used: !delay 1 --!cfx burst-acid @{target|destino|token_id} @{target|destino|character_id} !delay 2 --!sfx song:explo2 action:play unique:true volume:20 !delay 3 --!token-mod --ids @{selected|token_id} --set layer|gmlayer Does anyone know how to fix?
1605640897
The Aaron
Forum Champion
API Scripter
Do you have Players can IDS turned on for TokenMod?  By default, TokenMod treats the API user as unprivileged, like a regular user. 
1605643924
I am testing only with my GM profile I have not tested with players yet, I was unaware of this token-mod pattern.
1605644268
The Aaron
Forum Champion
API Scripter
Run: !token-mod --config players-can-ids once, that will probably fix it.
1605644434
It worked! Thank you! My games will be better thanks to you!
1605645241
The Aaron
Forum Champion
API Scripter
HAHAHA, no problem. =D
1605993408
Hey Aaron, could you help me again? My son's little space mouse needs to use his stealth and for that I would like to apply a fx effect, a sound and leave the token opaque, I am using the token-mod to exchange the current token for an opaque one (the opaque token is in my library), the code works except for the opaque token that doesn't appear. If I remove the! Delay from the mod token line then the opaque token appears but in a different order (it becomes opaque before the fx effect and the sound). Ah I used !token-mod --config players-can-ids !delay 1 --!sfx song:furtividade action:play unique:true volume:20 !delay 2 --!cfx burn-death @{selected|token_id} @{selected|token_id} !delay 2 --!token-mod --ids --set imgsrc|<a href="https://s3.amazonaws.com/files.d20.io/images/179847516/DGmGZaHIg7_z2mWkjKJ9_g/max.png?1605988681" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/179847516/DGmGZaHIg7_z2mWkjKJ9_g/max.png?1605988681</a>
1606003773

Edited 1606003812
The Aaron
Forum Champion
API Scripter
You need to pass the token id after --ids: !delay 1 --!sfx song:furtividade action:play unique:true volume:20 !delay 2 --!cfx burn-death @{selected|token_id} @{selected|token_id} !delay 2 --!token-mod --ids @{selected|token_id} --set imgsrc|<a href="https://s3.amazonaws.com/files.d20.io/images/179847516/DGmGZaHIg7_z2mWkjKJ9_g/max.png?1605988681" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/179847516/DGmGZaHIg7_z2mWkjKJ9_g/max.png?1605988681</a>