Block reserve party members joining.

Hey all,

I have been working on a game where the leader of the party is kinda like a pokemon trainer, and she will pop in at the start of the fight, summon the characters you have selected to be in your party, and then leave until the fight is over.

I had a working event for this, where she will play an animation (curtesy of yanfly's action sequence) and then leaves the battle>
This was done by swapping the party order until she is at position 5, and then restricting the party to 4. Essentially removing her.
Then after the battle is finished, she is swapped back into the first position.

However I realised this doesn't work if you only have 1-3 party members, excluding the leader, because it relies on having 5 members. I then experimented with lots of different scripts and commands to try get it to work with only having 1-3 other party members, but every time I change the max party size back to 5, the reserve members join.

The only fix I can think of, is a script/Java code that blocks reserve members automatically joining.
I would really appreciate any input on this as its been driving me insane for the last day, thanks.

Edit: Or, if anyone knows how to send an actor into the reserve with a script/command. The same way that yanfly's party system can 'remove' a character from the formation but not the party itself. That would also be useful in fixing this system as I can just remove the characters that are added due to the party size changing.
I think it is better if you take a step back and re-analyze what you really need, because what you want is a lot more complex than you think - there is no "reserve" definition in the default engine at all, it's just a split based on party index.

But why does the "Trainer" need to be in the party at all? If it is just for EXP, that can be equalized after battle and it would be much easier if the trainer is simply removed from the party for the duration of battle.
The trainer could actually be a vehicle.
Why is the trainer in the party at all? Sounds like he/she should just be an animation at the beginning of the battle. If you want them to have a sprite on the map but not be a party member, there's a SRD and I think HimeWorks plugin for that

@AquaEcho I believe that the HimeWorks plugin is:
https://himeworks.com/2016/03/guest-followers/
Not tried it myself, but the other plugins of theirs that I have used have worked well.

Original thread: https://forums.rpgmakerweb.com/threads/block-reserve-party-members-joining.158821/