Loot System¶
How loot works in VMaNGOS: which table feeds which loot store, how rows are grouped and rolled,
and where conditions and progression filtering apply. The loading/rolling code lives in
src/game/LootMgr.cpp.
Loot Stores and Their ID Sources¶
Every *_loot_template is a store. Rows with the same entry form one loot table; the entry
is referenced from another table (the loot id):
| Store | Referenced by | Notes |
|---|---|---|
creature_loot_template |
creature_template.loot_id |
Loot id 0 is never rolled; Alterac Valley player-kill loot uses battleground_template.player_loot_id into reference_loot_template. |
pickpocketing_loot_template |
creature_template.pickpocket_loot_id |
Empty loot id = nothing to pick. |
skinning_loot_template |
creature_template.skinning_loot_id |
Also used for herb/mining nodes that are skinnable. |
disenchant_loot_template |
item_template.DisenchantID |
|
gameobject_loot_template |
gameobject_template loot id (data1 for chest-type objects) |
|
item_loot_template |
item_template.entry |
Loot contained in items (e.g. clams). |
fishing_loot_template |
Area id (skill_fishing_base_level zones) |
Entry 0 = junk loot on failed catch. |
mail_loot_template |
Mail reward systems | |
reference_loot_template |
other stores via mincountOrRef < 0 |
Shared sub-tables, see below. |
The loader validates references at startup: unused or missing loot ids produce DB errors in the
server log (ReportUnusedIds / ReportNotExistedId).
How a Row Rolls¶
Shared columns of all loot templates:
ChanceOrQuestChance- Positive value = plain percentage chance to drop.
- Negative value = quest item; the absolute value is the chance, and the item only drops for characters on the matching quest.
100= always.groupid- rows sharing a non-zero group id form an equally distributed group: the server picks one (or more) members per kill so the total chance of the group stays constant. Set-chance groups use per-row chances instead when configured.mincountOrRef- Positive: minimum stack size for this drop.
- Negative:
-reference_entry- pull items fromreference_loot_templateinstead of dropping an item directly. maxcount- maximum stack size (or number of pulls from a reference).condition_id- optional conditions check; the row is skipped when the condition fails.patch_min/patch_max- progression filtering.
Drop rates can be tuned globally with the Rate.Drop.Item.* settings in
mangosd.conf.
Reference Templates¶
reference_loot_template lets many tables share one pool (e.g. "world drop epics"). A row in any
store with negative mincountOrRef expands into that reference table at roll time; each row of
the reference rolls independently using its own ChanceOrQuestChance. Nested references are
supported but keep them shallow for performance.
Creature Money¶
Gold drops do not come from loot templates: creature_template.gold_min / gold_max
define the money range, scaled by Rate.Drop.Money.
Related Pages¶
- creature_template -
loot_id,pickpocket_loot_id,skinning_loot_id,gold_min,gold_max - conditions
- Progression System - patch filtering