How to memorize a party?

How can I have the game memorize my party? The game has potentially 20 followers, none are guarantee'd.

So I wonder, how can I remove all party members except the main character, then have them that I specifically had before all added back after the battle?

I assume this needs to be a script? So any help would be much appreciated.
How can I have the game memorize my party? The game has potentially 20 followers, none are guarantee'd.

So I wonder, how can I remove all party members except the main character, then have them that I specifically had before all added back after the battle?

I assume this needs to be a script? So any help would be much appreciated.

And what do you do that for? Why don't you just leave another members there?
And what do you do that for? Why don't you just leave another members there?
Because it's a duel? I only want the main character to fight a specific person.
Because it's a duel? I only want the main character to fight a specific person.
Then you can just set Battle Party to 1, that way no one but First Actor in the party can join a fight. Are you using Yanfly Party System plugin? It can do that.
You could set a variable to the following script call:

Code:
$gameParty.members();

Then, after you've removed various party members, you can run the following script, where x is the variable you stored the first bit of code in:

Code:
$gameVariables.value(x).forEach(function(actor) {
    $gameParty.addActor(actor._actorId);
});

It should add everyone into the party that was present when you set the value of the variable.
You could set a variable to the following script call:

Code:
$gameParty.members();

Then, after you've removed various party members, you can run the following script, where x is the variable you stored the first bit of code in:

Code:
$gameVariables.value(x).forEach(function(actor) {
    $gameParty.addActor(actor._actorId);
});

It should add everyone into the party that was present when you set the value of the variable.

$gameParty.members(2);
Removed Party
Battle
$gameVariables.value(2).forEach(function(actor) {
$gameParty.addActor(actor._actorId);
});

Then the game crashes. Did I do something wrong? Sorry if it's obvious, I haven't had much experience with Script Calling.
$gameParty.members() doesn't accept any arguments. I don't think it harms anything to have any, but I suspect the issue is not saving $gameParty.members() to a variable properly.

Here's an example of what I mean:

Spoiler: Storing the current members in a variable before removing
EDkLwTM.png

Spoiler: Restoring the members stored in variable 1
aNIDUIp.png
Then you can just set Battle Party to 1, that way no one but First Actor in the party can join a fight. Are you using Yanfly Party System plugin? It can do that.

I can't see that option by the way. If you mean changing maximum amount of party members in the Yanfly Party plugin, that only goes as far as remembering one party member.
I can't see that option by the way. If you mean changing maximum amount of party members in the Yanfly Party plugin, that only goes as far as remembering one party member.
It's right here, just change this to 1 will do 😮
upload_2019-1-11_19-18-27.png
$gameParty.members() doesn't accept any arguments. I don't think it harms anything to have any, but I suspect the issue is not saving $gameParty.members() to a variable properly.

Here's an example of what I mean:

Spoiler: Storing the current members in a variable before removing
EDkLwTM.png

Spoiler: Restoring the members stored in variable 1
aNIDUIp.png

f7693cb12203652827ab0cc663d3d311.png


I'm getting a syntax error now! 🙁
It's right here, just change this to 1 will do 😮
View attachment 106812

No, I don't want him to be alone all the time! XD
I just want him to be alone for specific battles like duels. That will make him permanently on his own, unless I'm not understanding?
Simple solution to remove your 3 other members from battle without having to kick your entire party :
$gameParty._battleMembers[1]=0;
$gameParty._battleMembers[2]=0;
$gameParty._battleMembers[3]=0;

But before you do that, you'll want to save the previous values somewhere so you can put them back after.

EDIT : Assuming you're not confortable with arrays manipulation, you can just use 3 variables to save the values of $gameParty._battleMembers[1], $gameParty._battleMembers[2] and $gameParty._battleMembers[3] and use those variables after the battle to put the values back in.
No, I don't want him to be alone all the time! XD
I just want him to be alone for specific battles like duels. That will make him permanently on his own, unless I'm not understanding?
Yep, you just didn't take your time to read Yanfly plugin's help section
here, quoted from Help section of Yanfly Party System plugin:
* Plugin Command:
* ShowBattleFormation - Shows 'Formation' command in battle.
* HideBattleFormation - Hides 'Formation' command in battle.
* EnableBattleFormation - Enables 'Formation' command in battle.
* DisableBattleFormation - Disables 'Formation' command in battle.
*
* LockActor 3 - Locks actor 3.
* LockActor 4 5 6 - Locks actors 4, 5, and 6.
* UnlockActor 3 - Unlocks actor 3.
* UnlockActor 4 5 6 - Unlocks actors 4, 5, and 6.
* * Locked Actors cannot be moved out of their current
* position and must be in the party.
*
* RequireActor 3 - Player must have actor 3 in party.
* RequireActor 4 5 6 - Player must have actors 4, 5, and 6 in party.
* UnrequireActor 3 - Player no longer needs actor 3 in party.
* UnrequireActor 4 5 6 - Player no longer needs actors 4, 5, and 6 in party.
* * Required Actors must be in the party in order for
* the player to be able to exit the party menu.
*
* ChangePartyMax 5 - Changes max party size to 5.
Yep, you just didn't take your time to read Yanfly plugin's help section
here, quoted from Help section of Yanfly Party System plugin:

I did read the help I even said to you

I can't see that option by the way. If you mean changing maximum amount of party members in the Yanfly Party plugin, that only goes as far as remembering one party member.

So yeah, that doesn't help, but thanks for trying.
You can use 'Control Variables' to store the Actor ID of a party member into a variable. Do this for all party members who shouldn't take part in the battle. Then, you can use the following script calls to remove and add those actors to the party:

Code:
$gameParty.removeActor($gameVariables.value(x))
$gameParty.addActor($gameVariables.value(x))
With x being the variable ID you stored the actor ID in.

That said, this requires the main character to be in a fixed party slot. You might need to fiddle around with conditional branches if the main character isn't locked to a specific slot.
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.
f7693cb12203652827ab0cc663d3d311.png


I'm getting a syntax error now! 🙁

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?
Simple solution to remove your 3 other members from battle without having to kick your entire party :
$gameParty._battleMembers[1]=0;
$gameParty._battleMembers[2]=0;
$gameParty._battleMembers[3]=0;

But before you do that, you'll want to save the previous values somewhere so you can put them back after.

EDIT : Assuming you're not confortable with arrays manipulation, you can just use 3 variables to save the values of $gameParty._battleMembers[1], $gameParty._battleMembers[2] and $gameParty._battleMembers[1] and use those variables after the battle to put the values back in.

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.
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.

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.

@Kelphy , please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.


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.

edit: Also, why can't you just use variables to store the party member's ID before the battle, remove the ones you don't want, then restore them using those same variables? I haven't tried it yet, but just curious if you have?

upload_2019-1-11_7-9-10.png

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