(RM2K3) HOW DO YOU STORE A CHARACTER AS A VARIABLE?

Posts

Pages: 1
Ok, I want to make a multiple party dungeon system (like the last area in FF6) one problem though, I can't figure out how to set the characters to a variable. When I go to the change party section, it will give me the option to add character based off the variable they are stored in.


But how on earth do I store a character to a variable, please help and thanks.
By using several "Conditional Branch"es checking whether hero XX is in the party and setting a variable/switch accordingly.

You cannot store the ORDER of the party members this way, though. (It would be possible to create a DynRPG plugin for that, however.)
author=Cherry
By using several "Conditional Branch"es checking whether hero XX is in the party and setting a variable/switch accordingly.

You cannot store the ORDER of the party members this way, though. (It would be possible to create a DynRPG plugin for that, however.)

Wow, as a veteran with RM2K/3 I should have thought about the conditional branch. Duh, silly me. Thanks Cherry.

As for DynRPG. I wouldn't know where to begin.

EDIT: I spoke to soon Cherry, I was playing around with the Conditional Branch idea and could't figure it out. If you have time, could give a little more detail.
Well, I didn't mean that YOU should bother with creating a plugin. :-)

About the conditional branch:

METHOD 1: ONE SWITCH PER HERO
<> Switch {0101-0199} = OFF (you don't need 99 switches actually, just as much switches as heroes)
<> Conditional branch: If hero #1 is in party
...<> Switch {0101:Hero1} = ON
: End
<> Conditional branch: If hero #2 is in party
...<> Switch {0102:Hero2} = ON
: End
<> Conditional branch: If hero #3 is in party
...<> Switch {0103:Hero3} = ON
: End
... and so on. (You could even use RMEventFactory to create all branches at once in case you have many heroes.)
Result would be switches beginning with 0101 being set to ON if the hero is in the party (e.g. 0101=OFF, 0102=ON, 0103=ON, 0104=OFF, 0105=OFF, 0106=ON, 0107=OFF, etc. would mean heroes #2, #3 and #6 are in the party).

METHOD 2: ONE VARIABLE PER PARTY MEMBER SLOT (doesn't preserve the order either, unfortunately)
<> Variable {0100:Counter} = 101
<> Variable {0101-0104} = 0
<> Conditional branch: If hero #1 is in party
...<> Variable {V{0100:Counter}} = 1
...<> Variable {0100:Counter} += 1
: End
<> Conditional branch: If hero #2 is in party
...<> Variable {V{0100:Counter}} = 2
...<> Variable {0100:Counter} += 1
: End
<> Conditional branch: If hero #3 is in party
...<> Variable {V{0100:Counter}} = 3
...<> Variable {0100:Counter} += 1
: End
...and so on.
Result would be variables 0101 to 0104 being filled with values corresponding to the party members (e.g. 0101=3, 0102=6, 0103=7, 0104=0 would mean heroes #3, #6 and #7 are in the party)
The number stored in the variable references the Hero's ID# when you call it using that function.
So what you would want is a variable named 'Party1;Hero1' or your preferred syntax, followed by 'Party1;Hero2', 'Party1;Hero3', 'Party1;Hero4', and then start 'Party2;Hero1', and so forth. As the player picks his teams, you assign the character ID to each variable accordingly. Then it's just a matter of loading each Hero for the Party you're loading.

You probably want to disable Order if you're using the DMS though. Players who slap their team together then arrange them will be irked when each party rotation re-mixes their party.
What do you post an empty message for?
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
Cherry's second method is quite brilliant, it's a much simplified version of the way I did it in my game. Instead of using the variable that stores the number of party members as an index for the other variables, I just made a billion nested conditional branches.

I did do one tricksy thing, which is that I made it so my heroes are always in the same order. James is always first if he's on the team. Cole is always next after James; so if James is on the team he's second, otherwise he's first. Dak is always next after Cole. Taron is always next after Dak. Etc. Then in the event where I detect who's on the team, I check for them in that order. The end result is that the four variables not only store my four team members, but store them in the same order they're actually arranged in my party. So the first variable is always the first party member, and so forth.

Either way, an event that identifies your party members and stores them in variables is a great common event to have. I call it every time I have a cut scene, so I know who should be present.
I posted a suggestion but I realized it was just the same thing you had said under method two. I guess I should have left it up, but I didn't know you couldn't delete messages.
ok, thanks guys. Ill try that out in the next few days and let you know how it worked out.
Pages: 1