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 merry + bright! 🎄
Create a free account

Tokenmod Send to Chat Reaction

So I've been trying different things with the send to chat reaction but there is one problem I keep running into. I can make it do whatever to the player token but I can't do anything to the "Reaction" token. For example of I want to add a status marker to the Reaction token or if I want it to be a trap and I want to move it to the foreground when a player steps on it. Everytime I try it ends up affecting the player token not the Reaction token. Can anyone help, especially with the moving layers one.
look into the api called BUMP
1766724860
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
If you get the token_id of the Reaction token, you can add a tokenmod command to the reaction using the --ids argument to change its layer. If this sounds like what you need and you'd like some assistance, say the word.
Novercalis said: look into the api called BUMP I need it to move to the foreground layer, Bump doesn't work with foreground yet
1766725009
timmaugh
Forum Champion
API Scripter
Think of these "Send to Chat" reactions as messages, and in these messages the instigating token is the token that is "selected". Many scripts (TokenMod included) look at (and operate on ) the set of selected tokens that are attached to the message when it comes through. So when TokenMod sees the StC reaction message, it is seeing the token that is selected is the instigator, not the trap/trigger/reaction token. For TokenMod, this can be fixed by configuring it so that players can use IDs and then adding the "--ids" argument to your line. Reference the id of the trap token, and TokenMod should affect that token instead: --ids|@{TOKEN_ID} If there is another script that you need to use but which doesn't provide a handy "--ids" argument, you can use the Metascript Toolbox (another script) to manipulate the set of selected tokens. In that case, you'd be adding this verbiage to your command: {&select @{TOKEN_ID} } That will make it seem, for the script you need to use, like the message has come through with the trap token as the selected token.
keithcurtis said: If you get the token_id of the Reaction token, you can add a tokenmod command to the reaction using the --ids argument to change its layer. If this sounds like what you need and you'd like some assistance, say the word. I tried that and it still moved the player token not the reaction token, unless I messed up !token-mod --set layer|foreground --ids|-OhNDvqHK9XFr2_V4tnS
1766725395

Edited 1766725414
timmaugh
Forum Champion
API Scripter
First confirm that TokenMod is configured to allow players to use ids by running: !token-mod --config That should get you something like: Make sure it says "ON". Then try this command in the StC Reaction box: !token-mod --set layer|foreground --ids|@{TOKEN_ID} If that doesn't work, post back with a screenshot of your Reaction setup (the Advanced tab of the token properties).
I pasted in the new line and it still didn't move the token, however this time it didn't move the player token but it also no longer procs the attack so I'm guessing it's not triggering.  
1766733288

Edited 1766739815
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hmm. Try geting the token_id manually, then hardcode it into the reaction. Even though the reference is supposed to work here, a hard code is more foolproof. !token-mod --set layer|foreground --ids|-1234567890abcdef
1766758602
timmaugh
Forum Champion
API Scripter
Master Azroth said: I pasted in the new line and it still didn't move the token, however this time it didn't move the player token but it also no longer procs the attack so I'm guessing it's not triggering.   OK, it could be that it isn't running because you don't have "Automatically Reset" turned on (and didn't "re-arm" it between tests)...? However, I have recreated this issue and will raise it with The Aaron. What I'm seeing is that the "--ids" argument is not altering TokenMod's behavior, even with having the "playerscanids" setting turned to "On". I'm still getting the instigating token being the one moved to the foreground layer. However, if you need an immediate fix, I have confirmed that the Metascript approach *does* work... so for now, you can install the Metascript Toolbox and change your command line to be: !token-mod --set layer|foreground {&select @{TOKEN_ID} } I'm not sure what is going on, but hopefully Aaron will be able to spot it.
keithcurtis said: Hmm. Try geting the token_id manually, then hardcode it into the reaction. Even though the reference is supposed to work here, a hard code is more foolproof. !token-mod --set layer|foreground --ids|-1234567890abcdef I tried that also, sorry I tried a bunch of things so I didn't post everything !token-mod --set layer|foreground --ids|-OhNDvqHK9XFr2_V4tnS
timmaugh said: Master Azroth said: I pasted in the new line and it still didn't move the token, however this time it didn't move the player token but it also no longer procs the attack so I'm guessing it's not triggering.   OK, it could be that it isn't running because you don't have "Automatically Reset" turned on (and didn't "re-arm" it between tests)...? However, I have recreated this issue and will raise it with The Aaron. What I'm seeing is that the "--ids" argument is not altering TokenMod's behavior, even with having the "playerscanids" setting turned to "On". I'm still getting the instigating token being the one moved to the foreground layer. However, if you need an immediate fix, I have confirmed that the Metascript approach *does* work... so for now, you can install the Metascript Toolbox and change your command line to be: !token-mod --set layer|foreground {&select @{TOKEN_ID} } I'm not sure what is going on, but hopefully Aaron will be able to spot it. I ran the tests with reset both on and off so that wasn't the problem. So I just tested this out (with reset both on and off) the attack triggered, the player token stayed on the token layer, but the reaction token stayed on the GM layer and didn't move.