BASIC MOVES
Ok, so you have decided to make a character for MUGEN. You even have the sprites all cleaned up an ready to use , (tutorials on how to get to this point are all over the net, try http://icdweb.cc.purdue.edu/~magius/ for some excellent sprite tutorials by (e) magius) but how do you make his basic moves? What do you need to tell MUGEN about your move?
Well,you need to:
- Insert the frames in the SFF file
- Tell the engine the Joystick Motion and the buttons to activate the move.
- Define the states for this move
Inserting the frames in the SFF file
The SFF file is where all of your character sprites will be stored. It's organized in "groups" of frames, each group represents an action of your character and has a determined value that is unique within the file. You need to insert the frames for your move in the right group number. see Recommended Action Numbers Table
Let's say you are making a standing attack, if you followed the previous link ("Recommended...") you noticed that the recommended numbers for standing attacks are in the range 200-299, so you should use this numbers.
I strongly recommend you use MCM by ses as your tool for making SFF files as it's the easiest and fastest way to do it.
So, to add the frames you (quite obviously..) press the ADD button
You will be prompted to choose the frame to add from a list of PCX files on your harddisk.
After you have done that, you will need to type in the "GROUP" text box the action number we mentioned before. We used 260 in this case. Also type in the "IMAGE" text box which animation frame is this within the group. If it is the first type 0,1 for the second, and so on.
To add more frames click again on "ADD" and repeat the process:
Please remember to enter the same group number in the text box when you are adding more frames to the same move. Your move responds to a group of frames that has a unique number,260 in this case.
Repeat the process until you're done.Also remember that your frames must have a common pallette, that
holds all the colors you 're going to use. Again refer to various Mugen sites for tutorials on how to build ACT files,the character pallette file.
Defining collision boxes
MUGEN needs to know which frame/s of your move actually hits the opponent and causes damage , and where (as in which part of the sprite) YOUR character can receive hits. You need to define collision boxes for this, they are named like that because the engine realizes that character A has hit character B, when character A's red collision box (also known as CLSN1,the box used for hits) "collides" or makes contact with character B's blue collision box(also known as CLSN2, the box that shows where the char can be hit).
Example:
In the above picture you can see that Cody's arm has actually made contact with Akuma,but how come nothing happens? It's because the red box hasn't made contact (collide) with Akuma's blue boxes.
See what happens now:
Now Akuma receives the hit because Cody is close enough so that his red box touches Akuma's blue ones.
Collision boxes define the range that your moves have. If you want your move to have a lot of range, then you would
assing a wider collision box to it, if you want normal range , you just wrap the red box around the sprite,as seen in the Cody example.
It's recommended to use Ranchan's Mugenerator for defining the collision boxes of your char, (at least until MCM supports AIR files!), so lets see how to do that:
Joystick Motion and buttons to activate the move.
After you have all the sprites arranged in the SFF file ,and all your collision boxes defined in the AIR file, you need to tell MUGEN how the player is going to activate the move. Which motion is need to be done in the joystick/pad and which buttons need to be pressed.
This is defined in the CMD file of the character.This file is divided in two parts:
-Motion and buttons of your move
[Command] time=15
[Command] |
In this part you define a "name" for your command, (name="qcb_y"), the buttons needed to activate (command=...) and how much time you have to do the move (time=30).
Defining your own motion
-Always start with this line when defining your command:
[Command]
-Choose a name for your command,try to be descriptive so you can remember it later,also take into account that the name is case sensitive. Let's say we are defining a Fireball command:
name="Fireball"
-After choosing a name it's time to define the motion itself,we will use a standard fireball motion (Quarter circle forward+ some button)
command = ~D, DF, F, x
When defining commands take into account this concepts:
- Always specify directions in CAPS ,use this table to define the motions you need,remember to separate them with colons (,)
B | Back |
DB | DownBack |
D | Down |
DF | DownForward |
F | Forward |
UF | UpForward |
U | Up |
UB | UpBack |
So a Fireball in Mugen would be Down,DownForward,Forward or:D,DF,F
- Buttons are not specified in CAPS and are organized usually in this way:
Punches | x y z |
Kicks | a b c |
When making your character you should follow these guidelines, if you want to be true to the original game's button configuration:
Capcom Configuration
Jab Strong Fierce x y z
Short Forward Roundhouse a b c |
Snk Configuration
Light Punch Light Kick x y
Hard Punch Hard Kick a b |
Looking again at our example:
command = ~D, DF, F, x
Notice the "~" symbol preceding the directions. There are symbols that let you specify better how your move should be input. In the case of the "~"symbol,it means "release of a button". It seems that most popular games'special moves start with a "release direction" when the input is a motion of the joystick (like the Fireball Motion,Hurricane Kick,etc),so MUGEN adheres to that.
The rest of the symbols are:
- slash (/) - means the key must be held down
egs. command = /D ;hold the down direction
command = /F, a ;hold fwd while you press a
tilde (~) - to detect key releases
egs. command = ~a ;release the a button
command = ~D, F, a ;release down, press fwd, then a
If you want to detect "charge moves", you can specify
the time the key must be held down for (in game-ticks)
egs. command = ~30a ;hold a for at least 30 ticks, then release
command = ~30
dollar ($) - Direction-only: detect as 4-way
egs. command = $D ;will detect if D, DB or DF is held
command = $B ;will detect if B, DB or UB is held
plus (+) - Buttons only: simultaneous press
egs. command = a+b ;press a and b at the same time
command = x+y+z ;press x, y and z at the same time
You can combine them:
eg. command = ~30$D, a+b ;hold D, DB or DF for 30 ticks, release,
;then press a and b together
-Also,specify how much time the player it's going to have to execute the move.This will default to 15 if you don't specify anything.
time=15
Generally 15 is enough time to execute special moves, but you may want to put 30 for super (hyper) moves, as they take longer to perform.
Time in Mugen is measured in "game ticks". To give you an idea , there are 60 game ticks in a second. So,with time=15, you have 1/4 of a second to input the move,that's enough time ,believe me.Also note that everytime a "time" variable or parameter is needed, you will use the above convention.
-Triggers
Now,you need a way to tell Mugen which conditions are to be met to actually activate your move. Maybe it's not enough that the player presses the key to let him do the move. Maybe you want to check if the character is in the air or not, if he is standing,there are a lot of conditions you may want to check, and the posibilities, if not endless are numerous.
Because of the flexibility of the MUGEN engine, some of them are necesary, for example, take a look at this code:
; Standing B |
This is part of the CMD file of a character. The CMD file holds all the command motions needed to activate special moves,supers,etc. And also holds the triggers, needed to tell MUGEN when to activate the move.
In the above code we have 3 triggers. Note that all of them have the SAME number. This means that ALL of those conditions must be met to activate the move. If they had different numbers, only one condition met would be necessary to activate the move.
The code shown says "activate state 230 (ChangeState with value 230) when the player does the 'b' command (trigger1=command=b),if the player is standing (trigger1=statetype=S) and is able to do moves (trigger1=ctrl=1).
You
may want to check Alphabetical
Trigger Index by ElecByte
We said before that some triggers are necessary , if we hadn't put those triggers in the above example, the player could activate the move WHILE he is being hit, while he is in the ar, or while he is crouching, something we don't want in this case.
Initial State
Defining the states for your move