Change battle party limit

Hey guys! I hope everyone is having a good day filled with creating. I had a question as to how to change the battle party limit back and fourth. I would like boss battles to include 4-5 players but regular battles only have 3. Is there a simple way I can go back and fourth between allowing 3 players, and then 4-5, and then back to 3 after that. (I have a lot of trouble with events). I have the party system and actor party switch plugins.

Thanks in advance for any assistance 🙂
Event your regular ecountor battles aka make them acessible on map, basically no random encounter s. BTW,
I'm assuming you're using Yanfly's Party System v1.12.
In the plugin set the parameters make sure the battle size is 4 or 5
In your event do this:
1. Make a loop
2. In the loop make a conditional branch with else include.
3. in the condtional branch us this script:
$gameParty.battleMembers().length > 3

4.under the conditional branch put text saying "you have to many members for battle, you can only have 3" then use the plugin command:
OpenPartyMenu

5. in the else part of the brach put a break loop

6. under the loop put the troop you want

For boss battles jus use this event with the loop, and change the battle to a boss troop.
I'm not sure if mid-battle switching affects this workaround(it may allow the player to get more batters then allowed or not.), so your going to have to see for yourself.

Original thread: https://forums.rpgmakerweb.com/threads/change-battle-party-limit.76299/