increasing battlemember

hey guys,
im using srd_summoncore and yanfly partySystem.

my game currently has 5 partymember (3 participating in battle and 2 in reserve)
is it possible to raise the battlemember if i use a skill?
like if one of my actors can summon monsters that participate in battle i want the partysize to be 4
and once the summoned monster is gone it shall be 3 again.

but if i use another summon in the same fight its supposed to be 4 again and so on.


any help would be awesome.
I've never used SRD's summon core but I just looked at it and noted that it has an option to set the number of turns for the summoning. If you apply a state to the summoner, and use Yanfly's Buffs & States, you can run a script when the state is applied, and then another script when the state is removed. You make the state duration the same as the summoning duration then for your scripts:

<Custom Apply Effect>
num = $gameParty.members().length + 1;
$gameParty.changeBattleMax(num);
</Custom Apply Effect>

<Custom Remove Effect>
num = $gameParty.members().length - 1;
$gameParty.changeBattleMax(num);
</Custom Remove Effect>

Never tried it but seems like it would work.

Original thread: https://forums.rpgmakerweb.com/threads/increasing-battlemember.106298/