Log inGet started
World

Pack Rat: Inventory, Loot and Equipment Kit

README.md

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.

FieldMeaning
id, name, descriptionHow code names it and what screens show.
kindchest, boss, enemy, gather, mystery or other.
rolls, rollsMaxHow many picks one roll makes: exactly rolls, or a random count from rolls to rollsMax when rollsMax is larger.
nothingWeightThe 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.