Party Switching Scene

In RPG Maker, you have a party of actors. This is the party that you control normally when you explore the world, participate in battle, and so on.

However, what happens if there are more actors available in the game than you can recruit? We need to put those actors somewhere.

This is where a party switching scene comes in: it provides a simple solution for you to allow players to manage their parties.

This plugin provides a scene where you can trade actors between two parties. I provide a “reserve” party which is just another party which holds all of the actors that aren’t in the current party.

So for example, let’s say you completed a quest for someone and he was really moved by your cause and decides to join your adventure, and tells you that he will be available in the “guild hall”.

When you go to the guild hall, you can speak to an NPC to check your party status, and you will find the new actor ready to add to your party. If you already have too many actors in your party, then you will either have to swap someone out, or choose to leave him in the guild hall.

If you are using the Party Manager plugin, you can use this party switching scene to trade actors between different parties of your choice.

You can also lock actors to their party so that specific parties must have specific members.

Download

Plugin: download here (right-click, save-as)

Required: Party Manager

Installation

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_PartySwitchingScene plugin.

Once it is in your list of plugins, turn the plugin on.

Usage

Calling the Scene

To go to the party switching scene, use the script call

SceneManager.push(Scene_PartySwitch)

If successful, you will see something like this:

partySwitchingScene2

Notice the help text at the top of the window. In the plugin parameters, you can set up what text will be shown during the scene.

Switching Party Members

Once you’re in the scene, you should see two windows by default. The window on the left holds the current party, and the window on the right holds the other party.

Adding actors

To add an actor to your party, if you have enough room, select an empty space in the list. You will then be prompted to select an actor from the other party to add to your current party.

partySwitchingScene3

Removing actors

To remove an actor from your party, select one of your actors, and then select an empty space in the other window.

partySwitchingScene4

Swapping actors

To swap actors between parties, select one of your actors, and then select another actor from the other window.

Leaving the Scene

To leave the scene, press the cancel button. However, if you have no party members in the current scene, it will play a buzzer sound and you cannot leave.

Maximum Party Members

This plugin assumes that you have a limit on how many actors will be in the party. It is determined by the max number of battle members.

Working with Reserve Party

This plugin provides a default “reserve” party for you. The purpose of this reserve party is to hold all of the actors that are currently not in your party, but can be recruited into the party through the scene.

The reserve party can be accessed using a script call

var party = $gameSystem.reserveParty()

Which will return a Game_Party object. You can then interact with this party like any other party:

var party = $gameSystem.reserveParty()
party.addActor(2)    // add actor 2 to reserve party
party.removeActor(3) // remove actor 3 from reserve party

Initially, the reserve party has no actors.

Specifying a different party to trade

Perhaps you would like to have multiple reserve parties, or just have other parties that you would like to trade with.

The scene assumes the default party that you will trade with is the reserve party provided by this plugin, but if you are using a plugin such as the Party Manager, you may have other parties that you would like to use.

To have the scene use a different party, you can say

SceneManager.push(Scene_PartySwitch)
SceneManager.prepareNextScene(OTHER_PARTY)

Where the OTHER_PARTY is a reference to another Game_Party object.
The OTHER_PARTY will be shown on the right side.

So for example, using the Party Manager, you would write

SceneManager.prepareNextScene(Party.get(3))

To trade with party 3.

Refer to the other plugins for instructions on how to retrieve a reference to a party.

Working with Locked Actors

If certain actors should be locked to certain parties, you will need locking functionality. To use this functionality, you will need to use the Party Manager to lock actors.

The party manager allows you to lock actors to the party using the following script call:

   $gameActors.actor( ACTOR_ID ).lockToParty(true)

When an actor is locked, the scene will gray out the character, as well as play an error sound when the player attempts to select that actor.

partySwitchingScene5

Custom Scene Design

Want something different? You can send a request with a design that you’re looking for and we can see how it might be implemented.

You may also like...

78 Responses

  1. Kurot says:

    There is a way to swap only with other members insted of blank spaces? That way we can overcome the problem of limit characters and add through events just the numbers of members we want.

  2. Anonymous says:

    I received an bug error of “Cannot read property ‘facename’ null. Even I turn off the every other plug-ins, the problem still persists.
    When I set the Second Party’s maximum party member hold to “4”, but in-game, I get to add another remaining actor in second party.
    However, once I add another party member, the game crashes because it overrides the limit party member max.

    This is what the script that I tried to reposition:
    Party.create(2);
    Party.setMaxPartyMembers( 2, 4 )
    $gameParty.isPartyFull()
    Party.isPartyFull( 2 )
    SceneManager.push(Scene_PartySwitch)
    SceneManager.prepareNextScene(Party.get(2))

    When removing the max limit, everything else went okay.

  3. Richilye says:

    Shame that it never got an update, such a cool plugin, yet the bug would kill the game as players wouldn’t be able to know the limit apart from being told on the top of the screen.

  4. Anonymous says:

    An issue I’ve come across is that the plugin allows you to add members to your party beyond the limit you specify in the plugin parameters. If you do this, the game crashes. The same thing happens if your current party is at its limit and you want to swap a party member for a different one from the reserve party; you didn’t actually go over the limit, but the game crashes anyway.

  5. Wicksta says:

    I get a type error cannot read property “facename” of null whenever the reserve party contains more than 4 actors

  6. Anonymous says:

    Hi, for some reason if I am at my main party’s actor limit, it will let me try to add another then I get “Cannot read property ‘ isAppeared’ of null” any idea whats going on?

    • Anonymous says:

      Getting the same problem as above, for example if party size max is set to 4, in game it allows me to select a 5th member but then crashes? Shame as it seems like a great script!

  7. TheGonzoGamer says:

    Hime great work on this plugin. Truly.

    is it possible to have this plugin work off followers instead of battle members.
    For example: I would like to have one battle member who at the start of the battle can switch out for a different member but only ever 1 battle member fighting at a time. If I have 4 followers with me in the current party I can swap myself out for one of them.

    Currently, If I set my battle member size to 1 then upon using these (Amazing) plugins I can only have myself in the current party when I go to switch out members. I have tested by starting a game with 4 members.

    I hope my request is clear.

    • TheGonzoGamer says:

      I went into the code and figured out a work around
      the line

      return this._data ? Math.min(this._data.size() + 1, this._data.maxBattleMembers()) : 1;

      is what determines how many character the plugin allows to swap in. I still have my game set to 1 Battle Member so I changed the line to

      return this._data ? Math.min(this._data.size() + 1, this._data.maxBattleMembers() + 4) : 1;

      It’s a workaround that allows me to still have one Battle Member but the party switching to let me swap out 5 total members.

  8. Alby says:

    Is it possible to get this to be accessed in the main menu? In my project, the game revolves around having three members active and three in reserve, but they still mainly travel together. It would be quite nice if I could access this from the main menu instead of having to call up a script by talking to an NPC or something of the sort.

  9. Ztzhaiyang says:

    Bug report: when your team is full and you wants to swap your character from reserve team to replace one of team member, it will be error: cannot read “IsAppeared” of null.

  10. eaed says:

    I am using this script and I am attempting to use multiple parties with this system. However, when I am making party two and three I have to put multiple people in before the first one shows up in the party on the left. If I am not explaining this correctly I can send you a demo. Let me know, thanks.

  11. victor says:

    All I get from the script call is: “undefined is not a function”

  12. Corbas says:

    I’m having a issue right when I call SceneManager.push(Scene_PartySwitch) from the Event Editor.

    TypeError: undefined is not a function rpg_managers.js:1618
    at Window_PartySwitchList.isEnabled (/G:/Jogos/KADOKAWA/GAMES/TESTES/js/plugins/HIME_PartySwitchingScene.js:381)
    at Window_PartySwitchList.drawItem (/G:/Jogos/KADOKAWA/GAMES/TESTES/js/plugins/HIME_PartySwitchingScene.js:390)
    at Window_PartySwitchList.Window_Selectable.drawAllItems (rpg_windows.js:1250)
    at Window_PartySwitchList.refresh (/G:/Jogos/KADOKAWA/GAMES/TESTES/js/plugins/HIME_PartySwitchingScene.js:405)
    at Window_PartySwitchList.initialize (/G:/Jogos/KADOKAWA/GAMES/TESTES/js/plugins/HIME_PartySwitchingScene.js:348)
    at new Window_PartySwitchList (/G:/Jogos/KADOKAWA/GAMES/TESTES/js/plugins/HIME_PartySwitchingScene.js:181)
    at Scene_PartySwitch.createListWindow (/G:/Jogos/KADOKAWA/GAMES/TESTES/js/plugins/HIME_PartySwitchingScene.js:259)
    at Scene_PartySwitch.createAllWindows (/G:/Jogos/KADOKAWA/GAMES/TESTES/js/plugins/HIME_PartySwitchingScene.js:248)
    at Scene_PartySwitch.create (/G:/Jogos/KADOKAWA/GAMES/TESTES/js/plugins/HIME_PartySwitchingScene.js:230)
    at Function.SceneManager.changeScene (rpg_managers.js:1654)
    SceneManager.catchException rpg_managers.js:1618

  13. Merc says:

    Looks like the picture didn’t take in previous post. The script calls are:

    SceneManager.push(Scene_PartySwitch)
    SceneManager.prepareNextScene(2)

    Where party 2 is created beforehand.

  14. Merc says:

    This Plugin is great, but I’m having issues with specifying a different party. I’m using the script calls below:

    and am getting the error message: “Cannot read property ‘prepare’ of null”

    Anything I’m doing wrong?

  15. hanzomon says:

    Hey Hime,

    How do we lock certain party members so they cannot be switched out of the party?

    Thanks!

    • Hime says:

      The plugin has been updated to support actor locking.
      See the updated instructions for details.

      The party manager is required for that functionality.

  16. Todoquisque says:

    Hi Hime! Great work!

    I have a question about it. How could I make a reserve party bigger? I mean, I don’t want to change the maxBattleMembers method in Game_Party because it’s global for all parties. So, how I change it specifically for the reserve party. There’s any way to do it?

    Thanks! 😀

Leave a Reply

Your email address will not be published. Required fields are marked *