How to memorize a party?

Discussion in 'RPG Maker MV' started by Kelphy, Jan 11, 2019.

  1. Kelphy

    Kelphy Veteran Veteran

    Messages:
    79
    Likes Received:
    5
    First Language:
    English
    How can I have the game memorize my party? The game has potentially 20 followers, none are guarantee'd.

    So I wonder, how can I remove all party members except the main character, then have them that I specifically had before all added back after the battle?

    I assume this needs to be a script? So any help would be much appreciated.
     
    #1
  2. VeryXInh

    VeryXInh Veteran Veteran

    Messages:
    90
    Likes Received:
    114
    First Language:
    Japanese
    Primarily Uses:
    RMXP
    And what do you do that for? Why don't you just leave another members there?
     
    #2
  3. Kelphy

    Kelphy Veteran Veteran

    Messages:
    79
    Likes Received:
    5
    First Language:
    English
    Because it's a duel? I only want the main character to fight a specific person.
     
    #3
  4. VeryXInh

    VeryXInh Veteran Veteran

    Messages:
    90
    Likes Received:
    114
    First Language:
    Japanese
    Primarily Uses:
    RMXP
    Then you can just set Battle Party to 1, that way no one but First Actor in the party can join a fight. Are you using Yanfly Party System plugin? It can do that.
     
    #4
  5. Zevia

    Zevia Veteran Veteran

    Messages:
    591
    Likes Received:
    289
    First Language:
    English
    Primarily Uses:
    RMMV
    You could set a variable to the following script call:

    Code:
    $gameParty.members();
    Then, after you've removed various party members, you can run the following script, where x is the variable you stored the first bit of code in:

    Code:
    $gameVariables.value(x).forEach(function(actor) {
        $gameParty.addActor(actor._actorId);
    });
    
    It should add everyone into the party that was present when you set the value of the variable.
     
    Last edited: Jan 12, 2019
    #5
  6. Kelphy

    Kelphy Veteran Veteran

    Messages:
    79
    Likes Received:
    5
    First Language:
    English
    $gameParty.members(2);
    Removed Party
    Battle
    $gameVariables.value(2).forEach(function(actor) {
    $gameParty.addActor(actor._actorId);
    });

    Then the game crashes. Did I do something wrong? Sorry if it's obvious, I haven't had much experience with Script Calling.
     
    #6
  7. Zevia

    Zevia Veteran Veteran

    Messages:
    591
    Likes Received:
    289
    First Language:
    English
    Primarily Uses:
    RMMV
    $gameParty.members() doesn't accept any arguments. I don't think it harms anything to have any, but I suspect the issue is not saving $gameParty.members() to a variable properly.

    Here's an example of what I mean:

    [​IMG]

    [​IMG]
     
    #7
  8. Kelphy

    Kelphy Veteran Veteran

    Messages:
    79
    Likes Received:
    5
    First Language:
    English
    I can't see that option by the way. If you mean changing maximum amount of party members in the Yanfly Party plugin, that only goes as far as remembering one party member.
     
    #8
  9. VeryXInh

    VeryXInh Veteran Veteran

    Messages:
    90
    Likes Received:
    114
    First Language:
    Japanese
    Primarily Uses:
    RMXP
    It's right here, just change this to 1 will do :o
    upload_2019-1-11_19-18-27.png
     
    #9
  10. Kelphy

    Kelphy Veteran Veteran

    Messages:
    79
    Likes Received:
    5
    First Language:
    English
    [​IMG]

    I'm getting a syntax error now! :(
     
    #10
  11. Kelphy

    Kelphy Veteran Veteran

    Messages:
    79
    Likes Received:
    5
    First Language:
    English
    No, I don't want him to be alone all the time! XD
    I just want him to be alone for specific battles like duels. That will make him permanently on his own, unless I'm not understanding?
     
    #11
  12. TWings

    TWings The Dragon Whisperer Veteran

    Messages:
    279
    Likes Received:
    532
    Location:
    Kyoto
    First Language:
    French
    Primarily Uses:
    RMMV
    Simple solution to remove your 3 other members from battle without having to kick your entire party :
    $gameParty._battleMembers[1]=0;
    $gameParty._battleMembers[2]=0;
    $gameParty._battleMembers[3]=0;

    But before you do that, you'll want to save the previous values somewhere so you can put them back after.

    EDIT : Assuming you're not confortable with arrays manipulation, you can just use 3 variables to save the values of $gameParty._battleMembers[1], $gameParty._battleMembers[2] and $gameParty._battleMembers[3] and use those variables after the battle to put the values back in.
     
    Last edited: Jan 11, 2019
    #12
  13. VeryXInh

    VeryXInh Veteran Veteran

    Messages:
    90
    Likes Received:
    114
    First Language:
    Japanese
    Primarily Uses:
    RMXP
    Yep, you just didn't take your time to read Yanfly plugin's help section
    here, quoted from Help section of Yanfly Party System plugin:
     
    #13
  14. Kelphy

    Kelphy Veteran Veteran

    Messages:
    79
    Likes Received:
    5
    First Language:
    English
    I did read the help I even said to you

    So yeah, that doesn't help, but thanks for trying.
     
    #14
  15. Jules98

    Jules98 Veteran Veteran

    Messages:
    272
    Likes Received:
    135
    First Language:
    Dutch
    Primarily Uses:
    RMMV
    You can use 'Control Variables' to store the Actor ID of a party member into a variable. Do this for all party members who shouldn't take part in the battle. Then, you can use the following script calls to remove and add those actors to the party:

    Code:
    $gameParty.removeActor($gameVariables.value(x))
    $gameParty.addActor($gameVariables.value(x))
    With x being the variable ID you stored the actor ID in.

    That said, this requires the main character to be in a fixed party slot. You might need to fiddle around with conditional branches if the main character isn't locked to a specific slot.
     
    #15
  16. TWings

    TWings The Dragon Whisperer Veteran

    Messages:
    279
    Likes Received:
    532
    Location:
    Kyoto
    First Language:
    French
    Primarily Uses:
    RMMV
    Alternatively, if you're using Yanfly's party plugin, you can do as @VeryXInh said :
    before the battle use the plugin command : ChangePartyMax 1
    after the battle use the plugin command : ChangePartyMax 4
    That will do it too.
     
    #16
  17. Zevia

    Zevia Veteran Veteran

    Messages:
    591
    Likes Received:
    289
    First Language:
    English
    Primarily Uses:
    RMMV
    What's the error message?

    Also, is there a troop event for Orcish Lady, a skill you're using, or a plugin that makes use of variable 2?
     
    #17
  18. Kelphy

    Kelphy Veteran Veteran

    Messages:
    79
    Likes Received:
    5
    First Language:
    English
    Code:
    $gameParty._battleMembers[1]=0;
    $gameParty._battleMembers[2]=0;
    $gameParty._battleMembers[3]=0;
    
    I assume that's to remove party members 1-3? But when I put it as a script call in game, it doesn't remove them? I really appreciate you helping me, sorry I struggle with this kind of stuff.
     
    #18
  19. Kelphy

    Kelphy Veteran Veteran

    Messages:
    79
    Likes Received:
    5
    First Language:
    English
    it actually doesn't. Basically what happens is after you change it back to PartyMax 4, it only has 1 of the heroes that were previously following you. It's like it doesn't remember all 3 of them. It was a good idea, but doesn't work.
     
    #19
  20. mlogan

    mlogan Global Moderators Global Mod

    Messages:
    13,469
    Likes Received:
    7,469
    Location:
    Texas
    First Language:
    English
    Primarily Uses:
    RMMV

    @Kelphy , please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.


    If you need to quote more than one post, you can hit the quote button on multiple posts and insert them at the same time.

    Also, are you using Yanfly's plugin or not? I can't quite tell if you are or just tried it as a possible solution. If this is about getting that plugin to work, it needs to be moved to Plugin Support. Thanks.

    edit: Also, why can't you just use variables to store the party member's ID before the battle, remove the ones you don't want, then restore them using those same variables? I haven't tried it yet, but just curious if you have?

    upload_2019-1-11_7-9-10.png
     

    Attached Files:

    #20

Share This Page