Skip to content

War Narrative: expand phrasing variety (more variants + sequential decorrelation) + fix defendWon grammar #453

Description

@elfensky

User feedback on the War Narrative (/archives), shipped in v0.65.0.

Context

v0.65.0 added seeded phrasing variety (src/features/archives/narrativePhrasing.mjs): each beat picks deterministically from a pool via pickVariant(pool, season, key) (no Math.random — SSR-stable). Today each pool has only 2 variants and the seed is hash32(season * 1000003 + key) where key is the event_id (or a fixed PHRASE_KEY for singletons). This issue is about expanding that.

Requests (from users)

  1. More sentence variants per pool. With just 2 variants, repeated outcomes still read samey. Add several more Ministry-voice variants to each pool in narrativePhrasing.mjs (attackWon/attackLost/defendWon/defendLost, arrival, cascade, opening, victory/defeat/defeatGeneric, surge/collapse, breakthrough/homeworldFalls, numbers).

  2. Decorrelate sequential same-situation beats. When many similar events occur in a row (e.g. a run of "{region} falls to the {enemy}" defend-losses), adjacent beats can still land on the same variant because each is hashed independently by event_id. Vary the seed by occurrence-index within a beat-type (or rotate through the pool) so consecutive same-type beats don't repeat a variant back-to-back. Keep it deterministic.

  3. Grammar fix (copy). narrativePhrasing.mjs:77defendWon variant 2:

    "{region} repels the {enemy}. The Ministry notes the outcome was never in doubt, and never will have been."

    "and never will have been" is awkward future-perfect. Change to "and never will be" (parallels "was never in doubt").

Acceptance criteria

  • Each phrasing pool has ≥4 variants, in the established voice (mirror src/features/ministry/ministryContent.mjs: Helldivers-franchise only, dark comedy, profanity-free, no real-world politics).
  • A war with N sequential same-type events does not repeat a variant on adjacent beats.
  • Determinism preserved — no Math.random/Date.now; same (data, telemetry) ⇒ identical narrative (the 0.65.0 server-side/SSR contract).
  • defendWon variant grammar fixed.

Source: user suggestions on the live /archives War Narrative.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementUpdate to an existing featurefrontendUI/UX and frontend work

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions