[RM2K3] MANUALLY TRACK THE ORDER OF PARTY MEMBERS
Posts
Hello,
In my RM2K3 game, I have a Caterpillar system (Kentona's, to be precise), but now I have a problem.
You see, when I re-arrange the order of party members in-game, only the sprite of the Hero changes. The following three don't change.
This is because I don't know of a way to keep track of the order of party members, in other words, which party member is in which character slot. If I can somehow keep track of that, I can change the Caterpillar sprites accordingly.
So, is there a way to do it?
In my RM2K3 game, I have a Caterpillar system (Kentona's, to be precise), but now I have a problem.
You see, when I re-arrange the order of party members in-game, only the sprite of the Hero changes. The following three don't change.
This is because I don't know of a way to keep track of the order of party members, in other words, which party member is in which character slot. If I can somehow keep track of that, I can change the Caterpillar sprites accordingly.
So, is there a way to do it?
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
You have to do it manually. That is, each time an event adds or removes a party member, you need to assign the new members' IDs to four variables. I recommend also having a "number of characters in party" variable for the sake of your sanity.
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
So, at the beginning of the game, let's say you start with one character, Cloud. Cloud's ID is 1. You can tell what a character's ID is in the first tab of the database, the heroes tab - the first hero listed is #1, the second hero listed is #2, and so forth.
Since Cloud is the only party member, you will set the variable "number of characters in party" to 1, and set the variable "First party member" to 1 (Cloud's ID). You'll do this at the very beginning of the game.
Later, you add two more party members at the same time: Aeris and Tifa. The order of party members is Cloud,Aeris,Tifa. Tifa's ID is 3 and Aeris's ID is 4.
You will set the variable "number of characters in party" to 3, set the variable "Second party member" to 4 (Aeris's ID), and set the variable "Third party member" to 3 (Tifa's ID). You'll do that at the same time that you change the party.
Later Aeris gets killed so you remove her from the team. The order of party members is now Cloud,Tifa.
You will set the variable "number of characters in party" to 2, set the variable "Second party member" to 3 (Tifa's ID) since she's taking Aeris's spot in the second slot, and set the variable "Third party member" to 0 since you don't have a third party member any more. As before, you'll do that at the same time that you change the party.
Make sense?
You can now, at any time, see who's in what slot. If the variable "Third party member" is equal to 3 that means Tifa is the third party member. If the variable "Third party member" is equal to 4 that means Aeris is the third party member.
Since Cloud is the only party member, you will set the variable "number of characters in party" to 1, and set the variable "First party member" to 1 (Cloud's ID). You'll do this at the very beginning of the game.
Later, you add two more party members at the same time: Aeris and Tifa. The order of party members is Cloud,Aeris,Tifa. Tifa's ID is 3 and Aeris's ID is 4.
You will set the variable "number of characters in party" to 3, set the variable "Second party member" to 4 (Aeris's ID), and set the variable "Third party member" to 3 (Tifa's ID). You'll do that at the same time that you change the party.
Later Aeris gets killed so you remove her from the team. The order of party members is now Cloud,Tifa.
You will set the variable "number of characters in party" to 2, set the variable "Second party member" to 3 (Tifa's ID) since she's taking Aeris's spot in the second slot, and set the variable "Third party member" to 0 since you don't have a third party member any more. As before, you'll do that at the same time that you change the party.
Make sense?
You can now, at any time, see who's in what slot. If the variable "Third party member" is equal to 3 that means Tifa is the third party member. If the variable "Third party member" is equal to 4 that means Aeris is the third party member.
Does it really work that way? I never thought you could use the hero numbers in the database with variables. It does make sense though, gonna try it out later today.
I don't actually think there's a way to set a variable to the Hero ID.
I'd recommend removing the "Order" command from the menu. Then use the variables and check each time your party changes.
Then if you want to be able to rearrange your party, you'll make a custom common event that lets you do that. In that common event, it'll fix your variables.
I'd recommend removing the "Order" command from the menu. Then use the variables and check each time your party changes.
Then if you want to be able to rearrange your party, you'll make a custom common event that lets you do that. In that common event, it'll fix your variables.
Okay, so I tried some shit out.
However, I changed things up a bit. Instead of being able to freely re-arrange party members, I made it so that when the player presses Shift, every party members moves up a slot.
So the player starts out with four party members, in the order of Hero (Alex), Follower (Brian), Third (Azure), and Rearguard (Don Miguel).
If the player presses Shift, the order becomes Follower, Third, Rearguard, Hero. If the player presses Shift again, it becomes Third, Rearguard, Hero, Follower. If the player presses Shift again, it becomes Rearguard, Hero, Follower, Third. And if the player presses Shift once more it again becomes Hero, Follower, Third, and Rearguard.
Anyway, it works, but there is one problem: I get huge lag because I have two parallel process common events running at the same time.
These are the common events I'm using:
This event assigns a number to the total amount of party members (though that's still irrelevant here) and a number to each party member. When Shift is pressed, all party members move up a number.
This event constantly checks what the number is of the variable First Party Member, and by knowing that it re-arranges the party to the correct order by removing all party members and re-adding them in the correct order. It works seamlessly.
This is actually flawless save for the fact of the lag. It's not like the entire game freezes up, but it does become unplayable.
Is there any way to make this more compact?
However, I changed things up a bit. Instead of being able to freely re-arrange party members, I made it so that when the player presses Shift, every party members moves up a slot.
So the player starts out with four party members, in the order of Hero (Alex), Follower (Brian), Third (Azure), and Rearguard (Don Miguel).
If the player presses Shift, the order becomes Follower, Third, Rearguard, Hero. If the player presses Shift again, it becomes Third, Rearguard, Hero, Follower. If the player presses Shift again, it becomes Rearguard, Hero, Follower, Third. And if the player presses Shift once more it again becomes Hero, Follower, Third, and Rearguard.
Anyway, it works, but there is one problem: I get huge lag because I have two parallel process common events running at the same time.
These are the common events I'm using:
This event assigns a number to the total amount of party members (though that's still irrelevant here) and a number to each party member. When Shift is pressed, all party members move up a number.

This event constantly checks what the number is of the variable First Party Member, and by knowing that it re-arranges the party to the correct order by removing all party members and re-adding them in the correct order. It works seamlessly.


This is actually flawless save for the fact of the lag. It's not like the entire game freezes up, but it does become unplayable.
Is there any way to make this more compact?
Try putting in Wait (0.0) at the end of those parallel processes.
I have a way to store the IDs of the party members in variables for you. :-)
Tell me whether you use the default battle system or not, and which RM2k3 version and which patches you use.
Tell me whether you use the default battle system or not, and which RM2k3 version and which patches you use.
I do use the default battle system, but I modified it a bit to be more like Rm2k's battle system.
And I use Rm2k3 1.08
And I use Rm2k3 1.08
Well, if you want it more like 2k's system, then what I offer you might come in handy anyway.
Take a look at this: http://share.cherrytree.at/showfile-1900/tbbpatch_demo.rar
Makes the battle system turn-based and also adds other features, including finding out the party members and their order. To use this thing, replace your rpg_rt.exe with the one in the archive.
The reason why I asked you whether you used the default battle system was that in case you did not want it to be turn-based, I could create a special version which just includes the party-member-thing and nothing else.
Take a look at this: http://share.cherrytree.at/showfile-1900/tbbpatch_demo.rar
Makes the battle system turn-based and also adds other features, including finding out the party members and their order. To use this thing, replace your rpg_rt.exe with the one in the archive.
The reason why I asked you whether you used the default battle system was that in case you did not want it to be turn-based, I could create a special version which just includes the party-member-thing and nothing else.
Well it sounds nice and I would do it but to be honest even if I can find out the order of party members, will this thing get any easier? Right now I've assigned a number to each party member slot which seems to do the same thing.
Oh, I see, I missed that part. Sorry.
Well, I wouldn't use two parallel processes, but only one, looking like that:
{Let's assume, the variable "First member" is set to 1 at the beginning.}
<> Key Input Proc, Shift, wait for key press (variable doesn't matter)
<> Change variable {First member} += 1
<> Branch if var{First member} == 5
....<> Change variable {First member} = 1
: End If
<> Remove hero #1
<> Remove hero #2
<> Remove hero #3
<> Remove hero #4
<> Branch if var{First member} == 1
....<> Add hero #1
....<> Add hero #2
....<> Add hero #3
....<> Add hero #4
: End If
<> Branch if var{First member} == 2
....<> Add hero #2
....<> Add hero #3
....<> Add hero #4
....<> Add hero #1
: End If
<> Branch if var{First member} == 3
....<> Add hero #3
....<> Add hero #4
....<> Add hero #1
....<> Add hero #2
: End If
<> Branch if var{First member} == 4
....<> Add hero #4
....<> Add hero #1
....<> Add hero #2
....<> Add hero #3
: End If
<> Wait 0.0
(You don't need the patch then, unless you want a turn-based battle system^^)
Best regards,
Cherry
Well, I wouldn't use two parallel processes, but only one, looking like that:
{Let's assume, the variable "First member" is set to 1 at the beginning.}
<> Key Input Proc, Shift, wait for key press (variable doesn't matter)
<> Change variable {First member} += 1
<> Branch if var{First member} == 5
....<> Change variable {First member} = 1
: End If
<> Remove hero #1
<> Remove hero #2
<> Remove hero #3
<> Remove hero #4
<> Branch if var{First member} == 1
....<> Add hero #1
....<> Add hero #2
....<> Add hero #3
....<> Add hero #4
: End If
<> Branch if var{First member} == 2
....<> Add hero #2
....<> Add hero #3
....<> Add hero #4
....<> Add hero #1
: End If
<> Branch if var{First member} == 3
....<> Add hero #3
....<> Add hero #4
....<> Add hero #1
....<> Add hero #2
: End If
<> Branch if var{First member} == 4
....<> Add hero #4
....<> Add hero #1
....<> Add hero #2
....<> Add hero #3
: End If
<> Wait 0.0
(You don't need the patch then, unless you want a turn-based battle system^^)
Best regards,
Cherry
Awesome, it works flawlessly now. Thanks a lot.
That turn-based battle system might be useful in the future, so also thanks for that link.
That turn-based battle system might be useful in the future, so also thanks for that link.
Uh oh, I guess I spoke too soon. Turns out there is one bug with this. When the player moves into a spot that's next to an unpassable tile, and Shift is pressed 4 times, sometimes the last two party members will move into an unpassable tile.
To make it more clear I made this video:
Do you think the problem is in the Caterpillar or in the code above?
To make it more clear I made this video:
Do you think the problem is in the Caterpillar or in the code above?
author=Cherry
Take a look at this: http://share.cherrytree.at/showfile-1900/tbbpatch_demo.rar
Makes the battle system turn-based and also adds other features, including finding out the party members and their order. To use this thing, replace your rpg_rt.exe with the one in the archive.
Hmm... When did you create this gem? I will test it out later.
Try something that makes it where if those events touch a certain area, it doesn't allow them to pass. Such as the border of the land and the sky.




















