Gw Temp

Menu

Article - 'Angroth's Collection 2' by Guest

An item about Game Design posted on Jan 19, 2004

Blurb

A massive collection of random tutorials which I'd made a while back combined with my current Multi-Tuts.

Body

The Draw Ability

Like in Final Fantasy VIII when you can draw the abilities from enemies. Well, this is a very simple version of that.

A - Firstly, create a skill called ‘Draw’ and also create a switch counterpart with the same name. For now we’ll assume it’s 0001:Draw (but by the time you do it, it won’t be 0001, meh!) The skill ‘Draw’ will be the classification of a switch and will simply turn the ‘Draw’ switch on, okie?
B - Before you continue you are also going to want to create a variable called something like ‘0001:Draw Random No’ for later. It’s crucial that you do this.
C - Make it so that one of your characters learns the ability, for testing it’s wise to make it a level 1 skill.
D - Now, if you haven’t already, set up a monster and place it in Monsters Party for a test combat in a moment (we’ll do one for now). Let’s say the monster’s called Boss Guy for now eh?
E - Enter the following onto the first page of the combat:
-Make the trigger 0001:Draw

-Enter the below into the body of the coding:
1 - A fork condition and click on monsters, select Boss Guy.
2 - You should also erase the current face set (if you have used one).
3 - Now generate ‘0001:Draw Random No’ between 1 and 2.
4 - After this insert a message saying:\S[2](Hero’s name) attempt to draw Boss Guy’s magic.\..\..\..\^
5 - Now create a new fork condition (still) inside the original fork. It needs to have an else case to it. Make its trigger a new switch, 0002:Fireball Learnt.
6 - Before you carry on make sure you have a skill named Fireball or you could change the switches name and skill name, afterall it’s just examples.
7 - In the fork make a message saying:\S[2](Hero’s name) has already learnt Fireball.
8 - In the else case make yet another fork condition (with an else case) and make its trigger the 0001:Draw Random No at a value of 2.
9 - Inside it, create a message saying:\S[2](Hero’s name) has drawn the magic Fireball!
10 - Now you make the drawing hero memorize the skill fireball.
11 - Then in the else case put a message saying:\S[2](Hero’s name) failed to draw Fireball.
12 - And to finish off, after all of the forks and stuff, turn off the 0001:Draw. Failing to do this will result in a draw every turn…. You’ve been warned!

F - Now you’re done and should check out how the thing works. Hopefully it should be fine. You can create this an edit it to accommodate multiple , all you have to do is insert the coding from above for each enemy in the battle. Not too difficult!


Summoning

If you have ever wanted a necromancer to be able to summon skeletons, zombies, wraiths and such then this tut will do just that! You could make it so that as you level up you go from summoning pathetic skeletons to master wraiths and golems and as this happens your new summon replaces the old one. If you want your new summon to obsolete the old one all you have to do is create a common event at parellel process and make it fork something like this:
If necromancer==Raise Zombie Learned
Change skills (necromancer) raise skeleton forget
If necromancer==Raise Mummy Learned
Change skills (necromancer) raise Zombie forget
Etc. Get it? Now for the actual summoning.

A - Your going to need an event slot in common events per creature you can summon. For now we will just do one.
B - Create the skill Summon Zombie and make it a switch which turns on the switch ‘0001:Zombie summon’.
C - Create a parellel process on common events which is activated when ‘0001:Zombie summon’ is turned on.
D - Enter the following code in the coding section below:
1 - Change the variable ‘0001:Party Size’ to be set as the party size.
2 - Create a fork condition with the else case and make it so its conditions are for a party size of 4.
3 - Inside the fork put a message saying:\S[2]You have too many party members!
4 - Change switch ‘0001:Zombie summon’ off.
5 - In the else case add the hero (character) Zombie to the party.
6 - Give the zombie a full recovery.
7 - Make it so there is a wait of 60.0sec (1 minute).
8 - Full recovery of the zombie.
9 - Remove the zombie from the party.
10 - Play SE: Power
11 - Put a message in saying:\S[2]Zombie has vanished.\..\..\..\^
12 - Change the switch ‘0001:Zombie summon’ off.
E - And there you have it. If you want your creatures to level up you can give them skills and stuff too. I made it so you could equip mine with gear. I think this is a good idea as it adds a bit more depth to the game by making them more customisable and able to develop.


Day & Night (basic)

This is nice and simple day and night which shouldn't be hard to pull off yet doesn't feature things such as months, years and such.
A - Create two switches and activate one. 0001:Daytime and 0002:Night time
A - Firstly go onto common events and and create an new event named Timer System.
B - Make it a parellel process that is activated when the switch 0003:Clock ON is on.
C - The main coding should be like this (all forks are inside eachother):
1 - Create a loop function.
2 - Inside place wait 0.1sec.
3 - Change variable seconds +1.
4 - Fork condition: If seconds is 60 or more +1 minute.
5 - Fork condition: If minutes is 60 or more +1 hour.
6 - Fork condition: If hours is 12 or more set hours to 0, minutes to 0 and seconds to 0.
7 - Inside the fork put: If 0001:Daytime is on (and add else)
8 - If it is on then: Show a picture which says 'It is now night time'
9 - Set screen tone 80,70,70,100 & remove picture.
10 - Turn daytime off and night time switch on.
11 - In the else section show a picture which says 'It is now daytime'
12 - Set screen tone 100,100,100,100 & remove picture.
13 - Turn daytime on and night time switch off.
D - If you ever wish to stop the timer system simply turn 0003:Clock ON off. And you can re-colour the screen correctly by using a fork condition to check if it's daytime, if so set screen colour 100,100,100,100 if not set it 80,70,70,100.
E - You might find that the system takes too long to make a complete cyle from day to night and back to day. If this is the case make it so that seconds go up to 10, minutes go up to something like 20, hours up to 5. This way you will find the game time more reasonable and realistic to your game's playing time.


Steal Command

Similar to Final Fantasy's, Breath of Fire's and other games whereby you steal items off your foes.

A - Firstly, create a skill called ‘Steal and also create a switch counterpart with the same name. For now we’ll assume it’s 0001:Steal. The skill ‘Steal’ will be the classification of a switch and will simply turn the ‘Steal’ switch on, okie?
B - Before you continue you should also create a variable called something like ‘0001:Steal Random No’ for later. It’s crucial that you do this.
C - Make it so that one of your characters learns the ability, for testing it’s wise to make it a level 1 skill.
D - Now, if you haven’t already, set up a monster and place it in Monsters Party for a test combat in a moment (we’ll do one for now). Let’s say the monster’s called Knightly Matie for now eh?
E - Enter the following onto the first page of the combat:
-Make the trigger 0001:Steal

-Enter the below into the body of the coding:
1 - A fork condition and click on monsters, select Knightly Matie.
2 - You should also erase the current face set (if you have used one).
3 - Now generate ‘0001:Steal Random No’ between 1 and 2.
4 - After this insert a message saying:\S[2](Hero’s name) attempts to steal an item from Knightly Matie.\..\..\..\^
5 - Now create a new fork condition (still) inside the original fork. It needs to have an else case to it. Make its trigger a new switch, 0002:Scale Mail Stolen.
6 - Before you carry on make sure you have an item named Scale Mail (armour) or you could change the switches name and skill name, afterall it’s just examples.
7 - In the fork make a message saying:\S[2](Hero’s name) has already stolen Scale Mail.
8 - In the else case make yet another fork condition (with an else case) and make its trigger the 0001:Steal Random No at a value of 2.
9 - Inside it, create a message saying:\S[2](Hero’s name) has stolen the Scale Mail!
10 - Now use the command Add Item to insert a Scale Mail piece of armour into the players inventory.
11 - Then in the else case put a message saying:\S[2](Hero’s name) failed to steal the Scale Mail.
12 - And to finish off, after all of the forks and stuff, turn off the 0001:Steal. Failing to do this will result in a steal every turn…. You’ve been warned!

F - Now you’re done and should check out how the thing works. Hopefully it should be fine. You can create this an edit it to accommodate multiple, all you have to do is insert the coding from above for each enemy in the battle. So in theory you could have a Steal All skill aswell. By doing the steal skill in this manner you'll need a switch for every item and every enemy. You should also do a parellel process turning them off after, so you can re-steal later, but that is optional (yet worth doing).


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:
4 Make a NPC in your game say all the letters of the alphabet like so: AaBbCcDdEe etc
5 Play your game and talk to the NPC
6 Press the print screen button to copy the screen
7 Enter paint program and paste picture
8 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.


Custom Battle System (no pictures)

Here we go again! But after I've done this I'm not stopping, oh no! I've got some more custom battle systems that defy the normal system. Wait and see next week (or the week after)!! Anyways, here I will show you an example from one of my games. Its not perfect but nothing is.
A - You're going to need to set variables for at least one hero. You'll need every statistic and its max version eg. Max HP, HP, Max MP, MP, Max Str, Str etc. You should also do one for level and another for exp.
B - For the enemies all you need is a variable for every stat (same as hero) name them Enemy 1 Max HP etc because if you have more than one enemy you can have another called Enemy 2 Max HP etc. This way you will be able to tell which one belongs to who. You don't need one for each creature!
C - On the battle map you will require an event for each character (if you can have them moving by a common/with stepping, then it would look great!). You’ll also need an event for each enemy.
D - Create an auto start event (this will be the main engine) on the battle map. To start off make each of the variables for the hero(s) be set by the default statistics eg. Set Alex's Str & max str as: Alex's Attack. On the same page you will want to set the enemies profiles (which you’ll have to put in numbers for).
E - Create a switch which activates the next page (something like 0001:Combat Begins).
F - The next page should be an autostart (again) and the coding would be best looking something like this:
1 – Resume animation of all characters in move event (you’ll find out later) and set hero’s toughness as their max toughness.
2 – Set label #4 next.
3 – Show Choice:Fight/Flee/Stats
4 – In fight you can have go to label #1 (but it shouldn’t be required).
5 – In flee you can either play a sound (Failure 1) and say that you could not escape (for bosses) or if you want to escape you can use a variable, generate a random number between 1 and 3. If the number is 1 then you escape, or something like that, you might want greater odds of escaping, who knows?!
6 – Use a fork condition for each character, IF Hero is in party then:
Message:Hero Hp=(current)/(max) MP=(current)/(max) etc
7 – After this choice box place a label #1.
8 – Use a fork, IF ‘hero unconscious’ switch is off.
If ‘hero is in party’.
Change switch ‘Control Hero’ ON.
Show choice Attack/Defend/Skills/Magic.
9 – In the attack choice, show choice (every enemy in combat, use multiple choices if need be) for now we’ll say Gladiator.
10 – In Gladiator case, show message: Hero attacks Gladiator.
11 – Move event to change hero into an invisible character then play a battle animation on him (of his character attacking). If you use a character set sized animation of the hero and on battle animation, place the character directly in the middle then the animation will be ontop of where the hero was (it should look good).
12 – Then show the damage battle animation on the enemy, eg Sword Swipe 1. And return hero’s look (move event)
13 – Set hero strength as hero max strength.
14 – Add a random 0 – 3 to hero’s strength. (for variation)
15 – hero strength – enemy toughness
16 – enemy toughness Set as enemy max toughness
17 – Fork (with else case), IF Hero strength is greater than 0.
True=Message:Gladiator loses (hero strength) HP.
Enemy HP – Hero Strength
False (else case)=Message:Gladiator was too tough!
18 – In Defend Choice:
Show message:Hero defends.
Move Event Hero:Stop Animation.
Hero Toughness +2
Hero MP +1
Fork: IF Hero Mp=Greater than Hero Max MP then set Hero Mp as Max Mp.
19 – In skills case put something like this (for the time being):
Play SE:Failure1
Message:Hero has yet to learn any skills
Goto Label #1
20 – Magic case should look something like this (you should put forks to check the hero’s level. IF Hero=level 6 show choice blah and so on. Do it for every level the hero gains a magic, this way you will gain magics as you level up, I’m missing this out but you will need to do it if you have an entire rpg of this combat)
Show Choice:Heal
In Heal case place label #2
If Hero is in the party:
Show Choice: Heal Hero? Heal someone else?
Heal Hero:
IF Hero’s MP is greater than his Mind/2 + Level (with else case)
Hero’s Mp – 8
Hero Mp – Hero Level
Change (default) MP – 8
Change (default) MP – Hero Level
Hero Mind/2 + Hero’s level
Move event to change hero into an invisible character then play a battle animation on him (of his character using magic).
Show the healing battle animation on the hero.
Return hero’s look (move event)
Message: Hero gains (mind variable) HP.
Hero HP + Hero’s Mind
If Hero’s HP is greater than his max, set it as his max.
Set hero’s Mind as his Max Mind
Else:
Message:Hero doesn’t have enough MP!
Goto label #2
Heal Someone Else? Case
(repeat above for every other character)
21 – Use cancel cases to go back to the labels #1 and #4 so you can choose options freely.
22 – For the enemies turn do this:
23 – Use a variable to produce a random number to decide who the enemy attacks!
24 – IF ‘Hero Unconscious’ Switch is OFF
IF Hero is in party
Message:Gladiator attacks Hero.
Move event (make enemy invisible)
Show battle animation of enemy attacking
Show battle animation of damage on the hero
Return enemy’s look (move event)
Set enemy’s str as enemy’s max str
Enemy’s str + random no. between 0 and 3
Enemy str – Hero’s toughness
IF enemy str = 0 or less (with else case)
MessageHero loses 0 HP.
Else:
Message:Hero loses (enemy str variable) HP.
Hero HP – enemy str
Hero (default) HP – enemy str
25 – At the end of the Event Commands turn Control Hero off. (when you have multiple people control hero will be able to show you who you are controlling, as demonstrated below!)
26 – On each of the hero events (on the battle map) create a new page which is activated by the ‘Control ?’ switch, eg. ‘Control Hero’. Inside this place:
Flash this event (white) 0.5sec
Wait 0.5sec
This should hopefully loop and the current (selected) character will flash (when you have multiple people), and it should look pretty cool!
27 – Create a new event that activates on 0001:Combat Begins.
28 – Inside it do the following code:
IF ‘Hero Unconscious’ is off
IF Hero hp (variable) = 0 or less
Change switch Hero Unconscious on
Set Hero HP variable as 0
Set Hero (default) HP as 0
29 – If it is your only hero it should say ‘GAMEOVER’ for you. If not, when all heros are at 0 it will say it. The reason there is IF ‘Hero Unconscious’ is off, before everything is because when they are unconscious you won’t be able to do things such as attack, be attacked and so on, which is what you want!
If you want a mini-demo of this you can email me at GW or at angroth@jerrycantrell.net
But be warned that there are a few things in this which I did not include in the engine at the time (insignificant but neccesary for full on rpgs, so refer to this also, thankyou!).


Advanced Time System

Hopefully this is a little more complex and a little more effective than your standard basic night and day system type thing.
A - Create two switches and activate one. 0001:Daytime and 0002:Night time
B - Firstly go onto common events and and create an new event named Timer System.
C - Make it a parellel process that is activated when the switch 0003:Clock ON is on.
D - The main coding should be like this (all forks are inside eachother):
1 - Create a loop function.
2 - Inside place wait 0.1sec.
3 - Change variable seconds +1.
4 - Fork condition: If seconds is 10 or more +1 minute.
5 - Fork condition: If minutes is 20 or more +1 hour.
6 - Fork condition: If hours is 5 or more set hours to 0, minutes to 0 and seconds to 0.
7 - Inside the fork put: If 0001:Daytime is on (and add else)
8 - If it is on then: Show a picture or message which says 'It is now night time'
9 - Set screen tone 80,70,70,100 & remove picture.
10 - Turn daytime off and night time switch on.
11 - In the else section show a picture or message which says 'It is now daytime'
12 - Set screen tone 100,100,100,100 & remove picture.
13 - +1 to a Weekday variable.
14 - Do a scan at this point. If variable = 0 show message saying 'It is Monday'
If variable = 1 show message saying 'It is Tuesday'
If variable = 2 show message saying 'It is Wednesday'
If variable = 3 show message saying 'It is Thursday'
If variable = 4 show message saying 'It is Friday'
If variable = 5 show message saying 'It is Saturday'
If variable = 6 show message saying 'It is Sunday'
If variable = 7 set variable to 0 and show message saying 'It is Monday' but +1 to a week variable.
15 - Do a variable check. If week variable = 3 + 1 to month variable.
16 - Do another scan. If month variable = 0 show a message saying 'It is January'.
If month variable = 1 show a message saying 'It is February'.
If month variable = 2 show a message saying 'It is March'.
If month variable = 3 show a message saying 'It is April'.
If month variable = 4 show a message saying 'It is May'.
If month variable = 5 show a message saying 'It is June'.
If month variable = 6 show a message saying 'It is July'.
If month variable = 7 show a message saying 'It is August'.
If month variable = 8 show a message saying 'It is September'.
If month variable = 9 show a message saying 'It is October'.
If month variable = 10 show a message saying 'It is November'.
If month variable = 11 show a message saying 'It is December'.
If month variable = 12 change the variable to 0 and show a message saying 'It is January'. but also +1 to a year variable.
E - If earlier in the game you set the year date to... 2003 for example, you could have some custom menu that access' the date and time. This way you could see literally how long you spend dithering in the game. Who knows, maybe you could include a character's age and all.
F - If you ever wish to stop the timer system simply turn 0003:Clock ON off. And you can re-colour the screen correctly by using a fork condition to check if it's daytime, if so set screen colour 100,100,100,100 if not set it 80,70,70,100.
G - You might find that the system takes too long to make a complete cyle from day to night and back to day. If this is the case make it so that seconds go up to 10, minutes go up to something like 20, hours up to 5. This way you will find the game time more reasonable and realistic to your game's playing time.


Running Mode

Generally there are many ways you could do this but personally I would only really tackle it one way (for an rpg and not some minigame type thing).
A - Make a common event which is a parallel process. It will need the Enter Password function.
B - Create a variable in which the commands from the Enter Password can be utilised.
C - Use a fork condition to check if that variable is number 6 (escape button). If so it will put up a choice box:
Default Menu
Run (on/off)
D - Inside the run (on/off) you shall need to do the following:
1 - Fork condition if the 0001:Run switch is on. IF SO:
2 - Decrease move speed and frequency by 2 (or 3 if you're feelin' lucky!).
3 - Turn 0001:Run off.
4 - IF NOT: Increase move speed and frequency by 2 (3 if you did it above).
5 - Turn 0001:Run on.
D - And there's the basics of it. Maybe you could include it within a custom menu or advance it so that you can choose the level of speed you wish to go (that would be groovey!). Experiment, you'll never know where it might lead you. What a short tut that was eh?


The Changling Ability

Ever thought you might want a changling? People who can morph and transform can often add a nice depth to gameplay. There are many alterations you can have on this ability, for instance, does the character have to learn forms from enemies or do they learn them at certain levels? All sorts of queries like these will be answered in time, now for the actual tutorial itself!
A - To start off, you’re going to have to make a character for each form that your character can transform into. Making be able to increase levels is up to you. Alternatively you could make it so on common events the hero is given a statistic boost.
B - If you want each transform to replace the last simply do the following:
If shifter==Wolf Form Learned
Change skills (Shifter) Bat Form forget
If Shifter==Bear Form Learned
Change skills (Shifter) Wolf Form forget
Following that system would make you replace all forms as you learnt new ones. Nevertheless you will need to create a switch for each transformation, eg. ‘0001:Bat Morph’ ‘0002:Wolf Morph’ etc.
C - Now create a skill (or more) called things such as Spectre's Wrath, Dragon Shift, Wolf Rage, I don't know... Just suggestions! And these skills will need to be switches that turn on the switch according to what they turn you into (as above) 0001:Bat Morph & 0002:Wolf Morph
D - Create a parellel process on common events which is activated when the switch is activated, in this case ‘0001:Bat Morph' is turned on.
E - Enter the following code in the coding section below if you are doing a swapping characters version:
1 - Remove the hero from your party who is transforming.
2 - Add the desired form to the party. (and give it a full recovery if you wish it to be at full health!)
3 - If you want to get the changling in the front of the party list, do this:
Create a fork condition for every character in the game (minus the transformer). The fork should check if they are in the party and IF they are you must make it REMOVE them and then ADD them back into the party. This way you will get your hero back in the front.
4 - Make a long wait, maybe about 2 minutes.
5 - Remove the form from the party.
6 - Add the hero back!
7 - Play SE: Power
8 - Put a message in saying:\S[2]Form has faded.\..\..\..\^
9 - Change the switch ‘0001:Bat Morph' off.
F - Enter the following code in the coding section below if you are doing a character profile enhancement:
1 - Change the stats of the hero (Bat Form could be +15 agility and +5 attack, make these permenant alterations!).
2 - Change hero's Walk Graphic to the creature's appropriate graphic.
3 - Make a long wait, maybe about 2 minutes.
4 - Change the stats back to what they should be.
7 - Play SE: Power
8 - Put a message in saying:\S[2]Form has faded.\..\..\..\^
9 - Change the switch ‘0001:Bat Morph' off.
G - And there you have it. If you want your creatures to level up you can give them skills and stuff too. You could also make some of them possible to wear and equip arms and armour.


Banking System

Most bank tutorials I have read seemed not to work correctly for me. So I altered what different people said to get my own bank system.
It’s not too complex but if you are a new to Rm2k then you should just copy the following without question. If you are a hardcore Rm2k veteran then you might want to push your talents and make ‘interest’ and so on.
Well, I’ll shut up for now, here it is:

< > Message:Bank Man – What do you want to do?
< > Show Choice: Deposit/Withdraw/Leave
:[Deposit] Case

*For this point you will need to create a variable named ‘Current Money’*
< > Change Var: Var[0001:Current Money] (Set)-[$ Have]
< > Message:Bank Man – Deposit how much?
: :You have \v[01] gold.
< > Input Number(Digits=5) Var[0002:Entered Money]
< > If Var(0002:Entered Money) V[0001](>)
< > Change Var: Var[0002:Entered Money] (Set)- Var[0001]
< >
:End Case
*This simply means the number you input into the 5 digits is stored into the variable ‘Entered Money’. If you enter a number greater than your current money then it changes the number you entered to your current money.*
< > Change Var: Var[0003:Bank Money] (+)- Var[0002]
< > Change Money: $V[0002] (Rem)
< > Message:Bank Man – You now have \v[03] gold in the bank.
< >
*This next part adds the variable ‘Entered Money’ to ‘Bank Money’ therefore adding to any money you may have had in the bank already. It then removes the ‘Entered Number’ from your current money.*

:[Withdraw] Case
< > Message:Bank Man – Withdraw how much?
: :You have \v[03] gold in the bank.
< > Input Number(Digits=5) Var[0002:Entered Money]
< > If Var(0002:Entered Money) V[0003](>)
< > Change Var: Var[0002:Entered Money] (Set)- Var[0003]
< >
:End Case
< > Change Money: $V[0002] (Add)
< > Change Var: Var[0003:Bank Money] (-)- Var[0002]
< > Message:Bank Man – You now have \v[03] gold in the bank.
< >
:[Leave] Case
< >
:End Case
< >
*This second part is quite simple. After saying how much you want to withdraw it stores it into ‘Entered Number’ variable. And once again, just like before if it is greater than the ‘Bank Money’ then it will set it as the bank money.
Then the ‘Entered Money’ is added to your current money and then the ‘Entered Money’ is taken from the ‘Bank Money’.*

This bank is suprisingly easy to make and provides a nice addition to your game. The other bank tutorials I have seen merely let you withdraw all the money from the back or deposit all your money there. And this may be good but entering an exact amount is much cooler.


Custom Menu

Admittedly its been done before but who says I can’t do it aswell and put my own spin on it? This does work with a custom battle system as I was using it with my latest CBS however I updated the CBS recently and it doesn’t use this menu anymore.. Sob!
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:
4 Make a NPC in your game say all the letters of the alphabet like so: AaBbCcDdEe etc
5 Play your game and talk to the NPC
6 Press the print screen button to copy the screen
7 Enter paint program and paste picture
8 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 ‘MENU’ and can take you to Rm2k’s default menu system.
The second option will be called ‘SAVE’ and can..save your game??
The final option will be called ‘QUIT’ and can exit your custom menu.

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

Well, that’s it! It can be used for custom menu’s, custom battle system menu’s, mini games and whatever the hell you can think you could use this for. I was doing this late at night so if there’s anything wrong with it, please let me know!