How to memorize a party?

Double-post notice: @Kelphy
If you need to quote more than one post, you can hit the quote button on multiple posts and insert them at the same time.

Also, are you using Yanfly's plugin or not? I can't quite tell if you are or just tried it as a possible solution. If this is about getting that plugin to work, it needs to be moved to Plugin Support. Thanks.

It's not plugin report at all, that was a suggestion that someone else gave me. I was responding to that. I was quoting my previous message because they must have missed it was all. Sorry about that.

What's the error message?

Also, is there a troop event for Orcish Lady, a skill you're using, or a plugin that makes use of variable 2?

I got your idea to work! Thanks! I think there was something messy in my events making it not work. But when I did it on a separate event it worked perfectly. So I think I will just try with that.

Edit: Oh and thank you!!!!
Code:
$gameParty._battleMembers[1]=0;
$gameParty._battleMembers[2]=0;
$gameParty._battleMembers[3]=0;

I assume that's to remove party members 1-3? But when I put it as a script call in game, it doesn't remove them? I really appreciate you helping me, sorry I struggle with this kind of stuff.
It doesn't remove them from your party. You don't need to remove anyone from your party actually !
But it should remove them from the "battle party".

Works for me but I just realised the $gameParty._battleMembers data actually cames from one of the plugins I'm using (probably Yanfly's). Sorry if it doesn't work for you :s
@Kelphy Okay, that's why I was asking. (Haven't had my coffee yet.)

Is this solved then?
Because maybe he can only specify 8 of his 20 or more actors in there.
But he should use this to have the id of the first 4 Actors in Party, and than 20 branches if the other actors are in current party or not, than 20 switches to specify if those actors are in the party, that after removing them, we can know which to readd back to Party.

I read in this Thread about changing Battle Party size with Eventcommand Script, i would try that first in your case.
it actually doesn't. Basically what happens is after you change it back to PartyMax 4, it only has 1 of the heroes that were previously following you. It's like it doesn't remember all 3 of them. It was a good idea, but doesn't work.
Actually, i just tryed it and it works. You get your followers back when you switch back to 4. Not sure why it's not working for you.
Actually, i just tryed it and it works. You get your followers back when you switch back to 4. Not sure why it's not working for you.
Because she removed them manually already perhaps
I'm actually curious about this as well, because I have a Battle Tutorial that eventually I will need to remove the characters of the whole party and replace them with Actors so as to not have them leveled up. Then I'll have to replace the party members back.
So your question is, how can you remember all the party members at a particular time and then restore them after the battle.

Seeing as javascript doesn't have private members, you can actually just store the `$gameParty.actors` (which are cleanly serializable since it's just their ids)

So the first thing you need is:
Code:
// In a script command
const partyMemoryID = 2; // or whatever you feel like
const originalActorIDs = $gameParty._actors;
$gameVariables.setValue(partyMemoryID, originalActorIDs /* This is a list of actor ids, safely serializable */);
$gameParty._actors = []; // Erase the actors, equivalent to clearing the party
$gameParty._actors[0] = originalActorIDs[0]; // Restore the leader of the party

/* Run the battle scene */

/* Afterwards, to restore the original party in another script command */
const partyMemoryID = 2;
$gameParty._actors = $gameVariables.value(partyMemoryID);

Please note, I do not have a copy of RPG Maker MV, I just eyeballed the code from the demo (years old)
Alternatively, if you're using Yanfly's party plugin, you can do as @VeryXInh said :
before the battle use the plugin command : ChangePartyMax 1
after the battle use the plugin command : ChangePartyMax 4
That will do it too.
Here's an exemple :
ex_battle_rest.png

You really don't need anything else for your main character to fight alone (no need to save the party, no need to remove anyone).

Original thread: https://forums.rpgmakerweb.com/threads/how-to-memorize-a-party.104304/