Row Formation Help

I'm using Yanfly's Row Formation.

My game only has two characters and two rows (they can never share the same row, either).

I need the person in the front row to be the party leader. It seems so simple, yet I can't figure it out.

Thanks!
Himeworks has a plugin that allows you to change which actor is the party leader.
No, I need it so that when the characters swap rows in battle, the front row character is party leader; because they literally swap positions in the party order. I don't need a custom character as a leader. I just need the front row to somehow tell the game they are now the party leader.
Code:
Game_Party.prototype.swapOrder = function(index1, index2) {

You can change party order with this script call

Code:
$gameParty.swapOrder(0 ,1)

And that will change the leader with the second person. You'll have to figure out how to get the indices though.
Let's pretend I figured out how to get the indexes... How would I implement this script call and where?

EDIT: I'm guessing in battle events. Do I use both? They seem about the same to me. XD
Bump?

Maybe if I can check who's in which row I can figure it out that way too?
I think the first question is how are you having the two party members switch?

Since you only have two characters, the leader is index 0 and the other person is index 1
In battle and menus, they switch with the YEP - Formation command on the menu.

On the map, I use https://github.com/PrimeHover/SwapPartyPlugin instead (it says it works in battle and menu but it doesn't really seem that way).
Bumping this. Woot.

Original thread: https://forums.rpgmakerweb.com/threads/row-formation-help.124778/