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

[Request] Locking Token Resize (and a toggle for removing resize modes)

November 12 (10 years ago)
Maybe this is mundane, but it bothers me.

I dislike that every time I select a token, it get super cluttered by the re-size nodes. Tokens are not big, and unless you've got big 'ole fat squares in your grid, when you select your Token, a lot of it is covered by the re-sizing nodes. I hate it, and I'd like to be able to turn them off.

Maybe that's too superficial, sure.
But, it bothers me in another way. Every time you go to move a token, you risk accidentally re-sizing it. To which, the default response seems to be "Oh just hit Ctrl+Z" Bah! Just let me turn re-sizing off! I have to custom indicate the size of my tokens. Snap is necessary, because a grid is necessary, and any time you accidentally re-size a token, it defaults back to it's weird stretched out wrong size.

Any suggestions? I haven't been in school for years. My java is beyond rusty.
November 12 (10 years ago)
The Aaron
Roll20 Production Team
API Scripter
Hi Stephen!

There isn't a way in the API to get rid of the resize handles, but we can do something about the resizing. I wrote a script a while back that would prevent players from moving their tokens (or rather move them back if they did), and the behavior you're after is very similar. I modified that script into a new script called SizeLock, which will allow you to toggle on/off the resizing of tokens. It can't prevent you from resizing them, but in the locked state it will automatically revert a size change (and fix the position if it moved because of the resize).


You'll need my isGM script: https://app.roll20.net/forum/post/920764/script-is...
Here is ScriptLock: https://gist.github.com/shdwjk/e24c6a251af7969291e...
November 12 (10 years ago)
Beautiful! This is definitely helpful. Thanks so much!
November 12 (10 years ago)
The Aaron
Roll20 Production Team
API Scripter
No worries! Let me know if you need anything else!
November 14 (10 years ago)
Okay maybe this is silly. I got isGM in happily, but how do I use ScriptLock? I can't find where to toggle it
November 14 (10 years ago)

Edited November 14 (10 years ago)
The Aaron
Roll20 Production Team
API Scripter
You just type these commands in the chat (or make some macros):

Lock the resizes with this:
!script-lock lock
Allow the resizes again here:
!script-lock unlock
You can display help with this:
!script-lock

Let me know if you need anything else!