Jayje

THE Lone Indie Cheese!
Veteran
Joined
Sep 22, 2013
Messages
331
Reaction score
197
First Language
English
Primarily Uses
RMXP

I know there may be some Party Swapping plugins out there for RPG Maker MV, but I wanted something that was really easy and stripped down to use. So I looked around for a bit, but didn’t find anything that really worked for my needs. Then while I was surfing the web, I came across a bit of code that I helped out. So with that out the way, let’s get this tutorial going!

Step 1
What you’ll need to do is setup variables attached to your party. Conveniently, RPG Maker MV has this covered for you.

Just open the Event Editor and click where it says Control Variables. In the Variables window, choose a variable you want to use and click the Game Data button. Another window will pop up with a bunch of option. Click the next to last button next to Party and choose “Member 1” (the engine limits the party size to a max of 4 on the screen). When you’ve finished, your screen should look like this.


Step 2
You should have four separate variable for all you party members to help record their IDs. Now what? EASY!!


Step 3
Next, you have to set up a Choice menu to access the member of your party. All you need to do select Show Choices in the “Choices” boxes, you should type in this code \N[\V[1]], \N[\V[2]], etc. (See below Pictures)

Also, make sure you set the Cancel function to “Branch“. This is so you can cancel this action if you change your mind.


Step 4
Now go to the last page in the Event Editor and click the Script button (Left Picture). A window will show up and you’ll see an empty box (Right Picture) where you can type in code. For this one, you’ll type this: $gameParty.swapOrder(0, 1);. Just switch the last number to either 2 or 3 for the other party members.


RESULT


NOTE: The first choice slot is empty because you’re not swapping the first party member with the same member.

Here’s the result!


EXTRA Step
If you want to do a switch for ALL Members in the party, you would need to make a change to the Show Choice event. See the pictures below for how to do that. It’s just a simple Choice menu nested inside a Choice menu.




And you're done! Hope you enjoy this!
 

Zarsla

Veteran
Veteran
Joined
Jan 23, 2015
Messages
690
Reaction score
205
First Language
English
Primarily Uses
Something to help simplify what you're doing.
Use \p[x] instead of \n[\v[x]]. \p[x] returns the name of the person whose in that position for example \p[1] is the name of the party leader
 

Jayje

THE Lone Indie Cheese!
Veteran
Joined
Sep 22, 2013
Messages
331
Reaction score
197
First Language
English
Primarily Uses
RMXP
Thanks. Glad you shared that!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 2)

Latest Threads

Latest Posts

Latest Profile Posts

convention concluded, i'm glad the books well received and sold out
not every content is decent, but i'll be better for the next work.

now back to game developing
I hope to be able to post my vxace resource edits this Wednesday.
Not sure if I'll get to the library though.
Me: Man, I'm definitely burned out this time. Time for a break. Me three hours later: I'm ready to work again, let's go! Me another hour later: Okay, I can't do this anymore. Repeat for infinity.
Just got MV and am working on porting over my new game from VX Ace to it! I haven't done much with my new game so it should be pretty quick.
I was doing forge runs on D2 with my wife last night, and singing like a leprechaun to annoy her XD. I was calling it 'The Farge'

Forum statistics

Threads
94,448
Messages
921,037
Members
124,279
Latest member
Lacy
Top