In this tutorial you will learn...|
How to modify my party-switching script
Hello again! Welcome to my tutorial on modifying my party-changing script. This is the first specific script system tutorial, even though I used
this script as an example in the previous tutorial. Here I am going to teach you how to modify this script so that you
can have more than seven people in your party and you can switch out with them during battle. So, let's get going - open up your project that
has the party-switcher installed, and open up the script editor. Firstly, I am going to teach you how to modify the script for the battle
switching window. Navigate to the Scene_Battle 3 script and scroll down until you come across this...
This is the start of my custom method. Scroll down to the bottom, and here you will see some case branches. I could sit here for quite a while
explaining about cases and how this method works, but that's a lesson for another day. So, find, in the code, where it says this...
This is where we will be adding extra case branches in. So, to do this, we need to highlight the code from
when all the way down to where it says
phase3_next_actor, like so...
Okay. Right-click and copy, and then insert a new line underneath where it says
phase3_next_actor, and then paste in what we have just copied, so you get something like this...
So far, so good! Now we need to change a few things - but they're only numbers, so it's not to complicated!
Firstly, we need to change the case to say
when 2 so that it says
when 3 instead. Got that? Now, there are three other instances of
the number 2 that we need to change to
3. Can you spot them? I'll post a picture with the changes highlight so that you can see...
Can you see all the changes? (I've also added another comment at the top, but this is unimportant, really). This will now allow us to have up
to eight actors in our party. Well done for following so well! If you want more actors in your party, just follow exactly the same pattern,
changing all the figures in the red boxes in the picture above to correspond with the new branch. For example, the next time, you would
change all the figures to 4.
Excellent! So now we know how to add more actors to the battling scene - say you want to add more players to the menu screen. At the moment,
the script can accomodate for a party of up to 12 players, but if you want more, you'll have to do a little modifying.
In your script editor, find the script entitled Window_MenuStatus. When you've found that, scroll down right to the bottom, where you should
Now, see where it says if @index and so on? This is where
we will start copying from. Highlight everything from there down to where it says end,
like so (it doesn't really matter which one you copy)...
Copy this and paste it below the end, but before the line of dashes. You should be left
Right - now, just a couple of things to change, and then we're nearly done. The values we need to change here are 8, 928 and the other 8 lower
down. The first eight needs to be changed to 12 - it'll take me quite a while to explain where this value comes from, but for now you just need
to know that this is the maximum number of people in your party less 4. The 928 value needs to be changed to 1,392 - which is our first number,
12, multiplied by 116. And finally, the last 8 value also needs to be changed to 12. Okay? This is what your new snippet of code should look
like, with changes in red boxes like before...
Got it? If you want to extend this even further, you just need to keep in mind the formulae: the first values increase in intervals of four, so
the next value will be 16, and then 20, and so on. The larger value is simply the smaller value multiplied by 116.
There's just one last tiny thing to do before we're all set with extending this script - and that's making the same changes as we just
have here in the class Window_Target. Find the Window_Target class in the script list, and, again, scroll down to the bottom. You'll see something
similiar to what we have just changed in Window_MenuStatus. Just make the same simple changes that we made in Window_MenuStatus, and then you're
set to go! Here is a picture of the changed Window_Target...
And that's it! We're completely done changing the script for more players. I hope that you've found this tutorial easy enough to follow. The
next tutorial will be on installing and using my respawning script.
:: << Previous Tutorial ::
:: Home ::
:: Next Tutorial >> ::