Chapter 6 - The SFF file (sprites)


In this part, you will need the AIR.TXT and SPR.TXT files, normally present in the Mugen documentation. If possible, print them, in order to have them permanently within reach. Before beginning, read them carefully. In the beginning, maybe you are not going to understand everything, and that's perfectly normal!


6.1/ Before starting

To make things easier, it is preferable to have retrieved all your character's moves. However, adding sprites to a SFF file already existing is not very complicated. All your sprites should have a meaningful name. You can rename them with numbers (example: warrior001.gif) or give them a name that can remind you their content (example: air_kick1.gif or walk04.gif). Now, verify all your sprites to search for those that would be in duplicate. If you find some, note their name. Take a sheet of paper as well as the AIR.TXT file (that's the advantage of having a printer). In this file, see the second part, titled "Reserved Action Numbers". For every action number, indicate the corresponding sprite names.

Number   Description   Name of the sprites
------   -----------   ----------------------------------------------
0        Standing      stand1.gif, stand2.gif, stand3.gif, stand4.gif

You have to respect these action numbers because Mugen needs them. A lot of creators "forget" actions 5000 to 5520 because they think their characters don't need them. False! They are obligatory because, during a fight, the adversary can call the elements of these actions. But we will give you more details about that later. Read carefully the AIR.TXT!

Now, it is necessary to add attacks. Report yourselves to the "Recommended Action Numbers" part of the AIR.TXT file and do the same for attacks. Indeed, it is recommended to use some very precise numbers for these actions:

Numbers 200 to 399: standing attacks
Numbers 400 to 599: crouching attacks
Numbers 600 to 799: air attacks
Numbers 1000 to 2999: all the special attacks
Numbers 3000 to 4999: all the super attacks
Numbers 800 to 999 can be used if you need some space

As previously, indicate the names of sprites corresponding to every action number. Space your numbers out, in order to add other actions afterwards. For example, let's suppose that your character, when he is crouched, can give a stroke with the A button and another one with the B button. In this case, it is recommended to assign to these action numbers respectively 400 and 410.


6.2/ About sprites in duplicate

If you had found sprites in duplicate, that's the moment to erase them (otherwise, you can go to the next part). Let's suppose than you have three sprites (named character01.gif, character02.gif and character03.gif) corresponding to the action of walking forwards (action number 20 according to AIR.TXT) and three sprites (named character55.gif, character56.gif and character57.gif) corresponding to the action of running forwards (action number 100). So, you should get this:

Number   Description       Name of the sprites
------   ---------------   -------------------------------------------------
20       Walking forward   character01.gif, character02.gif, character03.gif
100      Running forward   character55.gif, character56.gif, character57.gif

Now, let's suppose that sprites character01.gif and character55.gif are identical, as well as sprites character02.gif and character56.gif. You have two sprites in duplicate: erase the second copy and note the new name. The goal is double: to lighten the SFF file and to lighten the number of sprites on your hard drive. Here is what you should get:

Number   Description       Name of the sprites
------   ---------------   -------------------------------------------------
20       Walking forward   character01.gif, character02.gif, character03.gif
100      Running forward   character01.gif, character02.gif, character57.gif

In our example, character55.gif and character56.gif files were deleted.


6.3/ SFF file creation

Tools to help character creators are quite rare. A SFF file contains all sprites of the character as well as parameters bound to every sprite: its group number, its image number and the X and Y coordinates of its axis. Mugen Character Maker (MCM in abridged) permits you to create these famous SFF files more quickly that with sprmaker (a tool provided with Mugen).


6.3.1/ Two very important notions

First of all, let's see notions of group number and image number. In the MCM screen shot that you will find lower, there is a C surrounded with yellow: that's here these two numbers are. Mugen needs the user assigns a number to every sprite in order to differentiate it from others. By convention, every family of sprites will have the same group number.

Take a second sheet of paper and note the names of all your pictures. In front of every name, write down the group number as well as the image number corresponding. Example:

SEIYA01.PCX = 10,1
SEIYA02.PCX = 10,2

Have in front of your eyes the AIR.TXT file, to the place where are indicated action numbers. You can inspire yourselves from these action numbers to define your group numbers in order to see if you included all the moves. But you are not obliged to follow the action numbers, anyhow every action will be defined into the AIR file.

IMPORTANT: don't confuse the group numbers of sprites and the action numbers!
> Action numbers are those that are indicated in the AIR.TXT file. Each number corresponds to a precise action.
> Group numbers of sprites only serve to differentiate sprites between them.

Now, we are going to include all the PCX pictures into the SFF file using MCM.


6.3.2/ Presentation of MCM

We will use the MCM version 1.0. This tutorial will be updated if a new version brings some meaningful improvements. We are going to see all the functionalities of this software:


The main dialog box and the SFF menu

Obviously, the second window displays the current element (sprite). A right click in this window permits to move both the sprite and its axis. With a left click, all depends if the "Move axis" option is activated or not. If it's the case, a left click will move the axis while letting the sprite immobile. If it isn't activated, a left click will only move the sprite.


6.3.3/ Using MCM

Using MCM is very easy, but setting the right parameters for every sprite takes time. In the beginning, familiarize yourselves with the software. If you downloaded or get characters for Mugen, load and view the content of their SFF files.

With the AIR.TXT and SPR.TXT files and your sheets of paper, you should manage to complete your SFF file. Load sprites one by one according to their action number. These numbers are in the AIR.TXT file, but you are not obliged to follow them. Indeed, it is your future AIR file that will indicate what are group and image numbers that correspond to such and such action numbers. However, if it is your very first character, it is strongly recommended to use identical group numbers and action numbers.

ONE MORE TIME: don't confuse the group numbers of sprites and the action numbers!
> Action numbers are those that are indicated in the AIR.TXT file. Each number corresponds to a precise action.
> Group numbers of sprites only serve to differentiate sprites between them.


The very first sprite of the "standing" action, with its axis

To begin a SFF file, we are going to take a concrete example. We will start with the action number 0, "standing". Clic on the ADD button to add the first sprite of the action 0 (or "standing" action, as you want). For group and image numbers, enter "0" and "0". Then, clic on the ADD button and select the second sprite of the action 0. This time, for group and image numbers, enter "0" and "1". And so on, according to the number of necessary sprites for the "standing" action. In our example, we chose "0" for the group number because it is about the action number 0 but, of course, we should use another number.

Then, still thanks to the AIR.TXT file, load the sprites corresponding to actions 5 ("turning"), 10 ("stand to crouch") and so on. Very important for setting the future AIR file: note on a sheet of paper action numbers as well as corresponding group and image numbers.

Finally, for every sprite, it is necessary to define an axis. Watch the previous screen capture: there is a white cross between the character's legs. You must place the axis at the ground level and at the centre of the character, and do this for every sprite. If the character is jumping, put the axis where the feet would be if he was standing.


The character's icon for the selection screen

A small detail: icons of characters are in the SFF file itself. You must add two pictures:

The picture group must be "9000". The first picture (the smallest) must have "0" as image number. Concerning the other one, it must receive the value "1". There is no order in the SFF file, you can insert these two pictures where you want.


6.3.4/ Required sprites

These sprites are very important and you must include them. Even if your character doesn't use them for his own actions, his adversaries will be able to use them. These obligatory sprites are those of the "being thrown" action. Indeed, they are used by Mugen to display your character when he has been thrown. That's the adversary who will "call" these sprites when he throws your character in air.

To know group and image numbers of these sprites, report yourselves to the SPR.TXT file. The "Frame" column indicates numbers to use, while the "Axis" column specifies places where axes must be positioned. If this is difficult to understand, get the SPR.GIF file that you will find on the site: it is about the obligatory sprite list for Kung Fu Man.

Now, just follow indications of the SPR.TXT file. I remind you that you must not confuse the group numbers and the action numbers! In the SPR.TXT file, only group and image numbers are used. These numbers, from "5000,0" to "5042,10" have nothing to do with actions 5000 to 5040. I heavily insist on this difference, but it's important (especially for newbies).

An example for those that feel lost:


The sprite and its axis for the picture (or frame) "5000,0"


The sprite and its axis for the pictures "5001,0" and "5002,0"

You are required to use the group number as they appear in the SPR.TXT file and don't forget to position carefully the axes. There you are! Now, you know how to construct a SFF file. Well, that's only the very first revision, I maybe forgot things and made mistakes, in this case don't hesitate to contact me.



© 1999, 2000, 2001 by Stéphane Perez - Mugen no Densetsu