Gw Temp

Menu

Tutorial - 'Event Stacking' by DarkStorm

An item about RPGMaker 2000 posted on

Blurb

An interesting glance into "stacking" events into one single event to prevent excessive cluttering.

Body

Event Stacking
By ~ DarkStorm

////////////////////////

NOTE: //
The double forward slash above represents a comment

This tutorial is to show people how to reduce RM2K/3 event clutter by stacking many events into just a
few single map events and using 1 common event.

This will be mainly of use to people who make CBS's and CMS's as there is usually a lot of event clutter on page
i.e. each character having there attack event in a seperate event etc.

Difficulty of this tutorial is Easy >> Moderate (after all this is RM2k...)

Knowledge Required >> Variables, ForkConditions and the call event feature.

/////////Theory////////

Getting many events into one event is actually quite simple, here is how:

First off you will need to decide how many events you will store on each page of your mapn event, how many pages you will
have per event, and finally how many events using this method on one map.

E.g. If you have complex events you may want to keep the events per page quite low so that you don't get confused...
If i needed twenty events placing i might say that i would have two per page, 5 pages, and two map events:
This works at 2 X 5 = 10, 2 X 10 = 20; So that gives me twenty events using just two events on the map!

Now you will need three variables, i will call these:
[MapEventNo]
[PageNo]
[EventNo]

First of all create your two map events and call them whatever you wish.

Now i decided on 2 events per page, so on the first page of my 2st map event my code will be this:

// Map Event 1
// Page 1

// Event 1
<>Conditional: Var [0003:EventNo] is 1
// You put your event code for the event that you want map event 1, page 1, event 1 to be
<>
: End

//Event 2
<>Conditional: Var [0003:EventNo] is 2
// You put your event code for the event that you want map event 1, page 1, event 2 to be
<>
: End
// End of example code


You then make the next 4 pages on that one event with EXACTLY the same code, the only thing you change is that
you have a different event inside the conditional branch.

You then make the next Map Event Using exactly the same code as above once again only changing the events in each one.


Finally, now that you have your events working you can make a decoding event to call the appropriate event when you
request it:

I.e. I want to get a hero's Hp, the code to do this is stored in Map Event 2, Page 3, Event 1, to do this i would change
the variables [MapeventNo] to 2, [PageNo] to 3, [EventNo] to 1. I would then call the decoding common event and it will
call that event.

First make a common event and name it event decoder, make it so that it is only activated on call.

Now here is the code:

// Event Decoder

// Map Event No 1
<> Branch: Var [0001:MapEventNo] is 1
// Now Check Page Numbers
// Page No 1
<> Branch: var [0002:PageNo] is 1
<>Call Event: MapEvent1[1] //The number in the brackets is the page Number btw
<>
: End

// Page No 2
<> Branch: var [0002:PageNo] is 2
<>Call Event: MapEvent1[2] //The number in the brackets is the page Number btw
<>
: End

// Page No 3
<> Branch: var [0002:PageNo] is 3
<>Call Event: MapEvent1[3] //The number in the brackets is the page Number btw
<>
: End

// Page No 4
<> Branch: var [0002:PageNo] is 4
<>Call Event: MapEvent1[4] //The number in the brackets is the page Number btw
<>
: End

// Page No 5
<> Branch: var [0002:PageNo] is 5
<>Call Event: MapEvent1[5] //The number in the brackets is the page Number btw
<>
: End
<>
: End

// End of Example

As you may have noticed i have only whown the coding for map 1, that is because to decode map to use the exact
same code as shown above (placed under the above code in the event decoder common event) all you have to do
is change the comments and change it so that it calls map event No 2 instead of map event number 1.

That is the end of the tutorial, i hope someone will find this useful! ^_-

Any feedback should be sent to dark_stormx@hotmail.com

~DarkStorm