Gw Temp

Menu

Tutorial - 'Memorize/Restore Party System' by Rife

An item about RPGMaker 2000 posted on

Blurb

Learn how to create a Memorize/Restore Party system, to get those parties back together!

Body

On occasion in RM2k games the storyline calls for one character in a party to go solo for awhile, or sometimes a complete party substitution is in order. If you have a lot of characters that could be in the party at a particular point in the game, it's difficult to remember who was in it when you need to return to the former party. It was for this and other reasons I designed a Memorize Party and Restore Party system. Basically, you set up two common events activated by Call.

Let's work on Memorize Party first. First, you need 5 variables.

[code]
Variable Ch:[0001:Party member 1] Set, 0
Variable Ch:[0002:Party member 2] Set, 0
Variable Ch:[0003:Party member 3] Set, 0
Variable Ch:[0004:Party member 4] Set, 0
Variable Ch:[0005:Members in party] Set, 0
[/code]

This resets the memorized party to blank. You can memorize more than one party if you like by creating a duplicate call event with different variables, but most people will only need one.

Now here's the tedious part. For each and every hero you must set up a fork along the following lines:

[code]
FORK Optn:Alex is in the Party
<>Change Hero's Party:Alex->Remv
<>Change Switch:[0001:Alex on standby]-ON Set
<>Variable Ch:[0005:Members in party]+,1
<>Variable Ch:[0006:Hero ID] Set, 1 (or whatever the Hero ID is for the character in the Heros list)
[/code]

The switch is optional, but it does come in useful. For instance, in my game Dimensions of Disorder I use Drakul's caterpillar system, which uses parallel process events to simulate party members following the main hero. I used the standby switch to turn off the following characters. You can also use the switch to keep track of which heroes are travelling with you but not in the party at present for dialogue or plot purposes.
This next part helps keep the order of the party members intact. This is not strictly necessary, but it is nice.

[code]
(continuing under the Alex in Party fork)
<>FORK Optn:Varbl[0005:Members in party]-1
<>Variable Ch[0001:Party member 1] Set, Var.[0006] (the Hero ID)
<>
:END
<>FORK Optn:Varbl[0005:Members in party]-2
<>Variable Ch[0002:Party member 2] Set, Var.[0006]
<>
:END
<>FORK Optn:Varbl[0005:Members in party]-3
<>Variable Ch[0002:Party member 3] Set, Var.[0006]
<>
:END
<>FORK Optn:Varbl[0005:Members in party]-4
<>Variable Ch[0002:Party member 4] Set, Var.[0006]
<>
:END
[/code]

Cut and paste will help with the tedium, and all you have to alter is the Hero and his ID. Now you'll note this leaves you with a heroless party but RM2k allows this as long as you immediately add a member after you call the Memorize Party event. Now let's move on to Restore Party. It's actually rather simple. First it adds the party members according to the Hero IDs stored by Memorize Party, then it turns off the standby switches according to who's in the party.

[code]
Change Hero's Party:V[0001]->Add (Party Member 1)
FORK Optn:Varbl[0005:Members in party]-2 abov
<>Change Hero's Party:V[0002]->Add (Party Member 2)
<>
:END
FORK Optn:Varbl[0005:Members in party]-3 abov
<>Change Hero's Party:V[0003]->Add (Party Member 3)
<>
:END
FORK Optn:Varbl[0005:Members in party]-4 abov
<>Change Hero's Party:V[0004]->Add (Party Member 4)
<>
:END
FORK Optn:Alex is in the Party
<>Change Switch:[0001:Alex on standby]-OFF Set
<>
:END
[/code]

That's pretty much it. Usage is as follows:

Call Event: Memorize Party
*Add temporary party and set them on thier way*

And when you need to return to the memorized party, remove all members in temporary party, then
Call Event: Restore Party

Hope you find this useful. As always, credit is appreciated when code is used. Any questions, email me at rife@lycosmail.com