Help - Search - Members - Calendar
Full Version: [Eventing]Questing Tutorial
RPG RPG Revolution Forums > Game Engines > RPG Maker VX Discussion > RPG Maker VX Tutorials
Koru-chan
Okay, someone in the RMVX forum asked for a questing tutorial, so here is my attempt at one. I completed everything first and then took screenshots after so if you follow step-by-step and your screen isn't exactly like mine, don't sweat it. As long as you follow the steps, you'll be fine.

Alright, I'm making two different scenarios.

1. You have a gate that needs unlocking by defeating three monsters and getting three keys. You can't get through this door unless you kill all three monsters and get all three keys. Leads to a boss.

2. You have three floors, each floor containing a monster and a gate. You must defeat the monster to proceed to the next floor.

Let's start with the first one.

Start a new project. From there, create a new map. I used the default settings for size and all that and just made a real simple wall around it with a random gate. In this case I used one of those 'graves' or whatever with the blue glowy stone. (All this seen below.)



Alright, we have our framework. Now make a copy of that map. You should have two identical maps now.

Now we're going to set up the database. Click the database icon (the stack of papers) and click the tab to get to items.

In the items, click on Array Size and extend it by three. You will have three extra item slots now. Make your keys here. You want them to have no target and to not be usable in battle or in the menu. In fact, you probably don't want them to be consumable, either, since they'll be key items. Add whatever description you want. This is my resulting item screen.



Now that our keys are created, it's time for the maps. In the first map, add a new event wherever you want the first boss. I just placed him against the left wall (as seen in the red circle below.) Make sure that you have him facing the right way, obviously (cyan circle). Also make sure to choose a sprite where the sprite is standing, not stepping. The first thing you may want is just some random chatter unless it's a boss that can't talk. All my bosses in this example are chatterboxes.



After the chatter you actually want to start a battle. Enter in a new event command to start the enemy battle you want to start. Enemy Encounter is the first command on the third tab. Easy enough. Now you'll want to actually award your player with their item. I always create the messages stating item possession before actually adding the item.

This is my favorite "you got something" window:



This is done with the following settings:



Dark background, centered (inside), and I dropped the line and hit the spacebar before it a bunch of times to center the text itself. Easy, no?

Afterwards, you want to actually add the item to their inventory. Go into the event commands and choose "Items" out of the second column on the first tab. Choose the key you want to award from the dropdown, the + sign to add the item, and the Constant or amount you're adding it by.



Now you're pretty much done. But you obviously don't want your player able to fight this boss over and over and try getting more than one key. So we're going to use a local switch, much like you'd do on a treasure chest.

Add an event command and choose Local Variable out of the first column of the first tab. Choose to turn on Switch A.



The end result page:



You'll notice I have no battle command. In my demo, to shorten it and make it easy to see how the actual keys work I made no battles. I made marks on the image to show where your enemy encounter WOULD be.

So now you turned on that switch, but what does that do to help you? Well, look at the top of the Event window. There is a button that says New Page. Click it to make a tab appear under the event name. Click page 2 to bring up another event page. This one is completely blank. This is entirely up to you now. You can leave this blank so the enemy disappears after the battle and item retrieval or you can keep the enemy around and have them say something witty. I chose the latter for mine, you can choose what you want.

The most important thing on this page is the Preconditions under the page tabs. Notice there is a checkbox for Self Switch? Click that checkbox. It should automatically choose A as its switch. This means that in order for this event to go off, Self Switch A has to be active. Therefore, when this event turns on its A switch, it will change its behavior from what you set it as on page 1 to what's on page 2.



Now you have your boss completed. Do the same thing for the other two bosses, changing their items and notices so they give the other two keys.

Now to set up the gate. I have these babies set up to teleport you when you talk to them, so that's what we're going to do for this example. Feel free to use doors or whatever in your own game.

Create a new event on top of the gate. For this event, we're going to use conditional branches. Conditional branches basically tell the game "if this condition is met, do this, otherwise do this." Conditional Branch is in the first column in the bottom grouping.

For your condition, choose Item from the fourth tab and choose having the first key as the condition. Make sure you check "If Else Statement." This makes sure you can set what happens when your conditions aren't meant, in this case, it will let you set what happens when the player talks to the stone without having all three keys.



Now this is the tough part. Highlight the line JUST under where it says Conditional Branch : [First Key Name] General Tools included. This is where you set what happens if they DO have the first key. Well, you need two other keys, right? So add another conditional branch here. Make this one require your second key. Then just under that make the conditions for the third key.

Now that you have the conditionals for all three keys, on the line just below the third, put an event command that teleports your character to the main boss or the exit or wherever you're sending them next. I sent my character to a main boss.

Next, under each line that says "When Other", put what you want to happen when the conditions aren't met. I have little notices that tell what you DO need but you can customize it as you wish.



As you can see, I also made it so when you're teleported, the keys are "used" and disappear from your inventory. This is completely optional but if you wish to do it, just add an event command for each item in the way you added them, but instead of choosing the + operation, choose - to remove them.

From there, I just have a "boss battle". You can make whatever you want happen after they open the gate. Now if your player tries to teleport to the boss without the three keys they will be denied. If they come to it with all three keys, they gain access.

---------------------------------------------------------------------------------------------------

Now for the second scenario: three floors, three monsters, three keys, and three gates. Well, in my demo, four floors if you count the boss floor.

Start it out just as you did before with creating the simple dungeon map. Map three copies this time instead of one. Set up the database as explained before.

On the first floor, put the first boss wherever you want, set them up the same way you did before to battle and give up the key. Set up a gate or door here too, but instead of three conditional branches before you only have to check for the one key.

Do this for the other floors, each floor having a boss that gives you the key for the next floor. On the final floor, have the monster give you the final key which leads you to the exit/master boss, etc.



Here is my demo of this if you want to play with it. If you've been messing with which keys on your keyboard are what buttons, make sure to set your "L button" back to the default Q key. If you get sick of running a dungeon and get the point, you can press this key at any time to go back to the initial position.

Questing Tutorial
karim ghazal
You are very good scriptor my sis. and you are very cleaver .. this one will help me alot .. downloading! ..TNX
jens009
QUOTE (karim ghazal @ Jan 30 2008, 09:26 PM) *
You are very good scriptor my sis. and you are very cleaver .. this one will help me alot .. downloading! ..TNX

It's called eventing. Once you get the logic of switches, conditional branches and variables everything would be easy as pie. ;-]
neclords
QUOTE (jens009 @ Jan 31 2008, 12:43 PM) *
It's called eventing. Once you get the logic of switches, conditional branches and variables everything would be easy as pie. ;-]


Well...i know the switches and conditional branches.
But what variable it is?I can't understand till now..
thankx
SeeYouAlways
Until I finish the tutorial: Variables are where you store numbers into. Let's say, the number of Potions you have right now is 2. You set the variable (event command) to the number of Potions you have, and the variable value would be 2. You can use this for stuff like in a mesasge, saying: "You have *variable number* potions right now!" pinch.gif

Damn, I'm not so good at explaining...
Koru-chan
QUOTE (SeeYouAlways @ Jan 31 2008, 05:16 AM) *
Until I finish the tutorial: Variables are where you store numbers into. Let's say, the number of Potions you have right now is 2. You set the variable (event command) to the number of Potions you have, and the variable value would be 2. You can use this for stuff like in a mesasge, saying: "You have *variable number* potions right now!" pinch.gif

Damn, I'm not so good at explaining...


So wait, you can display the number stored in a variable as text with a message? ^^() Wow, I feel kind of stupid. How would you go about this?
jens009
QUOTE (Koru-chan @ Jan 31 2008, 06:13 PM) *
So wait, you can display the number stored in a variable as text with a message? ^^() Wow, I feel kind of stupid. How would you go about this?

In RMXP showing variables as text goes as follows:
CODE
You have \v[x] party members.

Where x is the variable number. I'm not sure if this feature is omitted in RMVX though. I hope not. Check if it works.
HeroOfHyla
use \v[x] to display the value of a variable, where 'x' is the ID of the variable.

Use \n[x] to display a hero's name, where x is the hero's ID, or 0 for the first member of the party

use \n[\v[x]] to display a name based on a variable

EDIT:
Beat to it by Jens
Koru-chan
True HoH, but the hero ID thing is helpful too. Thanks to both of you.
L00NYGAMER
To all that are confused, in RMXP and RMVX terms, scripting is editing and making new codes using the RGSS/RGSS2 Script Editor which is more or less low-level programming. Eventing is using certain map events to trigger actions, which was the point of this tutorial.

Anyways, very nice tutorial for the newbies, and a refresher for novices such as myself.
neclords
Thanks...

i understand now
zeox70
Isn't another easy way to do it is simply by making the items then making multiple tabs that you need a specific item to continue on the quest? That's how I've always done it.
Diogotav
Some time i get realy luck now i can put my Great battle quest going.
I got 4 guys that i have to help holding their positions and i didn't know that to do Thanks.
Twilight27
Jens (or koru-chan), what about a lesson on variables?
It's one of a few stuff I don't really understand in the event lists...

Or if there's a topic already, maybe you can direct me to such?
-thanks.
nekros22
Highly reminiscient to "The Game of Death" with Bruce Lee. Laugh Out Loud (I must write it fully or the moderators will beat me...)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.