·
datatype · drop-in viewer
asset⌬ datatypedataTypeprimary: schema.yaml·part ofpackage inventoryKit.package·originates fromworld 8301876d-c…
lootTable.dataType
A loot table: which items can drop, how likely each is and how many. Every `.data` asset bound to this contract is a table inventoryKit can roll by its `id` (`Inventory.roll("goblinDrop")`), for a chest, a boss, an enemy, a gathering spot or a mystery box.
by·posted 24d ago
What it does
lootTable (dataType contract)
A loot table: which items can drop, how likely each is and how many. Every .data asset bound to this contract is a table inventoryKit can roll by its id (Inventory.roll("goblinDrop")), for a chest, a boss, an enemy, a gathering spot or a mystery box.
| Field | Meaning |
|---|---|
id, name, description | How code names it and what screens show. |
kind | chest, boss, enemy, gather, mystery or other. |
rolls, rollsMax | How many picks one roll makes: exactly rolls, or a random count from rolls to rollsMax when rollsMax is larger. |
nothingWeight | The weight of a pick that gives nothing, so a table can come up empty. |
entries | { item, weight, min, max, guaranteed }: an item id, its weight (chance = weight / total weight), how many it gives (a random count from min to max), and guaranteed entries that drop on every roll on top of the picks. |
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.