2 encounter mechanics and boss timelines
forgejo-actions edited this page 2026-07-15 12:43:13 +00:00

Encounter Mechanics And Boss Timelines

What This System Is

Encounter mechanics are versioned authored content rather than fixture-specific simulator code. Designers can compose reusable mechanic templates into deterministic boss phases, then validate the same timeline across party compositions, editor reports, and Content Health without changing Rust.

How Authors Use It

assets/gameplay/encounter_mechanic_catalog.json contains reusable templates and encounter scripts. Templates define:

  • cast, raid-wide, tankbuster, add-wave, or enrage behavior;
  • deterministic target selection;
  • telegraph and cast timing;
  • damage and mitigation eligibility;
  • interrupt response effects;
  • add counts or enrage damage multipliers.

Scripts bind to one encounter and contain ordered phases. A phase activates when both its time and enemy-health thresholds are satisfied. Scheduled mechanics use phase-relative start times, optional repeat intervals, and bounded execution counts.

Validation rejects unsupported schemas, duplicate IDs, missing templates, invalid thresholds, zero execution bounds, interruptible non-cast mechanics, and casts without cast times. Current-content validation also checks encounter IDs and required response status effects.

Rules And Invariants

Mechanics can target the entire party, tank, healer, highest-threat member, lowest-health member, or a deterministic random non-tank. Missing role targets fall back to a living member so malformed compositions remain simulatable and explainable.

Runtime Behavior

The party simulator activates phases from encounter time and remaining enemy health. It emits telegraphs, reserves matching response abilities for active casts, applies successful interrupts, resolves failed casts, adds encounter health for spawned waves, and raises enemy damage after enrage. Mitigation applies only when the template permits it.

Reports retain phase reach counts, mechanic executions, successful responses, enrage rate, unused mechanic count, and the synchronized member/mechanic timeline.

The selected Encounter Difficulty, Mutators, And Reward Scaling profile adjusts the canonical timeline at resolution time. Boss scripts remain single-source while cast windows, repeat timing, damage, adds, and enrage timing vary by tier or mutator.

Validation And Debugging

Party fixtures can assert that a mechanic executed, a response rate met its target, a phase was reachable, enrage stayed below a limit, and no more than an authored number of mechanics remained unused.

Use Mechanics Timeline in Simulation & Debug to run the balanced party against the selected encounter. The report shows phase transitions, telegraphs, targets, responses, failures, add waves, and assertion outcomes. Party Matrix continues to compare the same authored script across all registered party profiles.

Content Health fingerprints the mechanic catalog and schedules party fixtures when their encounter is reachable. Ability, status, build-strategy, party-profile, or mechanic changes therefore invalidate the same affected-content gate.

Examples

mechanics.slime_infestation_core demonstrates:

  • repeating interruptible Infestation Overflow casts;
  • a repeating highest-threat tankbuster;
  • a health-triggered Core Exposed phase;
  • an add wave and raid-wide pulse;
  • a time-triggered enrage phase.