Gw Temp

Menu

Tutorial - 'Switch-Event Tutorial' by Guest

An item about RPGMaker 2000 posted on

Blurb

ED explains how to use switches. For all you GW n00bs out there.

Body

!ED's guide to SWITCHES and EVENT wackiness!

Switches. Ask anyone and they’ll tell you it’s one of – if not – thee most important things you need to learn in RpgMaker since it piggy backs to all other functions – variables, events, fork conditions. All of these things are what make your Rpg come to life, from talking to people, to opening chests, to simply winning the game. But WHAT are switches. Well switches are “boolean memory locations”. GUH! Well if that doesn’t make sense to you that’s cool, because it doesn’t make sense to A LOT of people. Put in more simpler terms, SWITCHES are items that can only have two properties – On and Off. Now SWITCHES can have more than one funciton, but these functions will only ever have two states – either it is or it isnt. For example, a TREASURE CHEST. The TREASURE chest will either give you an item (switch is on), or it wont (switch is off). Off course someone could make an event and flip-flop that, but we’ll get to that later. To reiterate, a TREASURE CHEST can have two states, opened (switch on), or closed (switch off). We’ll be using that as an example later.

Now, where do we find SWITCHES in RPG MAKER. Well sir, switches can be found in the EVENT LEVEL (it’s the last level on the row of LEVELS: LOWER, UPPER, EVENT). Once you click on that your map grid should be sliced into nice little tiles. This is because a tile will hold on event starting position. Now we can either double click, or right click to bring up the EVENT EDITING menu. This is where the action takes place. From here we set whats going to happen on this particular map, in this particular tile. We can see it as a TELEPORT point to transition from one map to another (entering a cave, entering a town, warping to the start of a dungeon or other place), we can set a character to show up after passing this tile, or we can put a treasure chest here, or even have this be the starting position of a very important NPC (non-playable-character). Most anything you can think to do, we can do it. But what we want to do now is create a simple TREASURE CHEST to give us a potion. Simple. This is how we’re going to do it:

First lets take a look at the EVENT EDITOR. At the very top we can see this events ID. If its your first event, then its ID will be 1. Each MAP will have its own SET of EVENTS, so every new map when you place an event will have a 1 ID. Common rule of thumb is to not toss too many events on to one map (such as having 300 or so things to do in a single city map), so a workaround to that might be to split your large areas up that you think might get to EVENT heavy. You can choose to give your EVENT a name right below its id, so that if you come back to it, finding “Get Mr. Pearsons Eyeglasses” might be easier to find than “EV001”. Again its your preference, but try to get into the habit of naming events after what they are. A treasure chest in the Ice Cage would be “TrsrChst1IceCage”. If it contains a special item, might want to include that as well. Remember to keep ways you label events uniform.

Next to that, we can see NEW PAGE, and COPY PAGE. We’ll get into that later, but obviously it’ll give you a new page, or copy an existing page (a useful tool if you are making MULTIPLE instances of similar events such as. . tada. . .Treasure Chests).

Below that we see a TAB with the number one in it. This tells us we are on the FIRST PAGE of this event. EVENTS can have a ton of pages. We’ll go into using multiple pages in a few examples. It defaults you with the first page, and allows you to add on using the NEW PAGE button as needed. Below that we have two CHECK boxes named SWITCH, one for VARIABLE, ITEM, HERO, and TIMER. What this means, if for this EVENT to happen, we can check any of those boxes and specify what SWITCH needs to be ON/OFF, what VARIABLE (a number) needs to be present, what ITEM the HERO must have (“You need the crystal key to enter”), what HERO needs to be in your group (“I cannot allow you to continue without Tidus in your party”), or during what TIME you can access something (“Mr Bartleby is only availble between X-X. Come back later”). These are called EVENT CONDITIONS. They are mandatory for this EVENT to take place. You can have ONE or MORE of these boxes ticked. For example, using the dialogue above we could make an event that said, you need to have spoken to MR WILLIBEE (SWITCH ACTIVATED), as well as HERO having X (VARIABLE) amount of EXP, while in possossesion of the DRAGONS HEART (item), which can only be used by TIDUS (HERO) during the hours of 7am-12pm (TIMER). All you would do is check the mark besides the condition you want to set, and find the value of that condition. A value for a SWITCH would be to find what switch you’ve created. For ITEM it would be something like a potion, hero a hero, and timer a range of time. Simple enough right. To sum up: Event conditions are conditions that MUST be satisfied before the EVENT you will create will start. Of course for simple thing, like treasure chests, or TELEPORT points, you don’t need EVENT CONDITIONS (unless you’re making locked CHESTS or TELEPORTS) to start. But if you’re ever played an RPG, such as ZELDA, and realized you need the MONSTER KEY to open that door, this was an example of an EVENT with EVENT CONDITIONS. The EVENT was “Monster Door Opening”. The EVENT CONDITION was having the ITEM “MONSTER KEY” in your possession. Understand SWITCHES, and EVENTS and EVENT CONDITIONS is easier if you try to visualize someplace where you have seen them in action like the example above. As you go through this tutorial, when I explain something think of a game you played that might mirror what we’re talking about. Makes it easier to understand the CONCEPT and once you’ve got the concept down, you can do anything.

Immediately below the EVENT CONDITIONS is the EVENT GRAPHIC area. Now if you’re event was a simple TELEPORT you might not want to have a graphic – especially if it’s a hidden one. Of course for more obvious events, such as TOWN FOLK (non-playable-characters), treasure chests, ATM Machines, Locked Doors, then yes we’re going to need a graphic to represent this event. We can also choose its movement patters, how to START the event (Hero Touches it, which means you just run OVER and NEXT TO it), PUSH KEY (use the ACTION key to start it), Event touches you (for CREATING MONSTERS that follow the HERO and initiate combat), or it simply starts on its own. You can position it below, same level, or above hero – all up to you. Change its movement type, and even define it’s pattern, meaning you will edit on what trail the event will move. Whew. That’s a lot isnt it. But that’s only the left side, but the left side does give us some powerful options in creating our event. But what do we want our event to do?

On the right hand side is where we give out event instructions. So the LEFT SIDE defines CONDITIONS and LOOK, the RIGHT SIDE is for inputing CONTENT. To activate the long list of EVENTS you can create, simple double click or right click, and the EVENT’s MENU will pull up. From here we can do a number of things: START COMBAT (on Hero Touching an enemy, we go into a battle), INCREASE HP (Hero steps into a spring, on touch, party’s HP is restored), MEMORIZE PLACE (on PUSH KEY, you’re starting position is marked, and on another EVENT you teleport back to that position). We can string as many as we want on one page, as long as it all flows correctly and logically. For now we’ll start small. So to recap, this area is for INPUTING your events, and the left hand side is for defining how it looks and starts up. Again CONTENT (right side), CONTROL (left side). Now – lets set about making our first event.

To begin, lets go out of EVENT MODE, and into LOWER MAP MODE, and make a VERY generic grassy area. Make it about 15x15 tiles, or whatever you feel comfortable with. Give your hero some breathing room for when we test our play game. Add whatever you want but make sure we keep some space open. Now lets head on back to EVENT MODE, and right click on an empty space. We see our EVENT ID generated for us, but lets name this EVENT: POTION. Now since we’re going to create a treasure chest, do you think we need any EVENT CONDITIONS to start the event? Most likely no since it’s a generic treasure chest that anyone should have access to. So we wont click on anything under EVENT CONDITIONS. Now for the graphic. We’re making a treasure chest, so it might be practical for our event to LOOK like a treasure chest. So click on SET and find a Closed Treasure Chest graphic. Lets leave activation method as PUSH KEY, and we’ll keep the movement at default since we don’t want the TREASURE chest hopping around (althoug
h again, if you DO want a hopping around treasure chest, maybe its haunted or something, be my guest). Now lets go about creating the EVENT. Double click in the EVENT COMMANDS area to call up the EVENTS, and lets choose ADD ITEM. We’re choosing ADD ITEM because we want to ADD a POTION to our party’s inventory. Now, when you click on ADD ITEM, we’re taken to a screen where we can customize this EVENT. We can choose to either ADD or TAKE an item (such as if youre swapping something for another thing with an NPC – in that case you’d have TWO ADD ITEM events, with one set to ADD, and one set to DROP), whether its FIXED or VARIABLE, the AMOUNT – fixed or VARIABLE. In most cases all youll need to change is the type of item, if its dropped, and how many. We’ll cover VARIABLE options in another tutorial. Go ahead and leave everything default, and click on the OK button. ADD ITEM: POTION will now be the FIRST EVENT executed. We want the player to know that something DID occur, so lets put a little message s
aying “RECEIVED POTION”. Double click in EVENT COMMANDS again, and click on the SHOW MESSAGE event, and type in any notification message. Now, go ahead and click OK at the bottom of the screen, and we’re taken back to the WORLD MAP, and we can see a graphic of our CHEST sitting on one of the EVENT panels. Lets try it out. Make sure you have an PARTY STARTING POSITION SET (simply right click on one of the tiles in EVENT MODE, and click on the set PART POSITION – make sure its not on water or an impassable tile, or on our event –). You’ll now see a little graphic of a starting position for our hero.

At the top of the toolbar, go ahead and click on the YELLOW ARROW to run your game in window mode. We should see our hero, and theres the CHEST. Lets go see if we can get a potion out of it. And we do. Great one potion. Now click on the CHEST again. HEY! Another potion. Click again. Uh oh. ANOTHER potion. Ang again and again and again. Now, unless a BOTTOMLESS POTION GIVING CHEST is part of your storyline, this is something we do NOT want to happen. So, how are we going to make it, so that a generic chest, only gets used once? By using switches and turning this chest OFF.

So lets get on out of our demo, and head on back to EVENT MODE. Let’s right click on our treasure chest, and choose EDIT EVENT. We’re back to the familiar screen. The reason out TREASURE chest kept on giving us potions, is because we didn’t set any kind of OFF button for it, and only have ONE instance for this event, instance referring to when you click on an event what happens. What we want to do is create another INSTANCE where the Hero clicks on the EVENT and nothing happens. To do that, we’re going to create a NEW PAGE for this event. So instead of giving out more potions than ONE, it’s going to do something else AFTER we get the potion.

What we want to do, is below MESSAGE, right click and INSERT, and we will choose CHANGE SWITCH. What this is going to do for us, is when after we get that potion, its going to SWITCH over to PAGE 2, and from then on out, whenever you click on the treasure chest, it’s not going to read from PAGE 1, but will read from PAGE 2.

When we click on CHANGE SWITCH the EVENT EDITING menu appears for this EVENT TYPE, and we can create our SWITCH. You see we have the option of CHANGING a single SWITCH, or a RANGE of SWITCHES, or VARIABLE, and we can choose to set this SWITCH to ON or OFF (more on that later). Where we see the “. . .” button, click that so we can either choose our switch or name it. We’re gonna name it Treasure Chest Opened, and it is given the ID of 1. Go ahead and click ok, and click ok to set this SWITCH. So now what we have done is created a switch that will be activated on the FIRST INSTANCE of using this CHEST, so that when your players go back to the CHEST it will start on PAGE 2 not page one. Lets go ahead and click on NEW PAGE, so that it creates another INSTANCE for us to edit.

Now that we have clicked NEW PAGE, we are taken to a – you guessed it – NEW EVENT PAGE. From here we are going to set up what we want to happen after the player has taken the potion the first time. But how do we get to this page? Well, we want to set an EVENT CONDITION using a SWITCH. What this means is that the game will first read from PAGE ONE that has no CONDITIONS, PAGE 1 will set up the SWITCH, and the game will then read from page 2 since the switch is active. To do that for page 2 click on the SWITCH slot under event conditions, and lets find that Treasure Chest switch to set it as the EVENT CONDITION. Ok, so after opening the chest, the switch is ON, and from now on itll pop over to this page. You can add another SHOW MESSAGE event letting the player no the CHEST is emtpy, and also adds some character to the game. Go ahead and run the game and see what happens. You click on the CHEST. FIRST INSTANCE. You click on the CHEST again. SECOND INSTANCE, and you get the message “EMPTY. . .”. Click it again, and you get the same message. EMPTY. Since the switch is ON, for this event it will always give you this message.

Simple enough. It really is. SWITCHES help in transitioning from one thing to the next. “If I have done this, then this is going to happen.” “If I have opened the chest, then I cannot open it again.” “If I have talked to Yuna, then Tidus will talk to me”. Switches allow you to link different EVENTS together, so that you can do something in one area, and have it affect an EVENT in another area. As we saw theres more than one spot for a SWITCH to be placed as an EVENT CONDITION so you can specify as many things as you want. And remember what I said at the beginning. Switches can either be on or off. It’ll stay ON until you decide to turn it off, but in cases like the CHEST we don’t want that switch to be turned off, because then it’ll hop back over to the FIRST PAGE, and give that potion over again. Lets see what I mean. Go back to EVENT MODE and lets edit our TREASURE CHEST. Right now the game is set to run page TWO of our event since SWITCH 1 is on and Page 2 has the EVENT CONDITION of running S
WITCH 1. What we do to though is edit this Event so that it loops. To do that we need to turn Switch 1 from ON to OFF so that instead of going to Page 2, this event will start on Page 1 and will loop itself. So lets click in the EVENT COMMANDS, choose CHANGE SWITCH, select SWITCH 1: Treasure Chest, and at the bottom where we see “ON”, “OFF”, TOGGLE ON/OFF, choose OFF. This will turn Switch 1 off every other time we click on the chest. It will run like this:

FIRST INSTANCE, we click on the chest, and it gives up a potion as well as turning “ON” switch 1.
SECOND INSTANCE, we click on the chest, since switch 1 is activated, it will go to Page 2, we will get a message saying Empty, then switch 1 will be turned OFF.
THIRD INSTANCE, we click on the chest, since switch 1 is off, we start on page 1, we get a potion, and then again switch 1 is turned back on.
ETC.

Makes sense? Well go try it out to see it in action. Works doughnut. A more practical use for this is to simply switch up what a character says instead of using VARIABLES. I’m sure after practice you’ll be able to think of your own ways to manipulate this.

Go back to EVENT EDITOR, edit this event with different EVENT COMMANDS and see what results you get. Create more than one page (or INSTANCE) and link the pages together with Switches. Create a loop of a character saying different things when you talk to them. Create a treasure chest that gives three different items, and shuts off on the last item. Get comfortable with getting around in the EVENT EDITOR menu.

Ok now that you’ve had some fun, lets link more than one event together. In the first example we worked with one event that has INSTANCES linked together with SWITCHES. Now we’re going to work with more than one event where one event is conditional on your completing another.

Lets head on back to EVENT MODE, and edit or treasure chest to make it not loop. You should know what we have to do, which is simply delete the CHANGE SWITCH on page 2 so that it doesn’t turn the switch off. Now go ahead and click OK so that we don’t get loop the treasure chest. Click on out of that, and lets create a new event. You know how. Once here lets make it so that theres an old man who REALLY wants that potion. But he cant get it, his hands are so frial and tiny. So, here’s how we’re gonna do it. On the first INSTANCE, all we want is for this guy to say “Man I’d give anything to have that potion in that chest over there.” So, in the EVENTS COMMANDS, click on SHOW MESSAGE, and type that message in. We’re gonna do this simple for now, but there is a way to call up a FACE GRAPHIC is you so choose, and have it actually mimick real dialogue, but like I said, lets keep it simple. So. The guy is aching for a POTION. If you don’t have a potion, he’s going to beg and beg and beg, and all he will
say is “Golly I want that potion”. So lets create a new INSTANCE where you DO have that potion so he can shaddup, and maybe give you something nice for getting that potion for him. So we click on NEW PAGE to create a NEW INSTANCE, and since we want him to respond only if you have that POTION in your possession, lets go ahead and click in EVENT CONDITIONS “Item”, and choose POTION. In the event commands, lets add a couple of messages to let the player know whats going on. The first message should be “Gave Potion”. Right under that, lets click on ADD ITEM. And we don’t want to take we are dropping. So click on DROP instead of TAKE, and this will remove one POTION from your inventory. Then lets add another SHOW MESSAGE that says “Received 200 Gil” (that’s IF you want some sort of reward), and then add a GAVE MONEY Event. If there was another event here you’d specify that – such as trade you POTION for MONSTER KEY – but we’ll leave it just getting some phat cash. Now, if we leave things as they are, t
hen all you would need to do is keep bringing some cheapy potion and give it to the NPC, and hell keep giving you 200 bucks. So, of course we need to create a END point, much in the same way we did with the treasure chest. Simple CHANGE SWITCH. Name it GAVE POTION OLD MAN, hit ok, add NEW INSTANCE, check SWITCH and navigate to GAVE POTION OLD MAN, and leave the rest blank (you could add a show message that says “thank you for the potion”.) Lets try it out. Works didn’t it. Now we could further link these two events by making the “CHEST OPENED” switch the switch needed to be activated to get the 200gil from the old man, since you could easily just buy a POTION and give that one to the old man. Or we could further specify it so that THAT specific potion is the one you need, and there are several ways of doing that – the easiest would be to create a new item that is going to only be used once in the game – or a we could use a VARIABLE, but that’s another tutorial.

So, that brings us to the end of our tutorial. What have we learned? We’ve learned that EVENTS make up your game. They are CONVERSATIONS, COMBATS, TELEPORTS, TREASURE CHESTS – and more. We learned that SWITCHES allow us to to link EVENTS together and control what happens in our games. We learned that if we arent careful, we can create games that give a limitless supply of items. We’ve also learned that I’m pretty damn long-winded. Hopefully you’ve learned more of the former though. Good luck, and stay tuned for more Easy Access Tutorials.