Character Architecture
Overview
An IKEMEN Go / MUGEN character consists of several interconnected files that define everything from appearance to behavior. Understanding this architecture is essential for creating characters from scratch.
Character File Set
Every character needs these files (minimum):
| File | Extension | Purpose |
|---|---|---|
| Definition | .def | Master file linking all others |
| Constants | .cns | Stats, physics, size, states |
| Commands | .cmd | Input detection + Statedef -1 |
| Animation | .air | Sprite animation sequences |
| Sprites | .sff | Packed sprite images |
| Sounds | .snd | Sound effects (optional but expected) |
The .def File
The .def file is the entry point. The engine reads this first to find all other files.
Required Sections
[Info] -- Character metadata
- •
name: Internal identifier (used in code references) - •
displayname: Shown on screen in select/versus - •
versiondate: Creation/update date - •
mugenversion: Engine version (use1.1for IKEMEN Go) - •
author: Creator credit - •
pal.defaults: Default palette order (comma-separated 1-12)
[Files] -- Paths to character files (relative to character folder)
- •
cmd: Command file path - •
cns: Constants/states file path - •
anim: Animation file path - •
sprite: Sprite file path - •
sound: Sound file path (optional) - •
stcommon: Common states file (usuallycommon1.cns) - •
st1throughst99: Additional state files (for splitting states across files) - •
pal1throughpal12: Palette files (.act) -- only for SFF v1
[Arcade] -- Arcade mode storyboards
- •
intro.storyboard: Pre-fight storyboard path - •
ending.storyboard: Post-arcade ending path
The .cns File Structure
The .cns file contains two major parts:
Part 1: Constants (Data sections)
These define the character's base properties:
- •
[Data]-- Core stats (life, attack, defense, etc.) - •
[Size]-- Physical dimensions and collision bounds - •
[Velocity]-- Movement speeds (walk, run, jump) - •
[Movement]-- Physics (gravity, friction, air jumps)
Part 2: State Definitions
After the constants, the .cns contains state definitions (Statedefs) that define the character's behavior. Each state has:
- •A
[Statedef N]header defining the state's properties - •One or more
[State N, Label]blocks with state controllers
Character Constants Deep Dive
[Data] Section
life = 1000 ; Total hit points (standard: 1000) attack = 100 ; Damage multiplier percentage defence = 100 ; Defense multiplier percentage fall.defence_up = 50 ; Extra defense while falling (%) liedown.time = 60 ; Ticks spent lying on ground after knockdown airjuggle = 15 ; Maximum juggle points sparkno = 2 ; Default hit spark animation guard.sparkno = 40 ; Default guard spark animation KO.echo = 0 ; Echo on KO voice (0=off) volume = 0 ; Sound volume offset IntPersistIndex = 60 ; First non-persistent int variable index FloatPersistIndex = 40 ; First non-persistent float variable index
[Size] Section
xscale = 1 ; Horizontal display scale yscale = 1 ; Vertical display scale ground.back = 15 ; Standing push box back edge ground.front = 16 ; Standing push box front edge air.back = 12 ; Airborne push box back edge air.front = 12 ; Airborne push box front edge height = 60 ; Height for opponent jump-over detection attack.dist = 160 ; Default attack detection range proj.attack.dist = 90 ; Projectile attack range proj.doscale = 0 ; Scale projectiles with character (0=no) head.pos = -5, -90 ; Head position (camera/targeting) mid.pos = -5, -60 ; Mid body position (targeting) shadowoffset = 0 ; Shadow Y offset draw.offset = 0, 0 ; Display offset
[Velocity] Section
walk.fwd = 2.4 ; Forward walk speed walk.back = -2.2 ; Backward walk speed (negative) run.fwd = 4.6, 0 ; Forward run (x, y velocity) run.back = -4.5, -3.8 ; Back dash (x, y - hops backward) jump.neu = 0, -8.4 ; Neutral jump (x, y) jump.back = -2.55 ; Back jump X velocity jump.fwd = 2.5 ; Forward jump X velocity runjump.back = -2.55, -8.1 ; Running back jump runjump.fwd = 4.0, -8.1 ; Running forward jump airjump.neu = 0, -8.1 ; Air jump neutral airjump.back = -2.55 ; Air jump backward X airjump.fwd = 2.5 ; Air jump forward X
[Movement] Section
airjump.num = 1 ; Number of air jumps allowed airjump.height = 35 ; Minimum height for air jump yaccel = .44 ; Gravity acceleration per tick stand.friction = .85 ; Ground friction while standing crouch.friction = .82 ; Ground friction while crouching
Character Archetypes
| Archetype | Life | Attack | Defense | Walk | Run | Jump |
|---|---|---|---|---|---|---|
| Balanced (Shoto) | 1000 | 100 | 100 | 2.4 | 4.6 | -8.4 |
| Grappler | 1100 | 110 | 90 | 1.8 | 3.8 | -7.8 |
| Rushdown | 900 | 105 | 95 | 2.8 | 5.2 | -8.8 |
| Zoner | 950 | 95 | 100 | 2.0 | 4.2 | -8.0 |
| Glass Cannon | 800 | 120 | 85 | 2.6 | 5.0 | -8.6 |
| Boss | 1400 | 115 | 80 | 2.4 | 4.6 | -8.4 |
State Numbering Convention
| Range | Purpose |
|---|---|
| -3 | Intro state (before round starts) |
| -2 | First tick initialization |
| -1 | Command detection (in .cmd file) |
| 0 | Standing idle |
| 10 | Standing turn |
| 11 | Crouching turn |
| 12 | Stand-to-crouch transition |
| 20 | Walking |
| 40 | Jump startup |
| 45 | Airborne jump (going up) |
| 50 | Jump landing |
| 51 | Running forward |
| 52 | Running back (hop back) |
| 100 | Run forward |
| 105 | Run back |
| 110 | Taunt |
| 120 | Guard start (standing) |
| 130 | Guard start (crouching) |
| 131 | Guard start (airborne) |
| 140 | Guard hit (standing) |
| 150 | Guard hit (crouching) |
| 152 | Guard hit (air) |
| 155 | Guard end |
| 170 | Lose by time over |
| 175 | Draw by time over |
| 180 | Pre-intro (before round text) |
| 190 | Win pose |
| 191 | Win pose (teammate KO'd in team) |
| 200-299 | Standing normal attacks |
| 300-399 | Standing special normals |
| 400-499 | Crouching attacks |
| 600-699 | Air attacks |
| 700-799 | Additional attacks |
| 800-899 | Throw states |
| 1000-1999 | Special moves |
| 2000-2999 | EX/Enhanced specials |
| 3000-3999 | Super moves |
| 4000-4999 | Ultra/cinematic supers |
| 5000-5099 | Ground hit states (common) |
| 5100-5199 | Air hit states (common) |
| 5200-5299 | Knockdown states (common) |
| 5300-5399 | Get-up states |
| 5400-5499 | Dizzy states |
| 5900-5999 | Continue/death states |
Key Relationships Between Files
How Files Reference Each Other
.def (master) |-- .cmd (commands + Statedef -1) |-- .cns (constants + character states) |-- .air (animation data) |-- .sff (sprite images) |-- .snd (sound effects) |-- common1.cns (shared engine states) |-- st1.cns ... st99.cns (extra state files) |-- pal1.act ... pal12.act (palette files, SFF v1 only)
Cross-File Dependencies
- •States reference animations: Every
ChangeAnimcontroller uses action numbers from the .air file - •States reference sounds:
PlaySndcontrollers reference sound groups/indices from the .snd file - •Commands trigger states: Command definitions in .cmd bind input sequences to
ChangeStatecalls in Statedef -1 - •HitDefs reference sparks:
sparknoin HitDef controllers references animation actions (from the character .air or the fight effects .air) - •Constants affect states: Physics values in [Velocity] and [Movement] are used automatically by state types (e.g., a state with
physics = Susesstand.friction)
File Loading Order
- •Engine reads .def to discover all file paths
- •.sff sprites are loaded into memory
- •.air animation sequences are parsed
- •.snd sounds are loaded
- •.cns constants are read and applied
- •.cmd commands are parsed
- •Common states (common1.cns) are loaded
- •Additional state files (st1-st99) are loaded in order
- •Palettes are applied
Common Mistakes
- •Forgetting stcommon: Without
stcommon = common1.cns, the character has no default behavior (no walking, jumping, getting hit, etc.) - •Wrong file paths: All paths in .def are relative to the character folder. Use forward slashes even on Windows.
- •Missing animations: Referencing an animation action in a state that does not exist in the .air file causes the character to become invisible or crash.
- •Mismatched group numbers: Sound PlaySnd calls must match actual groups in the .snd file.
- •No Statedef -1 in .cmd: Without the command processing state, no inputs work.
- •Persist values too low: Setting IntPersistIndex or FloatPersistIndex too low means variables get reset between rounds unexpectedly.
- •Wrong mugenversion: Using
mugenversion = winmugendisables features available in1.0and1.1.