Variables let you write once whatever changes from one system, language or machine to another. They are written ${variable.name} and resolved on every theme load.
<text name="title" extra="true" text="${system}" pos="0.5 0.1" origin="0.5 0.5" />
<image name="logo" path="${system.logo}" />
<variables> block.$ variablesThe variables listed below date back to Recalbox 9. Recalbox 10.1 still reads them, but they are deprecated and may disappear: replace them with their
${...}equivalents.
Unlike ${...} variables, they are only resolved inside paths (path) and includes, not everywhere.
| Legacy variable | Recommended replacement | Contents |
|---|---|---|
$system |
(none) | Theme folder of the current system |
$language |
${settings.language} |
Language code (en) |
$country |
${settings.locale} |
Country code (US) |
$fullname |
${system} |
Full system name |
$type |
${system.type} |
System type |
$pad |
${system.input.pad} |
Gamepad requirement |
$keyboard |
${system.input.keyboard} |
Keyboard requirement |
$mouse |
${system.input.mouse} |
Mouse requirement |
$releaseyear |
${system.releasedate} |
System release year |
$netplay |
(none) | yes / no: the system supports netplay |
$lightgun |
(none) | yes / no: the system has light gun games |
$crt |
${hardware.crt} |
yes / no: CRT adapter active |
$jamma |
${hardware.jamma} |
yes / no: JAMMA adapter active |
$tate |
${display.tate} |
yes / no: TATE mode |
$tateleft |
${display.tateleft} |
yes / no: TATE rotated left |
$tateright |
${display.tateright} |
yes / no: TATE rotated right |
$overscan |
${display.overscan} |
yes / no: CRT without JAMMA |
$resolution |
${display.resolution} |
qvga, vga, hd or fhd |
$system remains useful in one specific case: inside a path, if <theme>/$system/file does not exist, Recalbox automatically tries <theme>/default/file before giving up. No ${...} variable reproduces that fallback.
<include>./$system/custom.xml</include>
Possible values for $type: arcade, computer, console, engine, fantasy, handheld, port, virtual, virtual-arcade.
Possible values for $pad, $keyboard and $mouse: mandatory, recommended, optional, no.
Inside a path, $random(a,b,c) picks one of the given values at random. The draw happens only once per theme load: every $random(...) occurrence in the same file returns the same value, which lets you vary a background, a colour and a font together.
<image name="background" extra="true" path="./art/$random(night,day,dawn)/background.png" />
<image name="frame" extra="true" path="./art/$random(night,day,dawn)/frame.png" />
For a random draw inside text, use the global variables ${random.between(...)} and ${random.range(min,max)} instead.