Dungeon Loot Table
Dungeon Loot Table
A loot table kept in one place, so that the chests and the mobs of a dungeon can share it: a 'Dungeon Loot Chest' (Loot table field) and a 'Dungeon Mob Spawn' (Loot table field) that name it roll the same lines the same way. Edit the table once, every chest and mob follows. A chest rolls it once per chest, when it is first opened. A mob rolls it when it dies, for every mob on its own (the slot of a line means nothing for a mob and is ignored).
Поля
| Поле | Тип | По умолчанию | Описание | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
entries | List<LootItem> | empty | The lines of the table: each one is an item with its chance, its quantity and, for a chest, its slot.
|
| Поле | Тип | По умолчанию | Описание |
|---|---|---|---|
item | Item | — | The item to drop |
dropChance | Double | 50.0 | Chance to appear in the chest (0-100%). When the table is WEIGHTED it is the weight of the item instead. |
minAmount | Int | 1 | Minimum quantity |
maxAmount | Int | 1 | Maximum quantity |
slot | Int | -1 | Specific slot in the chest (0-26), or -1 for random slot |
lootSelectionLootSelectionINDEPENDENTweightedPicksInt3How to use it
Create one table and fill entries, then name it in lootTableRef of a Dungeon Loot Chest and in lootTable of a Dungeon Mob Spawn. A table you name replaces the lines of the chest entirely, selection mode and picks included: nothing is mixed.
| Field | What to know |
|---|---|
entries | The lines: an item, its dropChance, a quantity range and an optional slot. In a chest, slot (0 to 26, -1 for random) places the item. For a mob the slot is ignored. |
lootSelection | INDEPENDENT: each line rolls its own dropChance (0 to 100). WEIGHTED: weightedPicks distinct lines are drawn and dropChance is the weight. |
weightedPicks | How many lines are drawn in WEIGHTED mode. Default 3. |
A chest rolls the table once per chest, when it is first opened. A mob rolls it when it dies, on top of its equipment and of the vanilla loot if dropVanillaLoot is on. What comes out of a mob (pieces of a slime) rolls nothing.