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] EasyReZorder — Simple Z-Order Manipulation

1782498153

Edited 1782508632
Aerotech
Pro
API Scripter
EasyReZorder — Simple Z-Order Manipulation EasyReZorder gives you chat commands to move tokens forward/backward in the z-order (stacking order). The Problem We've all been there. You've got a big map with lots of tokens and you want an NPC to be on top of the horse they are riding. You bring the NPC to front, but oh no! Now when the NPC moves into the stable, they are on top of the stable roof. That doesn't make sense. So instead, you try sending the horse to the back, but oh no! Now the horse clips UNDER the hay that should obscure the goblin token that is hiding under it, but definitely shouldn't obscure the much larger horse. So now, you gotta send like 300 other things to the back or front so that eventually, everything is in the correct order again. If only there was a plugin that could just move the NPC right in front of the horse or move the horse right behind the NPC. Someone should really make something like that. The Solution EasyReZorder gives you granular control over which riders go on top of who's horses — move one step at a time, or position relative to another object. No longer are you limited by "Bring to Front" / "Send to Back". You now can move Z-order as easily as typing a basic command. Commands !z-order forward [N] — Move selected token(s) forward by N steps (default 1) !z-order backward [N] — Move backward by N steps (default 1) !z-order front — Bring to front !z-order back — Send to back !z-order ahead-of <id> — Move just ahead of a specific token !z-order behind <id> — Move just behind a specific token !z-order check — Show z-order index of selected objects !z-order --help — Show command reference Works on tokens, paths, and text objects. GM only. Integration Works with Anchor — if you use Anchor's -z flag for z-order tracking, EasyReZorder automatically calls Anchor.updateZOrder(anchorObj) to propagate the new stacking to children. Install Available in the Roll20 Mod Library (one-click install). GitHub Source | Wiki Page
1782522979
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Ooh, I want to play with this. The Align script has very limited Z-Order control, but this looks like it can handle a whole lot more.
Let me know if you run into any issues! You will be the first person to use one of my scripts I'm pretty sure, haha.