Loot — Samples¶
Runnable examples for the Loot system.
Scene¶
Scenes/00_Loot_Quickstart — open it and press Play. It carries a LootService, a recipient, and both teaching panels already wired to the example tables.
Example tables¶
| Table | Mode | Teaches |
|---|---|---|
Tables/Chest_Weighted | Weighted | 2–3 picks per pull, mostly nothing, occasional potions and gold, a rare blade. |
Tables/Purse_IndependentChance | IndependentChance | Gold every time, gems one pull in ten. |
The chest's weights deliberately do not total 100. Weights are relative — 60/30/12/8 behaves identically to any other set in the same proportions — and a table that happens to sum to 100 reads as percentages and teaches the wrong thing.
What works without other systems¶
Rolling works on its own: open the scene with only Loot installed and the roll panel still samples the tables and reports real rates.
Delivery needs partners. The item entries use placeholder GUIDs (sample-potion, sample-blade) that resolve to nothing unless you point them at real items in your own database, and currency entries need Currency installed and an adapter bound. That is why the delivery panel reports which adapters are bound rather than leaving you to work out why nothing arrived.
Notes¶
- Compiles only when both
REV_SAMPLES_PRESENTandREV_LOOT_PRESENTare defined. - Moving this folder out of
Assets/RevFrameworkclearsREV_SAMPLES_PRESENTand compiles the samples out entirely, which is the supported way to strip them from a build. - The scene is generated rather than hand-authored, by a dev-only builder under
Editor/Internal, so it can be rebuilt if the panels or the service change shape.