Skip to content

Loot Rules ​

A loot table says what can drop. A loot rule says when it drops and at what item level. NPCs and objects (chests, crates, barrels) hold loot rules, and one holder can have several: a guard can have a few coins and a trinket for a thief to steal, and a bigger prize for when it dies.

Loot rules replace the old fixed Inventory and the single Loot table of an NPC and a chest: a loot table with only guaranteed entries does the same job as a fixed inventory, and the rule says when it is handed out. Old settings still work (see Moving the older settings).

A rule ​

FieldWhat it does
WhenThe trigger (below)
DropsWhere the drops go: Project default (the Gameplay Config says: Npc loot delivery and Object loot delivery), In its inventory (the player opens a window and takes what they want) or On the ground (dropped items around the holder; only for On Death and On Destroyed). See Where the drops go
TableA shared table from Items > Loot Tables, or its own table edited right there on the rule: "this guard carries the key" needs no entry in the shared list
Item levelWhere the item level of generated items comes from, with an offset and a lowest and highest level (below)
The receiver changes itThe one who gets the loot (the killer, the one who opens the chest) changes the amount with its loot quantity and the quality with its magic find (Loot Tables). On by default

When ​

TriggerForWhat happens
On InitializeNPCs, objectsWhen the NPC spawns or the object is set up. What it gets is there from the start: a thief can steal it, a chest holds it before anyone looks
On DeathNPCsWhen the NPC dies. The loot is on the body
On DestroyedObjects with healthWhen the object is destroyed. What it leaves behind stays lootable, like a corpse
On First AccessNPCs, objectsThe first time someone opens its inventory: a chest is opened, a pocket is picked, a body is looted. Rolled once and kept
On GatheredGathering nodesEach time the node is gathered from. Rolled again every time and given straight to the bag of the gatherer (no room: nothing is given and the charge is kept)

A rule on Initialize or First Access rolls once; the holder remembers it, so loading a save or opening a chest a second time does not roll it again. A rule on Death or Destroyed rolls when it happens.

First Access and the level. A chest that rolls on first access works out its item level at the moment it is opened (the party's level, which is the default for chests, or the opener's, as you choose), not at the level the party had when the world loaded. That is usually what you want. A rule on Initialize works it out when the holder is made.

Where the drops go ​

By default a rule follows the project (Gameplay Config > Dropped Items: Npc loot delivery, Object loot delivery), so a game that wants loot on the ground sets it once. The project starts on the inventory of the holder: a body or a chest, which the player opens to take what they want. A rule with the trigger On Death or On Destroyed can put them on the ground instead (Drops: On the ground): the loot lies around the body or the wreck as dropped items, picked up by walking over it, with the interact key or with the mouse, as the Gameplay Config says. There is no loot window, and an NPC or an object whose rules all drop on the ground has nothing to loot.

  • The receiver (the killer) and the item level work the same: the amounts, the quality and the level are rolled as before; only the delivery changes.
  • Several drops are scattered around the place; money lies as piles of coins.
  • If dropped items are switched off in the Gameplay Config, the loot goes into the inventory of the holder instead, so nothing is lost.
  • On Gathered has its own setting: a gathering node's Loot mode can be On the ground.

Pickpocketing ​

The Access Inventory effect (the pickpocket) first rolls the On First Access rules of its target, then opens its inventory. So an NPC with a first-access rule always has something to steal, even if its death loot is only rolled when it dies. An NPC with no rule on Initialize or First Access has an empty inventory until it dies, and a pickpocket finds nothing.

Destroyed objects ​

A destructible chest, crate or barrel that has a rule on Destroyed leaves a lootable remains: a destroyed chest can still be opened (a broken lock does not hold), and a plain crate with no interaction becomes openable like a container once it is destroyed. When everything is taken, the remains are gone for good. A destroyed container with nothing in it is simply destroyed.

Where the item level comes from ​

Each rule and each loot table can name a level source. The first one that says something decides:

  1. the loot table's own source (if it is not Inherit), then
  2. the rule's source (if it is not Inherit), then
  3. the project default for this kind of holder (Gameplay Config > Item Generation).
SourceThe level is
InheritThe next one in the order above decides
Fixed levelA number you write
Holder levelThe NPC's own level (an object has no level, so it uses the party's)
Receiver levelThe level of whoever gets the loot: the killer, the one who opens the chest
Party levelThe level of the party (the average or the highest, as the NPC level scaling setting says)
World levelThe item level of the loot of the world the holder is in

Every source can also have an offset (a boss: +3) and a lowest and highest level (a weak NPC farmed at level 60 still drops from level 20; a starting zone never drops above 15). A source set to Inherit still applies its offset and limits when nothing else gives them.

The table overrules the rule. A table that pins its level ("this boss table is always level 40") wins over every rule that uses it. A table with Inherit follows each rule, so one table can serve a level 5 wolf and a level 30 wolf. A table inside another table with a level source of its own uses it for its own entries.

If a source cannot give a level (no party yet, a world with no level) the fallback item level of the Gameplay Config is used.

Examples ​

You wantRule
A wolf that drops pelts at its own levelWhen: On Death. Table: Wolf loot. Item level: Holder level (or leave it, it is the default for NPCs)
A chest that holds loot for whoever opens itWhen: On First Access. Table: Dungeon chest. Item level: Receiver level or Party level
A chest in a level 40 dungeon, whatever the player's levelWhen: On First Access. Item level: World level, with the dungeon world's Item level of the loot at 40
A boss with a guaranteed unique item and a bonusRule 1: On Death, own table with the item as a guaranteed entry. Rule 2: On Death, shared table Boss gear with offset +3
A guard that can be robbedRule 1: On First Access, own table with a few coins. Rule 2: On Death, shared table Guard loot
A barrel that breaks into a few thingsWhen: On Destroyed. Table: Barrel contents
A merchant NPC that always starts with a keyWhen: On Initialize, own table with a guaranteed key

The editors ​

  • NPC: the Loot section of the NPC editor (NPCs).
  • Interactable: the Loot section under the interaction (Interactables).
  • A placed NPC or object: the Loot rules override of the Unique Object tool. When it has any rules, they replace all the rules of the definition.

Each rule shows its problems (an NPC rule On Destroyed, a rule with no table, a table that does not exist). The own table editor lists the entries as rows: an item, currency or another table, with its quantity, weight (for the rolled ones) and chance.

Moving the older settings ​

An NPC made before loot rules has a Loot table with a logic (None, On Initialize, On Death) and a fixed Inventory. A container has its inventory and its loot table. They keep working: the game treats them as rules (the fixed inventory is a rule on Initialize with its own table of guaranteed entries; the loot table is a rule on the logic it said). The editor shows a note with a button, Move the older settings into loot rules, that turns them into real rules you can edit and clears the old fields.

A player character's starting inventory is not a loot rule: it stays the list of items the character starts with.

See also ​