Party Switching Scene

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

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.

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

You may also like...

16 Responses

  1. 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.

  2. 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.

  3. 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.

  4. victor says:

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

  5. 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

  6. 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.

  7. 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?

  8. 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.

  9. 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.

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax