TenebrisCrow

The Kelphy Corp
Veteran
Joined
Oct 19, 2015
Messages
99
Reaction score
6
First Language
English
Primarily Uses
RMMZ
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.
 

VeryXInh

Veteran
Veteran
Joined
Jan 7, 2019
Messages
90
Reaction score
115
First Language
Japanese
Primarily Uses
RMXP
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?
 

TenebrisCrow

The Kelphy Corp
Veteran
Joined
Oct 19, 2015
Messages
99
Reaction score
6
First Language
English
Primarily Uses
RMMZ
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.
 

VeryXInh

Veteran
Veteran
Joined
Jan 7, 2019
Messages
90
Reaction score
115
First Language
Japanese
Primarily Uses
RMXP
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.
 

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
668
Reaction score
382
First Language
English
Primarily Uses
RMMV
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.
 
Last edited:

TenebrisCrow

The Kelphy Corp
Veteran
Joined
Oct 19, 2015
Messages
99
Reaction score
6
First Language
English
Primarily Uses
RMMZ
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.
 

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
668
Reaction score
382
First Language
English
Primarily Uses
RMMV
$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:

EDkLwTM.png

aNIDUIp.png
 

TenebrisCrow

The Kelphy Corp
Veteran
Joined
Oct 19, 2015
Messages
99
Reaction score
6
First Language
English
Primarily Uses
RMMZ
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.
 

VeryXInh

Veteran
Veteran
Joined
Jan 7, 2019
Messages
90
Reaction score
115
First Language
Japanese
Primarily Uses
RMXP
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 :o
upload_2019-1-11_19-18-27.png
 

TenebrisCrow

The Kelphy Corp
Veteran
Joined
Oct 19, 2015
Messages
99
Reaction score
6
First Language
English
Primarily Uses
RMMZ
$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:

EDkLwTM.png

aNIDUIp.png

f7693cb12203652827ab0cc663d3d311.png


I'm getting a syntax error now! :(
 

TWings

The Dragon Whisperer
Veteran
Joined
Jul 26, 2017
Messages
528
Reaction score
869
First Language
French
Primarily Uses
RMMV
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.
 
Last edited:

VeryXInh

Veteran
Veteran
Joined
Jan 7, 2019
Messages
90
Reaction score
115
First Language
Japanese
Primarily Uses
RMXP
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.
 

TenebrisCrow

The Kelphy Corp
Veteran
Joined
Oct 19, 2015
Messages
99
Reaction score
6
First Language
English
Primarily Uses
RMMZ
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.
 

Jules98

Veteran
Veteran
Joined
Jul 10, 2017
Messages
339
Reaction score
224
First Language
Dutch
Primarily Uses
RMMV
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.
 

TWings

The Dragon Whisperer
Veteran
Joined
Jul 26, 2017
Messages
528
Reaction score
869
First Language
French
Primarily Uses
RMMV
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.
 

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
668
Reaction score
382
First Language
English
Primarily Uses
RMMV
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?
 

TenebrisCrow

The Kelphy Corp
Veteran
Joined
Oct 19, 2015
Messages
99
Reaction score
6
First Language
English
Primarily Uses
RMMZ
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.
 

TenebrisCrow

The Kelphy Corp
Veteran
Joined
Oct 19, 2015
Messages
99
Reaction score
6
First Language
English
Primarily Uses
RMMZ
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.
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
16,154
Reaction score
8,938
First Language
English
Primarily Uses
RMMV

@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
 

Attachments

  • party.png
    party.png
    30.3 KB · Views: 2

Latest Threads

Latest Posts

Latest Profile Posts

"Another hundred habaneros... a teaspoon of tumeric... and a heaping helping of nitroglycerin!" The kitten in a chef's hat laughed maniacally as the pot he was stirring promptly exploded.
Woot got a promotion and a pay rise ᕙ( • ‿ • )ᕗ now I'm set.
does anyone feel like explaining to me the difference between simulation and emulation? you have my full permission to be as pedantic as you want.
About the Deer, I had to cut some piece of video due the *swearing* Youtube copyrights issues...

Forum statistics

Threads
116,010
Messages
1,094,890
Members
151,323
Latest member
yuyucomi
Top