Skip to content

Interactive Looting

Lootable container system with two-panel UI. Containers generate flat item tables on chance roll. Players pick up or deposit items one at a time. Container resets timer when fully depleted.


Generator

Unique identifier passed to lia.loot.registerLoot. Becomes the entity class name.
Display name shown to players for this loot container type.
World model for the loot container entity.
Sound played when the container is opened/searched.
Spawn chance weight. Used when the module auto-spawns loot containers.
Interval between spawn chance checks.
Maximum number of item stacks the container can hold.
If enabled, this container only spawns during post-raid events.
Each row becomes one entry in skillRequirements ([attribKey] = minimumValue).
Attribute: character attribute key (e.g. strength, luck).
Minimum: minimum value required to search this container.
Each row becomes one entry in items ([itemID] = { min = X, max = Y, chance = Z }).
Item: the item unique ID that can spawn (e.g. iron_ore).
Min/Max: random quantity range (inclusive).
Chance: percent chance (0-100) for this item to be selected per roll.
Items that are always present in the container (bypasses chance roll). Each row is [itemID] = amount.

Generated Code

document.addEventListener('DOMContentLoaded', () => { setupLiveUpdate(generateLootCode); fillExampleLoot(); });


Changelog

Version 1.0
  • Initial Release
Version 2.0
  • Two-panel loot UI, flat item table generation, deposit/withdraw interaction