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 .
×

[Script Update] TokenMod -- An interface to adjusting properties of a token from a macro or the chat area.

1767128690
Sandwich
Elite
Marketplace Creator
That's the ticket! Thanks for the help. Happy new year!
1769333760
StéphaneD
Pro
Sheet Author
API Scripter
Hello Any plan to support the 'gm_only_tooltip' property in a future release of the script ?
1769354928

Edited 1769354960
The Aaron
Roll20 Production Team
API Scripter
Oh!&nbsp; I missed that I hadn't added that yet. TokenMod v0.8.86 : Added support from gm_only_tooltip (Thanks&nbsp; StéphaneD ) Should be in the 1-click this week, but you can grab it now from:&nbsp; <a href="https://github.com/shdwjk/Roll20API/blob/master/TokenMod/TokenMod.js" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/TokenMod/TokenMod.js</a> StéphaneD said: Hello Any plan to support the 'gm_only_tooltip' property in a future release of the script ?
1769421391

Edited 1769421413
StéphaneD
Pro
Sheet Author
API Scripter
That's how I had changed the script code in my game, but figured out it would be easier to signal it here instead of doing a pull request and all that jazz :) Thx The Aaron :)
1770525982
Mike W.
Pro
Sheet Author
I have been using TokenMod for years, but have been away from Roll20 for over a year. Now I am back.&nbsp; My issue is with Toke Rotation . I noticed that Jumpgate now defaults to tokens rotating 15 degrees using the E key plus the Mouse Scroll Wheel.&nbsp; I used the following ToknMod command to set it to 30 degrees: !token-mod --set rotation|30 However, this doesn't seem to work. It still rotates at 15 degrees. Can you tell me what I am doing wrong, using the wrong syntax or command, or is it no longer supported?
1770568071
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hey Mike! That command is a run-time operation that just rotates the token to 30 degrees. It doesn't change the rotation interval.
1770574109

Edited 1770574305
Gold
Forum Champion
Mike W. said: I have been using TokenMod for years, but have been away from Roll20 for over a year. Now I am back.&nbsp; My issue is with Toke Rotation . I noticed that Jumpgate now defaults to tokens rotating 15 degrees using the E key plus the Mouse Scroll Wheel.&nbsp; I used the following ToknMod command to set it to 30 degrees: !token-mod --set rotation|30 However, this doesn't seem to work. It still rotates at 15 degrees. Can you tell me what I am doing wrong, using the wrong syntax or command, or is it no longer supported? Change it to this, Mike:&nbsp; !token-mod --set rotation|+30 and I think this is what you're looking for EDIT: This will not change the Roll20 mousewheel token-spinning interface to always rotate at 30 intervals (which is what keithcurtis seems to have understood you were trying to do), but instead this will create a TokenMod button (that you can set up as a command line, or macro button or even Token Action) that will let you spin your Hex Tokens by 30 degree intervals. I believe Mike is aware of that&nbsp;
1770589780
Mike W.
Pro
Sheet Author
Oh darn, I misunderstood then. I was hoping it would change the Roll20 rotation interval.&nbsp; Thanks for the quick replies.
1770772898
Gold
Forum Champion
Mike W. said: Oh darn, I misunderstood then. I was hoping it would change the Roll20 rotation interval.&nbsp; Thanks for the quick replies. Just set up a macro button with that TokenMod command, and you should be able to rotate how you want just-about as easily.&nbsp; In my game I have 2 token-action macro buttons like that. Rotate Clockwise, and Rotate Counterclockwise.&nbsp;
1770779918
Mike W.
Pro
Sheet Author
Gold said: Mike W. said: Oh darn, I misunderstood then. I was hoping it would change the Roll20 rotation interval.&nbsp; Thanks for the quick replies. Just set up a macro button with that TokenMod command, and you should be able to rotate how you want just-about as easily.&nbsp; In my game I have 2 token-action macro buttons like that. Rotate Clockwise, and Rotate Counterclockwise.&nbsp; Not a bad idea, thanks.
1772768965

Edited 1772773282
The Aaron
Roll20 Production Team
API Scripter
TokenMod v0.8.87 : Added support&nbsp;aura1_options and aura2_options, and support for transparent colors on auras.&nbsp;&nbsp; The aura1_options and aura2_options properties can have the value of "square" or "circle" and have the same effect as setting aura1_square to true or false.&nbsp; This fixes and issue with the Jumpgate games having a different representation for aura shape.&nbsp; aura1_square and aura2_square also work correctly again! Colors can be html colors like #ff000088 or #f008, rgb(0.5,0.1,0.0,.5) or rgb(255,128,0,50), hsv(1.0,0,0.5,0.3) or hsv(255,100,100,50).
I have a countdown timer token, where I use multisided token to track the countdown. The macro script I use allows me to tick the timer up or down !token-mod --set currentside|+ !token-mod --set defaulttoken and the set defaulttoken obviously updates default token for the timer. But I have the countdown timer on multiple maps and it doesn't update those tokens already on other maps. Is there a way to push the change to all instances of the token? I have thought about using one of the token bars to track it, because if you have a linked attribute like HP, I know it adjusts all maps. But not sure how I could then get it to update the token side.
1773546909

Edited 1773601891
You won't be able to do this natively with TokenMod, unless you manually get all of the Token IDs for each countdown timer token and input them into your command macro. &nbsp; Edit: You can use Aaron's suggestion below with @{character_id} without relying on Token IDs. You shouldn't need to set the default token each time you run the command. Setting the default token simply updates the token that gets pulled out of the journal, but it won't affect any tokens already on the VTT. If you have installed Timmaugh's Metascript suite, then you can select all countdown timer tokens pretty easily: If your tokens are named 'Countdown Timer', you could use this:&nbsp; !token-mod --ids {&amp; select Countdown Timer*} --set currentside|+&nbsp; However, the issue here is that all of your Countdown Timers may not already be on the same side, so you'll want a way to reference which side is currently displayed on one of them (the one you're currently selecting) and then update all of them to be one more than that, which requires a couple other Metascripts (Fetch and MathOps). There might be a better (more streamlined) way to do this, but this should work: !token-mod --ids {&amp; select Countdown Timer*} --set currentside|{&amp;math @(selected.side) + 1} !token-mod --ids {&amp; select Countdown Timer*} --set currentside|+ The first line makes all 'Countdown Timer' tokens to have the same side. The second line increments that side by 1. (The reason the first line has the +1 in the &amp;math is because TokenMod indexes the side number starting at 1, but Roll20 actually indexes starting at 0, which is what MathOps uses.)
1773589912

Edited 1773590090
The Aaron
Roll20 Production Team
API Scripter
So, it sounds like your countdown timer is already associated with a character, so you could actually do this with TokenMod.&nbsp; Assuming the character is named "Countdown Timer", this should work to adjust all instances at once: !token-mod --set currentside|+ --ids @{Countdown Timer|character_id} --ids can take character ids, in which case it will find all tokens representing that character and apply the change to all of them. Jarren's point about all the timers needing to be on the same side stands though, so you might either have to manually adjust it or do some MathOps work as he points out)
1773590051
The Aaron
Roll20 Production Team
API Scripter
TokenMod v0.8.88 : Fixed bug preventing setting tint_color to transparent (Thanks DeadMan!)
1773601776

Edited 1773601918
The Aaron said: So, it sounds like your countdown timer is already associated with a character, so you could actually do this with TokenMod.&nbsp; Assuming the character is named "Countdown Timer", this should work to adjust all instances at once: !token-mod --set currentside|+ --ids @{Countdown Timer|character_id} --ids can take character ids, in which case it will find all tokens representing that character and apply the change to all of them. Jarren's point about all the timers needing to be on the same side stands though, so you might either have to manually adjust it or do some MathOps work as he points out) [facepalm] I don't know why I forgot about using @{character_id}! For some reason I thought it would only work on the current page by default. So that totally works if they are all linked to a 'Countdown Timer' character . One benefit of the Metascript approach is that the tokens do not need to be linked to a character sheet, and simply need the token name to be 'Countdown Timer', if that is what your current setup is. It also allows for you to have multiple separate timers that are all linked to a single character. E.g. 'Lab Countdown Timer' versus 'Prison Countdown Timer' could have separate macros that update them separately, even if they are both linked to the same character sheet.&nbsp;
1774727255

Edited 1774817876
The Aaron said: TokenMod v0.8.88 : Fixed bug preventing setting tint_color to transparent (Thanks DeadMan!) Hello, it seems that this version doesn't work at all in my legacy 5e game, not even&nbsp; !token-mod --help &nbsp;command loads. I reverted to the 0.8.19 version and it works as normal there. Nvm this must have been an issue that was fixed by restarting the sandbox
JtanK said: Hello, it seems that this version doesn't work at all in my legacy 5e game, not even&nbsp; !token-mod --help &nbsp;command loads. I reverted to the 0.8.19 version and it works as normal there. Did you try restarting your sandbox when it wasn't working? Did you see any error messages in the console log? Were other scripts working?&nbsp;
Jarren said: JtanK said: Hello, it seems that this version doesn't work at all in my legacy 5e game, not even&nbsp; !token-mod --help &nbsp;command loads. I reverted to the 0.8.19 version and it works as normal there. Did you try restarting your sandbox when it wasn't working? Did you see any error messages in the console log? Were other scripts working?&nbsp; Oops, looks like a false alert from me indeed, because I set the version back to latest and it's working as expected. I guess just restarting the sandbox would have worked as well, but I didn't think of it as I was mid-game. Thanks.&nbsp;