2 encounter difficulty mutators and reward scaling
forgejo-actions edited this page 2026-07-15 12:43:13 +00:00

Encounter Difficulty, Mutators, And Reward Scaling

What This System Is

Encounter difficulty is an authored layer over a single canonical encounter and mechanic script. Designers can produce Story, Normal, Veteran, and Nightmare experiences without copying waves or boss timelines, then compare the variants against every registered party profile in one deterministic editor action.

How Authors Use It

assets/gameplay/encounter_difficulty_catalog.json contains:

  • ordered difficulty tiers;
  • composable mutators and declared conflicts;
  • encounter profiles that select supported tiers, a default tier, and allowed mutators;
  • global enemy, mechanic, timing, add-wave, enrage, and reward percentages;
  • optional mechanic-specific overrides.

Percentages compose multiplicatively. For example, an 80% tier cast window plus a 90% mechanic override resolves to 72%. The resolver rejects missing or duplicate references, unsupported selections, conflicting mutators, invalid percentage bounds, decreasing tier risk, and reward curves that decrease as tier risk increases.

Current-content validation also checks encounter references and mechanic-specific override IDs.

Rules And Invariants

The party simulator applies the resolved selection to:

  • total encounter health and enemy attack damage;
  • mechanic damage, cast windows, first-use timing, and repeat intervals;
  • add-wave counts;
  • enrage activation time;
  • completion XP, gold, and projected loot quality.

Runs record the resolved tier and mutators in their timeline. Completed runs pass those multipliers to Encounter Reward Eligibility, Lockouts, And Pity, so XP, gold, personal items, bonus rolls, and loot audits use the same resolved difficulty.

Normal uses 100% values and therefore preserves the original encounter behavior. Empty fixture difficulty IDs resolve through the encounter profile's authored default.

Validation And Debugging

Use Difficulty Matrix under Simulation & Debug. The action runs every registered party fixture for the selected encounter across every supported tier. It also runs each allowed mutator individually on the balanced party at the default tier.

Matrix rows deliberately replace fixture-specific Normal assertions with the no_simulation_errors invariant. Their purpose is comparison: completion, survival, duration, mechanic response, enrage, XP, gold, and loot-quality metrics remain visible even when a harder tier is intentionally lethal. The normal Party Matrix remains the regression gate for authored fixture expectations.

Party members retain their authored loadouts and build-strategy rotations, so difficulty comparisons already include the current role and strategy contracts.

Content Health

The difficulty catalog participates in the workspace fingerprint and current catalog validation. Changing it invalidates party-composition fixtures through their difficulty reference, while unrelated cached validation results remain reusable.

Examples

The Slime Infestation Core supports Story, Normal, Veteran, and Nightmare tiers plus Relentless, Reinforced Adds, and Volatile mutators. Its base encounter reward remains canonical; difficulty resolution projects the adjusted XP, gold, and loot quality without duplicating reward definitions.