This script allows you to create multiple, separate parties and manage each party easily using a user-friendly script call interface. By default, you start with one party. You can create additional parties throughout the game and allow the player to switch between parties.
Parties come with several features, such as
- Each party has their own location. When you switch between parties, the game will automatically change to that party’s location. Parties may also travel together so that switching parties does not change the location.
- Parties also have their own inventories, so if two parties are in separate locations, you can realistically make it so that each party may only use what they have collected during their journeys.
- You can manage each party’s actors separately by adding or removing actors. An actor can only be in one party at any given time.
By managing multiple parties, you can create a unique gaming experience for your players.
Check out the demo if you want to see it in action!
- Shared Party Inventory – use the same inventory across all parties
- Idle Party Events – setup events on the map that represent your idle parties
- Idle Party Conditions – conditional checks involving different parties on the map
- Party Trade Scene – simple scene that allows you to trade items between two parties
- Multiple Party Merger – merge multiple parties together
Install this script below Materisls and above Main
There are three steps to creating a party
- Pick a unique “Party ID” (which is just a number)
- Choose the actors that will be in the party
- Create a location, with the following script call
location = create_location(map_id, x, y)
For example, suppose you want to create a new party with ID 2, with actors 1, 3, and 5, and located at map 2, position (3, 4). You would write something like
id = 2 members = [1,3,5] location = create_location(2, 3, 4) create_party(id, members, location)
Optionally, you can choose to omit the location. In this case, the new party’s location will be synchronized to the current party’s location
id = 2 members = [1,3,5] create_party(id, members)
There are several functions available for managing your parties.
- Active Party
There can only be one party active at anytime. This is stored in $game_party, and you can use this in scripts or script calls. Some attributes that may be useful:
You can access all of the parties using
Which will return the specified Game_Party object.
- Party Switch
Switching parties allows you to change control from one party to another. If the location of the other party is different from the current party,
then the screen will change to the location of the other party.
You can switch parties by using the script call
- Move Party
You can move a party from one location to another using the script call
location is created using the
create_location script call.
- Synchronize Party Locations
To have parties travel together, you can synchronize their locations so that when you switch between parties, you do not change locations because they are traveling together. To synchronize party locations, use the script call
sync_party_location(party_id) sync_party_location(party_id, party_id2)
If you omit the second party ID, then it synchronizes the selected party with the currently active party.
- Managing party members
You can add or remove party members from different parties using script calls
$game_parties.add_actor(actor_id, party_id) $game_parties.remove_actor(actor_id, party_id)
If the party ID is not specified, then it is assumed to be the current party. An actor can only exist in one party at any given time.