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

Spawn CLI

Spawn commands inspect and convert ALife .spawn files. Unpack a file for editing, then rebuild and verify a separate output before replacing the game’s spawn file.

Examples

Run from a working directory containing all.spawn, with new output paths:

xrf-cli spawn info --path ./all.spawn
xrf-cli spawn unpack --path ./all.spawn --dest ./all_spawn

Example output excerpt — inspect spawn data:

Spawn file information:
Version: 10
GUID: a117405b-0a2e-a781-4ab5-f7aa88ae759c
Levels count: 5
Objects count: 262
Artefact spawn points: 256
Patrols: 4636
Level version: 10
Level graph vertices: 934
Level graph points: 512
Level graph edges: 2568

Exit code: 0.

info reports the header and counts of objects, artifact spawns, patrols, and graph entries. After editing the exported representation:

xrf-cli spawn pack --path ./all_spawn --dest ./all.rebuilt.spawn
xrf-cli spawn verify --path ./all.rebuilt.spawn

Verification reads the packed file and checks that its structure can be parsed. Use gamedata verification for checks involving the surrounding assets; test the affected spawning behavior in game.

Re-serialize a spawn file

xrf-cli spawn repack --path ./all.spawn --dest ./all.repacked.spawn

repack reads a packed file and writes another packed file. It does not automatically compare the output with the source or prove that an editing workflow preserved behavior.

Failure notes

Every command that writes requires --dest. Packing and unpacking reject existing destinations unless --force is supplied. Choose a new destination while reviewing edits; use --force when replacing that output is intended.

If the source cannot be parsed, inspect the reported chunk or format error before editing. Repacking requires a readable source and does not repair truncated data.

Command reference

xrf-cli spawn info

Print what a spawn file holds

xrf-cli spawn info [OPTIONS] --path <path>
OptionRequiredDefaultDescription
-p, --path <path>yesPath to spawn file
-s, --silentTurn off logging
-v, --verboseTurn on verbose logging
--jsonWrite the run’s JSON report to stdout, moving human output to stderr
--report <PATH>Write the run’s JSON report to a file

xrf-cli spawn pack

Pack an unpacked spawn file folder into one *.spawn

xrf-cli spawn pack [OPTIONS] --path <path> --dest <dest>
OptionRequiredDefaultDescription
-p, --path <path>yesUnpacked spawn file folder
-d, --dest <dest>yesPacked *.spawn written
-f, --forceReplace the destination when it is already there, once the new one is ready
-s, --silentTurn off logging
-v, --verboseTurn on verbose logging
--jsonWrite the run’s JSON report to stdout, moving human output to stderr
--report <PATH>Write the run’s JSON report to a file

xrf-cli spawn repack

Read a *.spawn and write it packed again

xrf-cli spawn repack [OPTIONS] --path <path> --dest <dest>
OptionRequiredDefaultDescription
-p, --path <path>yesPacked *.spawn
-d, --dest <dest>yesRepacked *.spawn written
-f, --forceReplace the destination when it is already there, once the new one is ready
-s, --silentTurn off logging
-v, --verboseTurn on verbose logging
--jsonWrite the run’s JSON report to stdout, moving human output to stderr
--report <PATH>Write the run’s JSON report to a file

xrf-cli spawn re-unpack

Read an unpacked spawn file folder and write it unpacked again

xrf-cli spawn re-unpack [OPTIONS] --path <path> --dest <dest>
OptionRequiredDefaultDescription
-p, --path <path>yesUnpacked spawn file folder
-d, --dest <dest>yesFolder the re-unpacked spawn file is written to
-f, --forceReplace the destination when it is already there, once the new one is ready
-s, --silentTurn off logging
-v, --verboseTurn on verbose logging
--jsonWrite the run’s JSON report to stdout, moving human output to stderr
--report <PATH>Write the run’s JSON report to a file

xrf-cli spawn unpack

Unpack a *.spawn into a folder of text files

xrf-cli spawn unpack [OPTIONS] --path <path> --dest <dest>
OptionRequiredDefaultDescription
-p, --path <path>yesPacked *.spawn
-d, --dest <dest>yesFolder the unpacked spawn file is written to
-f, --forceReplace the destination when it is already there, once the new one is ready
-s, --silentTurn off logging
-v, --verboseTurn on verbose logging
--jsonWrite the run’s JSON report to stdout, moving human output to stderr
--report <PATH>Write the run’s JSON report to a file

xrf-cli spawn verify

Verify that a *.spawn reads

xrf-cli spawn verify [OPTIONS] --path <path>
OptionRequiredDefaultDescription
-p, --path <path>yesPacked *.spawn, or its unpacked folder with –unpacked
-u, --unpackedRead the path as an unpacked spawn file folder
-s, --silentTurn off logging
-v, --verboseTurn on verbose logging
--jsonWrite the run’s JSON report to stdout, moving human output to stderr
--report <PATH>Write the run’s JSON report to a file