Creating a UMF character
UMF (Ultimate Mugen Format) describes a whole fighter in one JSON file. The compiler (crates/native/src/compile.rs) generates commands, states, HitDefs, projectiles, super pause, cancels and hitboxes. The result runs on the same state machine as M.U.G.E.N characters.
How a move is defined
This is an excerpt of the jab entry from Kaito’s definition. It belongs in moves, and anim refers to an entry in anims.
{
"id": "jab",
"name": "Snap Jab",
"input": "x",
"kind": "normal",
"anim": "jab",
"hits": [{ "at": 2, "damage": 28, "level": "light", "hitstun": 13 }],
"cancels": ["strong", "gale", "rise", "tide", "launcher", "overhead", "slide", "string_a"]
}
at: 2 selects the second animation frame. Each frame’s ticks value sets its duration at 60 simulation ticks per second. The compiler produces the input command, combat state and HitDef for damage and hit reaction. cancels lists the move IDs that can follow before the current animation finishes.
Step by step
- Copy a finished fighter as a base:
cp assets/chars/kaito.json assets/chars/mine.json. - Change
id(unique, lowercase, no spaces),name,series,authorandcolor. - Optional: add the
idtoassets/chars/index.jsonto set its order in the select screen. Missing ones follow alphabetically. - Run
cargo run --release.build.rsembeds every.jsonin the folder into the executable. - Test in Training with
F2on to see hitboxes and hurtboxes.
UMF fighters also load from a folder without recompiling: drop the .json in umf/ next to the game (or in mugen/umf/, or in the folder named by UME_UMF_DIR). Kit files in the same folder are registered first, whatever their names.
File skeleton
{
"format": "umf/2",
"id": "mine",
"name": "My Fighter",
"series": "My Series",
"author": "you",
"description": "Select screen text",
"color": "#e85d2a",
"winQuote": "Victory line",
"intro": "Line said at round 1 start",
"taunt": "Reply/provocation",
"form": "Awakened form name",
"boss": false,
"speed": 1.0,
"stats": {},
"art": { "type": "sprites", "style": {}, "poses": {} },
"palettes": [],
"awakeningPalette": { "hair": "#f6c83e" },
"anims": {},
"moves": []
}
| Field | Required | Description |
|---|---|---|
format | yes | umf/2 (umf/1 still loads) |
extends | no | Fighter or kit ids to inherit from, see Reuse. Required fields may then come from the parent |
id, name, series, author, color | yes | Identity; color is the select card color |
boss | no | true hides it from select and makes it the final Arcade boss |
npc | no | true hides it from select and every random pool; used by Story mode thugs, no boss empowerment |
profile | no | Nationality and biography, see Profile |
speed | no | Animation speed multiplier (>1 = faster moves) |
stats | no | Attributes, table below |
art | yes | Art: style.colors drives palette recolouring of the PNG sprites, poses names the pose keys |
palettes | no | Alternate colors; each item overrides keys of art.style.colors |
awakeningPalette | no | Color overrides applied on top of the selected palette while awakened; effect sprites are unchanged |
anims | yes | Animations by name |
moves | yes | Moves |
Reuse: extends, use and kits
A fighter does not have to be written from scratch. Three tools remove the copy and paste that M.U.G.E.N packages need (see the numbers in M.U.G.E.N code study):
| Tool | Where | What it does |
|---|---|---|
"extends": "kaito" | top level | Inherits everything from a loaded fighter or kit: stats, art, animations, moves. A list (["kaito", "storm-kit"]) layers several, left to right. |
"use": "gale" | inside a move | Clones another move (from a parent or from an earlier move of the same file) under a new id, changing only the fields you write. |
| kit file | "format": "umf-kit/1" | A partial definition (moves, animations, poses, stats) with an id, shared by many fighters. core is built in and carries the universal launcher and escape_burst. |
Rules of the merge, applied by crates/native/src/kit.rs before the normal UMF parser runs:
- Objects (
stats,art,abilities,passives) merge key by key, so"stats": { "life": 1080 }changes one number. An animation inanimsreplaces the inherited one as a whole. A value ofnullremoves the inherited key. movesare matched byid. An entry with only some fields keeps the rest ({ "id": "gale", "name": "Crimson Gale" }), a bare string ("launcher") lists an inherited move unchanged, and{ "id": "slide", "remove": true }drops one. Moves you list come first, in your order; inherited moves you did not mention follow.- Identity is personal:
name,author,description,profile,bossandnpcare never inherited from a fighter. spriteSetlets the new fighter reuse the parent's pixel-art pack. Recolour it withpalettesand leaveart.style.colorsinherited: those are the reference colours of the pack.- Mistakes name the culprit (
unknown kit or fighter,move x uses y, which no kit or earlier move defines), andextendschains deeper than 8 are rejected.
A complete fighter in 20 lines (docs/examples/umf/mika.json, which inherits a 39 KB definition and the kit storm-kit.json):
{
"format": "umf/2",
"id": "mika",
"name": "Mika Arashi",
"author": "Ultimate MUGEN",
"color": "#b8433a",
"extends": ["kaito", "storm-kit"],
"spriteSet": "kaito",
"stats": { "life": 1080, "attack": 104 },
"palettes": [{ "top": "#b8433a", "trim": "#6a1e1a", "hair": "#1a1a22" }],
"moves": [
{ "id": "gale", "name": "Crimson Gale" },
{ "id": "squall", "use": "gale", "name": "Squall Volley", "input": "~D, DF, F, x+a", "cost": 500, "fx": "aura" },
{ "id": "slide", "remove": true }
]
}
Try it with UME_UMF_DIR=docs/examples/umf cargo run --release.
Profile (nationality and biography)
Every fighter has a nationality and a short biography, written in English (en), Brazilian Portuguese (pt) and Spanish (es). A missing language falls back to en.
"profile": {
"country": "jp",
"nationality": { "en": "Japanese", "pt": "Japonês", "es": "Japonés" },
"bio": { "en": "Two short sentences.", "pt": "Duas frases curtas.", "es": "Dos frases cortas." }
}
- Built-in fighters, the final boss and the Story mode thugs keep their profiles in
assets/char_profiles.json, keyed byid. Aprofilefield inside the fighter file wins over that table, so imported UMF fighters carry their own. countrypicks the flag drawn next to the nationality:jp,br,no,us,cn,es,mn,de,kr,ar,au,ru,fr, plus the fictionalunderworldandeclipse. Flags are vector shapes insrc/flag/designs.rs(no image files); add a new entry there for another country. An unknown code simply shows no flag.UME_SHOTS_ONLY=flagssaves a sheet with every flag.- The flag appears on the roster tile, on the fighter card, in the profile strip under the roster and on the Story mode stage card.
- Keep each biography under 260 characters: it must fit two lines of the select screen.
tagsis an optional list of fighting-style tags ("tags": ["rushdown", "zoner"]). The select screen shows up to three as chips under the roster. Known keys are translated (rushdown,grappler,zoner,balanced,aerial,trapper,counter,power); any other key is shown uppercased (storm-callerbecomes STORM CALLER). The list lives insrc/profile_tags.rs.- The select screen shows the nationality and the biography of the highlighted fighter under the roster (thugs and the boss appear with the Bosses filter). The Story mode stage card shows the profile of the stage boss.
- Fighters without a profile (M.U.G.E.N content) keep showing
description. cargo test --release -p ultimate-mugen profilechecks that every fighter file ofassets/charshas a complete profile in the three languages.
stats
| Field | Example | Meaning |
|---|---|---|
life | 1000 | Life |
power | 3000 | Max super meter (1000 per level) |
attack / defense | 100 | Multipliers in % |
walk | [2.4, 2.2] | Forward / backward walking speed |
run | [5.2, 4.6] | Run forward / back hop |
jump | [-8.4, -2.5, 0, 2.6] | Vertical speed, horizontal back, neutral and forward |
gravity | — | Vertical acceleration |
airJumps | — | Extra air jumps |
airDashes | 1 | Air dashes per jump (movement.airdash.num) |
height | 100 | Body height |
width | [16, 15] | Front / back width for pushing |
anims
Each animation is a list of frames:
"jab": { "frames": [
{ "pose": "jab0", "ticks": 3 },
{ "pose": "jab1", "ticks": 3, "hit": { "part": "handR", "radius": 10 } },
{ "pose": "jab0", "ticks": 5 }
], "loop": 0 }
A frame with only a pose and a tick count can be written as "pose*ticks", and both forms mix in one list:
"jab": { "frames": ["jab0*3", { "pose": "jab1", "ticks": 3, "hit": { "part": "handR", "radius": 10 } }, "jab0*5"], "loop": 0 }
Run node scripts/umf2-migrate.mjs before committing a shipped fighter: it writes the canonical layout that CI checks. See ADR 0007. The format is also a JSON Schema checked in CI: UMF schema.
| Frame field | Description |
|---|---|
pose | Name of a pose in art.poses, or an inline pose object |
ticks | Duration in ticks (60 per second); -1 = forever |
hit | Active hitbox: part (limb or weapon) + radius, or box [x1, y1, x2, y2] |
hurt | "none" removes the hurtbox (invincible frame) |
effect | Draws an effect instead of the body (projectiles, sparks), see Effect frames |
offset | Drawing offset [x, y] |
loop | Frame index where the loop restarts |
How an attack frame becomes a hit box
Frames drawn from pixel sprites take their strike box from the explicit box when given, otherwise from a standard box seeded by the hit part (low for feet and knees, high for the head, middle otherwise) and radius, trimmed to the sprite silhouette. The compiler then reshapes it to the proportions measured on 605 M.U.G.E.N characters (native/pixel_hit.rs, H = standing height, 96 units for height 100):
- like a M.U.G.E.N
Clsn1, the box spans from the body to the tip: it starts at most0.10 Hin front of the origin and reaches at least0.60 H(the M.U.G.E.N median for punches is0.72 H, kicks0.80 H); - at least
0.36 Htall and never above0.95 Hor below the floor (M.U.G.E.N punches sit between-0.75 Hand-0.33 H, kicks down to-0.05 H); - the standing hurtbox is
0.46 Hwide (M.U.G.E.N median0.46 H) and the crouching one0.67 Htall (M.U.G.E.N median0.67 H); - an explicit
boxis used as written, so keep it inside those proportions; the audit fails otherwise.
cargo test --release -p ume-engine --test it native_hitbox_audit:: checks every strike frame of the roster (height, reach, start, width, above the head, under the floor), and native_normal_reach prints and compares the reach and damage of the four stand normals of every fighter.
Standard names
Animations with these names become the reserved M.U.G.E.N actions, so the common states work with no extra code.
| Name | Action | Name | Action |
|---|---|---|---|
idle | 0 | guardHit | 150 |
turn | 5 | crouchGuardHit | 152 |
crouchTurn | 6 | airGuardHit | 154 |
crouchStart / crouch / crouchEnd | 10 / 11 / 12 | lose / draw / win | 170 / 175 / 181 |
walk / walkBack | 20 / 21 | intro | 190 |
jumpStart / jumpUp / jumpFwd / jumpBack / jumpDown | 40–44 | taunt / powerUp | 195 / 196 |
land | 47 | defeat1…defeat4 | 197–200 |
run / hop | 100 / 105 | hitLight / hitMedium / hitHeavy | 5000–5002 |
guardStart / crouchGuardStart / airGuardStart | 120–122 | hitLowLight / hitLowMedium / hitLowHeavy | 5010–5012 |
guard / crouchGuard / airGuard | 130–132 | hitCrouch / hitAir | 5020 / 5030 |
guardEnd | 140 | airRecover / fall / trip | 5040 / 5050 / 5070 |
bounce / bounceAir / lieDown / getUp / dead | 5100 / 5101 / 5110 / 5120 / 5150 |
taunt, powerUp and defeat* have default versions if you do not define them. Other names get free numbers in file order.
moves
{ "id": "gale", "name": "Wind Wave", "input": "~D, DF, F, x", "simple": "sp1",
"kind": "special", "anim": "gale", "invuln": [1, 3],
"moves": [{ "at": 2, "vel": [2, -9] }],
"hits": [{ "at": 2, "damage": 90, "level": "heavy", "launch": true }],
"projectile": { "at": 3, "anim": "galeOrb", "hitAnim": "galeHit", "speed": [5, 0], "offset": [40, -60], "damage": 70 } }
| Field | Values | Effect |
|---|---|---|
id, name | text | Identifier and name in the move list |
input | command syntax, below | Command |
simple | sp1 sp2 sp3 super | One-button shortcut (keys 1/2/3, touch) |
kind | normal special super | Priority and cancels: normal → special → super on hit or guard |
when | stand (default) crouch air | State the move starts from |
anim | name in anims | Move animation |
hits | list | One HitDef per item |
moves | [{ "at": frame, "vel": [x, y] }] | VelSet on the frame; use null to keep an axis |
projectile | object or list | Projectiles |
cost | number | Meter spent; super defaults to 1000 |
invuln | [start, end] | Invincible frames |
teleport | frame, object, or list of { "at", "mode", "offset", "turn" } | Single or multi-step warp (behind, front, above, or fixed offset [x, y]); exits cleanly to state 50 when ending airborne (Pos Y < 0) |
fx | aura | Extra visual effect |
explods | [{ "at", "anim", "pos", "postype", "bind", "removeTime", "priority", "scale", "superMove" }] | Spawns visual effects (ki charge spheres, auras, super overlays) |
afterimage | { "at", "time", "length", "framegap", "trans", "palBright", "palContrast", "palAdd", "palMul" } | Customizes the afterimage trail |
shake | { "at", "time", "ampl", "freq" } (object or list) | Move-level screen shake (EnvShake) |
flash | { "at", "time", "color", "under", "superMove" } (object or list) | Screen flash / background darken (EnvColor) |
superPause | { "at", "time", "pos", "anim", "darken" } | Customizes the super freeze |
velMul / velAdd | [{ "from", "to", "x", "y" }] | Multiplies or adds velocity every tick between animation elements from and to (to 0 = until the end). A velAdd in y is the move's own gravity, so native gravity is skipped there (VelMul, VelAdd) |
posFreeze | [{ "from", "to" }] | Pins the fighter between those elements (PosFreeze) |
posSet | [{ "at", "x", "y" }] | Sets the absolute position on an element (PosSet) |
palFx | [{ "at", "time", "add", "mul", "sinAdd", "color", "invertAll" }] | Colour flash on the fighter (PalFX) |
followUp | { "to": "move_id", "on": "hit" | "contact" | "hitNow" | "end" | "command" | "release", "command", "at" } | Transition into a follow-up move: on hit-confirm, at the end, while command is held (command) or once it is released (release) |
holdRelease | { "button": "y", "tiers": [{ "at": 0, "to": "move_id" }, { "at": 45, "to": "move_id" }] } | Hold-to-charge: the move stays in its (looping) anim while button is held and, on release or when the anim ends, jumps to the tier with the largest at (ticks held) reached. Charge vfx explods are cleared on release |
spawn | [{ "at", "state", "id", "name", "pos", "postype", "facing", "ownPal", "superMoveTime", "pauseMoveTime" }] | Spawns a helper running a scripts.cns state (Helper) on animation element at |
cinematic | { "letterbox", "hideUi", "freeze", "title", "camera", "cuts", "finishSlow" } | Multi-beat movie direction (Zoom, Camera, EnvColor, EnvShake, Cinema, SlowMo, AssertSpecial(NoBarDisplay)) |
voice | 1000, 0 | Character sound group and index played at move start, when that sample is bundled |
airPhysics | true | Keeps air physics |
cancels | list of move ids | This move may be cancelled into those moves on contact (hit, guard or projectile contact). Declaring it replaces the automatic gatling out of this move |
throw | { "damage", "bind", "launch", "at" } | Grab: see Combat traits |
armor | { "hits", "threshold" } | Absorbs hits while the move is active |
parry | { "window": [from, to], "spark" } | Returns attacks during the animation-element window |
timestop | ticks | Freezes everyone else |
burst | true | Combo breaker usable while being hit |
requires | { "life": {"max": 0.5}, "enemyLife": {"min": 0.1, "max": 0.5} } | Life condition: the move only starts while the fighter's life (life) and/or the rival's (enemyLife) is inside min..max, as a fraction of max life (0 to 1). Either bound may be omitted. Compiles to life <= lifemax * max and enemy,life <= enemy,lifemax * max triggers |
flight | true | 8-way hover while the move lasts |
Built-in kits (extends). Fighters can inherit reusable capabilities with "extends": ["core", "ki_fighter", "clone_arts", "aerial_rush"] (crates/native/src/kits/): core provides universal launcher and escape_burst; ki_fighter provides abilities.fly, abilities.teleport, abilities.superSpeed, abilities.charge (customizable auraColor, shake, sound, explod) and a multi-hit ki_beam template (missTime, hitflag); clone_arts attaches autonomous shadow clones (helpers.clones); aerial_rush adds flight, super speed and double air-jump.
Finisher. A move with "kind": "finisher" (use throw or hits for the effect) is only available after a KO (RoundState = 3 and WinKO). When the final round ends by KO and the winner has a finisher, the round waits up to 6 seconds on "FINISH HIM" for the winner to perform it; performing it (or the timeout) ends the wait. Rosters with no finisher are unaffected.
Ultimate. A move whose id starts with ult_ is the fighter's ultimate, and every native fighter declares one (the command is ~D, DF, F, D, DF, F, x+y). The compiler spends the whole meter on it: cost defaults to 3000 (the three bars drawn by the HUD), the move gets a 70 % damage bonus where a normal super gets 30 %, and its super freeze lasts 75 ticks instead of 55. cargo test --release -p ume-engine --test it native_ultimates:: fails when a fighter has no ultimate, when the cost is not three bars, when the ultimate does not start from its command or drains the meter, or when the measured damage is below 380 or not above every one of the fighter's supers.
Combat traits
- Automatic gatling. A move without
cancelsfollows the genre rules: a normal cancels into any stronger normal (light<medium<heavyby the strongest hit level, ties by declaration order, so strings can never loop), ground normals link into crouching ones, air normals chain with air normals, and every normal cancels into every special and super on contact. Specials cancel into other specials only through explicitcancels; supers cancel out of any move. - Explicit routes.
"cancels": ["strong", "rush"]onjabmakesstrongandrushacceptjabon contact. A projectile special can be cancelled once its projectile touches the opponent. Anairspecial may start from a ground launcher that lists it (uppercut, then dive). throw(damage,bind[x, y]in front of the thrower,launch[vx, vy],at= grab frame, default 1). The grab HitDef fires on animation elementat(give that frame ahitbox), the victim is held onat + 1, takes the damage onat + 2and is launched, so the animation needs at leastat + 2frames. Throws ignore guarding and whiff when the target is out of reach.armor(hitsabsorbed, optionalthreshold= damage above which the armor breaks). From move start until the last hit frame the move takes 35 % chip damage and is not interrupted; oncehitsare spent the next hit staggers normally.- Multi-hit glue. Moves with three or more
hitspush the target away only a little on every hit except the last (so the whole string connects) and piercing projectiles (4+ hits) do not shove the target out of the beam. Setknockbackexplicitly to opt out.
Validate with cargo test --release --test it native_roster_lab:: -- --nocapture (every attack state must connect; prints damage and reach per move), --test it native_combo_routes:: (every declared cancel chains end to end) and python scripts/audit_native_moves.py.
hits[]
| Field | Default | Description |
|---|---|---|
at | — | Frame (1 = first) where the HitDef activates |
damage | — | Damage |
guardDamage | damage / 8 | Damage on block |
level | medium | light (hitstop 9, hitstun 12), medium (11, 16), heavy (13, 20) |
guard | mid | high, low, mid or unblockable |
knockback / airKnockback | by level | Velocity [x, y] applied to the opponent |
launch | false | Knocks down |
hitstop, hitstun, spark, shake | by level | Fine tuning |
projectile
| Field | Description |
|---|---|
at | Frame it is fired on |
anim / hitAnim | Flight / impact animation |
speed / accel | Velocity and acceleration [x, y] |
offset | Spawn position [x, y] relative to the fighter |
damage, level, launch, knockback | As in hits |
hits | Number of hits |
removeTime | Ticks until it disappears |
priority | Priority against other projectiles |
Elements and stun
hits[] and projectile accept element (fire, ice, lightning, earth, wind, water) and stun (extra hit-stun ticks). The compiler adds the element's hit-stun and shake and tints the victim for a moment (PalFX): ice freezes longest (+16), lightning shocks (+22 and a 8-tick shake), fire burns red, earth shakes the screen, wind and water add a short tint. stun stacks on top and adds a 5-tick shake when none is set. Unknown elements are ignored.
hits[] and projectile also accept ownSound: true: hitSound then plays from the fighter's own sound bank (S prefix in M.U.G.E.N) instead of the common fight bank.
Command syntax
| Symbol | Meaning | Example |
|---|---|---|
F B U D / DF DB UF UB | Directions (relative to facing) | D, DF, F, x |
x y z a b c | Buttons (s = start) | x |
, | In sequence | F, F |
+ | At the same time | x+y |
~ | Release | ~D, DF, F, x |
/ | Hold | /B, F, x |
$ | Inclusive direction ($D accepts DB, D, DF) | $D, x |
> | No other input between steps | F, >F |
N | Neutral direction (no direction held) | N, x |
Power normals (Punch 3 and Kick 3)
Every native fighter that does not declare a move bound to z or c gets four extra normals at compile time (native/power_normals.rs): power_punch and crouch_power_punch on z (default key E, shown as Punch 3), power_kick and crouch_power_kick on c (default key D, shown as Kick 3). Each one reuses the animation, timing, guard height and cancels of the fighter's heaviest ground normal of that family (y then x for punches, b then a for kicks, crouching variants take the crouching normal), named <base name> Max. Hits deal 130 % damage, are promoted to heavy, gain 4 hit-stun and 2 hit-stop ticks when those are set, and push 25 % harder. Moves that cancel into the base normal also cancel into its power version, and the new moves appear in the pause move list. Declare your own z or c move to opt out. Air versions are not generated here.
All native fighters also receive two down-light-kick normals at compile time (native/low_normals.rs): lowkick on D+a while crouching and airlowkick on D+a in the air. They use the character's existing crouch-light-kick and air-kick animations, respectively, keep their pixel-art frames, and use low guard. The aerial version moves forward and downward to close short gaps. A fighter that already declares a move with the same id or D+a state/input keeps its authored move.
Energy charge (every fighter)
Every native fighter can charge its meter: hold R (the s / Start input; the pause key in a fight is Esc or P). The fighter enters state 3920, plays its powerUp animation on a loop with a blue glow and gains 9 to 48 power per tick (native/charge_ramp.rs, filling a 1000-power super in about one second) until the button is released (after at least 6 ticks) or the meter is full. The state is movetype = I, so a hit interrupts it, and a form-capable fighter still transforms with T once the meter reaches the form cost. The command is charge_cmd (/s) and shows as Charge Energy in the move list. The built-in AI charges only at level 3 or above, with less than 700 power, when the rival is more than 190 units away and is not attacking.
taunt, powerUp and defeat* have default versions if you do not define them. Other names get free numbers in file order. Add "id": 8801 to any animation entry to pin a fixed action number for custom scripts or p2Anim.
Exotic mechanics (helpers, cinematic throw, bossRules, scripts)
Every Ikemen GO / M.U.G.E.N expressive pattern works declaratively inside a single UMF JSON without editing Rust:
| Section | Replaces in M.U.G.E.N / ZSS | Key capabilities |
|---|---|---|
helpers.stand | Manual Helper(keyctrl=1) + BindToParent + HitOverride | Independent hitbox/hurtbox Stand fighting alongside parent (input or triggerMove), toggle summon/recall, optional meter drain, lifeTransfer to parent via ModifyPlayer |
helpers.clones | Manual AI clone Helpers | Kage Bunshin autonomous clones (count, maxActive, duration, walkSpeed, attackRange, oneHitPoof), chase + random AI attack selection, camera freedom (ScreenBound movecamera = 0, 0) |
moves[].throw (cinematic) | Custom TargetState + ChangeAnim2 choreography | p2Anim (ChangeAnim2), cameraFree, camera (zoom, pos, delta, delay, bound, time, lag, freeze, hideUi, bars), beat-by-beat steps[] (at, bind, anim, p2Anim, p2State, damage, shake, facing, launch, camera, flash, sound, slowmo, invert), auto !GetHitVar(IsBound) failsafe |
moves[].cinematic | Movie direction on attacks & supers | letterbox, hideUi, freeze, title, camera, cuts[] (keyframes for zoom/pan, flash, shake, slowmo, invert, bars, lines, darken, text) and finishSlow; emits Zoom, Cinema, SlowMo, AssertSpecial, EnvColor & anime Cut-In |
bossRules | UI-breaking [StateDef -4] AssertSpecial / Text / ModifyPlayer | hideHud, hideLifeBar, hidePowerBar, hideTimer, freezeTimer, continuous or triggered HUD texts[], modifyPlayer[] (self or "enemy"), phases[] (lifeBelowRatio, when, once, attackMul, defenceMul) |
scripts | Raw .zss / .cns files ([StateDef -4], map()) | Inline zss and/or cns strings (supports [StateDef -4] running even during SuperPause, map(k) := v, teamMap(k) := v), custom commands[], and @anim(name) / @move(id) macro expansion |
In-game and CLI Debug Tool
- In-game (
F2): renders translucent-filledClsn1/Clsn2boxes, amber pushbox, pivot crosshairs, velocity vectors,helper/targetlink tethers, stage bounds, top toolbar, and a 4-tab inspector (F4:Overview/Vars & Maps/Clipboard & HitDef/Console & Engine);F5freezes simulation;F6or.advances+1 frame;F7cycles speed (1x/0.5x/0.25x/0.1x);F8cycles box layers. - CLI:
cargo run --release -p ume-devtools --bin ume-tools -- debug-fight <char1> [char2] [--frames N] [--only-moves] [--json]prints per-move frame data (startup,active,recovery, reach),clipboard,console, warnings, and cinematic events.
Air abilities (every special and super)
Every special and super with when unset or "stand" also gets an air version (state 20000 + ground state, label State -1, air <name>), entered with the same command while the fighter is airborne. The fighter hovers at the start of the move (drift kept at 40 %), gravity returns at 45 % after 12 ticks, the move ends into the jump fall state (50) with control, and touching the ground interrupts it with the landing state (52). Air versions deal 70 % of the ground damage, projectiles leave angled down (slope 0.85) so they reach a grounded rival, and each jump allows one air special (var(57), cleared on landing). Throws, flight moves and moves that declare when: "crouch" or "air" keep their own rules.
Pixel-art sprites (optional)
If assets/chars/sprites/<id>/ exists, the fighter is drawn from PNG files, the same way M.U.G.E.N fighters are drawn from sprites. Use transparent PNGs facing right, with the feet on the bottom edge and the same canvas size (400×400 RGBA) for every file of one fighter. Generate missing combat PNGs using generate_image with a validated canonical pixel-art anchor of that fighter (procedural or code-generated fighter art is forbidden).
| File | Poses that use it |
|---|---|
01_idle | idle0, walk, run, crouch, guard, jump and every pose with no art of its own |
02_attack1 … 06_victory | jab / punch, kick, special, projectile and victory / taunt poses |
07_idle1, 08_idle2 | the other breathing frames of idle (idle3 reuses 07_idle1) |
09_hit1, 10_hit2, 11_hit3 | hitH1, hitH2, hitH3 (damage) |
12_fall1, 13_fall2 | hitAir1/fall1/trip and hitAir2/fall2/bounce (knocked into the air) |
14_lie | lie, dead, lose and every df* pose (knocked out, with a low and wide hurt box) |
15_power0, 16_power1, 17_power2 | powerup0, powerup1, powerup2 (transformation, key T) |
meta.json holds {"refHeight": N}: the height in pixels of the standing body in 01_idle.png. Every pose of the fighter is scaled so that body is 100 units tall, so a lying or crouching sprite keeps the same pixel size. Without it each PNG is scaled to 100 units by its own height.
When awakeningPalette overrides hair, each sprite's frames.<stem>.awakeningHair supplies [left, top, right, bottom] in source pixels. Hair recoloring is confined to that rectangle; sprites without one retain their original hair. Web packing rescales these coordinates with the sprite.
Palette entries also apply to these PNGs: each pixel is matched to the shading line of a colour declared in art.style.colors, and the matching palette colour replaces it at the same shade. A palette key with no matching art.style.colors entry, or a colour nothing in the art resembles, is left untouched.
The web build does not read this folder from disk. scripts/build-web.sh runs ume-tools pack-sprites (crates/devtools), which writes one assets/chars/sprites/<id>.pack per fighter (images capped at 768 px, 256 colours stored as LZ4 sprites, see Sprite Container, meta.json anchors rescaled) into web/dist; the browser fetches a pack when the fighter is focused on the select screen or loaded for the fight, and the engine reads it through the same virtual folder. A failed download leaves the fighter without art, so the match waits for the pack and reports the failure.
Validate
cargo test --workspace --release
Review fighter art with ume-tools audit-sprites, which lists missing and reused poses, or in the game itself.
Browser sprite packs load asynchronously. A newly downloaded or replaced pack invalidates the affected native fighter’s cached previews and all palettes; other fighters keep their caches. Match loading waits for the chosen built-in fighters’ packs and reports download failures rather than starting with a cached procedural fallback. Imported native definitions without a bundled pack remain supported.
Share a fighter as a pack
A zip (or a mugen/ folder) that holds one UMF .json next to a sprites/ folder with 01_idle.png, the pose PNGs and an optional meta.json (axisX, axisY, refHeight per pose) is imported as a native fighter, with no .def. The marketplace installs it like any other pack. Goku SSJ4 UMF is the reference example.
M.U.G.E.N parity (exact migration)
tools/mugen2umf convert turns a M.U.G.E.N folder or zip into such a pack with identical behavior. The json carries a mugen block and art.type: "mugen":
mugen.cns,mugen.st,mugen.stcommon,mugen.cmd: the original state and command files, verbatim.mugen.anims: every AIR action by number, with sprite, offset, ticks, flip, blend and alpha, scale, angle and every Clsn1/Clsn2 box.mugen.info,mugen.mugenVersion,mugen.localcoord: the original.def[Info].mugen.names: optional move names for the move list, keyed by command name.sprites/: one indexed PNG per SFF sprite (exact indices and palette),sffpal_<k>.pngfor the SFF palettes,pal1.act..pal12.act, every sound assnd_g_i.wav, andmeta.json(axes, sizes and palette of each sprite in SFF order).
The engine builds the fighter from these with the same code as a M.U.G.E.N character (ume_engine::loader::assemble_mugen_char), so states, commands, constants, animations, palettes and sounds are the same. UMF fields (profile, series, quotes, rivals, scripts) are layered on top. mugen2umf parity proves it move by move.
Native moves work on top of an exact fighter: each anim (and projectile anim) names a M.U.G.E.N action number ("anim": "3000"), and the moves compile like those of a native fighter, with commands m_<id>, chains, throws, projectiles and air variants. Their states live in a block of 100000 numbers above the highest original state, and their Statedef -1 routes run before the original ones, so original states are never replaced. parity compares the exact part without them and lists them under "Added by UMF", played from their real input.
SFF v1 palettes follow M.U.G.E.N: in a shared-palette SFF (header palette type 1), a sprite flagged "same palette" uses the character palette (the selected .act), never the private palette of the sprite before it (usually the 9000 portrait). Individual-palette SFFs still inherit from the previous sprite.
Fighter element
The optional top-level element field accepts fire, ice, lightning, water, earth, wind or neutral. The fight HUD shows the assigned element beside the fighter portrait, with a localized text fallback. This metadata has no effect on damage or match rules.