Controlling Party Member Formation

My goal: a party system with several locked slots, in which players can (via certain events) switch which characters are in those locked slots. I think I'm one step away from a solution, but I'm open to alternatives if this method is too awkward. I threw together a script that prevents players from using the Formation menu to change the first two slots. I can post it if it's relevant.

I have an event that lets the player select a party member, and I'd like that person to be swapped into the second (otherwise locked) slot. Based on other scripts I think this is the command, but I don't know how to finish it:

$game_party.swap(1, x)The event uses "Show Choices: \P[1], \P[2], \P[3]" - hence I'd like x to be whichever character is in a given slot.

I'm not using any major party scripts. I'm fine with them, if there's one that can do this easily, but I hope I'm just one step anyway and that more experienced users will know the variable for actor id in a given slot.

All characters are optional, by the way, so I don't want to just have a list of all of them. If there's an easy way to make a list with only the actors who have joined the party, that would also be an easy solution.
try yanfly's party manager in case you're open to using other's scripts
I don't have a problem with others' scripts, I was just trying to keep my first project simple and make myself learn.

On this one, I think I'm reinventing the wheel. I added Yanfly's script and while it can't do exactly what I wanted, it provided a better base for a workaround. This will work. Thanks for the recommendation.

Original thread: https://forums.rpgmakerweb.com/threads/controlling-party-member-formation.21146/