Skip to content

Loot

Drop tables for items and currency, with the odds authored as assets rather than written into code.

What it does

A loot table lists what can drop and how likely each outcome is. Rolling one produces a result — a list of items and currency amounts — which is then granted to whoever earned it.

Two ways to author odds

Weighted tables pick a fixed number of entries, each chosen by relative weight. This is the classic drop table: exactly one of these five things, three times over.

Independent chance tables test every entry separately against its own probability. Use this when each drop is its own coin flip rather than a competition between entries.

What you need installed

The table and the rolling work on their own. Where the awards go depends on what else you have:

You have You get
Inventory Item awards land in a container
Currency Currency awards are credited to a wallet
Health LootDropOnDeath rolls a table when something dies

Nothing errors if a system is absent — awards it would have handled are simply not delivered, and the rolls are unchanged.

Checking your odds

Window / RevFramework / Loot / Debugger rolls a table thousands of times with a fixed seed and shows what actually dropped against what you authored. Weights describe intent; only sampling describes behaviour.


TL;DR

TL;DR

  • Want to understand Loot → Overview
  • Want the three ideas it is built onMental Model
  • Want to build safelyPublic API
  • Want to extend cleanlyIntegration Surfaces
  • Want to know what it will never doSystem Boundaries
  • Want the behavioural contractSystem Guarantees Matrix
  • Something drops nothingFAQ

The two things worth knowing before you author a table: ids are never validated, so sample in the debugger rather than trusting the weights — and odds cannot be modified at runtime, so decide whether you need luck or magic find before designing around this system.