Docs/JSON
Loot
Configure loot rolls, presets, replacements and additions with loot.json.
How world loot is rolled, which items may roll, where, and the scenario's
remove, replace and add rules. Live: /scenario reload applies it. Loot that is
already in the world is not rerolled; use /respawnloot for that.
The default scenario spells out today's behaviour exactly, so a scenario that
only adds a rules list (the original loot.json format) behaves as before.
Every key is optional in a scenario file and layers over its base (see
merging below).
{
"rolls": {
"world": {
"pool": "table",
"table_pick": "uniform",
"range": [1, 100],
"joker_roll": 100,
"bands": [
{
"roll": [1, 1],
"picks": [
{
"bucket": "Legendary",
"count": [1, 1],
"chance_pct": 10
}
]
},
{
"roll": [2, 5],
"picks": [
{
"bucket": "Rare",
"count": [0, 1]
}
]
},
{
"roll": [6, 25],
"picks": [
{
"bucket": "Common",
"count": [0, 4]
}
]
},
{
"roll": [100, 100],
"picks": [
{
"bucket": "Legendary",
"count": [1, 1],
"chance_pct": 10
},
{
"bucket": "Rare",
"count": [1, 2]
},
{
"bucket": "Common",
"count": [4, 10]
}
]
}
]
},
"nomad": {
"pool": "nomad",
"range": [1, 30],
"bands": [
{
"roll": [1, 1],
"picks": [
{
"bucket": "Legendary",
"count": [1, 1],
"chance_pct": 10
}
]
},
{
"roll": [2, 5],
"picks": [
{
"bucket": "Rare",
"count": [0, 1]
}
]
},
{
"roll": [6, 25],
"picks": [
{
"bucket": "Common",
"count": [0, 4]
}
]
}
]
}
},
"stash": {
"first_roll_range": [0, 100],
"pass_at_most": 10
},
"frozen": {
"base_chance_pct": 10,
"scale_with_season_blend": true
},
"pools": {
"airdrop": {
"any_flags": ["military"],
"any_types": ["Weapon", "Magazine", "Ammo"]
},
"nomad": {
"all_flags": ["civilian"],
"not_types": ["Furniture"]
}
},
"items": {},
"source_tags": [],
"filters": [],
"tiers": {
"normal": {
"bucket_mult": {},
"deny_item_tags": [],
"allow_item_tags": []
}
},
"default_tier": "normal",
"rules": []
}
The roll#
rolls.world is what a container or ground loot spot rolls on every refresh.
- A source with no loot tables rolls nothing. Otherwise one of its tables is
picked (
table_pickis always"uniform"). A source markedforcein the game data gives every entry of its table and skips the rest. - The candidate items are the table's entries (an item listed twice counts
twice), minus banned items, weight-0 items and what
filtersand the zone tier remove. Each candidate belongs to one bucket: the one whose rarity in the game export equals the item's rarity (Common,RareorLegendary), or the bucket set byitems.<name>.bucket. - The die is
range[0]torange[1], inclusive and uniform.Jokersources always rolljoker_roll. The first band whoserollpair contains the die applies; no band means an empty roll (26 to 99 by default). - Each pick in the band: with probability
chance_pct(default 100) it drawscount[0]tocount[1]items from its bucket, each draw independent (the same item can come up twice), weighted byitems.<name>.weight. An empty bucket draws nothing. Zone tiers can scale counts and gates (seetiers). - Each drawn item becomes a slot through presets (context
world). AFreezableitem startsFrozenwith probabilityfrozen.base_chance_pct, times the season blend (0 summer to 1 winter) whenscale_with_season_blendis true. A presetsfrozen_chance_pctreplaces the base for that item.
rolls.nomad is the one-off loot of a Nomad body, rolled the first time the
Nomad's loot is needed (when it dies or its saved body is touched). It draws
from the named pool across the whole map catalog instead of a table; each
bucket's candidates are sorted by item path, so a seeded roll is reproducible.
It has no joker.
A band's roll pairs must lie inside range and must not overlap (the error
names both bands). count pairs need min <= max; chance_pct is 0 to 100.
bucket must be one of Common, Rare, Legendary. rolls.<name> replaces
the inherited roll completely when a layer sets it.
stash: sources marked Stash (hidden caches) roll their first generation only
when first_roll_range gives a value <= pass_at_most. By default that is 11
of 101. A failed stash stays absent until its next refresh: clients hide it and
both client and server remove its collision. Once generated, the stash appears,
becomes solid and can be opened.
pools#
A pool is a named item filter. Conditions: any_flags (an item flag from
civilian, industrial, military), any_types (the exported item type),
any_tags (an item tag, see below); an item needs to satisfy one of the
non-empty any_* lists. all_flags (every flag) and not_types (exclusions)
then narrow the result. A pool is used by rolls.*.pool and by the airdrop
contents (events.json). Banned items are never in a pool.
items#
Key: an item name the way /give accepts it (name, file ID or resource path,
ignoring case, spaces, _, - and ., and matching exactly one item).
| Field | Default | Meaning |
|---|---|---|
weight | 1 | Relative chance within its bucket. 0 excludes the item from rolls. |
ban | false | Removes the item from rolls, from rule add/replace targets, from pools (airdrops) and from the economy. |
bucket | export | Puts the item in Common, Rare or Legendary. |
tags | none | Extra item tags (^[a-z0-9_:]{1,32}$). |
Item tags are the item's set flags (civilian, industrial, military), its
exported type and subtype in lowercase, and the tags above.
source_tags and zones#
source_tags adds tags to loot sources: { "match": "medical", "kind": "container", "maps": ["Village"], "tags": ["medical"] }. match is a lowercase
substring of the source's name; kind is container, ground or any
(default). Every source also carries kind:container or kind:ground,
map:<lowercase map name> and the tags of the zone that contains
it. Tag names match ^[a-z0-9_:]{1,32}$.
filters#
{
"when": {
"tags": ["military"],
"maps": ["Village"],
"tiers": ["high"]
},
"allow_item_tags": ["weapon"],
"deny_item_tags": ["furniture"],
"deny_items": ["Grenade F1"]
}
A filter applies to a source when every given when condition holds (tags:
the source has at least one of them). It narrows the candidates of step 2:
allow_item_tags keeps only items with at least one of those tags,
deny_item_tags and deny_items remove items.
tiers#
A tier is a loot grade zones can assign. default_tier (here normal) is the
tier of sources outside every zone, and must exist.
bucket_mult({bucket: number >= 0}, default 1): for a pick from bucketBwith multiplierm, the count becomescount * mrounded stochastically (the whole part, plus one more with the probability of the fraction), and achance_pctbelow 100 becomesmin(100, chance_pct * m).0empties the bucket for the tier.allow_item_tagsanddeny_item_tagsfilter the candidates like a filter.
rules#
The original remove, replace and add rules, unchanged in meaning. They run after the roll on each refreshed container or ground source (not on fixed world items).
{
"rules": [
{
"comment": "No grenades lying around in Village.",
"remove": "Grenade F1",
"maps": ["Village"]
},
{
"comment": "Some AKMs become AK-74s.",
"replace": "AKM",
"with": "AK-74",
"chance": 0.3
},
{
"comment": "Occasionally an extra medkit in medical cabinets.",
"add": "Medkit",
"kind": "container",
"source": "medical",
"chance": 0.1,
"count": 1
}
]
}
Each rule sets exactly one of remove, replace or add.
| Field | Used with | Default | Meaning |
|---|---|---|---|
remove | Item that should not spawn. | ||
replace + with | Item to swap, and the item it becomes. | ||
add | Item to add on top of the roll. | ||
chance | all | 1 | Probability 0 to 1. For remove/replace it rolls per matching item; for add once per refreshed source. |
count | add | 1 | Copies added, 1 to 20. |
maps | all | every map | Public map names (any case). |
kind | all | both | "container" or "ground". |
source | all | any | Text the source's name must contain, ignoring case. |
tag | all | any | A source tag (kind:ground, map:village, a source_tags tag or a zone tag). |
tier | all | any | A zone tier name; must exist in tiers. |
comment | all | For people; ignored. |
Rules run in file order. A matching remove drops a rolled item; a matching
replace swaps it and later rules see the replacement; then each matching
add appends its copies. Added and replacement items are built like any new
loot item (presets, context world) but are never frozen, and a banned item is
never added or swapped in. Containers keep what fits in their grid; the rest is
dropped.
Not covered by rules: fixed world items, trader stock, airdrop crates, AI corpses, Nomad loot, starting kits, and anything already in the world.
Merging with the base scenario#
rolls.<name>replaces the whole inherited roll.stash,frozen,items.<name>,pools.<name>,tiers.<name>merge key by key;nullfor an item, pool, tier or roll deletes the inherited entry.source_tags,filtersandrulesare appended after the base's. Set"source_tags_mode","filters_mode"or"rules_mode"to"replace"to drop the inherited list first.
Validation#
The file is checked strictly when the scenario loads or reloads: unknown keys
(typos), unknown or ambiguous items, out-of-range numbers, overlapping bands,
undefined pools or tiers, unknown maps, kinds and bucket names. Every message
names the file of the scenario layer that set the value, the key path and the
allowed range. At startup an error stops the server; on /scenario reload the
running scenario stays.
Found a mistake or missing detail? Tell us in the Discord.
rtv-mp