RUGENDOCS
Playing

CLI reference

Every rugen subcommand and flag, from quick matches and online rooms to content files, verification, replays and the asset generators.

rugen [--root dir] [--open screen]                            full game: title, select, fight
rugen rugen://watch/CODE  |  rugen --url rugen://watch/CODE   the full game, straight to WATCH of that room
rugen play <char> [char2] [options]                           quick match, direct netplay or an online room
rugen list [--root dir]                                       list chars/ and stages/
rugen convert <folder|archive> [out.rgc] [--stage]            write a shareable .rgc / .rgs
rugen export <file.rgc|.rgs> [out_dir] [--force]              back to a MUGEN folder
rugen check <char> [--root dir]                               report unsupported controllers
rugen verify <char> | --all [--root dir]                      load + headless soak, verdict stored in the cache
rugen replay <file.json> [--info] [--shot out.png] [--frames n]   play back a recorded match
rugen replay --list [--root dir]                              saved replays, newest first
rugen view <char.def | file.sff> [action] [--shot out.png]    sprite / animation viewer
rugen update [--check] [--root dir]                           install the latest release (--check: only report)
rugen ui-gen [--theme ink|dojo] [--out dir]                   regenerate a menu theme
rugen screenpack-gen / stage-gen / fontgen / pixelize / kit-import   asset generators

<char> is an id from chars/ (the file stem of a .rgc, .zip, .rar or folder, matched case-insensitively) or a path to a character.

rugen --help prints a short usage summary and rugen --version the version; neither opens the game window. This page is the complete reference.

Common options

OptionMeaning
--root dirUse dir as the game folder (the one holding chars/, stages/, motif/). Default: the current directory, then the binary’s folder.
--shot out.pngSave a screenshot and exit (after --frames, or at the matchup screen for online rooms).
--frames nRun n frames, then exit. Used with --shot and for scripted tests.
--no-update-checkFull game only: skip this run’s release check ([update] check = false in rugen.toml turns it off for good).

rugen

Starts the full game: title, select, fight. rugen game is the same. Accepts --root, --shot, --frames, --script, --script2, --keys and --open (see harness options).

ArgumentMeaning
rugen://watch/CODE (first argument)Open the full game on the ONLINE screen, join the room CODE on the official server as a spectator. This is what the desktop runs when a rugen:// link is clicked (see Watch links); other options still apply after it.
--url rugen://watch/CODEThe same, as an option.

The scheme and action ignore case, a trailing /, ?... or #... is dropped, and the code must be a room code (5 characters of ACDEFGHJKLMNPQRTUVWXY34679, older B S Z 2 5 8 accepted); anything else is refused before the window opens. Registering the scheme with the desktop is OPTIONS › ONLINE › REGISTER RUGEN:// LINKS (Windows and Linux; packaged Linux builds register through their .desktop file).

rugen rugen://watch/K7MQX
rugen --url rugen://watch/K7MQX --root ~/Games/rugen

rugen play

rugen play <char> [char2] [--stage s] [--root dir] [--ai 0..8]
           [--net ip:port [--port n] [--p2]]
           [--server url --room CODE|new [--spectate] [--guest]]
           [--synctest] [--watch] [--force] [--record file.json]
           [--team1 mode[:char,char]] [--team2 mode[:char,char]]
           [--shot out.png] [--frames n] [--script keys] [--script2 keys]

A local match against the computer (player 2 is char2, or char again). Quits back to the shell when the match ends.

OptionMeaning
--stage sStage id from stages/ or a path to a .def. Default: the training stage, else the first stage.
--ai nPlayer 2 computer level, 0 = human (default 4; 0 for netplay and sync tests).
--watchBoth sides computer-controlled.
--team1 / --team2 mode[:char,...]That side fights as a team (offline only): turns, simul or tag, then the fighters after its first one (--team1 turns:Goku,kfm makes P1 a team of three). See team modes.
--forcePlay a character even if it failed verification.
--record file.jsonRecord the match as a replay.
--seed nMatch seed (offline): the same seed and inputs play the same match, arena item drops included. Default: a fresh seed every match.
--synctestLocal match that runs a ggrs sync test to verify determinism.

Direct netplay

OptionMeaning
--net ip:portRollback match against a peer at that address (LAN / direct IP).
--port nLocal UDP port (default [net] port, 7000).
--p2This machine plays the 2P side.
rugen play kfm kfm --net 5.6.7.8:7000 --port 7000        # host side
rugen play kfm kfm --net 1.2.3.4:7000 --port 7000 --p2   # joining side

Online rooms

OptionMeaning
--server urlrugen-server address (https://host or host:port). Defaults to [net] server.
--room newCreate a room and print its code.
--room CODEJoin the room with that code.
--spectateWatch the room instead of playing.
--guestUse a throwaway account that is not saved to profile.json.

The command brings <char>, shows the matchup, confirms unless BLOCKED, syncs files, fights and quits. With --shot, it saves a picture of the matchup screen instead.

rugen play kfm --server https://rugen.example.com --room new
rugen play G6_Naruto --server https://rugen.example.com --room K7MQX
rugen play kfm --server https://rugen.example.com --room K7MQX --spectate

rugen list

Prints the game folder, then every character and stage with its id, kind (Content for a .rgc / .rgs, Zip, Rar, Dir) and source path.

rugen convert

rugen convert chars/MyHero                    # → MyHero.rgc in the current folder
rugen convert MyHero.zip out/MyHero.rgc
rugen convert stages/Rooftop --stage          # → Rooftop.rgs

Converts a folder, .zip or .rar into a shareable content file without touching the source (the game does the same on launch for anything new in chars/ and stages/, see Content files). The output defaults to <name>.rgc, or <name>.rgs with --stage; --root only tells it where data/ is. It prints a size summary and the fingerprint.

rugen export

rugen export chars/G6_Naruto.rgc              # → ./G6_Naruto/
rugen export stages/Rooftop.rgs out/Rooftop --force

Writes a content file back as a MUGEN folder that Fighter Factory and other tools open: sprites identical, sounds as WAV decoded from Opus, images as PNG. Files the converter copied in from the engine’s data/ (such as common1.cns) are left out. The folder defaults to the file’s name; an existing file stops the export unless you pass --force.

rugen check

rugen check G6_Naruto

Loads a character and reports its name, author, state and sprite counts, load time, every state controller kind rugen does not support yet (with counts), and compile warnings with file:line. Meant for character authors.

rugen verify

rugen verify G6_Naruto
rugen verify --all

Loads the character, inspects it (unsupported controllers, missing sprites) and runs two 3000-frame headless matches. Prints the report and stores the verdict (verified, warn, broken) in the cache manifest. Exits with status 2 if any character is broken. This also runs automatically the first time a character is used, once per engine version.

rugen replay

rugen replay replays/<file>.json [--shot out.png] [--frames n] [--root dir]
rugen replay replays/<file>.json --info
rugen replay --list [--root dir]

Plays back a recorded match (menu matches are recorded into replays/<p1>-vs-<p2>-<stage>-<hash>.json; quick play records with --record). Fighters and the stage are found by their path in the game folder, their content fingerprint, then their id, so a replay still plays after a fighter moved; older replays with absolute paths play too.

OptionEffect
--infoPrint the header (engine, machine, mode, time, online server and the other player’s version, fighters by id and fingerprint, length, rules) without playing.
--listList replays/ newest first: time, mode, version, file.

A replay keeps the match’s seed, so it plays the same item drops and CNS Random rolls; replays from rugen 0.6.2 and earlier, which carry none, play with seed 1 as they were recorded.

rugen storyboard

rugen storyboard chars/kfm/intro.def [--root dir] [--shot out.png] [--frames n]

Plays a M.U.G.E.N storyboard (cutscene) and quits at its end. A name that is not a file is looked up under data/, like mugen -storyboard. See Storyboards.

rugen view

rugen view chars/kfm/kfm.def          # animation viewer with Clsn boxes
rugen view chars/kfm/kfm.def 200      # start at action 200
rugen view chars/kfm/kfm.sff --shot sprite.png

Sprite and animation viewer for a character .def or an .sff file.

rugen debug

rugen debug <char> [char2] [--stage s] [--ai n] [--root dir]

The fighter debugger: a local match beside an inspector with pause, frame step (forward and back), slow motion, boxes, the selected player’s state, values and variables, and every controller of the frame with why it ran or not. --ai gives player 2 a computer level (default 0: it stands). See Debugging.

rugen theme new

rugen theme new neon [--from ink|dojo] [--root dir]

Starts a user theme in themes/neon/: a theme.toml building on the bundled theme (ink by default), its system.def / fight.def and every ui/*.toml screen to edit. It reloads live while it is the active theme. See Your own themes.

rugen update

rugen update --check     # say whether a newer release is out
rugen update             # download, verify and install it

Asks GitHub for the latest release and, for a portable folder (zip / tar.gz), downloads the archive for this machine, verifies it against the release’s SHA256SUMS, unpacks it next to the game and swaps in rugen, motif/ and data/; your rugen.toml, chars/, stages/, themes/, cache/ and replays stay. Start rugen again afterwards. A system package (.rpm / .deb) is never replaced: the command prints the package’s download link instead. --root picks the game folder as elsewhere. The same lives in the game under OPTIONS › UPDATE; see Updating.

RUGEN_UPDATE_URL points the check at another releases/latest JSON (a local server in tests).

rugen ui-gen

rugen ui-gen --theme ink [--out motif/themes/ink] [--motif motif] [--font bold.ttf]

Regenerates a menu theme: ink (Shonen Ink) or dojo (Dojo, the default when --theme is omitted). See Themes.

Asset generators

CommandWhat it does
rugen screenpack-gen [--font bold.ttf] [--motif motif] [--out motif/themes/dojo]Regenerates the MUGEN system.def / fight.def screenpack of a theme.
rugen stage-gen [--out motif/stages]Writes the four built-in stages: training (the huge grid room with a floor ruler), ink_dojo (sumi-e), ink_arena (Sky Islands, the ARENA stage), night_festival (the dark one). All procedural, a few hundred KB together.
rugen fontgen [font.ttf] --size N [--italic rows] [--condense f] [--rim] --out font.def [--preview x.png]Renders a TTF into a MUGEN FNT v2 bitmap font (defaults: size 16, italic 3, condense 0.9).
rugen pixelize <in.png|webp> <out.webp> [--width N] [--palette p.gpl] [--dither] [--outline]Pixelizes an image onto a palette (default: the full motif palette).
rugen kit-import [--motif motif] [--out motif/themes/dojo]Re-exports the UI kit pieces.

Harness options

For automated tests and screenshots; available on rugen and rugen play.

OptionMeaning
--script keysScripted player 1 input: comma-separated tokens of keys held for one tick (U D L R a b c x y z s, . = nothing) with an optional *n repeat, for example R*40,.*20,D,DR,R,xy,.*10.
--script2 keysThe same for player 2.
--keys 90:Enter,120:kRaw key presses at given ticks (full game only), released 3 ticks later.
--open online|profile|options|controlsFull game only: start on that screen instead of the title (controls is player 1’s controls page).
rugen play kfm --shot kfm.png --frames 120 --script "R*40,.*20,D,DR,R,xy"
rugen --keys "90:Enter,120:Enter" --frames 300 --shot select.png
rugen --open options --frames 60 --shot options.png

The s token in --script is MUGEN’s s fighter button. START is not a fighter input, so --script cannot press it; use --keys with the START key (for example 90:p).

Environment variables

Diagnostics for the game itself; all off unless set. Their output goes to the log (stderr).

VariableWhat it does
RUGEN_FRAMESTATS=1Frame profiling, logged once a second: CPU time per phase (update, data rebuild, UI layout, draw building, GPU submit), draw calls, quads, texture uploads and live textures.
RUGEN_LATENCY=1Input-to-display latency, logged every 5 seconds: how long a key press waits for the next tick, how long the newest tick waits to be presented, how long presenting blocked on vsync, and an estimate of when the frame reaches the screen.
RUGEN_OVERLAY=1Start matches with the F3 state / frame data / input overlay on (see Debugging).
RUGEN_PRESENT=fifo|mailbox|immediateForce a presentation mode, when the GPU offers it (overrides [video] low_latency).
RUGEN_FRAMESTATS=1 rugen

Something wrong on this page? Edit it on GitHub.

SEARCH !!

    ↑↓ to move, Enter to open