2 encounter reward eligibility lockouts and pity
forgejo-actions edited this page 2026-07-15 12:43:13 +00:00

Encounter Reward Eligibility, Lockouts, And Pity

What This System Is

Named encounter rewards use one deterministic personal-loot pipeline from editor simulation through server authority. The pipeline combines encounter rewards, the selected difficulty, authored loot tables, eligibility state, pity counters, and duplicate-conversion policy before producing an idempotent transactional reward snapshot.

How Authors Use It

assets/gameplay/encounter_reward_catalog.json defines one profile per encounter. A profile selects:

  • the canonical loot table;
  • character, account, or party eligibility scope;
  • unlimited, once, daily, weekly, or custom claim cadence;
  • first-clear and repeat XP/gold percentages;
  • base, first-clear, and loot-quality bonus rolls;
  • guaranteed item grants;
  • per-item pity thresholds;
  • owned-item currency conversions.

Validation rejects duplicate profiles, invalid percentages, empty scope contracts, zero custom lockouts, zero pity thresholds, missing loot tables or items, pity items absent from their table, and missing conversion currencies.

Rules And Invariants

Every claim supplies a stable reward ID, authority-owned scope IDs, completion time, seed, base encounter rewards, resolved difficulty percentages, loot quality, and the player's owned items.

Resolution proceeds in this order:

  1. Reject an already-claimed reward ID without mutating state.
  2. Resolve the eligibility scope and cadence lockout.
  3. Scale XP and gold for difficulty plus first or repeat clear.
  4. Apply profile-guaranteed and loot-table-guaranteed drops.
  5. Resolve weighted personal-loot rolls and quality bonus rolls.
  6. Advance or trigger pity counters.
  7. Convert configured owned duplicates into currency.
  8. Persist the claim, lockout, and pity state together.

The roll audit records seeds, pool weights, chance gates, counts, pity awards, and duplicate conversions. Pity counters advance only for eligible granted claims.

Server Authority

AuthoritativeGameplayState persists the encounter reward ledger alongside the encounter director. When the final encounter wave completes, the server marks the instance reward as claimed, resolves the personal reward with authority-owned character/account/party identities, and emits the result through the existing transactional CombatRewardSnapshot path.

Daily or weekly ineligibility completes the encounter without emitting another reward snapshot. Invalid shipped policy falls back to base XP/gold and logs an authority error so a catalog mistake cannot silently discard a completed encounter reward.

Validation And Debugging

Use Reward Matrix under Simulation & Debug. It evaluates:

  • every supported difficulty tier;
  • each allowed mutator;
  • deterministic seed batches;
  • same-period lockout attempts;
  • a bounded deterministic pity chain;
  • an owned guaranteed item and its conversion policy.

Rows report grants, lockouts, average XP/gold, item totals, pity awards, and duplicate conversions. Content Health fingerprints reward profiles and loot tables, validates their references, and reruns affected party fixtures.

Examples

The Slime Infestation Core grants a personal Slime Voucher, rolls slime_green_basic, guarantees a Slime Core after three eligible misses, and converts an already-owned voucher into gold. The reward is character-scoped with a daily cadence, while difficulty controls XP, gold, and bonus-roll quality.