Characters
The character .def file section by section, how file references resolve, the load order of state files, and how palettes and .act files work in rugen.
A character is a folder (or archive) with one definition file, <name>.def,
that names everything else. rugen reads it, loads the files it points to and
builds the fighter.
chars/MyHero/
├── MyHero.def the manifest (this page)
├── MyHero.cns constants and states
├── MyHero.cmd commands (plus the [Statedef -1] command logic)
├── MyHero.air animations and collision boxes
├── MyHero.sff sprites
├── MyHero.snd sounds
└── pal1.act ... optional extra palettes
A complete .def
; MyHero.def
[Info]
name = "MyHero"
displayname = "My Hero"
versiondate = 10,12,2026
mugenversion = 1.1
author = "You"
localcoord = 320, 240
pal.defaults = 1, 2, 3
[Files]
cmd = MyHero.cmd
cns = MyHero.cns
st = MyHero.cns
stcommon = common1.cns
sprite = MyHero.sff
anim = MyHero.air
sound = MyHero.snd
pal1 = pal1.act
pal2 = pal2.act
[Arcade]
intro.storyboard = intro.def
ending.storyboard = ending.def
[Info]
| Key | Meaning | rugen |
|---|---|---|
name | Internal name. The Name trigger compares against it. | Read |
displayname | Name shown on the select screen and lifebars. Falls back to name. | Read |
author | Your name; the AuthorName trigger compares against it. | Read |
localcoord | Coordinate space the character was made for (320, 240, 640, 480, 1280, 720…). | Read |
versiondate | Release date, for humans. | Ignored |
mugenversion | Format version the character targets (1.0, 1.1). | Stored, no effect |
pal.defaults | Preferred palette order on the select screen. | Ignored (see Palettes) |
The [Info] section is required. Quotes around values are optional.
[Files]
| Key | Required | Meaning |
|---|---|---|
sprite | yes | .sff sprite file |
anim | yes | .air animation file |
cmd | yes | .cmd command file. Its [Statedef -1] holds the “which move to start” logic. |
cns | yes | Constants ([Data], [Size], [Velocity], [Movement]) and usually states. Falls back to st if empty. |
st | no | More states. Often the same file as cns. |
st0 .. st9 | no | Even more state files. A listed file that is missing is an error. |
stcommon | no | Shared states; default common1.cns. |
sound | no | .snd sound file. A missing sound file is a warning, not an error. |
pal1 .. pal12 | no | .act palette files. Missing ones are skipped with a warning. |
Path resolution. Paths are relative to the .def. Case does not matter
and backslashes work (sprites\Hero.sff). stcommon is looked up in the
character folder first, then in rugen’s data/ folder. Paths may not leave
the character folder (that matters for online packages).
State load order. rugen reads states from cmd, cns, st, st0 ..
st9, then stcommon. The first definition of a state number wins. That
is how you override a common state: define [Statedef 5000] in your own
file and common1’s version is never used.
[Arcade]
intro.storyboard and ending.storyboard name storyboard .def files for
arcade mode: the intro plays after the fighter select, the ending after a
cleared ladder. See Storyboards.
[Palette Keymap]
Maps select-screen buttons to palette numbers in M.U.G.E.N. Ignored by rugen.
Palettes
Sprites in MUGEN are mostly indexed: each pixel is a number from 0 to 255, and a palette turns numbers into colours. Index 0 is always transparent.
.actfiles are 768 bytes: 256 RGB triples in Photoshop order (rugen reverses them, so the file’s first triple is index 255). Shorter files fill only what they contain.- SFF v1 characters: the first
.act(pal1) recolours sprite 0,0, portrait 9000,0 and every sprite that shares their palette. Sprites with their own palette keep it. - SFF v2 characters carry their palettes inside the
.sffas a palette table (palette 1,1 is the default)..actfiles can still override it.
Portraits and select art
| Sprite | Used for |
|---|---|
| 9000,0 | Small portrait: select grid and lifebar face |
| 9000,1 | Large portrait: VS screen |
rugen_art.webp / rugen_art.png | Optional large render for rugen’s select screen (rugen extension, up to one subfolder deep) |
rugen extracts 9000,0 and 9000,1 to PNGs in the cache, so portraits appear even before the character is loaded.
The other files
- CNS: constants, states, expressions for
.cns/.st - Commands (.cmd)
- Animations (.air)
- Sprites and sounds for
.sff/.snd
Original reference: elecbyte.com/mugendocs-11b1.
Something wrong on this page? Edit it on GitHub.