Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configs

XRF stores game configuration source under src/engine/configs. The build copies static .ltx and .xml files and generates additional .ltx or .xml files from TypeScript sources.

Config files are runtime behavior. Script configs can switch schemes, call effects, check conditions, spawn objects, define smart terrain jobs, describe tasks, load dialogs, configure weapons, and drive weather.

Domain pages

The config chapter is split by the kind of runtime data being edited.

PageUse it for
SchemeHow $scheme/*.scheme.ltx files validate LTX sections.
CondlistsConditional expressions used by script configs and scheme switching.
DialogsDialog XML sources, phrase graphs, and dialog-related config data.
ScriptsStory script configs, scheme sections, effects, conditions, and logic activation.
CreaturesActor, stalker, monster, crow, and online/offline group configs.
Zones and anomaliesAnomaly fields, anomaly zones, restrictors, camp zones, and level changers.
Smart terrains and jobsSmart terrain population, jobs, respawn, and simulation behavior.
TreasuresTreasure descriptors and hidden stash behavior.
WeaponsWeapon section layout and generated weapon config helpers.
WeatherWeather cycles, graph sources, and weather config generation.

Source types

Source typeBuild behavior
.ltxCopied to target/gamedata/configs.
.xmlCopied to target/gamedata/configs.
.tsImported by the CLI and rendered to .ltx with renderJsonToLtx.
.tsxImported by the CLI and rendered to .xml with renderJsxToXmlText.
$scheme/*.scheme.ltxUsed by verify-ltx to validate config shape.

Dynamic .ts LTX sources must export create() or config. Dynamic .tsx XML sources must export create().

Includes and inheritance

LTX files use normal X-Ray include and inheritance syntax:

#include "items\weapons\base.ltx"

[wpn_example]:identity_immunities
class = WP_AK74

Generated LTX sources can express includes and section inheritance through the helper symbols used by renderJsonToLtx.

Validation

Run LTX validation after changing config shape, includes, inheritance, or $scheme coverage:

npm run cli verify ltx

Use strict validation when the change is specifically about schema coverage:

npm run cli verify ltx -- --strict

For generated configs, also run a focused build:

npm run cli build -- --filter configs

Do not edit generated files under target/. Fix the source config or generator instead.