MZ On-Map Leader switching

Hello! I have a plugin request, I would like to know if someone may make an on-map party leader switcher plugin.

Basically, what would need is for example let's say you have an active party of 4 members called 1 2 3 and 4, and the first character is the leader.
  • By pressing Q button, the party is rotated to 4 1 2 3, 3 2 1 4, 2 3 4 1.
  • By pressing E the party is rotated to 2 3 4 1, 3 4 2 1, 4 1 2 3.
  • Button hotkeys can be configured (if Q and E can't be used, then change them for Pg Up/Pg Down for example).
  • Also touch buttons are available so you can rotate without the use of a keyboard/gamepad (specially due mobile games).
  • Only affects to active members, meaning that members in reserve aren't shown when you're rotating the leader.
  • This is useful for videogames where each player has it's own on-map feature, such as lift rocks, cut trees, etc.
I don't know if I explained it correctly.
EDIT: Forgot to mention, if someone makes it, please! Feel free to share your work with the community!
I created only the sorting process.
Sorting is possible by using plug-in commands.
You should prepare a separate method for calling the plugin commands with the button.

We will create the button processing later.
Awesome! Casually Gabe did a plugin like this one too, however your time won't be wasted since his plugin was designed to work with his followers system, while your plugin doesn't require any dependences and is perfect for a simple rotate function.

I tested it with a parallel process with a conditional branch "if accept key was triggered" and with a waiting time (because is also really fast! I like it) and works really good without issues.

Please share this awesome contribution with the community, you're awesome 😀
Thank you a lot!

EDIT: Whops, it was Raizen, sorry! Anyways!! Share it 😀

Original thread: https://forums.rpgmakerweb.com/threads/on-map-leader-switching.127232/