In RPG Maker, you have a “party”. A party consists of a group of actors, an inventory of items, weapons, armors, and gold, and potentially some other information related to this group.
By default, you only have one party, which is what the player will control throughout the game.
This plugin provides functionality for working with additional parties.
1. You can create new parties. Separate parties can be used to represent different characters in your game. Each character may have their own set of followers and inventories as the story progresses.
2. You can switch between parties. If your story switches from one character to another and you would like to keep their location, characters, inventories, and other party-related information, you can simply switch to a new party instead. You could even switch between parties in real-time on the same map to build additional mechanics related to multiple party control.
3. You can merge parties. By merging parties, you can have different parties come together as one large party. All of the members, inventories, and other information will be merged together.
These are the three basic functions that you can use to design your game using the Party Manager. Additional functionally will be provided over-time as they are developed.
Plugin: download here (right-click, save as)
- Party Switching Scene – provides a scene for switching members between different parties.
Download the plugin and place it in the “plugins” folder in your project’s “js” folder. Then open your Plugin Manager (F10), double-click an empty row, and select the HIME_PartyManager plugin.
Once it is in your list of plugins, turn the plugin on.
Just want to get the parties started? Read this and have something working in a few minutes.
Managing multiple parties involves
- Creating parties
- Switching parties
- Merging parties
To create party, you need to choose a party ID. The default party ID is 1, which you can customize in the plugin parameters, so don’t use this one. For example, if you prefer numbers, you might choose 2 as your second party ID.
Now you create the party, add some actors, and choose a location if needed.
Let’s say I wanted to create a party that I will refer to as 2, with actors 3 and 4, at location (10, 12) of map 5. Here are the script calls:
Party.create(2) Party.addActor(2, 3) Party.addActor(2, 4) Party.setLocation(2, 10, 12, 5)
Once I have a party set up, I can switch between them.
And I can switch back
Now, if I’m done with the second party and want to merge it into party 1:
This is all you need to manage multiple parties. Please read the rest of the instructions for advanced usage beginning at “Idle Parties”.
This plugin provides a lot of different functionality. Here is a table of contents
- Party ID
- Creating Parties
- Party Actors
- Switching Parties
- Changing Party Locations
- Merging Parties
- Party Inventory Trading
- Idle Parties
You can click on these link to jump to the appropriate section.
The Party Manager uses the concept of a “party ID” to identify each and every party in the game.
A party ID is basically a name that you give your parties. It could be a number like
or it could be text like
and so on.
Party ID’s are meant to give you an easy way to manage parties throughout your game since you will be using events to manage them.
Your project begins with one party by default. You can customize the ID that is assigned to it in the plugin parameters.
All additional parties will need to be created using events or plugins. To create a party, use the script call
Party.create( PARTY_ID );
For example, you can create parties like this
When you create a new party, it will have no actors.
You can add or remove party actors using these script calls
Party.addActor( PARTY_ID, ACTOR_ID ); Party.removeActor( PARTY_ID, ACTOR_ID);
The ACTOR_ID is the ID of the actor in the database.
For example, to add actor 3 to party 2, you would write
And to remove actor 3 from party “main”, you would write
Once you have created additional parties, you can switch between them.
Party.switch( PARTY_ID );
So for example, if you want to switch to party 2, you would write
When you switch parties, active control goes to the selected party, and the other party will go “idle”. You can see the other party on the map if both
parties are on the same map. For more information, refer to the section on “Idle Parties” below.
In this system, all parties have locations. When you switch parties, the game will change to where the party is currently located.
By default, when you create a party, it will be located where the current party is located.
You can change a party’s location during the game using the following script call:
Party.setLocation( PARTY_ID, X, Y ); Party.setLocation( PARTY_ID, X, Y, MAP_ID );
Where X and Y is the position on the map, and the MAP_ID is the ID of the map that you would like to set the party’s location.
If you omit the map ID, it is assumed to be the current map.
When you want two parties to merge together, you can use the script call
Which means “merge party ID1 into party ID2”. If the first party is the current party, then the game will automatically switch to the second party.
You can trade items and gold between parties. Items collectively refers to weapons, armors, and usable items.
To transfer items from one party to another, use the script call
Party.tradeItem( ID1, ID2, ITEM, COUNT )
Where ID1 is the ID of the party to take the item from, and ID2 is the ID of the party to give the item to.
The ITEM is an item object. There are many different items in the game, including items, weapons, and armors. By default, you would access themlike this:
$dataItems - item 2 $dataWeapons - weapon 3 $dataArmors - armor 12
The COUNT is just the amount of the specified item you would like to trade. If the first party does not have enough, it would simply trade as much as it can, instead of failing.
You can also trade gold from one party to another. Use the script call
Party.tradeGold( ID1, ID2, amount )
Where you’re trading the given amount of gold from party ID1 to party ID2.
If party 1 does not have enough gold, the game will transfer as much as it can.
By default, if you have multiple parties, only one party can be “active” at any time. The other parties are said to be “idle”. The active party is the
party that you currently control. When you switch parties, you are switching which party is the currently active party.
Idle parties are drawn on the map as events if they are on the same map. At this point, they are just visual indicators and do nothing. However, in the
future, you will be able to create your own events to determine how these idle parties should behave when you interact with them.
Active Party Variable
In the plugin parameters, you can choose something called an “active party variable”, which is just a game variable that keeps track of which party is currently active. This is mostly for convenience purposes in your events.
RPG Maker assumes variables are numbers, but you can store text as well. However, in your conditional branches, you will need to use script conditional branches in order to check that.
Checking Party Location
Idle parties are events on the map, but unlike map events, these events do not have a fixed ID. Instead, you would check the party’s position directly!
To check if a party is at a specific location, you can use the following script calls
Party.atLocation( PARTY_ID, X, Y ); Party.atLocation( PARTY_ID, X, Y, MAP_ID);
If the MAP_ID is not provided, it is assumed to be the current map ID. This means that you could check a party’s position across different maps.
If you wanted to know if there were *any* parties at a location, you can use this script call instead
Party.anyAtLocation( X, Y ); Party.anyAtLocation( X, Y, MAP_ID );
You can also check if a party is at a specific region
Party.atRegion( PARTY_ID, REGION_ID );
And similarly, to check if any party is at a specific region:
Party.anyAtRegion( REGION_ID );
Note that region ID checks can only be done for the current map.
Setting Max Number of Party Members
By default, there is no limit to how many members you can have in a party. This is different from the number of “battle” party members, which determines how many party members will actually participate in battle.
In the plugin parameters you can specify how many party members each party can have.
To check if the current party, or a certain party is full, you can use the script calls
$gameParty.isPartyFull() Party.isPartyFull( PARTY_ID )
Which will return true or false depending on whether the party is full or not. You can use the script call
Party.setMaxPartyMembers( PARTY_ID, NUMBER )
To change this limit at anytime.
Checking if an actor is in a party
To check whether an actor is in a certain party, you can use the script call
Party.hasActor( PARTY_ID, ACTOR_ID )
Which will return true if the specified actor is in that party.
Locking Actors to Party
To lock an actor to a party, use the script call
$gameActors.actor( ACTOR_ID ).lockToParty(true)
To remove the lock, use
$gameActors.actor( ACTOR_ID ).lockToParty(false)
Where the ACTOR_ID is the ID of the actor you wish to operate on.
Party locking is useful for plugins that require this information, such as the Party Switching Scene which uses this to determine whether the actor can be moved from the party.