Formation Cleaning

We are working on an event, trying to enter the players home, and much like in Star Ocean 2, you see your party members walking around the home and the yard. All that is working nicely, disable party caterpillar and you just see your character walking around the map. Problem, I moved the main character out of the party formation and the other 4 party members are the ones in formation now, a random member being the lead, now you're the thief... talking to the thief.

Is there a way to clean out all party members from your formation, making the Hero the only party member? Alternatively, is there a way to move the Hero (actor 0001) to the top of the formation while shuffling the rest down?

I found a couple threads that mention swapping actor 2 and 4 around, so I assume this is possible?
I googled it for you. Here's how you can save who you had in your party and remove everyone else than the leader. Also, how you can put the same saved party back together. Scripts:

Save and remove:
$gameParty._savedActors = $gameParty._actors.clone();
$gameParty._actors = [1]; // change 1 to the actor ID who you wish to remain in the party
$gamePlayer.refresh()
$gameMap.requestRefresh()

Back together:
$gameParty._actors = $gameParty._savedActors.clone();
$gamePlayer.refresh();
$gameMap.requestRefresh();
Problem, I moved the main character out of the party formation
and why did you do that instead of just hiding the followers, if you want the main actor to stay the main actor?
and why did you do that instead of just hiding the followers, if you want the main actor to stay the main actor?
They are the main character/hero of the story, but they aren't required to be in the main four party slots at all times. There are times when having them switched out for another party member is just better depending on the situation.
I googled it for you. Here's how you can save who you had in your party and remove everyone else than the leader. Also, how you can put the same saved party back together. Scripts:

Save and remove:
$gameParty._savedActors = $gameParty._actors.clone();
$gameParty._actors = [1]; // change 1 to the actor ID who you wish to remain in the party
$gamePlayer.refresh()
$gameMap.requestRefresh()

Back together:
$gameParty._actors = $gameParty._savedActors.clone();
$gamePlayer.refresh();
$gameMap.requestRefresh();
Alright, I tried that out, and it sorta worked, but I think the Yanfly party script may be doing something weird in this case. The script is removing all party members entirely instead of just putting them into reserve and the party formation that you see walking around is still present even though only Actor 0001 is in the party actual. Guess I'm gonna have to do a bit more digging but thankyou for the help.
Just to mention it, we're not supposed to double post. You can click Reply or Quote on each post you want to reply to.

I think the Yanfly party script may be doing something weird in this case. The script is removing all party members entirely instead of just putting them into reserve
Yes, well, you never said you were using Yanfly's Party Manager (I presume that's what you mean by "party script") 😛

By default, there's no such thing as reserve, it's just the first four members of your party are the ones you see on the map.

Try replacing actors with battleMembers, from a quick glance that's what Yanfly made to create the two separate lists.

Save and remove:
Code:
$gameParty._savedActors = $gameParty._battleMembers.clone();
$gameParty._battleMembers = [1]; // change 1 to the actor ID whom you wish to remain in the party
$gamePlayer.refresh()
$gameMap.requestRefresh()

Back together:
Code:
$gameParty._battleMembers = $gameParty._savedActors.clone();
$gamePlayer.refresh();
$gameMap.requestRefresh();
Just to mention it, we're not supposed to double post. You can click Reply or Quote on each post you want to reply to.


Yes, well, you never said you were using Yanfly's Party Manager (I presume that's what you mean by "party script") 😛

By default, there's no such thing as reserve, it's just the first four members of your party are the ones you see on the map.

Try replacing actors with battleMembers, from a quick glance that's what Yanfly made to create the two separate lists.

Save and remove:
Code:
$gameParty._savedActors = $gameParty._battleMembers.clone();
$gameParty._battleMembers = [1]; // change 1 to the actor ID whom you wish to remain in the party
$gamePlayer.refresh()
$gameMap.requestRefresh()

Back together:
Code:
$gameParty._battleMembers = $gameParty._savedActors.clone();
$gamePlayer.refresh();
$gameMap.requestRefresh();
Thankyou for the headsup regarding double posting. I hate using forums and I try not to use them unless I have no other option. Also, yes. I wasn't aware the yanfly script would cause this issue. I hope your help here resolves the problem for us. Thankyou again for your help.

Edit 1: No such luck. I guess I need to keep looking for a solution to this.

Edit 2: Solved. What I had to do was
ChangePartyMax 1
RequireActor 1
Change Party Member: Remove Actor 1
Change Party Member: Add Actor 1

Then, when leaving back to the world map, add these
ChangePartyMax 4
UnrequireActor 1

Original thread: https://forums.rpgmakerweb.com/threads/formation-cleaning.159824/