# V2 Economy Loot Table System

`V2LootTable` is the shared item and economy loot runtime for deterministic
reward rolls. Economy drops use the same authoring surface as inventory drops so
shops, quests, encounters, and live events all resolve item rewards through one
validated table format.

## Authoring Model

- `GuaranteedDrops` always emit when their context rules pass.
- `DropPools` contain weighted entries and a roll count.
- `PityThreshold` forces an entry once its `RollsSinceDrop` counter reaches the
  threshold.
- `ContextTags` on the roll request describe the source of the drop, such as
  `biome.ruins`, `time.night`, `event.festival`, or `difficulty.elite`.
- `RequiredContextTags` and `BlockedContextTags` filter guaranteed drops,
  weighted pools, and individual entries.
- `ContextWeightModifiers` multiply entry weight when the request contains the
  modifier tag.
- `RarityWeightModifiers` multiply entry weight based on the resolved item
  definition rarity.

## Economy Usage

Use context tags instead of duplicating tables whenever the same reward source
needs small variations. A seasonal event can boost cosmetic entries with
`event.festival`, a biome can enable local materials with `biome.marsh`, and
elite difficulty can apply rarity curves without changing guaranteed currency or
quest item drops.

The roll request seed is the deterministic audit key. Server systems should
derive it from stable reward context, such as encounter id, account id, reward
grant id, and drop sequence. Replaying the same table, seed, context tags, and
pity counters must produce the same item instance ids.

## Validation

Run `python3 V2/ue/Tools/check-v2-loot-table.py` after changing runtime code,
contracts, docs, or CI wiring. The checker verifies weighted pools, guaranteed
drops, pity counters, deterministic seeding, context-sensitive eligibility,
rarity weight curves, automation coverage, and Horde gates.
