Command reference
LootTable
Help on LootTable
Loot tables create an ordered graph of items and commodities in one atomic operation.
A table contains named variants. Each variant runs its groups from top to bottom. A group repeats a number of times and selects one weighted choice each time. A choice can create an exact item revision, create a commodity, run an exact nested LootTable revision, or create nothing.
An item choice can provide a local key. Later groups may use that key as their destination, which puts their results inside that particular generated container. Running a nested table does not itself imply containment: the nested group's destination controls where the child table's outer-target results go.
Example realised structure:
Outer target
|- envelope provided as key 'vessel'
| '- 125 grams of carbon steel directed inside 'vessel'
'- envelope produced by a nested child table directed to the outer target
Create and inspect:
loottable new <name>
loottable edit <id|name> [revision]
loottable edit
loottable close
loottable show <id|name> [revision]
loottable list [filters]
Variants:
loottable set variant add <key>
loottable set variant remove <key>
loottable set variant rename <old> <new>
Ordered groups:
loottable set group add <variant> <key> [repeat <min> <max>] [into <target|earlier-key>]
loottable set group repeat <variant> <key> <min> <max>
loottable set group destination <variant> <key> <target|earlier-key>
loottable set group swap <variant> <key> <position>
loottable set group remove <variant> <key>
Weighted choices:
loottable set choice add <variant> <group> <key> <weight> nothing
loottable set choice add <variant> <group> <key> <weight> item <prototype> [revision <rev>] [quantity <min> <max>] [quality <min> <max>] [closed|locked] [as <local-key>]
loottable set choice add <variant> <group> <key> <weight> commodity <material> [tag <tag>] [mass <min> <max>]
loottable set choice add <variant> <group> <key> <weight> table <id> <revision> <variant>
loottable set choice weight <variant> <group> <key> <weight>
loottable set choice variables <variant> <group> <key> <definition=value ...|clear>
loottable set choice remove <variant> <group> <key>
Commodity mass accepts explicit units such as 125g or 1.5kg. Bare numbers remain supported as engine base mass units for compatibility.
Item choices start open and unlocked unless marked closed or locked. locked also closes the item and requires a prototype with a built-in lock.
Validate and test:
loottable validate <id|name> [revision] - checks references, destinations, cycles and limits
loottable preview <id|name> [revision] <variant> [seed] - shows the deterministic plan without creating anything
loottable load <id|name> [revision] <variant> [seed] here|into <item>|to <character> - atomically creates the plan
Revision lifecycle:
loottable clone <id|name> [revision] <new name>
loottable revise <id|name>
loottable submit <comment>
loottable review <id|name> [revision]