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

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

1744293013
The Aaron
Roll20 Production Team
API Scripter
keithcurtis said: Baseopacity is an amazing bonus! Is it accessible through the GUI? Also,  renderAsScenery  is a bit opaque*. Does true indicate that it is on top of DL, or below? *Yeah, I did that. I'm incorrigible. Lol!  Cleared up the description. =D
1745072450

Edited 1745072463
The Aaron
Roll20 Production Team
API Scripter
TokenMod v0.8.84 Added support for Bar Permissions.  This controls the display of numbers over bars on tokens.  Here's the help: Bar Permission specifies who sees numbers overlaid on the bar. To not show any numbers, you can set it to  hidden  or  none . To only show it to editors (the default), you can set it to  editor  or leave the field blank. To make the numbers visible to everyone, you can set it to  everyone  or  all . Any other value is ignored. Available Bar Permission Properties: bar1_num_permission bar2_num_permission bar3_num_permission Hide the numbers from everyone: !token-mod --set bar1_num_permission|hidden !token-mod --set bar2_num_permission|none Showing only the editors the numbers: !token-mod --set bar3_num_permission|editor !token-mod --set bar2_num_permission| Making the numbers visible to everyone: !token-mod --set bar1_num_permission|everyone !token-mod --set bar3_num_permission|all
Not sure if it's a me problem, but it doesn't look like bar linking is working on 2024 sheets/Jumpgate. I've seen these macros working previously on older games, but maybe it's something I'm missing. Even just a: !token-mod --set bar1_link|hp is kicking up a fuss, but all the other sets I tried work, save for bar linking. Has it changed and I've not realised?
1749240330
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Aaron can answer more authoritatively, but I'm going to hazard a guess that to interact better with the 2024 sheets, the API engine needs to be set to "Experimental"?
Good eye, that was exactly the fix!
Hello, Is there a way to make it so that TokenMod can recognize "door" and "window" _type objects? I would like to manipulate some Dynamic Lighting doors and windows by ID to flip their isOpen, isLocked, and isSecret attributes and this seems like it should be doable here, but maybe not as straightforward as I'm thinking.
1749436920
The Aaron
Roll20 Production Team
API Scripter
Unfortunately, they don't provide selected IDs, which prevents you from targeting them. They're not graphics, so wouldn't be able to manipulate them with TokenMod natively. There are some script possibilities with it. 
Luce said: !token-mod --set bar1_link|hp is supper helpful, but does your mod happen to also have the ability to UN-link an attribute? I'm trying to apply attributes from one character sheet to several tokens for similar enemies without leaving them connected. Automating it would be nice! Just leave the bar#_link blank: !token-mod --set bar1_link|
I'm still trying to learn how all this stuff works and need a bit of advice, I want to set all characters to have default note of "Human" in the character sheets' GM Notes when created (because I inevitably forget to do it manually) for a "Detection/Recognition" Macro in Call of Cthulhu. Since I can't even begin to figure out how that would work I thought TokenMod would allow me to add the same default note to the Tokens' GM Notes sections. (The intent is to modify the ones that aren't Human as I'll remember to do those.) Does TokenMod offer the option to add an entry to GM Notes on a Token that is specifically attached to a character sheet, triggered when the Token is dragged on to the page? Am I trying to do something that is more easily achieved another way?
1750404783
Andrew R.
Pro
Sheet Author
No, that's not something Token-Mod can do without help from other Mods. You might be able to do it with ScriptCards, which can watch for events and run a ScriptCard macro when they happen. I haven't done this myself yet, because I don't need it for my 13th Age or Trail of Cthulhu games. ScriptCards can also modify Character Sheets as well as Tokens.
Andrew R. said: No, that's not something Token-Mod can do without help from other Mods. You might be able to do it with ScriptCards, which can watch for events and run a ScriptCard macro when they happen. I haven't done this myself yet, because I don't need it for my 13th Age or Trail of Cthulhu games. ScriptCards can also modify Character Sheets as well as Tokens. Thanks Andrew, I should have been clearer, I did figure out it would need something like ScriptCards to "fire" it. It's probably better if I talk to someone about the framework for a ScriptCard, then I can start figuring out how to fit the TokenMod details. If it can edit Character sheets GM Notes directly, that should make the initial idea I had easier.
1750925053

Edited 1750925501
In the experimental sandbox the DefaultToken cannot be set with !token-mod --set defaulttoken It can be set in the default sandbox.&nbsp; So i created two videos to demonstrate the issue In <a href="https://www.rhenenrpg.net/public/2025-06-04_16-13-46_Jumpgate_Default_Sandbox.mp4" rel="nofollow">https://www.rhenenrpg.net/public/2025-06-04_16-13-46_Jumpgate_Default_Sandbox.mp4</a> you can see that the default token is properly set. In <a href="https://www.rhenenrpg.net/public/2025-06-04_16-16-30_Jumpgate_Experimental_Sandbox.mp4" rel="nofollow">https://www.rhenenrpg.net/public/2025-06-04_16-16-30_Jumpgate_Experimental_Sandbox.mp4</a> you can see the default token is not set. I think the root cause is a BUG in setDefaultTokenForCharacter()
1752101215

Edited 1752112730
Pak
Pro
Running a session within Jumpgate using "experimental" mode on API&nbsp; and using 2024 DnD Roll20 character sheets. I'm unable to set the aura&nbsp; shape on tokens to square or circle. The command below just sets it to circular shape !token-mod --set aura1_radius|?{Radius } --on aura1_square So does the command below: !token-mod --set aura1_square Both of these commands work fine in non-jumpgate session.
1752117138
The Aaron
Roll20 Production Team
API Scripter
Hmm. Are you using the Default or Experimental API server?
Experimental API. Server. I couldn't get it to work on either one actually.
So it looks like TokenMod makes the toggle on the token pulldown itself, but the graphic doesn't update to square. I tried again this morning and went into the token setup menu and noticed that "square" was already chosen as the shape as the picture shows. But you can still see aura shape is circle.&nbsp;
1752156629
The Aaron
Roll20 Production Team
API Scripter
Oh! &nbsp;If you refresh the page, does the shape update? This is probably a Jumpgate bug. The update to the dropdown means the API server updated the state data, but the VTT client didn't make the update based on the change.&nbsp;
I refreshed the browser and it did not force the change. I was able to force the change by double clicking the token to open the token settings window and then clicking "save changes"
Is it possible for TokenMod to append text to a token attribute. Example, I want to add the word "alert" to the token tooltip. But I don't want to overwrite what's already in the tokens tooltip. The command below inserts "Alert" into the tooltip but overwrites what I had in tool tip prior to running the syntax. !token-mod --set tootip|Alert I glanced thru the TokenMod help files but may have missed the append function if it exists.
1752397038

Edited 1752397223
StéphaneD
Pro
Sheet Author
API Scripter
Hi Not sure this is the right spot to report this, since it looks like an issue with the legacy game engine and it won't be resolved anytime soon, but I thought I'd pass the bug along I am implementing interactions between the sheet I am developing (for an heroic fantasy french game system) and TokenMod. This is all legacy game &amp; sheet (no JG, no Beacon) Whenever a condition (blinded, restrained, etc...) is set or unset on the sheet, I have the condition effects sent to chat, some debuffs applied on various attributes if required, and a token-mod command sent to chat via the CRP functions (startRoll &amp; finishRoll) to set/unset token markers What I am seeing : - If the condition implies a debuff on an attribute&nbsp; linked to a token bar&nbsp; (namely the Defense attribute, same as AC for D&amp;D or Evasion for Daggerheart), the condition marker is actually displayed on the token only once in two. Set condition : marker added Unset condition : marker removed Set condition : no marker added (visually, I haven't tried to check the VTT objects) Unset condition : no visual change Set condition : marker added etc... - If the condition does not imply any debuff on the Defense attribute, or if the Defense attribute is not linked to a token bar, then the condition marker is displayed or removed as intended each time the condition is set or unset Here are the token-mod commands that are sent to set and unset a condition marker !token-mod --ignore-selected --ids @{Kamshaka|character_id} --set statusmarkers|+cof2-aveugle !token-mod --ignore-selected --ids @{Kamshaka|character_id} --set statusmarkers|-cof2-aveugle Again, I don't think that is an issue with TokenMod, but since The Aaron is now a member of the Roll20 team, maybe he can get the attention of whoever still works on the legacy engine and not JG or Beacon
1752408185
Andrew R.
Pro
Sheet Author
What happens if you use the toggle "!" instead of the "+" &amp; "-"?&nbsp;
1752418509
StéphaneD
Pro
Sheet Author
API Scripter
Hi, Andrew R. said: What happens if you use the toggle "!" instead of the "+" &amp; "-"?&nbsp; Exact same issue. Marker appears only once in two.
1752425553
Gold
Forum Champion
The Aaron said: Oh! &nbsp;If you refresh the page, does the shape update? This is probably a Jumpgate bug. The update to the dropdown means the API server updated the state data, but the VTT client didn't make the update based on the change.&nbsp; I have the same issue for Token Bars... in Jumpgate.&nbsp; I use !token-mod to apply Bar value, Bar max, and Bar visibility.&nbsp; The bars do not appear on the token in VTT.&nbsp; I (have to) double-click each individual token, click into 1 of the bar values-or-max (I see that my changes from Token-Mod are on the token settings), hit SAVE, now the bars appear on the token.&nbsp;
What is the command to change the field of vision of a token to 360 degrees.&nbsp; And what is the command to set directional lighting to 30 degree arc?&nbsp; I cannot find this anywhere.
1755675222
nesuprachy
Sheet Author
API Scripter
I noticed Roll20 added an optional 4th status bar. Can this bar also be set from TokenMod?
1756064508
timmaugh
Forum Champion
API Scripter
The fourth bubble is not yet accessible to the API, but I'm sure TokenMod (and other scripts) will get updated. (As a for instance, I already have the integration ready to go in Fetch; I'm just awaiting the availability of the data so that I can test and publish; I would think Aaron is in a similar position with TokenMod.)
awesome! cant wait to autmate that last bar/bubble :) to all you API peeps, thank you so much for all your work in keeping stuff updated!