How to manage removing/adding party members?

This is broken into 2 questions related to the same topic I keep running into one or the other. I have both questions in bold and underlined.


For the game rpg maker xp the game limits the initial party to 4 characters.  However, more than 4 characters exist in my game.  I designed a "party switcher" where the main character transforms into an object that selects the party members on a separate map.  The issue is how do I cause the game to "recognize" that the player already has 4 characters in their party when they're trying to "add more party members"? I haven't been able to figure out this option on conditional branches.  I figured either it would be a long common event that checks "if \n[002]" is in the party then...and so on until it determines whether or not you have 4 people with you(this seems to be too much), or the opposite would be all party members besides the main character are autoremoved and you just select who you want(this is easy to do, but it seems like it would be a pain for the player, so I don't want to do this).


When a character has been training with the player's party, is dropped off, and picked up again I also get "off" experience amounts for any character who initially isn't level 1. When the character is removed from the party I do the following:


@>control variables: [0030: Sosa's current lvl] = [Sosa]'s Level


@>control variables: [0031: Sosa's current XP] = [Sosa]'s EXP


@>Change equipment: [Sosa], Weapon = (None)


@>Change Party Member: Remove [Sosa]


@>Control Self Switch: A = ON


^--afterwards I "change party member add "sosa" change their EXP adding the variable, etc. but is it supposed to be "initialized"? I don't know if that's what throws me off, since I don't know what initialize means.
Use control variable command to load the number of party members (it's under "other") into a variable and check that in a conditional branch before adding new actors.
Use control variable command to load the number of party members (it's under "other") into a variable and check that in a conditional branch before adding new actors.

THANK YOU! I don't know how I've never known about that! I've used control variables for gold, map ids, so many things WOW. Thanks. I figured out the other one as well.  Apparently when you do "initialized" if your character joins you when they're level 2, you train to lvl 4, they leave, then join again, you "add" initialized(their original level of 2) with the variable xp added and they come back fine.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-manage-removing-adding-party-members.61382/