Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[XP] Party Changer

Gamemazta":13pdixj0 said:
What code do I have to use if I want an event to use the party changer? I want my game to use a crystal to change the party.

I'll field this question.  Just give me a moment to find the countless answers to this littered throughout the thread. 

Actually, that'll take too damn long, like navigating or searching for a relevant post on any thread on any forum, and I want to be old enough to still get an erection by the time I finish this answer.  It's not easy when I still have to look at those goddamn newbie-to-the-internet-made-these message icons up there. 

Let's think of this more like hitting a new milestone, plus it'll fill in this area here so nobody can catch AIDs or whatever it is they get by making a double post. 
Code:
$scene = Scene_Party.new(min_members, max_members, forced_members, locked_members)
min_members = minimum members (had to think carefully for that one)
max_members = maximum members (kind of archaic phrasing, but okay)
Slylock Fox's Kid's Corner Funny Fact:  Minimums should be lower than maximums. 
forced_members = An array of the Actor IDs for those actors who you want to "force" to be in your party.  Arrays look like this:  [1, 2]  Some high mathemagicians theorize that you don't need to use 1 and 2 and can use whatever sensible numbers you want as long as each number is separated by a comma (slang term for Dali's period). 
locked_members = Actors who have been incarcerated for public drunkenness.  You force which position in the party the forced actors must be in, even though it doesn't matter much because RMXP doesn't let you dash, doesn't count your battle victories for you, and it doesn't let you care which character is on point.  All in all, WELL worth the SIXTY ($60, less than a barrel of crude oil, maybe it's still more at this point but not for long) USD you paid for it, right?  I hope I sell my game to 61 people because a game made with this is barely worth a dollar (unless you like ripped, mismatched sprites, poorly rendered midi and nonlooping MP3 and Chrono Trigger/Final Fantasy VII/Kingdom Hearts/Sailor Moon/Torchwood/Alien Nation crossover fanfiction emo drama). 
Oh, right, I was supposed to explain it, wasn't I.  You set which Actor IDs go in which sequential spot, and use nil for a placeholder I think.  Like:  [1, nil, 3]
 
Thanks for the help.

So let me see if I understood it. If I want 8 out of 12 characters available in the party, and Actor 1 must stay in the first position, it would be (nil, 8, nil, 1)?
 
Large and Annoying Signature Pic, meet Unhelpful and Annoying Reply. 

If you want eight characters out of twelve available to put into the party, then you use the "Add Party Member" Event Command to add those eight members you want to be available out of the twelve total characters you've made. 

If you want a party of eight characters but have twelve characters available to put into the party, then use the "Add Party Member" Event Command to add those twelve characters, and set the "max_members" field to 8 when you use the "Call Script" Event Command. 

$scene = Scene_Party.new(min_members, 8, [forced_members], [initial_members])

According to your "(nil, 8, nil, 1)" you will get an error for not using [] for the array of initial_members.  If you used the square brackets [] then the Actor ID 8 will initially be shown in the second party slot and Actor ID 1 would initially be shown in the fourth party slot, as reading goes from left to right in the programming. 

You can't use nil for min_members.  It makes sense to have a non-existent number there.  It'd be like mixing antimatter and matter. 

"Forced Members" are "forced" to be in the party.  "Initial Members" are where the members are "initialized" when the Party Chooser menu is opened.  This is extremely difficult to remember, so write it down everywhere you can, walls, toasters, underpants, etc. 
 
All right, I'm trying hard to interpret what you're saying.

So min_members has to be at least 1. OK, got that.

Not let me see if I got it right. So if I want Actor 5 to be in the 2nd slot and if I still want Actor 1 to always be the first member I'd have to put in [1,5] in the [forced_members], and put [1] in the [initial_members], right? So the code would be:

$scene = Scene_Party.new(1, 8, [1,5], [1])

All right, I got that working now. Thanks.

But seriously, I hate those annoying large signature pics. But that's probably because I browsed GameFAQs most of the time back then.
 
Gamemazta":3okv5bd5 said:
Not let me see if I got it right. So if I want Actor 5 to be in the 2nd slot and if I still want Actor 1 to always be the first member I'd have to put in [1,5] in the [forced_members], and put [1] in the [initial_members], right? So the code would be:

$scene = Scene_Party.new(1, 8, [1,5], [1])

No.

$scene = Scene_Party.new(1, 8, [1], [1, 5])

This is assuming you only want Actor 1 to be a requirement in the party. 

On a completely different note, I have a suggestion for the script that I was wondering if it would be possible to implement.  I notice that when you have an event, like a bed the player can rest in to completely recover, that if you choose the "Recover All... > Entire Party" Event Command that only the people in the current party and NOT in the reserve are healed.  It'd be neat if all the Actors in the array were healed.  Though this makes me wonder why the RMXP development team would see fit to only recovering the people in the current party and not all the actors in the array anyways.  Guess they didn't think it'd matter much.  They left so much out. 

Of course, this doesn't matter as much as the bugs that I mentioned above, as you can easily write around this with a Common Event that recovers all for each individual actor.  And you have to go one by one, since you can't use Actor ID as a variable.  Anything anyone can do to expose the blatant incompetencies of Enterbrain is worth doing.  Frankly, leaving everything beyond RM95 up to scripts was one of them. 
 
@RaijinRagnarok 
Ok, to fix the 'undefined method' error, go in the Party Arrange script, line 67, and replace
Code:
actor = $game_party.actors
for
Code:
actor = $game_party.actors[i]
. The second error should be fixed with version 4.0 (you have version 3.3). However, version 4.0 requires the RMXP SDK 2.3.

Take care!
-Dargor
 
Okay, it tells me it can't find the graphic for "Actor 1" whenever I try to select "Party" from the menu. How do I fix this?
 
In the Party Changer script, under class Game_Temp, under def initialize, set

@use_custom_graphic = false

By default it's set to true, because absolutely everyone in the world already has professionally drawn out facial graphics in RMXP, honest. 
 
Hey Dargor, I was wondering if you fixed that error that GreenBanana pointed out...
"Script 'Party Changer' line 644: typeError occurred
undefined superclass 'Scene_Base'"

I think his had something to do with an SDK or whatever, anyways if you already fixed it then let me know. (I can overlook things easily, lol)
 
The Scene_Base class belongs to the RMXP SDK 2.3. The only reason you could have this error is because you don't have the SDK in your scripts.
 
SF_Vucas":1crgvigz said:
@use_custom_graphic = false
^^^
Exactly what line is that? I can't find it.

It's a magical hidden line that you can skip right to by using Ctrl + F and typing in "use_custom_graphic".  Also, it's right at the top of the script so you probably don't even need to scroll down.  I wouldn't have the same line as you anyways because I copied down the pertinent Call Script commands that you're not supposed to know about unless you read through every last word on this twelve-page thread and pasted them into the comments section so that I could know what they are. 
 
I... keep getting errors. Is it because I'm not putting it information where they're supposed to go? If so... exactly what do I have to do?
 
Dargor":k7jw62gl said:
@RaijinRagnarok 
Ok, to fix the 'undefined method' error, go in the Party Arrange script, line 67, and replace
Code:
actor = $game_party.actors
for
Code:
actor = $game_party.actors[i]
. The second error should be fixed with version 4.0 (you have version 3.3). However, version 4.0 requires the RMXP SDK 2.3.

Take care!
-Dargor
 
First of all, awesome script.

Now, this might be the nit-pickiest thing ever, but I'm not sure how to do this myself. Version 3.3 has no system sounds when confirming/canceling choices in the Party Change menu. Dargor, would you be able to tell me how to add those functions to the 3.3 script? Or, if you've got the free time, upload a 3.3 version with those functions added in already?

If I knew where to add the lines, I'd edit it myself, but I'm unsure and don't want to break the script.
 
Does this work with RTAB (using v1.16 with ADD-ONs)? I'm getting an error if it does. Error comes when trying to go to menu. It's an RGSSError.

Error: Window_Command line 18
Code:
 self.contents = Bitmap.new(width - 32, @item_max * 32)

Help?
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top