Debugging
The fighter debugger (in the game from PRACTICE or Training, or rugen debug), the in-match overlays, frame stepping, rugen check and rugen verify output explained, and the common errors in character and stage files with their fixes.
In-match keys
| Key | What it does |
|---|---|
| F1 | Toggles the debug window title: state, state time, anim / element, position, velocity, ctrl and life of player 1. On by default. |
| F2 | Collision boxes: Clsn1 (attack) in red, Clsn2 (hurt) in blue, plus stage platform lines. |
| F3 | Per-player overlay: state number and time, type / movetype, ctrl, anim / element / AnimTime, position, velocity, life, power, hit count, juggle points and the last inputs. Start with it on: RUGEN_OVERLAY=1 rugen play ... |
| Space | Freeze the match. |
| . | While frozen: advance one frame. |
| + / - | Zoom the view in and out. |
| F11 | Fullscreen. |
Debug keys only work when the key is not bound to a player control.
The fighter debugger: rugen debug
rugen debug MyChar # MyChar against itself, the other side stands still
rugen debug MyChar kfm --ai 4 # against Kung Fu Man at computer level 4
rugen debug MyChar --stage training
A local match runs in a window of its own with an inspector beside it.
You play player 1 with your usual keys; player 2 stands still unless you
give it a computer level with --ai.

| Control | Key | What it does |
|---|---|---|
| PLAY / PAUSE | Space | Run or freeze the match. |
| STEP | . | Advance one frame (pauses first). |
| STEP BACK | , | Go back one frame; the last 600 frames (10 s) are kept. Stepping forward again plays new frames from there. |
| SPEED | F4 | Slow motion: 1/1, 1/2, 1/4, 1/8. |
| BOXES | F2 | Clsn1 (red) and Clsn2 (blue) boxes. |
| Select a player | click it, or Tab | Inspect another fighter or one of its helpers (the name under the state number cycles too). |
The inspector shows, for the selected player:
- The state: its number, the file it comes from and its name (the
comment on the
[Statedef]line, or the comment line above it). - Values:
anim,elem(element / count),time(state time),ctrl,type,movetype,physics,power,pos,vel,facing,life. - Variables: every
var,fvar,sysvarandsysfvarthat is not zero. The ones that changed on this frame are red. - Controllers this frame: each controller of the states the player
ran on this frame, in order, plus the ones of the special states
(
[-1],[-2],[-3]) that fired. A check means it ran, with the trigger group that held (its lines joined by&&). A cross means it did not, with the trigger that failed and, for a comparison, the current value of its left side:VarAdd · var(3) > 20 (var(3) = 12). Controllers skipped bypersistentor during hit pause say so. The last one that ran is highlighted.
The debugger never changes the match: the trace is recorded beside the
simulation, and the values behind failed triggers are computed on a copy
of the world (so Random in a trigger does not move the match’s random
numbers). Characters are hot reloaded as usual (below), so you can edit a
.cns, save and step again.
In the game
The same debugger opens without a terminal (offline only):
- PRACTICE → DEBUGGER on the title menu: pick the fighter to debug,
its opponent (the same fighter again for a mirror match, as
rugen debug MyCharplays) and a stage. The match starts inside the debugger, with no VS screen; Esc opens the pause menu, QUIT TO MENU leaves. - In TRAINING: the pause menu’s DEBUGGER entry, or F12 during the fight, opens it on the match you are playing, dummy settings and all. The same entry (now CLOSE DEBUGGER) or F12 closes it and the match goes on. A training match the debugger opened on keeps no replay, since STEP BACK rewinds it.
Reloading after edits
rugen plays characters from .rgc content files (see
Content files). Keep
the character you are working on as a folder in chars/: a folder is
your working copy, never moved or deleted, and its conversion lives in
cache/rgc/.
During a match, rugen checks about once a second whether any file in that
folder was added, removed, renamed or written. If so it converts the folder
again (unchanged sprites and sounds are reused, so a .cns edit converts in
a moment) and reloads the character in place. Edit your files in chars/
directly. A .zip, .rar or .rgc in chars/ is not watched: use a
folder while you work, then rugen convert it to share it. Stages are not
hot-reloaded. Hot reload is off in netplay.
rugen check
rugen check MyChar
My Char by You — 214 states, 380 sprites, loaded in 52ms
1650 controllers, 2 unsupported kinds:
envcolor x3
sndpan x1
2 warnings:
mychar.cns:812: [hitdef] HitDef needs attr
mychar.cmd:40: unknown trigger "comand"
- Unsupported kinds are controllers rugen skips. The controller reference shows which ones and what partial support means. Your character still runs; the skipped controller just does nothing.
- Warnings are parse and compile errors with
file:line. A controller with an error is replaced by a no-op; a state with a broken[Statedef]is dropped.
rugen verify
rugen verify MyChar # one character
rugen verify --all # everything in chars/
My Char: WARN
load 61 ms, 214 states, 1650 controllers, 9 sprite MB
soak 6000 frames: max helpers 3, explods 24, projectiles 1, biggest hit 18% of life, 0 sim warnings
unsupported envcolor x3
! unsupported controller envcolor (3x)
! 2 animation frames use sprites missing from the SFF (1500,4 1500,5)
What it does: loads the original files, inspects them, then plays two 3000-frame headless matches (random inputs against a level-8 CPU, then against Kung Fu Man when available). The verdict is stored in the cache and shown on the select screen; the exit code is 2 if anything is broken.
| Verdict | When |
|---|---|
verified | No issues at all. |
warn | Any issue: unsupported controllers, missing sprites, load warnings, engine limits hit, a state loop cut off, a single hit taking 60 % or more of a life bar. Playable. |
broken | Does not load, the simulation panics, or the character stays in one state for more than 1800 frames of fighting (except standing, crouching, walking, lying down). Cannot be picked; BLOCKED online. |
rugen re-verifies characters automatically when the engine version changes.
Common errors and fixes
Loading
| Symptom | Cause and fix |
|---|---|
| The character does not show up | rugen found no .def. Name it after the folder (MyChar/MyChar.def) and make sure it has [Files] sprite =. Archives must sit directly in chars/; .7z is not scanned. |
| “Install unrar/7z or repack as .zip” | A .rar needs unrar, 7z or bsdtar on the PATH. Zips always work. |
does not load: ... not found | A [Files] path is wrong. Paths are relative to the .def; case does not matter, but spelling does. |
| Garbled name on the select screen | The .def is not UTF-8. Re-save it as UTF-8. |
| Wrong colours | rugen uses the first palette (pal1 / palette 1,1). Check that pal1 is the palette you expect. |
States and expressions
| Message | Fix |
|---|---|
unknown trigger "..." | Typo or a trigger from another engine. The whole controller is dropped. Check the trigger list. |
missing value / HitDef needs attr | A required parameter is missing. The controller reference marks required ones. |
bad attr "..." | attr, hitflag-style strings must be like S, NA or SCA, NA, SA. |
missing ', value' | An old-style trigger such as AnimElem or TimeMod needs its comma part. |
State ignored after type = X | type, movetype and physics take one letter (S C A L, I A H, S C A N). |
| Later triggers ignored | Trigger groups must be numbered without gaps: trigger1, trigger2, … |
| A duplicate state does nothing | The first definition of a state number wins (cmd, cns, st, st0..9, then common). |
stuck in state N | A state never ends: usually ChangeState on AnimTime = 0 with a looping animation (last frame -1, or Loopstart). End on Time instead, or give the animation an end. |
| State machine stuck in a loop | Two states change into each other on the same tick forever. Add a condition (Time > 0) to one side. |
Gameplay
| Symptom | Fix |
|---|---|
| The move never hits | No Clsn1 box on the frame where the HitDef is active (press F2). AnimElem = n fires on the first tick of element n only. |
| The move hits twice or never stops hitting | Each HitDef hits once; a HitDef with trigger1 = 1 re-arms every tick. Trigger it on one element. |
| Command does not come out | Check the input history in F3. Long motions must come before short ones in [Statedef -1]; raise buffer.time; use $D instead of D for loose downs. |
| Character slides forever | physics = N keeps velocity. Use physics = S or set velocity to 0. |
| Hangs in the air | physics = N has no gravity and no landing. Use physics = A, or add Gravity and land yourself with PosSet / ChangeState. |
| Online: BLOCKED | See Online-fair characters for the flag named in the reason. |
Something wrong on this page? Edit it on GitHub.