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 .
×
D&D 2024 has arrived! Pre-order the new core rulebooks now and get an exclusive pre-order bonus for free!
Create a free account

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

The reference depends on which game and character sheet you are using.  For 5th Edition D&D using the 'D&D 5E by Roll20' character sheet, it would be: !token-mod --set tooltip|"@{selected|token_name}"
1643917123
timmaugh
Pro
API Scripter
Jarren said: The reference depends on which game and character sheet you are using.  For 5th Edition D&D using the 'D&D 5E by Roll20' character sheet, it would be: !token-mod --set tooltip|"@{selected|token_name}" I don't think this matters for the token name. The token is a token across all systems, with the same properties.
1643919188
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Try this. The space makes the macro think that it is the end of the statement: !token-mod --set tooltip|'@{selected|character_name}'
Thanks so much folks! Turns out token_name was what I needed. Just closed a 3 year long campaign and getting ready to start a new one so it seemed like a good time to tidy up my Roll20 macros. 
1643924180
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Ah, I took a gamble as to which it was you were looking for.
The Aaron said: I'd suggest building a chat menu with api command buttons for each face and speaking as option.  Thanks, took me a while but I found what you were talking about and figured it out. 
1644279864

Edited 1644280252
Nate
Pro
Hey all, (not an avid poster so I hope I didn't screw up some of the scripting posts) I guess I'm stumped. Going out of my way to make a cool effect for the Giant Spider. It has an ability to cast a web, restraining the character on a successful attack roll. I'm using power cards to implement a series of effects and successfully pulled it off. In this scenario, the Giant Spider attacks the bandit casting its web on the poor soul. Below is the Power Card Script, the chat output and the effect on the token: The above script produces a result in chat like this: and if the attack is successful, the token is changed from  So everything thus far is how i'd like it to be. Now the issue is once the webbing is destroyed, I'm looking for a way to restore the token back to it's original default. Opening up the character sheet and moving into the Edit Bio page, I can see the default token is still that of the bandit. I'd like to have a quick macro that can "de-web" (so to speak) that prompts a target ' @ { target | "something" } and then restores the modded token image (of the webbing) back to it's original default token image. Best I can tell there's no "reset" or "restore" in token mod. I also don't want to have to keep a list of all token id's of all players, I was hoping to have the script pick up on that automatically. Token ID isn't vital to me, I'd be willing to go for an image URL if necessary, but realistically I'd like the macro or token mod script to detect what the default token is supposed to be and restore it back to that image. More importantly this has to work on PC tokens since they'll be the ones I'm targeting, though i don't think it would make much difference in the nomenclature of the macro. I hope y'all can understand my babble lol I'm still quite new to all javascript, macros, api's, etc. To expand, I'm not really interested in using the rollable tables to change the face of a token since this effect would essentially be used on any/all player characters. Giving them the opportunity to flip their token sides to webbed creatures would spoil the surprise and be a bit distracting.  
1644280223
The Aaron
Roll20 Production Team
API Scripter
There is no reset for images, but you could add an image to the sides and set the side to the added image, then set it back to the previous image and remove the added one. 
1644280528

Edited 1644281547
Nate
Pro
Ok, yeah I just found a previous post where you go in depth on creating sides from 2 years ago, (sigh) i swear i looked hard through the forums, but i think i see where you're going with this. The idea would be in the power card script to create the multiple sides and changing the token to the new side and then have a separate macro that essentially switches the side back to the original and then deletes the web side. Something like that? Update: Beautiful. it worked! I updated the token action of the Giant Spider to create and use a new side showing the new token image. Then a simple macro using token mod to delete the extra side and bingo! Thanks Aaron.
1644281622
The Aaron
Roll20 Production Team
API Scripter
That's precisely correct, that is what I am suggesting.
Is there a way to change all creatures' and all characters' bar1_value to hit points with the color red, bar2_value to ac with the blue color, and bar3_value to dexterity + stealth modifier with the gray color via your api?
1644386859

Edited 1644386936
Andrew R.
Pro
Sheet Author
The bar colors are not set on the tokens, they're set in the game settings, so TokenMod has no control over them. What you can set the bars to represent depends on the character sheet you are using. 
I am using 5eOGL.
Andrew R. said: The bar colors are not set on the tokens, they're set in the game settings, so TokenMod has no control over them. What you can set the bars to represent depends on the character sheet you are using.  Knowing that I am using 5e OGL, do you know how I would set the third bard to represent either the dexterity base number or the passive stealth (10 + stealth modifier)? I still don't know how to make that happen across the board without manually changing every single token and replacing each sheet's token with the modified token. That is truly a lot of work, hence why a shortcut would be nice. By the way, I did figure out how to adjust the token colors via the game settings--thanks for the information regarding that.
1644523236
Mike W.
Pro
Sheet Author
I have noticed that each day when I check my scripts, the API has shut down due to a possible infinite loop. Restarting the API sandbox, with TokenMod as the only script, I see this: Spinning up new sandbox... "Loading character sheet data..." "Starting webworker script..." "Loading 1179 translation strings to worker..." "Starting webworker script..." "Loading 1179 translation strings to worker..." "-=> TokenMod v0.8.73 <=- [Wed Dec 15 2021 01:16:06 GMT+0000 (Coordinated Universal Time)]" "SyntaxError: Unexpected token '?'" "SyntaxError: Unexpected token '?' at eval (<anonymous>) at messageHandler (evalmachine.<anonymous>:713:6) at process.<anonymous> (/home/node/d20-api-server/node_modules/tiny-worker/lib/worker.js:65:55) at process.emit (events.js:310:20) at emit (internal/child_process.js:876:12) at processTicksAndRejections (internal/process/task_queues.js:85:21)" Seems to be a small issue here with a "SyntaxError: Could this be causing the shutdown of the API Sandbox?
1644529867
The Aaron
Roll20 Production Team
API Scripter
That is likely coming from the character sheet. Sheet Workers get executed in the API and errors in them like that can go unnoticed in the browser which is often more forgiving of bad code.
1644532027
Mike W.
Pro
Sheet Author
The Aaron said: That is likely coming from the character sheet. Sheet Workers get executed in the API and errors in them like that can go unnoticed in the browser which is often more forgiving of bad code. OK thanks for the information.
1644689712
Mike W.
Pro
Sheet Author
I have a real quick question, only because I cannot find the answer in the Help output. For a macro in Abilities, can TokenMod set the Checkbox for ‘Show in Macro Bar’, checked/uncheck, using code? If so, what is that code? Thanks for a GREAT script.
Can TokenMod be used to flip over cards on the VTT?   If not can someone point me to an API that can? 
1644693710

Edited 1644694059
The Aaron
Roll20 Production Team
API Scripter
Kilter  said: Can TokenMod be used to flip over cards on the VTT?   If not can someone point me to an API that can?  Yes!  Cards are multisided tokens, you just need to increment them currentSide to flip them.  Note that this will only work on decks you've created with User Library graphics.  If they come from the marketplace, the API can't change them. !token-mod --set currentside|+
1644694098
The Aaron
Roll20 Production Team
API Scripter
Mike W. said: I have a real quick question, only because I cannot find the answer in the Help output. For a macro in Abilities, can TokenMod set the Checkbox for ‘Show in Macro Bar’, checked/uncheck, using code? If so, what is that code? Thanks for a GREAT script. No, TokenMod is only set up to deal with Tokens, not abilities.  Furthermore, that setting isn't actually exposed to the API, so I can't even write you a one-off to do it, despite wanting to. =(
1644717291
Mike W.
Pro
Sheet Author
The Aaron said: Mike W. said: I have a real quick question, only because I cannot find the answer in the Help output. For a macro in Abilities, can TokenMod set the Checkbox for ‘Show in Macro Bar’, checked/uncheck, using code? If so, what is that code? Thanks for a GREAT script. No, TokenMod is only set up to deal with Tokens, not abilities.  Furthermore, that setting isn't actually exposed to the API, so I can't even write you a one-off to do it, despite wanting to. =( That is ok, I appreciate your response. Please keep up the great scripting you do.
So I am using the Pathfinder Community Sheet, would it be possible to write a macro that uses the character size (Tiny, small, medium, large, huge) and resets the token size appropriately?
1644774885
The Aaron
Roll20 Production Team
API Scripter
Pathfinder Community sheet stores the sizes from 8 (fine) to -8 (colossal).  The distribution is not linear compared to the scale you would want the token set to.  You might be able to find a sum of terms formula to get the right sizing from it, but it would be somewhat complicated.  It would be easier to write a little one-off script that would either set the size when you drag the token in or change the size on the character sheet, or have a command for doing the same. What dimensions would you use for each size? Size Scale Colossal 6x6 Gargantuan 4x4 Huge 3x3 Large 2x2 Medium 1x1 Small 1/2 x 1/2 Tiny ? x ? Diminutive ? x ? Fine ? x ?
1644785728
vÍnce
Pro
Sheet Author
We just manually use a tokenmod macro to bump token size up/down example; #TokenSizex2 !token-mod --set width|*2 height|*2 #TokenSize½ !token-mod --set width|/2 height|/2 FYI: the PF community sheet uses the attribute @{default_char_size} which is the default(obviously...) and then uses @{size} for the current size.  I suppose you would need to determine the # of "steps" from the current size to the new current size in order to determine the appropriate token ratio to apply?
1644785802
The Aaron
Roll20 Production Team
API Scripter
If you're setting it to the same size for both width and height, you can use the scale property to do it in one: !token-mod --set scale|*2
1644785908
vÍnce
Pro
Sheet Author
+1
1644848960
timmaugh
Pro
API Scripter
The Aaron said: Pathfinder Community sheet stores the sizes from 8 (fine) to -8 (colossal).  The distribution is not linear compared to the scale you would want the token set to.  You might be able to find a sum of terms formula to get the right sizing from it, but it would be somewhat complicated.  It would be easier to write a little one-off script that would either set the size when you drag the token in or change the size on the character sheet, or have a command for doing the same. What dimensions would you use for each size? Size Scale Colossal 6x6 Gargantuan 4x4 Huge 3x3 Large 2x2 Medium 1x1 Small 1/2 x 1/2 Tiny ? x ? Diminutive ? x ? Fine ? x ? If that's the table of scale sizes, you could establish that as a Mule table and reference it with Muler. And (if I understand things correctly) since the default_char_size attribute is available, you could retrieve your value, do the math, and set the token size. Of course, this doesn't get you a whole lot, since at that point you could just as well have a roll query that presented the same table to you... you pick the scale and it applies the math. The one benefit to a mule table would be that you could do things like "incremental" shifts. If something wanted to move 2 levels relative to its current size, you could track the current position (size relative to the table), and return the appropriate new value. If that seems like something you'd want, I can work up an example.
1644885157

Edited 1644886381
Is there a way to set the token's light color with token-mod? I've tried using the following command !token-mod --set low_light_color|#00ff00 thinking that would work because using the following command !token-mod --set tint_color|#00ff00 works for changing token's tint, but it didn't work for setting the low light color. I also tried the following without success !token-mod --set low_color|#00ff00
1644888672
The Aaron
Roll20 Production Team
API Scripter
You're close, the option is lightColor: !token-mod --set lightColor|#00ff00 TokenMod's arguments are the property names for the token.  There are some unfortunate inconsistencies between the naming of various of the properties.  I have some plans for addressing that, but never enough time to get it done. =/
The Aaron said: You're close, the option is lightColor: !token-mod --set lightColor|#00ff00 TokenMod's arguments are the property names for the token.  There are some unfortunate inconsistencies between the naming of various of the properties.  I have some plans for addressing that, but never enough time to get it done. =/ Thank you, I finally did find your reference in Token-mod help.
I see a whole lot about inline rolls, but is there a way to perform inline commands much like ChatSetAttr can do? I'm in a game where in the future I'll be able to have multiple summons of the same type so they are just differentiated by being multiple tokens and to put it simply these tokens will have a form of life steal so i would like it that when one attacks and the attack gets displayed in the chat it also automatically adds the health to the tokens health bar but without using the $[[0]] to call back the result of previous rolls im stumped as to how to reuse the same roll result besides by using inline commands, and all information about reusing roll results mostly ends in someone saying "you need the API for that" and then not specifying
1646064542
The Aaron
Roll20 Production Team
API Scripter
There's probably a solution using Tim's ZeroFrame.  I'd suggest posting a general question for what you need in the API Forum, and Tim will see it (or I'll send him a link to it once I do. =D)
1646068446

Edited 1646099945
timmaugh
Pro
API Scripter
You'll want to use Plugger. Plugger can dispatch an inline command (using constructions -- like inline rolls and query results -- from the outer command). If the dispatched-command is defined as a "plug-in" to Plugger, Plugger can return a value from that command to that location in the outer command, but for what you need, it doesn't sound like that's necessary. Assuming the "health bar" for your token is bar 1, and assuming the token gets an amount of life equal to the damage they do, you could have something like: !SomeAttackScript --dice|[[2d20]] {&eval}token-mod --set bar1|+$[[0]] --ids|@{selected|token_id}{&/eval} That would use the results of the first inline roll (the only one) in a sub-call to TokenMod (everything between the {&eval} and {&/eval} tags). If you need to perform math on that inline roll for the Plugger call (for instance, if the life steal is some equation based on the roll result -- like 50% of the value), then you have 2 options. Option 1 First, you can wrap your inline rolls into a single stack and extract them where needed: [[ floor([[2d20]]/2)]] Since the Plugger syntax is removed from your outer command line after it runs, and since this roll is what the embedded Token-Mod call would want, you can put the Plugger statement before the outer script needs the inner roll: !SomeAttackScript {&eval}token-mod --set bar1|+[[ floor([[2d20]]/2)]] --ids|@{selected|token_id}{&/eval} --dice|$[[0]] ...or I believe you can use "computed" with the original order (where the inner roll is needed before it is calculated): !SomeAttackScript --dice|$[[0.computed]] {&eval}token-mod --set bar1|+[[ floor([[2d20]]/2)]] --ids|@{selected|token_id}{&/eval} Option 2 You won't always be able to conduct all of the math you want to do with inline rolls just by stacking them. There are times when you need the values for more computations than the Roll20 parsers allow. For times like that (or if you just prefer to work differently), your other option would be to use ZeroFrame to extract roll values and/or defer secondary rolls: !SomeAttackScript --dice|[[2d20]] {&eval}token-mod --set bar1|+ [\][\]floor($[[0]].value/2)\]\] --ids|@{selected|token_id}{&/eval} Extension by SelectManager The above examples use the --ids argument of TokenMod because it is being called by another API script. In those cases, the message doesn't contain a set of selected tokens, so you have to instruct TM what tokens to take action on. However, if you have SelectManager installed, you won't have to include that --ids argument for TokenMod, because by the time TokenMod sees the message, SelectManager will have supplied the selected token(s) to the message working its way through the set of installed scripts. Extension by Fetch Fetch is yet another metascript that can retrieve token- or character-info *after* Roll20 parsers have had at the message. This can be important if you need to handle token-specific actions, and need to pull differentiated info into your command line. Most times this would be a case where you were using the forselected handle of SelectManager to issue separate Token-Mod calls for each selected token (if a bunch of tokens might get a benefit from the life steal, for instance). I don't think this is immediately applicable to your situation, so I won't clutter this with an example other than just to mention that the possibility is there.
timmaugh said: You'll want to use Plugger. Plugger can dispatch an inline command (using constructions -- like inline rolls and query results -- from the outer command). If the dispatched-command is defined as a "plug-in" to Plugger, Plugger can return a value from that command to that location in the outer command, but for what you need, it doesn't sound like that's necessary. Assuming the "health bar" for your token is bar 1, and assuming the token gets an amount of life equal to the damage they do, you could have something like: !SomeAttackScript --dice|[[2d20]] {&eval}token-mod --set bar1|+$[[0]] --ids|@{selected|token_id}{&/eval} That would use the results of the first inline roll (the only one) in a sub-call to TokenMod (everything between the {&eval} and {&/eval} tags). If you need to perform math on that inline roll for the Plugger call (for instance, if the life steal is some equation based on the roll result -- like 50% of the value), then you have 2 options. Option 1 First, you can wrap your inline rolls into a single stack and extract them where needed: [[ floor([[2d20]]/2)]] Since the Plugger syntax is removed from your outer command line after it runs, and since this roll is what the embedded Token-Mod call would want, you can put the Plugger statement before the outer script needs the inner roll: !SomeAttackScript {&eval}token-mod --set bar1|+[[ floor([[2d20]]/2)]] --ids|@{selected|token_id}{&/eval} --dice|$[[0]] ...or I believe you can use "computed" with the original order (where the inner roll is needed before it is calculated): !SomeAttackScript --dice|$[[0.computed]] {&eval}token-mod --set bar1|+[[ floor([[2d20]]/2)]] --ids|@{selected|token_id}{&/eval} Option 2 You won't always be able to conduct all of the math you want to do with inline rolls just by stacking them. There are times when you need the values for more computations than the Roll20 parsers allow. For times like that (or if you just prefer to work differently), your other option would be to use ZeroFrame to extract roll values and/or defer secondary rolls: !SomeAttackScript --dice|[[2d20]] {&eval}token-mod --set bar1|+ [\][\]$[[0]].value/2\]\] --ids|@{selected|token_id}{&/eval} Extension by SelectManager The above examples use the --ids argument of TokenMod because it is being called by another API script. In those cases, the message doesn't contain a set of selected tokens, so you have to instruct TM what tokens to take action on. However, if you have SelectManager installed, you won't have to include that --ids argument for TokenMod, because by the time TokenMod sees the message, SelectManager will have supplied the selected token(s) to the message working its way through the set of installed scripts. Extension by Fetch Fetch is yet another metascript that can retrieve token- or character-info *after* Roll20 parsers have had at the message. This can be important if you need to handle token-specific actions, and need to pull differentiated info into your command line. Most times this would be a case where you were using the forselected handle of SelectManager to issue separate Token-Mod calls for each selected token (if a bunch of tokens might get a benefit from the life steal, for instance). I don't think this is immediately applicable to your situation, so I won't clutter this with an example other than just to mention that the possibility is there. Thank you both for the help this has been really informative! I definitely think this will work for me and I shall be tinkering with it to get the hang of it, if I do run into anything that I can't seem to figure out should I make a post on the API forum about it or could I potentially send you a message tim?
1646100037
timmaugh
Pro
API Scripter
Either way... though if it's something others looking to follow in your footsteps could benefit from, a post is better. =D (Also, I edited my post just above because I had forgotten the floor() function of my ZeroFrame example... just in case you try exactly what I typed.)
1646271660
The Aaron
Roll20 Production Team
API Scripter
Update v0.8.74 &nbsp;-- Added support for lockMovement. !token-mod --flip lockMovement You can also use the aliases lock_movement or lockmovement. Available in my github now:&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> or in 1-click next week.&nbsp; Cheers!
Thanks, Aaron; you’re so prompt! :D
1646272237
The Aaron
Roll20 Production Team
API Scripter
I do what I can. =D
The Aaron said: Update v0.8.74 &nbsp;-- Added support for lockMovement. !token-mod --flip lockMovement You can also use the aliases lock_movement or lockmovement. Available in my github now:&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> or in 1-click next week.&nbsp; Cheers! I like this but would there be a way to make a command that behaves like tokenlock did?&nbsp; Where it locks all tokens on the map?&nbsp; Am thinkin specifically for when traps trigger and I want everything to freeze.&nbsp;&nbsp;
1646297559

Edited 1646297591
The Aaron
Roll20 Production Team
API Scripter
Not via TokenMod right now, but I could write you a one-off that does that pretty easily.&nbsp;
The Aaron said: Not via TokenMod right now, but I could write you a one-off that does that pretty easily.&nbsp; If you did do this it might be important that you know it would be used in Its a trap api if that matters for it to work?&nbsp; I use the old tokenlock script there, in the api fields for its a trap I just put !tl
1646306317
Andreas J.
Forum Champion
Sheet Author
Translator
Wonder it it's worth the effort to refactor TokenLock &amp; MapLock to now properly lock things down using the new API feature. I did notice that you can't (yet?) lock multiple selected tokens at the same time (unless you use TokenMod or any API doing things).
Does either of those just lock the position of a token. I have a problem with doors being dragged off, I tried the new feature, but I can't interact with a "locked" token, it just puts this big icon of a lock.&nbsp;
1646318058
The Aaron
Roll20 Production Team
API Scripter
Updating MapLock and TokenLock is on my list.&nbsp; Al e. can you go into more detail about what's happening?
1646321192

Edited 1646321232
DM Eddie said: I like this but would there be a way to make a command that behaves like tokenlock did?&nbsp; Where it locks all tokens on the map?&nbsp; Am thinkin specifically for when traps trigger and I want everything to freeze.&nbsp;&nbsp; I just updated my 'Lock' macro (previously using MapLock and TokenLock) to just use the new locking feature in TokenMod. After creating a map on a page and getting everything set, I just select all (Ctrl-A) on the map layer and use my lock macro (which is just&nbsp;!token-mod --on lockMovement). This works great to prevent accidental moving of the map image later on. You could do the same thing by just selecting everything on the Object layer and then using the TokenMod lock after a trap is triggered. But for locking just the player tokens, I found it was easier for me to just put the character_id's in an attribute on my MacroMule character (which stores the macros anyways) and just reference the attribute in the macro. That way I can update the 'AllPlayersIDList' attribute if I ever change characters or if they add familiars, etc. ?{Lock or Unlock | Lock,!token-mod --on lockMovement | Unlock,!token-mod --off lockMovement | Lock Players,!token-mod --ids @{MacroMule|AllPlayersIDList} --on lockMovement| Unlock Players,!token-mod --ids @{MacroMule|AllPlayersIDList} --off lockMovement} AllPlayersIDList @{CHARACTER1|character_id} @{CHARACTER2|character_id} @{CHARACTER3|character_id}&nbsp;... This is functionally the same as the TokenLock script, because it only affected tokens that had something set in the 'controlled by' field.&nbsp; I also like that I can still use 'Vision Crumbs' without inadvertently turning off the locking when using a macro to unlock all player-controlled tokens. So that's just an idea that might be helpful!
The Aaron said: Updating MapLock and TokenLock is on my list.&nbsp; Al e. can you go into more detail about what's happening? I wanted to lock doors in place, but still have them able to be interacted with. Using your door script, I like to have normal doors tht the players can open and close, locked doors I drop to the map layer until unlocked. The players tend to drag doors around for some reason and I have to figure out where they came from and put them back. The new feature locks them in place, but when you click on them a big "Locked" logo appears, if you unlock them it allows the players to drag them away. I was asking if the token lock macro allowed interaction, but not movement. I will have time to test it out over them weekend, but I figured one of the illuminated would be able to answer and save the testing time.
al e. said: I wanted to lock doors in place, but still have them able to be interacted with. Using your door script, I like to have normal doors tht the players can open and close, locked doors I drop to the map layer until unlocked. The players tend to drag doors around for some reason and I have to figure out where they came from and put them back. The new feature locks them in place, but when you click on them a big "Locked" logo appears, if you unlock them it allows the players to drag them away. I was asking if the token lock macro allowed interaction, but not movement. I will have time to test it out over them weekend, but I figured one of the illuminated would be able to answer and save the testing time. What 'interaction' do you want your players to have with doors?&nbsp; Typically doors are a combination of two things: an image on the map layer (either as part of the map, or a separate image on top of the map that can be 'removed'), with a DL line on the Dynamic Lighting layer.&nbsp; I don't think I've seen any cases where the Door image was on the Object layer. Scripts such as DoorKnocker do not need the Door image to be on the Object layer. The only way your players will be able to 'interact' with doors is if they are a token on the Object layer that the players have 'Edit and Control' access over -- what is the purpose of giving them that access to a Door token/image?&nbsp;&nbsp;
1646339467

Edited 1646339508
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
al e. &nbsp;said: &nbsp;I was asking if the token lock macro allowed interaction, but not movement. I will have time to test it out over them weekend, but I figured one of the illuminated would be able to answer and save the testing time. The token lock (and map lock) scripts are workarounds. They do not actually prevent you from changing anything, but they immediately reverse the change. They do have the advantage over the new lock feature of preventing re-sizing and rotation.