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 .
×
May your rolls be chill this holiday season!
Create a free account

Tokenmod help, I want to place another token on the selected token

1764876358

Edited 1764878995
Somehow  TokenCondition  never hit my radar and today I am trying to make some effects for my spellbook. I created a custom FX called "Booming_Blade" { "angle": 0, "angleRandom": 180, "duration": 5, "emissionRate": 1000, "endColour": [125, 125, 255, 0], "endColourRandom": [0, 0, 0, 0], "lifeSpan": 30, "lifeSpanRandom": 0, "maxParticles": 500, "size": 15, "sizeRandom": 0, "speed": 7, "speedRandom": 0, "startColour": [90, 90, 175, 1], "startColourRandom": [0, 0, 0, 0.25] } i want to trigger on the selected NPC token. Then for it to place a token of animated thunder on that NPC, reminding me that if it moves, it will take the additional damage. I have an animated lightning storm that is named "Condition: Spell Booming Blade" I've tried a few variations such as: /fx Booming_Blade @{selected|token_id} !token-mod --new-token --name "Condition: Spell Booming Blade" --set left|left@{selected|token_id} top|top@{selected|token_id} but nothing seems to place the token.  What am I missing? I also tried things like: /fx Booming_Blade @{selected|token_id} !set-attr-on-selected --new-token --name "Condition: Spell Booming Blade" left|--offset left@{selected|token_id} top|--offset top@{selected|token_id}
1764880719
timmaugh
Forum Champion
API Scripter
Hi, sean c.... TokenMod won't "place" the token. It will only modify a token that's already on the board. For something like placing the token you'd want SpawnDefaultToken. As long as your Condition Spell Booming Blade character had the default token set up to use the correct token you want to use (Spawn will add the default token of a character to the map), your Spawn command would be something like: !Spawn --name|Condition Spell Booming Blade --qty|1 --size|1,1 --layer|object So you'd first select the token that will serve as the location for the new "Booming Blade" token, then run the above command. Since the token already locates to the position of the selected token, you don't need the "left" and "top". Those properties aren't available via native Roll20 syntax, anyway... but they are via the MetascriptToolbox. So far, everything above you can do with just Spawn. If you want to add the Metascript Toolbox, you can move the Booming Blade token with TokenMod and Toolbox syntax together. There are lots of ways this could work... in this example, I'll assume you don't want to have to select the Booming Blade token, but you want to send it to move to the location of a token you'll target with @{target} syntax: !token-mod --set left|@(@{target|Target to Match|token_id}.left) top| @(@{target|Target to Match|token_id}.top {&select @(Condition Spell Booming Blade.token_id)} This command could be useful if you've already go the Booming Blade token on the board, and you want to locate it to a token you target. Or if the Booming Blade token needs to follow the token it's "attached" to. Both Spawn and the Metascript Toolbox are available in the 1-click. If you have any trouble with these, post back.
TY Now I see what might be the problem. I wanted to use an animated asset I got from some monthly pro free thing.... It has to be something I upload. So now I have something to work with !! TY