RUGENDOCS
Creating content

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]

KeyMeaningrugen
nameInternal name. The Name trigger compares against it.Read
displaynameName shown on the select screen and lifebars. Falls back to name.Read
authorYour name; the AuthorName trigger compares against it.Read
localcoordCoordinate space the character was made for (320, 240, 640, 480, 1280, 720…).Read
versiondateRelease date, for humans.Ignored
mugenversionFormat version the character targets (1.0, 1.1).Stored, no effect
pal.defaultsPreferred palette order on the select screen.Ignored (see Palettes)

The [Info] section is required. Quotes around values are optional.

[Files]

KeyRequiredMeaning
spriteyes.sff sprite file
animyes.air animation file
cmdyes.cmd command file. Its [Statedef -1] holds the “which move to start” logic.
cnsyesConstants ([Data], [Size], [Velocity], [Movement]) and usually states. Falls back to st if empty.
stnoMore states. Often the same file as cns.
st0 .. st9noEven more state files. A listed file that is missing is an error.
stcommonnoShared states; default common1.cns.
soundno.snd sound file. A missing sound file is a warning, not an error.
pal1 .. pal12no.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.

  • .act files 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 .sff as a palette table (palette 1,1 is the default). .act files can still override it.

Portraits and select art

SpriteUsed for
9000,0Small portrait: select grid and lifebar face
9000,1Large portrait: VS screen
rugen_art.webp / rugen_art.pngOptional 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

Original reference: elecbyte.com/mugendocs-11b1.

Something wrong on this page? Edit it on GitHub.

SEARCH !!

    ↑↓ to move, Enter to open