Party Manager

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.

Download

Script – Demo

Check out the demo if you want to see it in action!

Add-ons

Installation

Install this script below Materisls and above Main

Usage

Creating Parties

There are three steps to creating a party

  1. Pick a unique “Party ID” (which is just a number)
  2. Choose the actors that will be in the party
  3. 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)

Managing Parties

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:

$game_party.id
$game_party.location

You can access all of the parties using

$game_parties[party_id]

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

switch_party(party_id)
  • Move Party

You can move a party from one location to another using the script call

move_party(party_id, location)

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

You may also like...

47 Responses

  1. Mario says:

    Hey! Thanks for your great script!

    I have two main characters in my game with each ones own group.

    So, with your script I can switch between those 2 groups and they group with the ID=1 and the group with the ID=2 hold their own items, money etc. ?

    Cause that’s what I’d need right now. xD

    Thanks. =)

  2. Anonymous says:

    There seems to be a typo in the code on this line:

    $game_parties = contents[:parties] || Game_Paries.new

    “Paries” should be “Parties”.

  3. Mari says:

    The first time I tested the plugin it worked fine and I was delighted. Next time I testplayed I couldn’t load any of my old save games. It didn’t matter much, so I started a new game. Since then, however, to my disappointment, the script commands of the plugin don’t have any visible effect anymore. No other party appears nor can I switch to it. Any ideas about what went wrong, or how it can be fixed? Thanks!!! 🙂

  4. Zephadus says:

    I saw on another website that you were planning on porting this to MV.
    Is that still happening?
    Because I would love you for it. :3

  5. eaedwards says:

    Have you ever considered an interface that allows you to pick what party you use? At least, for initial party setup? I would like to think that the interface could just be feed to your event setups but it may be a little more complicated with that. (I a little program but mostly in PHP)

    So I would think you could send it variables like this.

    multi_party_interface(party_number,members_in_party)

    example: multi_party_interface(3,[1,[2,3],[]])

    and then you send the return from the the interface to your script?

    Just an idea. I attached an image from FF6 that made me come up with this idea.

    If this is truly just a pain in the butt I understand I just thought it might make this awesome script even more attractive.

    • Hime says:

      I don’t have a multi-party formation script but what you can do as a workaround is to use one of the existing party management scripts and then set up each party separately in your event. Yanfly has a party manager, for example.

      It’s not the same as seeing all the parties at the same time, but if it is enough then that would work.
      Otherwise you can see if someone would be willing to build an interface that is tailored for your needs.

      • eaedwards says:

        Okay, I believe I can make that work. New question: instead using an event I just wanted the player to switch parties by pressing a button on my controller how would you suggest scripting that?

        • Hime says:

          I would look for a script that allows you to assign common events to a key. When the key is pressed, you would have the common event check what the current party is, and then switch to the other party. You might use a variable to keep track of who is the current party.

          Yanfly has a script that allows you to assign common events to buttons.

  6. Stesc says:

    It seem’s like the link for the newest version of your party manager is offline/broken.
    The older version (the one of the demo) does not work with your multiple-party-merge-script.
    Would you be so kind and load it up again.
    Thanks, Stesc

  7. Flimbo says:

    Hi Tsukihime,

    I'm getting an error message when trying to use the "move_party" command:

    "undefined local variable or method 'refresh' for #Game_Parties0xc3c67f0"

    The issue seems to be here:

    def move_party(id, location)
    (…)
    refresh if id == $game_party.id
    (…)
    end

    Thanks!

    • Hime says:

      Looking at the code, it looks like I took out the refresh methods for some reason. It is not clear why, but presumably those are not needed. I've updated the script to take out that refresh.

      • Flimbo says:

        Tsukihime,

        Thanks for the quick reply! Now the error message vanished, but the party doesn't actually seems to change maps after the command.

        • Hime says:

          I'm having a hard time figuring out why I took out some of the refresh code…so I put it back in. I've also made it so that whenever you call move_party, it will perform the transfer correctly.

          Though, I'm not sure why I took that out in the beginning.

  8. darknlight says:

    Hi Hime,
    I love the script, it's been a great help to me. I was wondering if there was a way to disable the fading in and out between switching parties.

  9. Ronoke-chan says:

    hi, can u add the ability to merge parties? i don’t need shared inventories cuz my parties gonna traveling different worlds (party A in world A while party B in world B) so same inventory for such case looks kinda weird o-o i think it could merge inventories of party A and B as well..

    • Hime says:

      If you merge inventories, how would you separate them later? You can merge parties manually by removing members from one party and adding members to another party.

      • Ronoke-chan says:

        by plotline parties should be separated and merged in the end of game to kill final boss together, if party B has important items (some kind of loot player could get from monsters or equipment) in inventory it’s gonna be lost after adding members i guess….right? o_o

  10. Simba451 says:

    I’ve been trying to do a couple of different things here and I keep getting this error ‘Script ‘Game_Interpreter’ line 1411: NoMethodError occurred. undefined method ‘character_name’ for nil:NilClass’

    This only happens when I try to use the ‘add actor’ or ‘remove actor’ script calls for this script. I am using these in a common event, if that matters. I’m not sure what kind of other information you need to help me, so let me know if this isn’t enough.

    Thanks

  11. vantrice says:

    i was just about to write down entire list of what i made on new game but i think might have
    found the reason it doesnt work.

    quick test first.

    yea for a noob rpg maker i still got lot to learn

    fixed it by changing the party creating event from action event to a parallell event.
    action event with script was never activated because of this.

    it works now and thanks for help and fast reply tho.
    my apology for making such a dumb mistake.

  12. vantrice says:

    the demo was fun to play

    i did same things from the demo and created a new party
    members = [6]
    location = create_location(1, 186, 366)
    create_party(2, members, location)

    however i still get this error when i try to switch to the other party with script call

    script ‘game_interpreter”line 1411:nomethoderror occurred.
    undefined method ‘location’ for nil:Nilclass

    i have several other scripts in use and yanfly party system script affect party.
    if that matters. changed party from 4 to 5 with that.

    • Hime says:

      The problem looks like you have not actually created the party, or you are trying to switch to a party that does not exist.

      What is your script call for switching parties?

      • vantrice says:

        script call is
        switch_party(2)

        maybe my party doesnt exist, i thought this was the way to make new party
        members = [6]
        location = create_location(1, 186, 366)
        create_party(2, members, location)

        or do i first have to put the actor in my party?
        guess i could try that while i wait for reply.

        • Hime says:

          Yes, create_party should immediately create the party with the specified party ID. I guess it could be a compatibility issue, so you should disable all othter scripts to see if the problem persists, and then re-add them one at a time to determine which script(s) cause the problem.

          Or better… first create a new project and copy the party-creation event over to see if it is set up correctly. I don’t see any immediate problems but then again there could be other details.

          No, the actor does not need to be in the current party, especially since the purpose of the script is to allow you to maintain separate parties (though you have the option of moving actors from one party to another)

  13. vantrice says:

    im trying to make this work but i havent been using rpg maker to long so i might be doing it wrong.
    when i try to switch to other party with a script event i get

    script ‘game_interpreter”line 1411:nomethoderror occurred.
    undefined method ‘location’ for nil:Nilclass

    i put event parallel process event with script to make the party.
    and another event next to my main character with script to change
    to new party.

    also was i suppose to make an idea with script or somewhere els?
    i only know actors have ID but party ID i dont know about.

    maybe pictures of how and where to add them.

    • Hime says:

      I’ve added a demo. It only shows how to create a party for now since I haven’t thought of any applications for the other functionality.

  14. FifaXion says:

    Hi there Hime!

    Really nice job, just awesome, but I have a question since I just have few ideas on scripting: is there any way to merge different partys together? I mean: I wanna use the different parties (with your awesome addons) on a puzzle but, once resolved, i wanna get the initial party back so, how is it possible?

    Thanks for your time and sorry about my english.

    • Hime says:

      The current version of the script provides “add actor” and “remove actor” functionality. You can create a new party and move actors by removing from the current party and adding it to the new party.

      To merge parties, if the inventories are shared it is easy you just need to move the actors from one party to another and then delete the unused parties.

      If inventories are not shared then you need to think about it some more.

Leave a Reply

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