Gw Temp

Menu

Tutorial - 'Adventure System' by CyTWO

An item about RPGMaker 2000 posted on

Blurb

CyTWO shows you how to create an adventure system like those found in the Legend of Zelda Series.

Body

"Adventure System Tutorial
For Rpgmaker 2000
~~Author: CyTWO (Chris.keefer@3web.net)~~

First Of all...
This is version 1.0 of this tutorial, and unless I’ve screwed up a part or forgotten something, this’ll probably be the final version. If something doesn’t work for you from this tutorial, contact me at chris.keefer@3web.net. If your having trouble with the basics (switches, variables, enter password function, etc.) try going to www.gamingw.net to find out how to use these.
The purpose of this tutorial is to let you make an adventure game, like Zelda, for RpgMaker 2000. Because of system differences, this will not work with RPGMaker 95, or any other rpgmaker.
...there, now that ‘s over with, let’s get on with the main event.

INdex-or whatever...
1. Hero movement
a) running and jumping
b) attacking
2. Fighting
a) HP/MP
b) normal weapons
c) special weapons
3. Characters
a) weapons effects
b) characters with weapons
4. Enemy control
a) enemy -no target- control
b) enemy -target- control
5. Special effects
a) using battle animations
b) using move picture function

NOTE: All common events are parrallel process events unless otherwise stated.





NOW: Before doing anything else, make a common event that tracks your heroes X,Y position on the map. This is absolutely critical to most of the adventure system. (Make a tracking system by making two variables, ex. Hero X and Hero Y. Set the starting position as 1,1 (or wherever on the map your hero is, according to a grid (because RM2K is tile based, this is easy. Just count the number of squares from the left hand that your hero is starting horizontally and vertically) then put the values into the variables. Then set your common event to add 1 to the variable every time the hero takes a step (do this by using the enter password function - every time the user presses right, have the common event add a one, every time user presses left, have the common event subtract 1 from the horizontal variable. Repeat with up and down for vertical variable.)

1. Hero Movement
For normal movement, the regular arrow keys will do just fine.
A) Running and Jumping
It will be up to you to decide whether to include running or jumping with your game, but if you do, here’s how:
Running- First, set another common event. Now, use the enter password funtion to wait for certain keys to be pressed (for example, two right keys) and then set it to move character speed up. Have another enter password common event, (two right key presses again, for example) to move hero speed back down.
Jumping- The best (and easiest) way to do this is to let the hero jump and certain predetermined spots. (example, the hero comes to a cliff on which you have set an event. When the hero presses the action key, he jumps off the cliff to a spot that you have determined.)
You can also let the hero jump anywhere, anytime by using common events and the enter password function. Set the enter password to wait for the up arrow key pressed twice, or the action key followed by the up key press, or whatever. Then have the event make the hero jump, followed by a move forward, and end jump.

2. Fighting
Hero attacks with weapon. Hero does 99 damage...enemy does 2 damage to hero...hero is dead...
A) For hero, set a common event called hero HP, then set it with a variable that named HP. Then, have an if function in the common event check to see whether the variable HP equals 0. If so, then gameover. If not, just leave it blank.
For enemy HP, you’ll have to set many, many common events, each with their own variable (though you can use the same variable for enemies of the same type) and each with their own if function checking if HP=0. If so, have the event change a switch (which you have to set up on all enemy characters on the map) that changes it to a blank (those pink squares.) do this by having that switch set up on the second page of each enemy event, and the second page having the character as those transparent pink squares, with nothing in the event commands area.

B) With normal weapons (sword in this case) its rather simple. first, you have to have the ability to let the character equip his/her weapon. You can do this with an item in the normal rm2k menu, or with a custom menu (reccommended). When the hero equips his weapon, have it change a switch called weapon (or whatever). Set up a common event (yes, another one), with the appearance switch being weapon. When that switch is turned on by equipping the hero, this common event will come into action. Set the common event with a enter password function, that waits for the action key to be pressed. When its pressed, have the event check the hero X,Y variables, and then have the event do a certain amount of damage to 1 square beyond the hero (yes, this does mean the user can attack in all directions at once, but o well, I might fix that later.) (you may be wondering how it does damage to enemies, so I’ll skip ahead a bit here. For each enemy event, you have to set an if function that checks the hero X, Y variables, and then, if the enemies X,Y is within one square of the hero’s X,Y, does the prescribed damage to the enemy event. This will be explained further in section 4.)
C) special wapons-
Let’s say boomerang for now. Your hero has a boomerang. It’ll have to be equipped instead of a sword (since your only allowed one action key with RM2K) when the boomerang is equipped, amke sure it turns on a different switch. Then, another common event (yes, get used to it, common events are the only way to make this work) set with the apperance switch of the switch you turned on when the boomerang was equipped. To make the boomerang actually go, you have to set the common event to, when the action key is pressed, check the heroes X,Y variables, and then move the boomerang , for ex. 5 squares from the hero, then move back across those five squares back. (you can’t skimp on this, you’ll have to make character sets for the boomerang to show it moving. Or get them from someone else this is sort of hard to do in battle, because it gives the hero a great advantage over enemies. You can either compensate (explained in section 4) or use the boomerang only for puzzles (ex. the hero has to throw the boomerang to hit a switch in a dungeon.) Do the same thing for arrows, but don’t have the return sequence.

3. Characters-
A) WEapons effects-
Use battle animations on enemy characters when their hit (explained further in section 4).
B) Characters with weapons- You’ll have to draw (using Photoshop, paint, whatever) characters with weapons in their hands to switch to when the equip switch happens (add it to the common event.) simple as that.

4. Enemy control-
Ok, I’ve been saying I’ll explain everything in section 4 for the last two pages, so here it is.

A) Enemy -No Target- control
Simply, enemy movement. While it is obviously easier to leave them standing still, this doesn’t look too fancy, so moving them around is good. Remember though, for each and every enemy, another common event tracking THEIR X, Y positions is needed. So, if you have them moving around, be sure to have the event add/subtract their X, Y variables accordingly.

B) Enemy -TARGET- control
While you might want the enemies swarming towards the hero as soon as he enters the room, chances are you want them to only attack once he/she is within a certain area. Also, you have to have the enemies attack him/her too. Once again, the heroes X,Y variables come into play. In th enemies event (not a common event this time...you have to set this up in the actual enemy event) have the event check to see if the heroes X,Y variables equal, say, one step away from the enemy. If so, then have a switch that changes the event to a different page. On that page, write how the enemy will attack (ex. with sword, axe, pineapple, whatever).

I) Hero damage is done when the enemy event checks if the hero is within the set attack radius (ex. 1 square away.) You do this by knwoing the enemys X,Y varaible (you’ll have to set it yourself anyways) and knowing what one square away would be. Then just check. If so, then have the monster attack at certain times (ex.wait, attack, wait, wait, attack, repeat). Have the event take 1 or 2 or 3, etc. HP off the heros HP variable (you might want to give the user a graphical representation of how much HP...ex. HP bar, or heart bar, like in Zelda.) every time it attacks.
II) Enemy damage is done when the hero attacks. This has to be a common event, after the hero has the weapon equipped, and it also checks to see the enemy X, Y (that’s why you have to set and X, Y variable for every enemy.) Then if the enemy is one square away, you take whatever amount of HP away from the enemies HP variable (which you should have set up as a common event.)
There! Now you’ve got everything you need to make a successful, good-looking, cool adventure game!

...what? Yeah, there’s a fifth section, but I’ve never teseted the stuff here, so...use at your own discretion!

5. Special effects-
A) Obviously, battle animation is the easiest way to do cutting effects, and hits and so on. But you can’t move scenery with it...
B) Move picture function- I saw, not too long ago, an adventure game in which the hero jumps up, and slices a mountain apart with his sword. This was rather neat, and I figured maybe other people would like to be able to do this with RM2K. Well, the picture function is what you need. For this, just set an event that shows the picture, and then, when another event is trigger, change the picture by changing the switch, going to another page, and on that page, removing the original image, and replacing it with another (ex. the hero slices the mountain, a switch turns on that changes th eshow picture event pages, and changes it to a picture (or rather, two pictures in this case) of a mountain slowlt splitting apart.

There! Good luck on your game, and if there’s something you need clarified, try going to www.gamingw.net/forums and posting a question, or e-mail me at chris.keefer@3web.net. C’yA!



" Chris Keefer (CyTWO) 11/07/2001 142.154.83.220