Hello Everyone!
Today, we will learn how to use the
Party Manager plug-in made by
Tsukihime! She already provided a
tutorial on how to create 2 parties, but today we will go a bit further: we will give the player the ability to create 3 parties with some issues: some members can't be reunited on the same party because they hate each other. How can we make it? Let's go!
What we will achieve today:
-----------------------------------------------------------------------------
Context
First, let's create the idea. For this example, we will use 5 different actors:
- byBibo (Actor1)
- Gérard the spider (Actor2)
- Acquire-chan (Actor3)
- Chimg (Actor4)
- Chicken (Actor5)
Now let's create the problematic: byBibo must reunite Chimg, Acquire-chan and Chicken, and is seconded in his task by Gérard the spider. However, Chicken and Chimg don't like spiders at all, and thus can't be in the same party at the same time. Chicken doesn't trust byBibo neither, because he is friend with a spider after all.
For some simplification purpose (or not?), Acquire-chan will accept to join a party only if Chimg is in that party too.
So now, we can event with that in mind:
- Gérard will never be with Chicken or Chimg or Acquire-chan,
- Acquire-chan will always be in Chimg party, whatever this one is,
--> The three possible parties will be like this:
- Party 1: byBibo +/- Gérard OR +/- Chimg +/- Acquire-chan
- Party 2: Chimg +/- Acquire-chan +/- Chicken
- Party 3: Gérard
-----------------------------------------------------------------------------
1. Split parties
The first thing you want to be able to do is creating new parties. To achieve that, you need party members first.
Here you are the different possibilities in our example:
Party 1:
- byBibo + Gérard [at the beginning]
- byBibo + Chimg [after putting Gérard in Party 3]
- byBibo + Chimg + Acquire-chan [in case we keep Chimg in Party 1 to look after Acquire-chan]
- byBibo alone [after splitting with Gérard, and after Chimg creates her own party to look after Chicken]
Creating a party
Here you are the script call to create your other parties:
- Party 2 (if Chimg is alone with byBibo)
Party.create(2)
Party.addActor(2, 4)
Party.removeActor(1, 4)
Party.setLocation(2, MapX, MapY, MapID)
- Party 2 (if Chimg is with Acquire-chan in byBibo's party)
Party.create(2) // Creates Party 2
Party.addActor(2, 4) // Adds Chimg into Party 2 [as the leader]
Party.addActor(2, 3) // Adds Acquire-chan to the Party 2
Party.removeActor(1, 4) // Removes Chimg from Party 1
Party.removeActor(1, 3) // Removes Acquire-chan from Party 1
Party.setLocation(2, MapX, MapY, MapID) // Create a Party 2 event on MapID, located at MapX & MapY
- Party 3 (at the beginning when you need to split with Gérard)
Party.create(3) // Creates Party 3
Party.addActor(3, 2) // Adds Gérard into Party 3 [as the leader]
Party.removeActor(1, 2) // Removes Gérard from Party 1
Party.setLocation(3, MapX, MapY, MapID) // Set Gérard's party's event on MapID, at location MapX & MapY
Now you just have to create an event with conditionnal branches to see if you have the members that can go in one or another party! Don't forget to put a message when you don't have any member to split with.
To do such a thing, we need to know if the Party doesn't already exist:
- Does party 2 already exist?
Party.get(2)
- Does party 3 already exist?
Party.get(3)
And if they exist, which one is active at that time?
Party.isActive(1) // Party 1 is the current party controled by the player. Here, byBibo (+/- Gérard OR +/- Chimg +/- Acquire-chan)
Party.isActive(2) // Party 2 is the current party controled by the player. Here, Chimg (+/- Acquire-chan +/- Chicken)
Party.isActive(3) // Party 2 is the current party controled by the player. Here, Gérard.
You now have all the tools to create the Split event.
Here you are how the event looks like in-game:
Spoiler
Note: The Chicken conditionnal branch is useless too here, because he will never be in Party 1.
-----------------------------------------------------------------------------
2. Switch parties
Now you can split your parties according to the possibilities given to you. Once it is done, you will want for sure to switch for everyone of them. In this case, you will need to control Chimg to get Acquire-chan if it is not already done, and to get the Chicken that will only follow her.
To switch between parties you will need this script call:
Party.switch(2) // Switches to Party 2. Here, Chimg +/- Acquire-chan [+/- Chicken later]
Party.switch(3) // Switches to Party 3. Here, Gérard.
Party.switch(1) // Switches back to Party 1. Here byBibo [alone if Party 2 exists, with Chimg +/- Acquire-chan if not]
This part is pretty simple. Once again, you only need to check which party is active at the time you want to switch:
Party.isActive(1) // Party 1 is the current party controled by the player. Here, byBibo.
Party.isActive(2) // Party 2 is the current party controled by the player. Here, Chimg (+/- Acquire-chan +/- Chicken)
Party.isActive(3) // Party 2 is the current party controled by the player. Here, Gérard.
And create a conditionnal branch in order to achieve the switch. You needn't care if people hate each other or not in this part so that is pretty simple. don't forget to create choices once the 3 Parties are created.
Here you are how the event looks like in-game:
Spoiler
[url=https://forums.rpgmakerweb.com/attachments/switch-parties-png.35562/]
-----------------------------------------------------------------------------
3. Merge parties
Finally you want to be able to reunite your different party members that had to split up for some reason. In this example, byBibo and Gérard have to come back together after being forced to split up.
Party.merge(3, 1) // Merges Party 3 into Party 1.
Party.merge(2, 1) // Merges Party 2 into Party 1.
The main issue here is that we need to be able to check whether an unwanted member is part of the OTHER Party. Luckily for us, a script call is provided with the plug-in that allows us to check just that:
Party.get(2).isActorInParty(5) // Checks whether Chicken is in Party 2 yet.
Party.get(1).isActorInParty(4) // Checks whether Chimg is still in Party 1. [also implies that Acquire-chan follows the same path]
That way, You can check if Chicken is in Party 2 in case you want to reunite byBibo and Chimg [Party 1 and Party 2], provided Party 1 is the active party. If the active Party is Party 2, just use the default condition "if Actor X is in the group".
If you control party 3, you can check if Chimg left party 1 before Gérard can go back with byBibo.
Overall you won't have much problems in this part, because when you hit the "merge parties" choices while controlling byBibo, you will only merge with Party 3 if Chicken is in party 2.
If you control Gérard, you will automatically be merged into Party 1 [because there is no way Gérard can be part of Party 2].
BE CAREFUL!!
You can only merge parties into the Party you are currently controlling.
As I want byBibo to remain the leader, when I'm in control of Party 3 and hit the merge button, I'll switch to Party 1 before merging:
Party.switch(1) // Switches to Party 1
Party.merge(3, 1) // Merges Party 3 into Party 1.
Add a few conditionnal branches and here we go!
Spoiler
[url=https://forums.rpgmakerweb.com/attachments/merge-parties-png.35560/][/url]
-----------------------------------------------------------------------------
4. Wrap it up
Now your events are done! You can either create 3 distinct events, or one big events as I made [ in the form of a magic well!

]
When you switch between 2 partys, it can be pretty convenient to use a button common event. but in this case, it is better to use a fix point, because the location of the different parties is fixed [if you switch inside a tent for example, the new Party will go the map where it is meant to go].
Now create your characters events, so you can talk to them and add them into your Party. Make sure that you check whether certain actors are in the party or not before accepting to join the Party!
In our example, Chimg will check if Gérard is in the Party before she agrees! Chicken will check if Gérard AND byBibo are in the party first.
I hope you enjoyed this tutorial and found it useful! Have a nice time playing around with this plug-in that has big potential!
On a side note, in the video you can see that I added some money to Party 1. It is to show you that what comes into Party 1 stays in Party 1 unless you use some script call to transfert item and money into other parties. But i'll let you check the Help file of the plug-in, as it may be the theme of another tutorial ^^
Enjoy! ~
-----------------------------------------------------------------------------
5. Script calls Summary
Spoiler
Create a Party:
Party.create(PARTY_ID)
Add / Remove an Actor from a Party:
Party.addActor(PARTY_ID, ACTOR_ID)
Party.removeActor(PARTY_ID, ACTOR_ID)
Set the location of a newly-created Party:
Party.setLocation(PARTY_ID, MAPX, MAPY, MAP_ID)
Check if a Party exists:
Party.get(PARTY_ID)
!Party.get(PARTY_ID) // Checks if the party DOESN'T exist.
Check if a Party is Active:
Party.isActive(PARTY_ID)
Check if an actor is in a specific Party:
Party.get(PARTY_ID).isActorInParty(ACTOR_ID)
Merge Parties:
Code:
Party.merge(PARTY2_ID, PARTY1_ID) // Party1 being the active Party where party2 will be merged into.
本贴来自国际rpgmaker官方论坛作者:byBibo处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/party-manager-tutorial-handling-multiple-parties-plug-in-by-himeworks.59886/