Party member limit

I need some help with a problem. I want to make it so I can only have 4 party members. I'd like to set it up so that the people not in my party are at the home base. Can anyone give me a hand. I have Yanfly's party member add on but I don't think it can do what I want.
So do you mean like you can exchange party members at the home base?
Yea I have about 9 characters and I want to only have a 4 in at a time.
The Party Manager allows you to accomplish this.


The party manager is a plugin that provides a set of tools for managing parties. It doesn't tell you HOW to manage your parties, so you have a lot of freedom in setting up your system.






This is my recommended approach. There are three steps


1. Create a second party to hold your "home base" members. This allows you to check who is in reserve right now.


2. When adding new actors, check if there's room in your current party.


3. Set up your home base. Create events that will represent different actors in the home base, which you can recruit upon interaction.


First, you have your "main" party, which is the one that the player will be controlling in your game.


Then, you have your "home base" party, which is all of the actors that you've recruited, but cannot travel with you because your party is full.


So using the party manager, you would start by creating a second party. Just to make it simple, we assume your main party is party 1 and your home base party is party 2


Party.create(2)


Now you have a second party.


Next, you want to set how many party members you can have for your main party (again, party 1). Let's say 4. Just to be safe, remove the limit on the second party


Party.setMaxPartyMembers( 1, 2 )
Party.setMaxPartyMembers( 2, -1 )




Now you can only have two members in your main party.


Note that the plugin doesn't automatically move extra members to a back-up party.


This is because I am assuming all actor recruiting will be done through events, or script calls via $gameParty.addActor


You would need to check if the main party is full to determine what to do.


In your event, you would create a conditional branch and use the script conditional branch


Party.isPartyFull( 1 )


Which returns true if the party is full.


If it's full, you want to add that actor to the second party.


Party.addActor(2, NEW_ACTOR_ID)




Now you have your actor recruiting set up.


Finally, you just need to create your home-base.


You have your second party which holds all of the members in the party.


You can create a bunch of events representing different actors, and upon talking to them, you can have them join the party.


A script call is available for checking if an actor is in a certain party. So if you want to know whether actor 12 is in party 2, you would write


Party.hasActor(2, 12)




It would be up to you to determine how to set up the home base. You might have the first page of the event auto-run to check if a certain actor is in a party, and then turn on self-switch to change to a different page.


To move actors from one party to another, you would simply add them to one, and remove them from another.


For example, let's say you wanted to add actor 6 to party 1, and remove actor 6 from party 2.

Code:
Party.addActor(1, 6)
Party.removeActor(2, 6)
i have a much simpler way. have a variable for how many people are in your party. when you get another party member, raise the variable by one. when you deposit a member, lower it by one. when exchanging party members, do a conditional branch that has the variable as the condition with if over 4. then, in the else section, add the member. on the if over four, deny the action and don't add the member. it's quite a easy thing to do, no?
The Party Manager allows you to accomplish this.


The party manager is a plugin that provides a set of tools for managing parties. It doesn't tell you HOW to manage your parties, so you have a lot of freedom in setting up your system.






This is my recommended approach. There are three steps


1. Create a second party to hold your "home base" members. This allows you to check who is in reserve right now.


2. When adding new actors, check if there's room in your current party.


3. Set up your home base. Create events that will represent different actors in the home base, which you can recruit upon interaction.


First, you have your "main" party, which is the one that the player will be controlling in your game.


Then, you have your "home base" party, which is all of the actors that you've recruited, but cannot travel with you because your party is full.


So using the party manager, you would start by creating a second party. Just to make it simple, we assume your main party is party 1 and your home base party is party 2



Party.create(2)


Now you have a second party.


Next, you want to set how many party members you can have for your main party (again, party 1). Let's say 4. Just to be safe, remove the limit on the second party



Party.setMaxPartyMembers( 1, 2 )
Party.setMaxPartyMembers( 2, -1 )




Now you can only have two members in your main party.


Note that the plugin doesn't automatically move extra members to a back-up party.


This is because I am assuming all actor recruiting will be done through events, or script calls via $gameParty.addActor


You would need to check if the main party is full to determine what to do.


In your event, you would create a conditional branch and use the script conditional branch



Party.isPartyFull( 1 )


Which returns true if the party is full.


If it's full, you want to add that actor to the second party.



Party.addActor(2, NEW_ACTOR_ID)




Now you have your actor recruiting set up.


Finally, you just need to create your home-base.


You have your second party which holds all of the members in the party.


You can create a bunch of events representing different actors, and upon talking to them, you can have them join the party.


A script call is available for checking if an actor is in a certain party. So if you want to know whether actor 12 is in party 2, you would write



Party.hasActor(2, 12)




It would be up to you to determine how to set up the home base. You might have the first page of the event auto-run to check if a certain actor is in a party, and then turn on self-switch to change to a different page.


To move actors from one party to another, you would simply add them to one, and remove them from another.


For example, let's say you wanted to add actor 6 to party 1, and remove actor 6 from party 2.



Party.addActor(1, 6)
Party.removeActor(2, 6)


So I see how this is set up and it's what I was looking for but I have a few questions. I was looking for a way to arrange the parties so I can open a menu and manually move one person around and replace them with another member. Kinda like the FF6 and onward did it. The way this is set up is I would need to make a command line and remove the actor manually from the party and add them to the other one unless I'm misunderstanding something. My concern is lets say I have members 1-4 in my party, I add 5 to the party but the branch says I have 4 members so he goes to party 2. When I go the base and take to this person how would I let the player manually remove the person they don't want in the party. Sorry if i'm not wording this the base way, you've been a big help and I hope my question is clear.
So I see how this is set up and it's what I was looking for but I have a few questions. I was looking for a way to arrange the parties so I can open a menu and manually move one person around and replace them with another member. Kinda like the FF6 and onward did it. The way this is set up is I would need to make a command line and remove the actor manually from the party and add them to the other one unless I'm misunderstanding something. My concern is lets say I have members 1-4 in my party, I add 5 to the party but the branch says I have 4 members so he goes to party 2. When I go the base and take to this person how would I let the player manually remove the person they don't want in the party. Sorry if i'm not wording this the base way, you've been a big help and I hope my question is clear.



One way is to simply display ALL of the actors in home-base (that isn't the leader).


Depending on whether they're in the party or not, and whether they can join or not, you might tell them to stay behind (ie: remove from party), or come with you (add to party)


Another way is to use the Party Switching Scene, which allows you to "trade" actors between parties.





This scene provides a basic example switching function.


The party switching scene is designed to specifically with multiple parties in mind, under the assumption that you have a second party that holds all of the actors that aren't in the party, which would be perfect for your needs since you need a way to keep track of actors that you CAN add to your party, but are NOT currently in your party.


The plugin provides a custom "reserve party" already, but the party manager is unable to work with that because it's not standardized.


You can use your own party for trading using script this script call

Code:
SceneManager.push(Scene_PartySwitch)
SceneManager.prepareNextScene(Party.get(OTHER_PARTY_ID))
This is just what I was looking for.

Original thread: https://forums.rpgmakerweb.com/threads/party-member-limit.61172/