Gw Temp


Tutorial - 'Secret of Mana Style Battle System' by Rusty

An item about RPGMaker 2000 posted on


It's what you've all been waiting for! A tutorial on making a Secret of Mana Battle System, and this one is from Rusty!


(Download the example game at )

Adding the battle system to your game
Creating your characters
Stats Bar
Showing Of Damage
Making Items
Making Spells
Making a Monster
Useful Commands


Well, a good place to start would be to try the Example game included to see
if you actually like
my Secret Of Mana Style Battle System before you try and use it in your

(Lagging? Try going to the Charging section and disable charging.)

Note that the example battle system isn't the greatest visually wise. Some
of the charsets are
jerky, the menu isn't exactly a work of art, the showing of damage appears
as a message, and the
non-active character just disappears in a puff of smoke. Well, I made that
in a slight rush,
but you can make your own characters, your own menu, showing of damage as
pictures, and a
caterpillar system for your characters to follow you (or even make the
computer control party
members!), if you wish.

If you do like it, and would like to use it in your game, feel free to! You
may edit it in any
way you like, all I ask is that the 1st comment in every monster event is
kept, but you can
change everything else. Also, if you wanted to bulk up on your credits you
could always add me
if you wanted ( =P ), and if you release a demo that's got my battle system
in it, I wouldn't
mind taking a look at it, so if you could e-mail me a link to where to d/l
it, that would be
great =) .

Also, if you look at the size of this tutorial, don't immediately give up.
A lot of the stuff
is "do it once and never again", and the stuff which you do have to do more
than once (only
thing you have to do more than once is the monsters) is fairly easy and with
practice can be
done very quickly. But, if you are very new to RM2K, please note that in
this tutorial I
sometimes just say for example "add a fork condition here", so if you do not
know how to use
basic commands, namely switches, variables, and Fork Conditions, you might
want to brush up on
them before you start.

Quick Run Through -

A Fork Condition is an IF statement.
E.G. IF I had money I would go to the shop (anyone done the conditional
tense in French yet?)

A switch is what you call a digital device (like digital tv). It can either
be ON or OFF.
E.G. In a game, if you go into a room and fight a boss, you want the boss to
stay dead once you
kill him, so you would put "Switch - Boss Dead - ON set", and make a blank
2nd page in the boss
event with the "Event Conditions - Switch - Boss Dead - ON" Meaning that if
you re-entered the
room, rather than having to fight the boss, he'd be dead.

A variable is what you call an analogue device (like analogue tv). It can be
any value between 0
and a maximum. (although RM2K does allow negative numbers)
E.G. In a game, if you wanted someone to give you a potion if you spoke to
them 10 times, the
coding would be along the lines of...

1st Page

Messg:If you speak to me 10 times, I'll give you a potion.
Variable Ch:[Number Of times Spoken to guy] + , 1

2nd Page

Event Conditions - Variable - Number Of times Spoken to guy - Above 10
Messg:Here's the potion I promised.
Add/Remove Item:Potion-> 1 Incr.

(You would probably now change a switch on, and make a blank 3rd page with
the Event Conditions
that switch, so as to stop you getting infinite potions)


I hope this tutorial is helpful to you, 'cos after all, I'm sure I could
have thought of
something more fun to do than writing a tutorial.


If you already have a game -

Okay, 1st off open the Example battle system in RPG Maker 2000. Go to the
common events (last
section in the database) and multicopy* the common events. Then open your
game, go to the
common events, and paste. (Note: You may need to increase the "Max Field
Number") Next, go back
to the Example battle system (don't worry, this is the last time) and copy
one of the monster
events (event M1 on either Forest 1 or Forest 2 would probably be best) then
go back to your
game, and paste the event anywhere. This will be your basic enemy, although
you will change it
to suit you later. Also, import/copy the charset "blank.png" into your game.

Please note the battle system as default makes use of switches 0001-0014,
0021- 0040, and
variables 0001-0009, and 0021-0030. If your game already uses any of these
you will have to go through the battle system changing the switches and
variables, or changing
the switches and variables which you used in your game.

* Multicopy - Right-click on "0001:Attack" on the left menu, select
multicopy, type in 11, and
click okay.

If you don't have a game -

This is a lot easier and quicker. Simply open up the Example game in RPG
Maker 2000, re-name it,
and you're ready to go! Everything has been set up for you. (You can delete
the maps, charsets,
sound effects etc. you aren't using later)


For 2 characters in party -

Well, you may think its self-explanatory but it isn't exactly the same as
for the default battle

1st off, go to the Hero section of the database. Give your characters a
name, a degree if you
wish, and choose their charset to be their unarmed charset, e.g. the charset
which will be used
when the hero enters a village. Give them a face, choose their starting
equipment and so on,
just as if you were making a character for a game with the default battle
system, but note that
this battle system does not take account of either Mind or Agility
abilities, but you can give
them to the characters just to make it look cool if you want ( =P ).

Go to the common events again. In the 1st common event (0001:Attack) look
to the 7th line down.
It is "FORK Optn:[Hero 1]- Sword Equipped". Now, the contents of this fork
will take place if
[Hero 1] has got the sword equipped. The contents of this fork condition
show the hero attacking
with the sword for each different direction they can face. The else case of
this fork condition
show the hero attacking with their fists for each different direction they
can face. So, for
every weapon in your game, create a Fork Condition like the ones shown, that
show the battle
animations for the hero's attacks, with the ELSE case leading onto another


FORK Optn:[Hero 1]- Sword Equipped
Show battle animations for Sword
FORK Optn:[Hero 1]- Axe Equipped
Show battle animations for Axe
Show battle animations for unarmed.

Of course, if you are going to have 2 characters in the game, you will have
to do this once for
each character. Once inside the "FORK Optn:Switch [0011:Controlling Char 1]
- ON" (6th line
down) for Hero 1, and in the ELSE case of this fork condition for Hero 2.

Next (don't worry, last bit) go to Common Event "0005:Restore Graphics".
Now, from the last bit,
this should be fairly self explanatory. The "FORK Optn:Switch [0011:Weapons
Out] - OFF" should
change the character to their unarmed charset, and the ELSE case of this
fork condition should
change the hero to the charsets of them holding different weapons, depending
on what weapon is
currently equipped. (Just the same as before apart from changing charsets
rather than showing
battle animations.)

And that should be everything!

For 1 character in party -

Usual for most action RPGs. There are two ways of doing it. The first is
simple, at the start
of the game just switch "Switch [0011:Controlling Char 1]" ON, and every
time you come to a
"FORK Optn:Switch [0011:Controlling Char 1] - ON" fork condition, you can
just ignore the ELSE
case, or otherwise set the fork condition so that there isn't an else case.

The other way keeps your coding a little tidier, but in the long-run it
shouldn't really matter
because the battle system will run just the same. You could remove all the
"FORK Optn:Switch
[0011:Controlling Char 1] - ON" fork conditions, and just have the contents
for the yes case
(and delete the contents of the else case).

Also, in both cases, it would be good to delete Common Event "0009:Change

For more than 2 characters in party -

Well, every time* there is a "FORK Optn:Switch [0011:Controlling Char 1] -
CASE" you will have to change this to separate fork conditions, 1 for each


FORK Optn:Switch [0011:Controlling Char 1]

is the same as...

FORK Optn:Switch [0011:Controlling Char 1]

FORK Optn:Switch [0011:Controlling Char 2]

And apart from that, its the same as in "For 2 characters in party".

(Every time - there are quite a lot of them over the place by the way =) )


How to remove -

Well, if you've played the example game you will notice that after you
attack, you have to wait
for a little bar to reach 100% before you can attack full strength again.
This is Secret Of
Mana style, but I figured lots of people might not like this and get bored
waiting for it to get
full again. So its easy to disable it. Just do the following...

1. Delete the Common Event "0011:Charging"

2. In Common Event "0002:Stats" remove the Fork Condition "FORK Optn:Switch
[0008:Charging] -

(Don't remove its contents, just the condition - as in, we want the contents
of this fork
condition to happen no matter what, so cut and paste all the contents of the
fork outside of the
fork condition (still in order though), before deleting the fork.)

3. Not necessary, but as a tidy up remove all the "Change Switch :
[0008:Charging]-ON set" in
Common Event "0001:Attack"

And that should be it.

(You can now re-name and use "Switch 0008:Charging" as anything you want!

How to edit -

Well, there's a possibility that you may have actually liked the charging
factor, but would like
to edit it to fit with your battle system. Well, go to Common Event
"0011:Charging", and just
change what you want to change for your battle system. E.G. Rather than
percents, you could make
a nice little bar which fills up, and when it gets full you can attack with
full strength again.


Making your own -

Well, you may have noticed that the default stats bar for this battle system
is the one from
Secret Of Mana, but you can change it to whatever you like, even to a little
bar that's red and
empty when you're nearly dead, and full and green when you have full health.
Just edit Common
Event "0003:Show Health" to your liking.

Using default -

The 3rd fork condition of the Common Event "0003:Show Health" shows the MAX
HP of your character,
depending on what level they are on. You will have to have 50 (don't worry,
you just have to
copy and paste them, and change a tiny thing - should take less than 5 mins)
Fork Conditions for
each possible level the hero can be, and inside it should display the Max HP
for each level.
Also, I got lazy, and it only currently displays health up to 72 HP, so you
can add Fork
Conditions for health higher than that.

Note - When your hero health changes, for the display of health to change,
you will have to
"Change Switch : [0001:Change Health]-ON set". This will update the stats
bar and then
automatically "Change Switch : [0001:Change Health]-OFF set". You could
make it so that the
stats bar is always updating itself, by removing the "Appearance Conditions
Switch" of Common
Event "0003:Show Health", however, by doing this there is a chance that the
battle system will
lag on some slower computers.


Okay, you may have played the example game, and the menu (or CMS) isn't
exactly great, but I
stress the point that this is a BATTLE SYSTEM, not a menu system, so don't
blame me! =)

Well, I am not going to go over Menus in too much detail, since I don't
really know too much
about them. Anyway, the point is, you can make your own menu if you wish.
Edit Common Event
"0008:Example Menu" to your needs.

Its even possible to make a Secret Of Mana Style ring menu, MechaMagi has
made one.

Well, in the example game damage is displayed as show messages. Now, I've
already had a couple
of comments that it would be better if damage was displayed as pictures, so
if you wish, you can
make it displayed as pictures. Go to Common Event "0010:Show Damage", and
edit it to how you
would like it. I think you would do...

FORK Optn:Varbl [0014:Show Damage] - 1
Show picture for damage 1.

And so on, but you might be able to come up with a better way.


Okay, when you are making a weapon, just to let you know, the Equip Hand,
Options, MP Cost, Hit
Chance, Critical Hit Chance, Attack Attribute, Change to Conditions, and
Changing Chance options
mean nothing to the battle system, so there's no point in setting them to
anything. Also, you
will have to add an extra Fork Condition for every character who can equip
this weapon to both
Common Event "0001:Attack" and "0005:Restore Graphics" as was explained
earlier in this tutorial
in the creating your characters section.


You will notice that the Candy in the example game is as a common event.
This isn't necessary,
the only reason I did it was so that when you used it you could see the
battle animation of them
using the candy. But you can still just make an item in the Items section
of the database if
you want. E.G. the default Potion for RM2K will still work with this battle
system (hm... but
the Stats Bar might not update itself to the new health...) Anyway, I'm sure
you get the point.
This isn't really anything to do with the battle system, this is just
standard RPG Maker 2000,
so I'll stop now.


Well, spells using this battle system have to be Common Events. However,
because they're common
events you can have full flexibility on what the spell does. 1st off, in
the Skills section of
the database, create a skill with Classification as switch, name it, make an
explanation if you
wish, and then create an ON switch for it. Now, in the common events,
create a common event,
name it the same as the skill name (not necessary just for easiness), make
the Event Start
Condition parallel process, and make the Appearance Conditions Switch the
same switch as you
made the ON switch for the skill. Now, in the common event, create what you
want to happen when
the spell is used (and at the end make sure to change the Appearance
Conditions Switch OFF). You
can heal yourself... take health off enemies... you can make it do whatever
you want really
(within limits of RPG Maker 2000) you could make it that you could only use
it when you were
doing a puzzle, and if you used the spell while you were doing the puzzle, a
little man would
appear and give you a hint, and then disappear again...

Well... just make it do what you want the spell to do.


Setting Up Monsters For Your Game -

Okay, now, you should be able to see a monster event. Either the one you
copied into your game
if you already had a game, or just one of the ones that's already there if
you didn't already
have a game and are using the Example game as your starting point (if this
is case open up Event
M1 on either Forest 1 or Forest 2 maps). Now, if you open up the monster
event, you will notice
that the coding is SLIGHTLY big - don't worry, its done for you, you just
need to change a couple
of things to set it up for your game.

Right, okay, first off, what we're going to do now is set up the hero's hurt
charset to show when
he (or she) gets hurt, and for the hero to dodge/block other times. So on
the 1st page of the
monster event, if you scroll down half-way, you should see something along
the lines of -

FORK Optn:Hero -[A direction] Face Direct
Move Event...
Wait: 0.1 s

This is for the hero's dodge/block. If you scroll up a little to where the
dodging movement Fork
Conditions stop, and above them it says in a comment "*ATTENTION* In each
fork condition below
should be the heroes dodging movement. *ATTENTION*". There are several
comments like this
throughout the coding just to help you. Below the comment there is a "FORK
[0011:Controlling Char 1] - ON" (remember what it said in Creating your
characters if you have 1
or more than 2 characters in your party.) Inside this Fork Condition there
are 4 separate Fork
Conditions for Hero 1 facing each direction, and inside these Fork
Conditions a Move Event
command which controls the hero's dodging/blocking movement. You should now
edit these Move
Event commands to show your hero 1's dodging/blocking movement. Also in the
ELSE case of
"FORK Optn:Switch [0011:Controlling Char 1] - ON" you should edit the move
event commands to
show your hero 2's blocking/dodging movement (only for 2 heroes in party,
check Creating your
characters if you have 1 or more than 2 characters in your party.)

Now, if the monsters attack is lower than your defense, your hero will dodge
out of the way when
the monster attacks him. Next, we want to display the hero's hurt charsets
for when the monsters
attack is greater than the hero's defense. 3 commands below the "FORK
[0011:Controlling Char 1] - ON" that controlled the hero's dodging/blocking
there is another
comment which says "*ATTENTION* The change graphic below should change the
charset to the heroes
hurt charset. *ATTENTION*", and below this there is another "FORK
[0011:Controlling Char 1] - ON". In the IF case and the ELSE case there is
another Move Event
command, but these show the hero getting hurt. Change the Move Event
Command in the IF case to
show hero 1 getting hurt, and the Move Event Command in the ELSE case to
show hero 2 getting
hurt. You can also change the Sound Effect that is played when the hero
gets hit.*

*Note - If you do not change the Sound Effect, and used the "If you already
have a game" method,
and do not have the sound effects from the example game in your game folder,
RPG Maker 2000
might stop (while test playing) saying it could not find the sound effect
file. There are also
several other sound effects that get played, and unless you want to use your
own, you should
copy these sound effects from the example game Sound Effects folder to your
own game's Sound
Effects Folder.

Making a Monster -

Now that you have set it up to show the hero dodging/blocking and getting
hurt, you will never
have to do that again! (*Phew*) Now we can get round to making a monster!

Okay, in the example game folder you will notice a file called Monster
Stats.txt. Now this isn't
me editing RPG Maker 2000 so as it reads the enemy stats in from text files,
its just to remind
me of what all the enemies stats are. Its quite useful to do this, but if
you think you have an
amazing memory, so be it (you will probably only have to input their stats
once anyway).

Now, in the monster event, select the Graphic for the monster on Page 1, and
select the same
graphic on Page 2. Then back on page 1 again select the Frequency that the
monster will move at,
and the monsters Movement Speed. Now 7 commands from the top of the 1st
page there is another
comment, and you can probably figure out what to do from that comment, but
the variable below the
comment subtracts a random number from the Hero's Attack. This random
number is the monster's
defense. Input what you want your monster's defense to be. (Instead of
using a set number, I
used a random number between 2 points just to make it so that its possible
to hit the monster
really powerfully sometimes, to barely take any HP off at all other times,
and to just take
average HP off other times - the hero's attack and defense also gets
slightly randomized to make
an even larger selection of hit points you can take off, of course depending
on what level your
heroes are at and what weapons/armour they have equipped.)

Now, scroll back down to the Fork Condition where you set the hero to look
hurt, and 7 lines
below it, you will see the same comment as above, and the same variable,
change the variable to
subtract the same numbers as you did before.

Scrolling back up to the top again (you may be slow at finding some commands
at first, but once
you've created a couple of different monsters you'll become a lot quicker) a
couple of lines
below the variable you first edited you will see another comment, and below
that a Move Event
command. The Move Event command changes the monster to ITS hurt charset, so
change this move
event command to show the hurt charset of your monster.

Now, scroll down through 10 Fork Conditions which are "FORK Optn:Switch
[003?:Current M?] -
ON", and below these there are a SECOND set of Fork Conditions "FORK
[003?:Current M?] - ON". Now, you will see...

FORK Optn:Switch [0031:Current M1] - ON
FORK Optn:Switch [0031:M1 Dead] - OFF
Move Event...
END Case
END Case

And the Move Event Command changes the monster back to its normal charset,
so you change the
Move Event Command to make it change your monster back to its normal
charset. Now copy the
edited Move Event Command, and paste it over all the other Move Event
commands in
"FORK Optn:Switch [0031:Current M2] - ON" to "FORK Optn:Switch [0031:Current
M10] - ON".

Now scroll back up again to the original variable you changed, and below
this variable you will
see a "FORK Optn:Varbl [0004:Hero Attack - 0less" copy this Fork Condition,
then scroll all the
way back down to the second variable you changed, and just below that you
will see another
"FORK Optn:Varbl [0004:Hero Attack - 0less". Delete this Fork Condition and
paste the one you
just copied. Hurrah! You just created it now so that you can hit the
monster (the monster
hitting you takes a lot less time...thankfully =) )

Now, you want the monster to be able to hit you... well you might not WANT
the monster to be able
to hit you, but it does make the game slightly more exciting ( =P ). Back
up top again, below
all the Fork Conditions you edited to make the monster go back to its normal
charset, a couple of
lines below you will see a comment, and below the comment a variable. And
the variable is a
random number, and this random number is the monsters attack. So change the
variable to your
monster's attack. And a couple of lines below this there is another
comment, and below this is 4
Fork Conditions. Inside each fork condition show the battle animation for
your monster attacking
(showing the animation for them attacking Left in the Left Fork Condition,
and Right in the Right
Fork Condition, and so on =P ). Below the 4 Fork Conditions is another
comment, followed by a
Move Event command. Make the Move Event command change the monster to its
normal charset.

Finally (really, I mean finally) on the 3rd page, under Event Conditions you
will see a variable.
The value of this variable is the monster's health, so change it to your
monster's health. 5
commands down from the top of the 3rd page you will then see another "FORK
[0011:Controlling Char 1] - ON". Inside the Fork Condition choose how much
experience you should
get for defeating your enemy. In the IF case the experience for hero 1 and
in the ELSE case the
experience for hero 2. Below the Fork Condition is a command to add Gold.
Choose the amount of
gold you should receive for killing this monster.

IT IS...

Adding others of the same monster -

If you wish to add others of the same monster to the same map, you don't
need to go through that
horrible process again, in fact, I've managed to add another of the same
monster to the same map
in under 30 seconds; here's what you do. Copy and paste the monster
somewhere else on the same
map. Open it up, change the Name. E.G. If the last monster was called M1,
change this one to M2
(in case you aren't too quick, M is short for Monster). On the 1st page,
the 2nd command is
"Change Switch : [0031:Current M1]-ON set". Change the switch to M2 (and if
you already have a
monster called M2, change it to M3 etc.) Now scroll to the very bottom of
this page, and also
change the switch from M1 to M2 (blah blah etc.) On 3rd page, change the
Event Conditions
variable from M1 Health to M2 Health (I don't need to say the bit about M3
anymore, right?) and
at the bottom of the 3rd page, change the 2 switches from M1 to M2.
Finally, on the 4th page,
change the Event Conditions switch from M1 to M2, and that's all, that
monster is fully
functional... and what's more, you can become even lazier...

If you wish to add another of the same monster, but to a different map,
simply copy and paste the
event!!! Yes, that's all, a single copy and paste. TOO easy, huh? =P

(NOTE - You cannot have more than 1 M[Number] per map. If you have 2 M1's,
change one of them to
M2, and so on. If you wish to have more than 10 monsters per map, create
switches M11 Dead,
Current M11, and a variable M11 Health. Every time in a monster's coding
(page 1) there is a
set of Fork Conditions, for switch "Current M1 ON", "Current M2 ON"...etc
add another fork
condition for "Current M11 ON", and fill in the fork condition the same as
the others are (its
not exactly too hard to figure out what to put inside the fork conditions
yourself considering
you will have 10 examples), and also add to Common Event "0006:Restore


Here's a list of some useful commands for the battle system...

Change Switch:Weapons Out:ON - Takes your weapons out, allowing you to fight
and use attacking

Change Switch:Weapons Out:OFF - Puts your weapons away, used in villages.

Change Switch:Change Health:ON - Updates stats bar, if you change the hero's
health at any point
make sure to use this.

Change Switch:Change Characters:ON - Changes the active character.

Change Switch:Restore Graphics:ON - Updates the hero's graphic, for example,
if he (or she) has a
new weapon equipped, putting the switch Restore Graphics ON will switch the
hero to the charset
of the hero with the new weapon.

Change Switch:Restore Enemies:ON - Restores enemies health.

When teleporting to a map with enemies, I put these commands...

Change Switch:Weapons Out:ON
Change Switch:Change Health:ON
Change Switch:Restore Graphics:ON
Change Switch:Restore Enemies:ON

And when teleporting to a map without enemies, I put "Change Switch:Weapons
Out:OFF" instead of
"Change Switch:Weapons Out:ON" and miss out the "Change Switch:Restore
Enemies:ON" and "Change
Switch:Restore Graphics:ON".


Now you should have a working Secret of Mana style battle system, but
there's a possibility that
you have a non-working Secret of Mana style battle system. However, this is
my first tutorial,
so don't be too evil to me, but if you need to ask me a question, or if I
didn't explain
something very well, e-mail (also my MSN) or you can
aim RustyRM2K.


Also, erm.. thanks to these people..

Khaos, for helping me out with some of my earlier battle systems, by giving
me ideas and cool

Fess, for actually pretending to like my earlier battle systems, when
everyone else hated them.