How t do: Automatic row adjustment for a character

Hey there,

I'm using Yangfly's Row Formation plugin (http://www.yanfly.moe/wiki/Row_Formation_(YEP)), with which I built a simple two rows system. Most characters I have in the party can be pushed towards the rear row or pulled towards the front row by enemies, or choose to make those moves by themselves. The only exception is a bodyguard character which cannot go to the rear row by himself, but still can be pushed there by enemy action.

What I'm looking for is a way to have this character automatically get back to the front row at the beginning of each turn if he happens to have been pushed to the rear last turn. How would you build this? Common event? Script? A conditional event integrated to every troop? A passive state? I already know how to make a character change row; I'm looking in the general architecture to have this automatic row change every turn.

Thanks!
Moved to: Javascript/Plugin Support
Woups, sorry about that...
Does the plugin offer a Plugin Command or Script function to move rows? I assume it does.

If so, you can have a troop event that runs every turn and resets everybody to the front row.
@Aloe Guvner: Indeed it does. So I would have to create an event for each and every troop? I guess it's not that bad (let's praise the copy/paste function)... Many thanks.

I'm still interested to hear about other solutions, though, if it might happen that other people have one.

Edit: Tried it, and works perfectly.
If it should be on every troop event, look up YEP Base Troop Events, it'll let you put it on one troop event which is applied to all the others. You can also surround it with a Conditional Branch that checks for a switch, in case you ever want to turn it "off" for some battles.
If it should be on every troop event, look up YEP Base Troop Events, it'll let you put it on one troop event which is applied to all the others. You can also surround it with a Conditional Branch that checks for a switch, in case you ever want to turn it "off" for some battles.

Cool, thanks for the tip!
🙂

Original thread: https://forums.rpgmakerweb.com/threads/how-t-do-automatic-row-adjustment-for-a-character.114018/