Screenpacks and lifebars
Classic system.def and fight.def screenpacks in rugen - which sections and keys work, the lifebar keys and rugen's extras, fonts and rugen fontgen, storyboards, localization, how to build a TOML UI theme, and your own themes in themes/ with live reload.
rugen has two layers for everything outside the fight itself:
- Classic screenpacks: M.U.G.E.N’s
system.def(menus, select, VS) andfight.def(lifebars and round announcements), with.sff,.sndand fonts. rugen reads a subset ofsystem.defand most offight.def. - TOML themes: rugen’s own data-driven menus (
ui/*.tomlwith WebP art). When a theme has a TOML file for a screen, it replaces thesystem.defversion of that screen. The lifebars always come fromfight.def.
Where screenpacks live
| Location | What |
|---|---|
themes/<name>/ | Your themes, next to chars/: any folder with a system.def (Your own themes) |
motif/themes/<name>/ | The bundled themes: system.def, fight.def, .sff files, fonts, ui/*.toml |
motif/ | Shared files and the classic theme |
data/ | A classic M.U.G.E.N screenpack can go here |
Pick the theme in OPTIONS → INTERFACE or with [video] theme = "<name>"
in rugen.toml. A file missing from a bundled theme is looked up in
motif/, then in data/. See Themes for the
bundled ones.
system.def
All sections use localcoord from [Info] (default 320, 240).
[Files]
| Key | Meaning |
|---|---|
spr | system.sff with menu art (default system.sff) |
snd | Menu sounds |
font1 .. font10 | Fonts used by .font = n, bank, align keys |
logo.storyboard, intro.storyboard | Played once at launch, before the title (Storyboards) |
select and fight are not read: rugen builds the roster from chars/ and
stages/, and loads fight.def from the theme folder.
[Title Info]
| Key | Meaning |
|---|---|
menu.itemname.<item> | Labels, in file order. Known items: arcade, versus, training, watch, options, exit |
menu.pos | Menu position |
menu.item.font, menu.item.active.font | Fonts of normal and selected items |
menu.item.spacing | Distance between items |
menu.window.visibleitems | Items visible at once |
menu.boxcursor.coords, menu.boxcursor.visible | Highlight box |
cursor.move.snd, cursor.done.snd, cancel.snd | Sounds |
menu.item.bg.spr, menu.item.active.bg.spr, menu.item.bg.offset | rugen extension: a sprite behind each item |
rugen always adds OPTIONS and NETPLAY entries, and a TUTORIAL entry when the screenpack has no pause menu of rugen’s to hold the Training lessons. rugen’s own themes (Shonen Ink, Dojo) show their own title menu instead, with TRAINING and WATCH gathered under PRACTICE.
[Select Info]
| Key | Meaning |
|---|---|
rows, columns, wrapping, pos | Grid layout |
cell.size, cell.spacing, cell.bg.spr | Cells |
p1.cursor.startcell, p1.cursor.active.spr, p1.cursor.done.spr (and p2.) | Cursors |
p1.cursor.move.snd, p1.cursor.done.snd (and p2.) | Cursor sounds |
portrait.offset, portrait.scale | Small portraits in the cells |
title.offset, title.font | Mode title |
p1.face.offset, p1.face.scale, p1.face.facing (and p2.) | Big portraits |
p1.name.offset, p1.name.font (and p2.) | Names |
stage.pos, stage.active.font, stage.active2.font, stage.done.font | Stage name |
stage.move.snd, stage.done.snd, cancel.snd | Sounds |
Not read: showemptyboxes, moveoveremptyboxes, cell.random.*,
p1.random.move.snd, p1.cursor.blink. Portraits come from the cached
9000,0 / 9000,1 PNGs, and verification badges are drawn on the cells.
[VS Screen]
| Key | Meaning |
|---|---|
time | Ticks before the fight starts (any button skips) |
match.text, match.offset, match.font | Match label (%i is the match number) |
p1.offset, p1.scale, p1.facing (and p2.) | Big portraits |
p1.name.offset, p1.name.font (and p2.) | Names |
Menu backgrounds
[TitleBGdef] + [TitleBG ...], [SelectBGdef] + [SelectBG ...],
[VersusBGdef] + [VersusBG ...] and [OptionBGdef] + [OptionBG ...]
work like stage backgrounds (normal, anim, parallax elements, with the
keys from Stages).
Music
| Key | Meaning |
|---|---|
title.bgm, select.bgm, vs.bgm, … | Music for that screen |
<screen>.bgm.volume | 0 to 100 (default 100) |
<screen>.bgm.loop | 1 to loop (default) |
These keys live in a [Music] section of system.def.
Not supported yet
[Option Info] (rugen’s OPTIONS screen is its own), [Continue Screen],
[Win Screen], [Victory Screen], [Game Over Screen], [Survival Results Screen], and select.def (no [Characters] options such as stage= or
order=, no [ExtraStages], no [Options] match counts; only boss = 1
is read, for Boss Rush). Arcade mode is a
fixed ladder of six opponents.
fight.def: lifebars
fight.def draws the in-match HUD. Positions are in its localcoord
(default 320, 240). When the localcoord is 16:9 or wider, the two bars
spread to the screen edges.
Elements and fonts
Most keys below name an element: a group of keys under one prefix.
| Suffix | Meaning |
|---|---|
.spr = g, n | A sprite from fight.sff |
.anim = n | An animation from fight.def’s own [Begin Action] blocks |
.offset = x, y | Position relative to the parent pos |
.facing = 1 / -1 | Flip |
.scale = x, y | Scale |
.skew, .angle | rugen extension, sprites only |
.font = n, bank, align | A font from [Files] (align 1 left, 0 centre, -1 right) |
[Files] and [Info]
sff (default fight.sff), font1 .. font10, plus fightfx.sff,
fightfx.air, common.snd and fight.snd used by characters. [Info] localcoord.
Sections
| Section | Keys | rugen extras |
|---|---|---|
[Lifebar] | p1.pos, p1.bg0, p1.bg1, p1.mid, p1.front, p1.range.x (and p2.) | p1.fg0 (a top layer), p1.mid.delay (ticks the red damage trail waits, default 30), p1.flash.low (life % that starts flashing, 0 = off), p1.flash.* element, p1.flash.period (default 16) |
[Powerbar] | the same bar keys, p1.counter.offset, p1.counter.font (level number) | p1.counter.lit.font, p1.segments (one cell per level), p1.segment.bg.*, p1.segment.full.*, p1.segment.part.*, p1.segment.step, p1.stamp.*, p1.stamp.lit.* |
[Face] | p1.pos, p1.bg, p1.face (offset, scale, facing) | p1.face.fit = w, h crops and scales the portrait to cover a box |
[Name] | p1.pos, p1.name.font | p1.name.scale, p1.name.upper = 1, p1.bg.* plate stretched to the name, p1.bg.slice, p1.bg.pad, p1.bg.offset |
[Time] | pos, counter.offset, counter.font, framespercount | bg.* plate, round.text (Round %i), round.offset, round.font, round.scale, round.bg.* |
[Combo] | team1.pos, team1.counter.font, team1.text.text, team1.text.font, team1.text.offset, team1.displaytime (and team2.) | team1.angle |
[Round] | round.default.*, fight.*, ko.*, dko.*, to.*, win.*, draw.* (each an element or font + text + displaytime); timings start.waittime, ctrl.time, over.waittime, over.hittime, over.wintime, over.time, slow.time, win.time, match.wins, match.maxdrawgames | |
[WinIcon] | p1.pos, p1.iconoffset, p1.n, p1.s, p1.h, p1.throw, p1.c, p1.t, p1.suicide, p1.teammate, p1.perfect | p1.empty.* (placeholder for rounds not yet won), p1.follow = 1 (start after the name plate), p1.label.text (a caption such as WINS after the last round slot) with p1.label.font, p1.label.scale and p1.label.offset (from that slot) |
[ArenaHUD] | rugen only | Colours (r, g, b) and font banks of the Smash-style fighter cards in arena fights: card.color, card.border, p1.accent / p2.accent, p1.shadow / p2.shadow, face.bg, face.border, life.p1 / life.p2, life.empty, pip.color, power.off, power.on, clock.color, clock.shadow, tag.p1.bank / tag.p2.bank, name.bank, num.p1.bank / num.p2.bank, label.bank, clock.bank. Unset keys keep the Shonen Ink look. |
The portrait in [Face] is always the character’s sprite 9000,0;
p1.face.spr is ignored. In [Lifebar], only bg0 / bg1 are read (not
the 1.1 p1.bg.* form).
[WinIcon]
p1.follow = 1
p1.label.text = WINS ; rugen: caption after the round slots
p1.label.font = 2, 0, 1
p1.label.offset = 10, 0
[ArenaHUD]
card.color = 250, 246, 238
p1.accent = 220, 30, 40
clock.bank = 0
[Lifebar]
p1.pos = 140, 12
p1.bg0.spr = 10, 0
p1.mid.spr = 11, 0
p1.front.spr = 12, 0
p1.range.x = 0, -126
p1.mid.delay = 40 ; rugen: hold the damage trail a little longer
p1.flash.low = 25 ; rugen: flash below 25 % life
p1.flash.spr = 13, 0
[Powerbar]
p1.pos = 140, 228
p1.bg0.spr = 20, 0
p1.front.spr = 21, 0
p1.range.x = 0, -100
p1.segments = 3 ; rugen: one cell per power level
p1.segment.bg.spr = 22, 0
p1.segment.full.spr = 23, 0
p1.segment.step = 34, 0
Not supported yet: [Simul Lifebar], [Turns Lifebar], [Tag Lifebar]
and their face / name sections, round announcement sounds (round1.snd,
fight.snd, ko.snd…), win2.*, the [Combo] start / shake effects and
[WinIcon] p1.counter.
Fonts
| Format | rugen |
|---|---|
FNT v1 (.fnt: PCX image + map) | Supported |
FNT v2 (.def with [Def] Type = bitmap + an .sff of glyphs; each palette is a colour bank) | Supported |
FNT v2 Type = truetype | Not supported: convert with rugen fontgen |
rugen fontgen turns a TrueType font into a FNT v2 bitmap font with an
outline and drop shadow, ready for font1 = ...:
rugen fontgen MyFont.ttf --size 16 --out motif/font/myfont.def --preview myfont.png
rugen fontgen MyFont.ttf --size 20 --italic 0 --condense 1 --rim --out title.def
| Option | Default | Meaning |
|---|---|---|
--size | 16 | Pixel size |
--italic | 3 | Shear one pixel every n rows; 0 for upright |
--condense | 0.9 | Horizontal squeeze |
--rim | off | Coloured rim inside the outline |
--out | font.def | Output .def (the .sff goes next to it) |
--preview | none | Writes a sample PNG |
The generated font has 12 colour banks (white with red rim, white with
orange rim, red, orange, yellow, blue, grey, plain white, dark, ink, red,
paper), selected by the bank part of a .font key.
Storyboards and localization
The screenpack’s logo and intro storyboards play at launch; see
Storyboards. The localization system
([Languages] and per-language keys) is not supported yet.
TOML themes
Menus in rugen’s themes are TOML files in motif/themes/<name>/ui/. Each
file is one screen, laid out in a virtual 1280 x 720 space.
| File | Screen | Without it |
|---|---|---|
title.toml | Main menu | system.def title |
select.toml | Fighter select (every mode; the online pick also keeps its stage strip here) | system.def select |
stages.toml | Stage select, between the fighter select and VS | a random stage, straight to VS |
vs.toml | VS screen | system.def VS |
options.toml | Settings | built-in options |
controls.toml | Key bindings | skipped |
result.toml | Match result | skipped |
pause.toml | Pause menu | skipped |
online.toml | Online lobby | built-in |
A screen file
# vs.toml (excerpt)
background = [0.02, 0.02, 0.05, 1.0]
exit_time = 12
[[node]]
kind = "image"
image = "ui/bg.webp"
dock = "fill"
fit = "cover"
[[node]]
kind = "text"
text = "{p1.name_up}"
font = 3
bank = 0
x = 80
y = 600
enter = "left"
enter_time = 14
[[node]]
kind = "button"
text = "FIGHT"
on_press = "fight"
anchor = "bottom"
x = "50%"
y = 690
w = 240
h = 56
image = "ui/button.webp"
image_focus = "ui/button_lit.webp"
nine = [12, 12, 12, 12]
Nodes
Every [[node]] has a kind and a position; containers have children.
| Kind | Use |
|---|---|
panel, image | Boxes, art, 9-slice frames (nine = [l, t, r, b]) |
text | Text with {bindings}, a font from system.def and a colour bank |
button | Focusable, with on_press / on_left / on_right actions |
vbox, hbox | Stack children with gap, pad, align, justify |
list, grid | Scrolling collections; items = "news" repeats children per array element ({item.*}, {index}) |
input, slider, toggle, choice, pips | Settings widgets |
keycap, icon | Key and glyph pictures (glyph = "up", text @pad) |
particles | Floating particles (count, speed, size) |
slot | Content the engine draws into the node’s rectangle, in draw order; its id names what (stage_preview: the live stage preview on stages.toml) |
Common keys: x, y, w, h (pixels or "50%"), anchor (tl, tr,
bl, br, center, top, bottom, left, right), color /
color_focus, image / image_focus, skew, angle, alpha, scale,
fit (stretch, contain, cover), visible (a binding; ! negates),
enter (fade, left, right, up, down) with enter_time,
enter_delay, stagger and ease, hover_scale, tip.
Focus styles give buttons, rows, inputs and choices one filled focus
state that moves with the keyboard, gamepad and mouse hover alike:
shadow_focus = [dx, dy] draws a hard drop shadow behind the node while it
is focused (or selected), in shadow_color (default ink black);
border_focus sets a thicker edge while focused (default: border). A
focused choice also fills its picked option with color_focus.
[[node]]
kind = "button"
text = "CREATE"
color = [1.0, 1.0, 1.0, 1.0]
color_focus = [0.86, 0.12, 0.16, 1.0]
border = 2
border_focus = 4
shadow_focus = [6, 6]
on_press = "create"
dock pins a node to the window rather than the 1280 x 720 design
frame, so it adapts to wide screens: left, center, right, top,
middle, bottom, the corners tl tr bl br, fill (edge to edge),
fill-x, fill-y, and stretch / stretch-x / stretch-y (keep one
edge, grow with the extra room).
when shows a node only in one focus state of its scope (the node, its
children, or the items instance it belongs to): when = "focus" while
focused, "focus2" while player 2’s cursor is on it in two-player select,
any other value (for example "idle") while not focused. Pair two nodes to
swap looks on focus.
Assets are ui/<file>.webp (or .png) in the theme, or sff:g,n for a
sprite from the theme’s system.sff.
Actions are strings the engine understands: mode:arcade,
mode:versus, mode:training, mode:arena, mode:tutorial,
mode:watch, mode:options, online, netplay, quit, back; on select
pick:<i>, confirm, random, search, sort, stage:prev, stage:next;
on VS fight; on results rematch, select, title; on pause resume,
restart, moves, page:1 / page:-1 (move list pages), controls,
select, quit.
The stage select: stages.toml
The engine fills these bindings:
| Binding | Meaning |
|---|---|
{title}, {sub}, {p1}, {p2} | Header: screen title, subtitle and both fighters’ names |
{cur.name}, {cur.author}, {cur.music}, {cur.width}, {cur.note} | The stage under the cursor; cur.has_author, cur.has_music, cur.has_width, cur.random for visible |
cur.tags | items list of tags ({item.t}): CLASSIC or ARENA RULES, BUNDLED |
preview_ready, preview_wait | The live preview is drawn / still loading (show a placeholder) |
strip | items list of the visible strip tiles: {item.name}, {item.thumb}, {item.x}, and item.sel, item.idle, item.random, item.has_thumb, item.placeholder for visible |
{pos}, {track.x}, {track.w}, track.scrolls | The STAGE n / N counter and the track under the strip |
Put a slot node with id = "stage_preview" where the preview goes. Only
the visible strip tiles exist in the data, so place each tile at {item.x}
rather than laying the strip out as a list.
Options and controls: SAVE
options.toml and controls.toml bind save (save.unsaved,
save.clean, save.toast, save.confirm, save.status). The action
save writes rugen.toml (F2 / Ctrl+S do
the same). Leaving with unsaved edits sets save.confirm: show a modal with
the actions leave:save, leave:discard and leave:cancel, and keep the
id dlg_save on its first button, which takes the focus.
Your own themes
Your themes live in themes/, next to chars/ and stages/ (in the
user data folder for the .deb / .rpm packages, see
Content). Any folder there with a system.def
is a theme: it shows up in OPTIONS → INTERFACE after the bundled ones,
marked YOURS · LIVE RELOAD ON. The last card, OPEN THEMES FOLDER,
opens themes/ in your file manager.

Start one
rugen theme new neon # based on Shonen Ink
rugen theme new washi --from dojo # based on Dojo
This writes themes/neon/ with:
| File | What |
|---|---|
theme.toml | name = "NEON" (shown on the card) and base = "ink" |
system.def, fight.def | Copies of the base theme’s, to edit |
ui/*.toml | Copies of every screen of the base theme, to edit |
Everything else (WebP art, fonts, system.sff, fight.sff) still comes
from the base until you put your own file with the same name in your
folder. Delete the screens you do not change: they come from the base too.
Where files are looked up
| Theme | Order |
|---|---|
A user theme with base | your folder, the base theme, motif/, data/ |
A user theme without theme.toml | your folder, motif/, data/: a plain M.U.G.E.N screenpack. rugen draws its own menus only for the screens your folder has a ui/*.toml for, M.U.G.E.N’s system.def screens elsewhere |
# themes/neon/theme.toml
name = "Neon" # card label (default: the folder name)
base = "ink" # "ink" or "dojo"; leave it out for a plain screenpack
A folder named like a bundled theme (ink, dojo, classic) is skipped:
give yours its own name.
Live reload
While your theme is the active one, rugen watches its folder. Save a file
and, within half a second, the screen on display is rebuilt in place: the
screen’s TOML, its images, system.def and its fonts. The focus, the
cursor and the screen’s state stay where they were, so you can keep a menu
open while you move things around. The pause menu and the online screens
reload the same way; the fight HUD (fight.def) changes at the next
fight.
A TOML that does not parse leaves the last good screen up, with a red THEME ERROR strip on top naming the file, line and column. Fix the file and save again: the strip goes away.

Making a bundled-style theme
- Start with
rugen theme new mytheme(or copymotif/themes/dojo/tothemes/mytheme/). - Edit the TOML screens, replace the WebP art, and adjust
system.def/fight.def. Each save shows up at once. - Pick it in OPTIONS → INTERFACE, or set
[video] theme = "mytheme". Add aui/preview.webp(about 372 x 206) for its card; without one the card shows its name.
Keep the focus ids the engine follows in options.toml and controls.toml
(tabs[i].tab, rows[i].row, themes[i].card, binds[i].row). The
options and controls bindings are listed in each theme’s README.md
(motif/themes/ink/README.md, motif/themes/dojo/README.md), and the node
reference is the module documentation of crates/ui/src/lib.rs, both in the
engine repository.
Original reference: elecbyte.com/mugendocs-11b1.
Something wrong on this page? Edit it on GitHub.