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] MapLock -- Provides individual graphic locking as well as highlighting.

February 28 (10 years ago)

Edited February 14 (9 years ago)
The Aaron
Roll20 Production Team
API Scripter
Update v0.3 -- Fixed bug that prevented the core feature of the script... whoops! (Thanks Ziechael!)

Prevents moving/resizing/rotating graphics that have been locked. (Thanks Ziechael for the idea!)

Commands

  • !map-lock -- this is the command for this script. Here are the arguments:
    • lock -- adds selected graphics to the list of locked graphics. Will lock any sort of graphic on any layer, preserves across layers (but not across copies!).
    • unlock -- removes the selected graphics from the list of locked graphics.
    • toggle-highlight -- turns on a red tint on all locked graphics, making it easy to see what is locked and unlocked and providing contrast for things you're moving about on top of them. (Existing tinting is preserved.)
    • --help (or no arguments) -- shows the help output in chat.



Git: https://github.com/shdwjk/Roll20API/blob/master/Ma...
If you use my scripts, want to contribute, and have the spare bucks to do so, go right ahead. However, please don't feel like you must contribute just to use them! I'd much rather have happy Roll20 users armed with my scripts than people not using them out of some sense of shame. Use them and be happy, completely guilt-free!
Disclaimer: This Patreon campaign is not affiliated with Roll20; as such, contributions are voluntary and Roll20 cannot provide support or refunds for contributions.
February 28 (10 years ago)
Ziechael
Forum Champion
Sheet Author
API Scripter

The Aaron said:

Prevents moving/resizing/rotating graphics that have been locked. (Thanks Ziechael for the idea!)
Never ever going to say no to a credit (hence forcing my way onto a colleagues film end credits by supplying rudimentary script edits and duplication services ;) ) but this is an idea i selfishly needed and had seen suggested previously... then reminded Aaron that he could *nudge nudge wink wink* make it with ease... however, disclaimer aside, you are welcome =D

On a more roll20 appropriate note, having tested all the features of this script already it is awesome for klutz's like me who constantly move their carefully aligned map instead of that pesky torch token!

Great work as always, thanks Aaron!
February 28 (10 years ago)
vÍnce
Pro
Sheet Author
And... it can be marked off of Aaron's backlog. :-)
February 28 (10 years ago)
Ziechael
Forum Champion
Sheet Author
API Scripter
1 down, a billion to go!
February 28 (10 years ago)
Needs to be a built-in feature. :D
February 28 (10 years ago)

Edited February 28 (10 years ago)
vÍnce
Pro
Sheet Author
I might grab this one for locking down my map "descriptor" tokens. I place tokens above my map on the token layer, controlled by all players. They can use the zoom (Z) feature to view/read more detail about an area of the map. Sometimes the tokens can get moved around accidentally. I usually copy the tokens to the GM layer of the map so that I can easily move the tokens back to their proper location in case they get moved too far. I think this might work very nicely. Thanks Ziechael and The Aaron.
February 28 (10 years ago)

Edited February 28 (10 years ago)
Ziechael
Forum Champion
Sheet Author
API Scripter

Vince said:

Thanks Ziechael and The Aaron.
Again, i did little more than ask Aaron nicely to write the script... but you are welcome Vince =D

February 28 (10 years ago)
The Aaron
Pro
API Scripter
Update v0.3 -- Fixed bug that prevented the core feature of the script... whoops! (Thanks Ziechael!)
February 28 (10 years ago)
The Aaron
Pro
API Scripter

Vince said:

I might grab this one for locking down my map "descriptor" tokens. I place tokens above my map on the token layer, controlled by all players. They can use the zoom (Z) feature to view/read more detail about an area of the map. Sometimes the tokens can get moved around accidentally. I usually copy the tokens to the GM layer of the map so that I can easily move the tokens back to their proper location in case they get moved too far. I think this might work very nicely. Thanks Ziechael and The Aaron.

It would work just fine for that. =D
February 28 (10 years ago)
Ziechael
Forum Champion
Sheet Author
API Scripter
v0.3 hits the nail on the head... job done.
March 09 (10 years ago)

HoneyBadger said:

Needs to be a built-in feature. :D

+1
March 09 (10 years ago)
I didn't even know you could tint tokens. Now that's handily cool.
March 10 (10 years ago)

Edited March 10 (10 years ago)
Ziechael
Forum Champion
Sheet Author
API Scripter

Ken L. said:

I didn't even know you could tint tokens. Now that's handily cool.

Tell me about it, i didn't realise the usefulness of this till i used the graphical inventory script... 1 flask icon, a million potion possibilities ;)

Also, on topic, handy for highlighting those key bits of mappyness.
March 10 (10 years ago)
The Aaron
Pro
API Scripter
Yeah, very AutoREALMie. =D
March 14 (10 years ago)
Ziechael
Forum Champion
Sheet Author
API Scripter
Gold recently had an issue where he had accidentally moved his map to the GM layer when zoomed in and work on some fine detail... would it be possible to tweak this to incorporate a 'layer lock' option also do you think?

Not saying he is going to do it often but seems a shame not to add it as an option to this script =D
March 15 (10 years ago)
The Aaron
Pro
API Scripter
Yeah, it would be trivial to add. :)
Quick question Aaron, would this interfere with the "Bump" script you wrote?
April 16 (10 years ago)
The Aaron
Pro
API Scripter
Hmmmm... if you've MapLocked a graphic and then you also bump it, there would be some weird behavior. Shouldn't cause any crashes, just weird behavior.