Does this code make sense for swapping a character into the party with variable amounts of party members?

Basically, I want an inn where all recruited characters are waiting when not in the party, so I need a repeatable generic piece of code that can be copy-pasted, with some name revisions, for every possible party member.
Does this make sense for code that
A ) Realises how many people are currently in the party, and changes the number of options to match
B ) Removes party members in a specific slot based on where they are in the party.

◆If:Script:$gameParty.members().length = 0
◆Show Choices:Add Hex to Party, Do not add Hex to Party (Window, Right, #1, #2)
:When Add Hex to Party
◆Change Party Member:Add Hex Maniac (Initialize)
◆
:When Do not add Hex to Party
◆
:End
◆
:Else
◆If:Script:$gameParty.members().length = 1
◆Show Choices:Swap Hex with \P[1], Add Hex to Party, Do not add Hex to Party (Window, Right, #1, #3)
:When Swap Hex with \P[1]
◆Script:$gameParty.removeActor($gameParty.members()[1].actorId())
◆Change Party Member:Add Hex Maniac (Initialize)
◆
:When Add Hex to Party
◆Change Party Member:Add Hex Maniac (Initialize)
◆
:When Do not add Hex to Party
◆
:End
◆
:End
◆If:Script:$gameParty.members().length = 2
◆Show Choices:Swap Hex with \P[1], Swap Hex with \P[2], Add Hex to Party, Do not add Hex to Party (Window, Right, #1, #4)
:When Swap Hex with \P[1]
◆Script:$gameParty.removeActor($gameParty.members()[1].actorId())
◆Change Party Member:Add Hex Maniac (Initialize)
◆
:When Swap Hex with \P[2]
◆Script:$gameParty.removeActor($gameParty.members()[2].actorId())
◆Change Party Member:Add Hex Maniac (Initialize)
◆
:When Add Hex to Party
◆Change Party Member:Add Hex Maniac (Initialize)
◆
:When Do not add Hex to Party
◆
:End
◆
:End
◆If:Script:$gameParty.members().length = 3
◆Show Choices:Swap Hex with \P[1], Swap Hex with \P[2], Swap Hex with \P[3], Do not add Hex to Party (Window, Right, #1, #4)
:When Swap Hex with \P[1]
◆Script:$gameParty.removeActor($gameParty.members()[1].actorId())
◆Change Party Member:Add Hex Maniac (Initialize)
◆
:When Swap Hex with \P[2]
◆Script:$gameParty.removeActor($gameParty.members()[2].actorId())
◆Change Party Member:Add Hex Maniac (Initialize)
◆
:When Swap Hex with \P[3]
◆Script:$gameParty.removeActor($gameParty.members()[3].actorId())
◆Change Party Member:Add Hex Maniac (Initialize)
◆
:When Do not add Hex to Party
◆
:End
◆
:End
◆
:End
theoretically yes, although you probably do not want to initialize.
Initialization should be done for first adding the actor and never after that, because initialize resets to database values, erasing all EXP or other things eraned since then.

and you might want to simplify it for the player.
for example don't offer options to swap but check if party is full before adding and if yes, remind the player to remove actors first. And then have some empty bed events where the player can remove unwanted actors.
theoretically yes, although you probably do not want to initialize.
Initialization should be done for first adding the actor and never after that, because initialize resets to database values, erasing all EXP or other things eraned since then.

and you might want to simplify it for the player.
for example don't offer options to swap but check if party is full before adding and if yes, remind the player to remove actors first. And then have some empty bed events where the player can remove unwanted actors.
Ahhhh thank you so much!
That initialization thing could have been a huge issue if you hadn't told me!
The swapping is mostly for ease of travel, going straight to one character you want, instead of having to stop at a specific "remove party member" spot, then going to them.

Original thread: https://forums.rpgmakerweb.com/threads/does-this-code-make-sense-for-swapping-a-character-into-the-party-with-variable-amounts-of-party-members.133516/