Gw Temp

Menu

Tutorial - 'Multi-Tut III' by Angroth

An item about RPGMaker 2000 posted on

Blurb

Includes custom menu system and custom battle system using pictures. For their inflexibility I recommend you don’t use a picture battle system.

Body

I thought I’d recap you on the custom menu stuff because you’re gonna need it for the custom combat system with pictures. Personally I recommend you stay clear of a whole picture battle system. I reminded myself how complex and unrewarding it was as I began writing this tut for it, but if you’re gonna do it then look no further and if you’re just looking for idea’s, jump aboard! Here the are:
Custom Menu System
Custom Battle System (pictures version, which is harder)


Custom Menu System

Anyway, firstly this event must be (or is better in) the database common events location. Call it Menu Key and set it as a parallel process with a switch that changes a Menu Available switch on. But before you continue its best you have a custom menu graphic (picture). Here’s a quick way to make it:
- Make a NPC in your game say all the letters of the alphabet like so: AaBbCcDdEe etc
- Play your game and talk to the NPC
- Press the print screen button to copy the screen
- Enter paint program and paste picture
- Save the file as a template to make your menu (you have all the letters and the system box)

Once you’ve done that you must go onto the next common event and name it something like Cursor loop. Upon doing this you should create the following variables in advance:
1 - Cursor input
2 - Cursor Pos X
3 - Cursor Pos Y
4 - Cursor Position
After this its advisable that you create some form of pointer or cursor for your menu (a little hand with a pointing finger is cliché but always cool). As well as that you should make a variable key for menu. By using ??? I have intended that you find the specified location for where the menu is located on your screen.

The first section is as follows:

<>Disable System Menu: Disable
<>Saving: Disabled
<>Enter Password:[????:Key for menu]
<>FORK Optn:Varib[????:Key for menu]-6
<>Play SE: Beep
<>Show Picture: 1,Menu,(???,???)
<>Move Picture: 1,(???+20,???)
<>Set Screen Tone:(R050,G050,B050,S050),0.2sec
<>Call Event: Cursor Loop
<>
:END Case
<>

Remember the variables you created? Good! Cuz they’ll come in handy at this next point. So will your pointer. The second sections coding is:


<>Variable Ch:[????:Cursor Pos X]Set,??
<>Variable Ch:[????:Cursor Pos Y]Set,??
<>Variable Ch:[????:Cursor Position]Set,1
<>Show Picture: 20,Cursor,(V[Cursor Pos Y],V[Cursor Pos X])
<>Move Picture: 20,(V[Cursor Poss Y+20],V[Cursor Pos X])
<>CYCLE
<>Enter Password:[????:Cursor input]

*If you press down at this point, the following happens:

<>FORK Optn:Varb[????:[Cursor input]-1 (1 specifies the down button)
<>FORK Optn:Varb[????:[Cursor Position]-? (number of options in menu)
<>
:ELSE Case
<>Variable Ch:[????:Cursor Position]+,1
<>Variable Ch:[????:Cursor Pos Y]+,?? (Here the ?? = the space between your text)
<>Move Picture: 20,(V[Cursor Pos Y+20],V[Cursor Pos X])
<>Play SE: Beep
<>
:END Case
<>
:END Case

*If you press up at this point, the following happens:

<>FORK Optn:Varb[????:[Cursor input]-4 (4 specifies the up button)
<>FORK Optn:Varb[????:[Cursor Position]-? (number of options in menu (again))
<>
:ELSE Case
<>Variable Ch:[????:Cursor Position]-,1
<>Variable Ch:[????:Cursor Pos Y]-,?? (?? Specifies the space between your text)
<>Move Picture: 20,(V[Cursor Pos Y-20],V[Cursor Pos X])
<>Play SE: Beep
<>
:END Case
<>
:END Case

If you have done the above section then that’s very good as that’s the main weight off your back. Is all there is left is actually the selecting of the different menu options. When you think about it though its really quite pissy easy to do if you don’t know how to do it.
When you press DOWN, the enter password sets a variable to 1. And when this variable is
on 1, a FORK is triggered. FORK is simply an event that says IF X is 1 then do THIS (If Then function).
So this FORK is triggered and you change the variable "Cursor PosY" by deducting 2 and show move the picture by the variables-which have now changed by 2 less. So the picture of the Cursor moves down and the cursor position moves by 1. I don't know if you understood that because I didn’t when I just read it myself however it doesn’t really matter (as long as you get the coding correct). By the end of this you should end up learning how it all works anyway.
Now here’s the last part:
Last of all is doing the actual menu option selecting. You will probably have loads of menu options especially if you’re doing a custom combat system however I will demonstrate a simply dum arse 3 options (as most other authors do).
The first option will be called ‘ATTACK’ and can make your character attack the enemies.
The second option will be called ‘DEFEND’ it will make your hero reduce damage.
The final option will be called ‘FLEE’ and can exit you from the combat.

Then you should continue to type just above the END CASE the following:-

<>FORK Optn:Varb[????:[Cursor Position]-1 (1=Whatever is at the top of your menu)
<>FORK Optn:Varb[????:[Cursor input]-5 (5 specifies you pressing enter button)
<>Play SE: Decision
<>Call System Menu
<>
:ENDCase

<>FORK Optn:Varb[????:[Cursor Position]-2 (2=Whatever is 2nd of your menu)
<>FORK Optn:Varb[????:[Cursor input]-5 (5 specifies you pressing enter button)
<>Play SE: Decision
<>Call Save Menu
<>BREAK Cycle
:ENDCase

<>FORK Optn:Varb[????:[Cursor input]-6 (6 specifies you pressing esc button)
<>BREAK Cycle
:ENDCase
<>
:END CYCLE
<>Set Screen Tone:(R100,G100,B100,S100),0.2sec
<>Play SE: Buzzer
<>Erase Picture: 1
<>Erase Picture: 20



Custom Battle System (using pictures is harder! Not worth it!!)

Basically this will help you generate a CBS that plays something like Kindred Saga, only if you were using ALL pictures it might differ slightly. To start off you’ll need to be able to make custom menus (for your commands, attack, magic etc). I will show you how to make one. After this you can make multiple versions in the same manner. Eg. You choose magic, then fireball, then power 5. If you know what I mean…
After creating some menus from the above section you can now move onto the more difficult tasks…. Well they’re not really more difficult!

1. At the beginning of the fight you want an event on the map that does the following:
a. Set heros max hp as a variable according to the characters max hp.
b. Set heros hp as a variable according to the characters hp.
c. Set heros max mp as a variable according to the characters max mp.
d. Set heros mp as a variable according to the characters mp.
e. And then the same as above but for Strength, Speed, Defence and Intelligence. This is if you’re using the default character profile (which is easier). You might also want to add a Critical Hit % variable and a To Hit Chance % variable. This way you could make it later on so that your hero can miss or have a chance to deal much more damage.
f. It may sound laborious but you’re gonna need to do the same as above with every enemy you’re planning on having in the combat.
g. No you need to show picture and place where the enemies (and yourself) will be standing on the screen. Remember the higher the number of picture the more priority it has!
h. If you’re having hit point and magic point bars there is one way to show them (that I know of) and it is quite complicated. The alternate way to do this is have a menu in combat that lets you view your current profile. Here’s how you do the bars:
a. You need a fork condition to say - IF (hero’s hp) is same as or greater than 0 then it will show health bar 0 picture. Inside it put - IF (hero’s hp) is same as or greater than 2 then it will show health bar 1 picture. Inside that place - IF (hero’s hp) is same as or greater than 4 then it will show health bar picture 2 etc.
Can you see where this is going? You should end up with one huge chain of fork conditions. If you find them going out of the event commands section because they are too wide then do them in two halves and then paste the second half into the first one expecting not to be able to edit it again for some time! Now repeat for mp!!

2. You will require a parrallel process event to begin when the hero is placed (you’ll need to turn it off for attacks, defends and magic). It should look something like this:
Show Picture: Hero Stand 1
Wait 0.3sec
Show Picture: Hero Stand 2
Wait 0.3sec
Show Picture: Hero Stand 3
Wait 0.3sec
Show Picture: Hero Stand 4
Wait 0.3sec
(Assuming the different stands are alternate standing positions) If its on parallel then it will automatically loop for you. I would suggest the enemies stay still to save all the extra hard work for you.

3. Here is the hero’s attack. You can have it on the same event as the hero movement loop, this will save having too many events lying around. This is how its done:
a. You’ll need to create a fork conditions before the attack saying - IF enemy (number) is dead and make them else cases. This will stop you attacking a dead enemy.
b. When you choose the enemy you want to have something like this for the attack (assuming the different attacks are alternate attacking positions):
Show Picture: Hero Attack 1
Wait 0.1sec
Show Picture: Hero Attack 2
Wait 0.1sec
Show Picture: Hero Attack 3
Wait 0.1sec
Show Picture: Hero Attack 4
Wait 0.1sec
Play Se: Sword 1
Flash the enemy event red
Take your Str and set it as your max strength
Set enemies defence and set it as their max defence
Minus your strength from the enemies defence
Check using fork condition if the number left over is below 0 if so make it change the strength to 0. (This will stop people losing -5 hp and therefore recovering 5hp)
Minus enemy hp from your remaining strength
Create message saying how much hp the enemy lost by using \V[?] to show variable number.
Do a fork condition - IF enemy hp is 0 or lower then turn on switch enemy (number) is dead.

4. Here’s the hero’s defend. Once again just place it in the same event and navigate around them by turning different switches on and off. You can use variables to make the enemies use different attacks but here we’ll just deal with a standard attack. You can use this event for the enemy attacking you when the turn’s over (and you don’t defend). But you must make sure that the hero doesn’t get the defence bonus for defending, in it!
a. Show pictures as before but defending animations.
b. You should do a message saying that the enemy is attacking you.
c. Flash your event red and back to normal.
d. + a random number between 2 and 8 to your defence.
e. Take your defence from enemies attack.
f. Make sure the enemies attack isn’t a minus number and is only 0 at lowest (as before).
g. Take damage from your hp.
h. Show message and use \v[?] to show how much you were injured by.
i. Set your defence to your max defence.
j. Set enemies attack to their max attack.
k. Now repeat for all possibilities of enemies attacking and in the order they might.
l. After the enemies attacks do the fork condition health thingy again. Make it so that if you have 0 hp then you die (obviously). But by using these bars again your health will go to what it should be. Don’t include this as a separate event that’s parralel and constantly checks because it will make your game run really slow.

5. For magic and skills just repeat the attack but use different animations and minus some mp from your hero.

6. The last thing you need is a event that finishes the combat. One way of doing this is using a parralel process that says when all enemies dead switches have been turned on it does, blah! Blah obviously being giving you experience, money etc.

And there you have it! A simple and quick run through of a picture battle system. There’s no point in including all of the coding for it because it would be so long that there would be no point (like my duelling tut! XD). Well, have fun and make some custom menu’s if you haven’t already.