Grief & Tribute

When an elf loses someone they were close to (a friend, a partner, a bonded tree), it gets a mood penalty and enters mourning: a multi-tick state that pulls it toward the workshop and marks any composition it creates as an elegy.

Grief is one of the few states that overrides an elf's normal task priorities. A mourning elf leaves food gathering, building, and aspiration work to compose. Elegies get an emotional bonus, and a refusal to mourn a bonded tree can damage friendships across the settlement.

Overview

The grief arc has four stages:

  1. Loss: a close friend departs, a partner leaves, or a bonded tree dies.
  2. Mourning: the bereaved elf gains a Mourning component with a ticks_remaining countdown and a "Grieving" mood modifier. They prefer composing over other tasks.
  3. Tribute: if a workshop is available, the mourner composes. Any composition created while Mourning is present gains the Elegy property (+15 emotional). A TributeComposed event fires.
  4. Resolution: when ticks_remaining hits zero, grief_system removes the Mourning component and clears per-episode dedup keys in PendingOriginWrites. Compositions already tagged Elegy keep the property.

Acquaintances, rivals, and friends below strength 60 don't trigger mourning. Only close friends (strength ≥ 60), partners, and bonded trees do.

Source: crates/er-sim/src/sim/components.rs, Mourning; crates/er-sim/src/sim/systems/mood.rs, grief_system; crates/er-sim/src/sim/systems/satisfaction.rs and lifecycle.rs for the spawn sites.

How It Works

What Triggers Mourning

Three pathways apply a Mourning component. Each sets a different duration:

Loss TypeSource SystemMourning DurationConditions
Friend departs in dissatisfactionsatisfaction_system200 ticksFriend relationship strength ≥ 60. Skipped if already mourning.
Friend departs in fulfillmentfarewell_departure_system150 ticksFriend strength ≥ 60. Bittersweet farewell — shorter than dissatisfied departure. Also Partner.
Partner departssatisfaction_system300 ticksPartnership cleared, PartnerLoss scar applied. Extends existing mourning by +100 if already mourning.
Bonded tree diestree_death_grief (flora_systems.rs)300 ticksOnly if tree is Notable (named) and elf has TreeBond. Tradition-gated — see Refusing the Elegy.

A MourningBegan event fires for elf-on-elf mourning. Tree mourning fires BondedTreeDied instead (and ElegyRefused for the refusal branch). Both are emitted at EventPriority::Notable.

Source: crates/er-sim/src/sim/systems/satisfaction.rs:518-532 (friend), :535-575 (partner); lifecycle.rs:158-167 (fulfilled departure); flora_systems.rs:585-680 (tree death).

Effects on the Mourner

While Mourning is present, the elf is changed in three player-visible ways:

Mood. A "Grieving" modifier of -5 is pushed for 200 ticks. This stacks with the "Friend departed" or "Partner departed in fulfillment" mood modifier that fires alongside the death, so a partnered elf losing its bonded mate carries both penalties at once.

Behavior. task_decision_system checks is_mourning before checking creative block, aspirations, and idle decisions. A mourning elf is pulled toward TaskKind::Compose if a Workshop building exists. If no workshop is available, they default to TaskKind::Wander, preferred over gathering or building. Critical needs (sustenance < 20, rest < 20) still take priority over mourning.

Composition. Any composition completed while Mourning is present automatically gains the CompositionProperty::Elegy property, which adds +15 to the emotional score. The Elegy property occupies a property slot (max 2), so it competes with seasonal properties, Heartbreak, LoveSong, Debut, Stormborn, etc.

Source: crates/er-sim/src/sim/systems/behavior.rs:181-191 (task decision); crates/er-sim/src/sim/systems/compose.rs (Elegy property assignment, TributeComposed emission).

The Tribute

When a mourning elf finishes a composition, two events fire:

  • ArtCompleted: the normal completion event listing the piece's tier and properties (including Elegy).
  • TributeComposed { composer, departed, composition_name }: the elegy-specific event naming the departed friend. Notable priority.

There's no quality threshold for a tribute. Any composition a mourning elf finishes is a tribute, regardless of mastery, originality, or audience reception.

A single mourning episode can produce multiple tributes if the mourner composes more than once before ticks_remaining expires. Each fires its own TributeComposed event.

Source: crates/er-sim/src/sim/systems/compose.rs:305-312, Elegy property assignment.

Refusing the Elegy

The tree-death branch of grief has a check that elf-on-elf mourning does not. When a Notable tree dies and its bonded elves are about to enter mourning, each bonded elf is checked against their AestheticPosition.tradition value:

TraditionOutcome
≥ 0.3Full mourning: Mourning component (300 ticks, with departed_tree set), -8 "Bonded tree lost" mood for 300 ticks.
< 0.3Refusal: -8 mood only. No Mourning component. An ElegyRefused event fires.

A refuser skips the mourning ritual but still takes the full mood penalty.

Refusal has a social cost. Any elf with high tradition (aesthetic.tradition > 0.7) and low tolerance (aesthetic.social × personality.patience < 0.2) is offended. Each traditionalist:

  • Gains a -3 "Ancient rites disrespected" mood modifier for 100 ticks
  • Has their Relationships toward each refuser adjusted by -10
  • Emits a RitesDisrespected { offended_elf, refuser } event per refusal

This is the only place in the game where refusing to grieve in the traditional way damages relationships. A colony with many low-tradition elves and many high-tradition traditionalists can split along these lines after a single notable tree dies.

Source: crates/er-sim/src/sim/flora_systems.rs:619-677, tradition gate and traditionalist reaction.

Resolution

grief_system runs every tick at pipeline slot 6.5 (after mood_system). Each tick it does two passes:

  1. Expire: collect Mournings where ticks_remaining == 0, capture (entity, elf_name, departed_friend), then remove the component and clear matching SharedCrisis dedup entries in PendingOriginWrites so the partnership-origin bookkeeping doesn't grow unbounded.
  2. Decay: for every remaining Mourning, decrement ticks_remaining.

The capture happens before the remove so the departed name is available to pending_origins.clear_crisis_keys_by_departed(...). The clear is scoped per (elf_name, departed_friend) pair, so SharedCrisis entries for the same elf pair with a different departed are preserved.

There is no event for mourning ending. The Mourning component just disappears. A TributeComposed event records a tribute if the elf composed; otherwise, no tribute was produced.

Source: crates/er-sim/src/sim/systems/mood.rs:57-96, grief_system; crates/er-sim/src/sim/pending_origins.rs:80-90, dedup-clear contract.

Cultural Events

The grief arc fires four cultural events, all at EventPriority::Notable:

EventFires WhenPayloadDisplay Example
MourningBeganFriend (str ≥ 60) departs in dissatisfaction{ elf, departed }"Lyra withdraws into grief for Elara" (one of three rotated phrasings)
TributeComposedMourning elf finishes any composition{ composer, departed, composition_name }"Lyra completes Quiet Hour — a tribute to Elara"
BondedTreeDiedNotable tree with bond dies{ elf, tree_name }"The Old Oak falls. Mira's bond breaks."
ElegyRefusedLow-tradition (< 0.3) elf bonded to a dying notable tree{ elf, tree_name }"Mira refuses the elegy for The Old Oak"
RitesDisrespectedHigh-tradition + low-tolerance elf reacts to an elegy refusal{ offended_elf, refuser }"Old Tomar takes offense at Mira's refusal"

MourningBegan is not emitted by the fulfilled-departure path or the tree-death path, only by dissatisfied departures. A fulfilled elder's friends enter mourning silently (no event), and tree mourners fire BondedTreeDied instead.

Source: crates/er-sim/src/sim/events.rs:229-256, 339-353, 741-771 (priority tags); events.rs:579-668 (display strings).

Interactions

With Partnerships

A Partner relationship triggers the partner-loss branch on departure, distinct from the friend branch:

  • Partnership state cleared (partner = None, courting = None, dissolution_pressure = 0.0)
  • PersonalityScar { kind: ScarKind::PartnerLoss } added to Scars
  • Personality::apply_scar(PartnerLoss) permanently shifts root personality (see Scars)
  • Mourning duration: 300 ticks (vs. 200 for a close friend), or current ticks_remaining + 100 if already mourning
  • ScarFormed event fires alongside any MourningBegan

A partner departure is one of the few events that can stack mourning on top of mourning. An elf already grieving a friend whose partner then departs has its mourning extended by 100 ticks rather than reset.

Source: crates/er-sim/src/sim/systems/satisfaction.rs:535-575, partner-loss branch.

With Romance

Mourning is one of the strongest catalysts for new attractions. Per romance:

  • Shared grief (both elves mourning the same departed friend): +6.0 warmth per cycle, catalyst flag set, which unlocks the courtship transition.

Two elves who lose the same close friend can start a courtship from comfort alone, even if they barely knew each other before the loss. This is the "grief bond". It develops through the simulation rather than a script, and can be asymmetric.

The PendingOriginWrites system tracks this with per-episode dedup so that a single 200-300 tick mourning episode doesn't multiply SharedCrisis partnership-origin entries across the 50-tick warmth cadence (romance_warmth_system runs every 50 ticks; mourning lasts 150-300 ticks, so naive accumulation would produce 3-6 entries per pair per death).

Source: crates/er-sim/src/sim/pending_origins.rs, dedup contract; crates/er-sim/src/sim/systems/romance.rs, SharedGrief warmth source.

With Composition

The Elegy property is one of five "named-circumstance" composition properties (alongside Heartbreak, LoveSong, Stormborn, Debut). It is automatic: no aspiration, skill check, or audience condition gates it. If Mourning is present at the moment of composition completion, the property is added (provided fewer than 2 properties are already attached).

Elegy properties stack with seasonal properties (Vernal/Solstitial/Autumnal/Hibernal): a winter elegy can carry both Hibernal and Elegy. They do not stack with Heartbreak and LoveSong if the slot budget is full; the property-pushing order in compose_system determines which wins. Elegy is pushed before Heartbreak and LoveSong, so an elf mourning a friend while also unpartnered+heartbreak-scarred ends up with Elegy (not Heartbreak).

A separate composition path triggers on PartnerLoss scar specifically: when an elf with an unresolved PartnerLoss scar composes about the mourned partner, an extra +10 emotional bonus is added without occupying a property slot. See Scars — Composition Properties.

Source: crates/er-sim/src/sim/systems/compose.rs, property-assignment order.

With Behavior Priority

The task-decision priority cascade in task_decision_system places mourning between Discontented (refuses ambitious work) and the normal block/aspiration check:

  1. Critical needs (sustenance < 20, rest < 20)
  2. Discontented elves — only basic survival
  3. Mourning elves — compose if workshop exists, else wander
  4. Creative block — skip composing
  5. Aspiration goals
  6. Normal idle decisions

A mourning and discontented elf falls into the discontented branch and never composes. Discontent overrides grief.

Source: crates/er-sim/src/sim/systems/behavior.rs:142-191, priority cascade.

Tips

  • Low-skill elves can still write good tributes. A mourning elf doesn't need high music skill to produce a tribute. Even a tier-1 Mediocre composition with the Elegy property carries +15 emotional, which can shift a revel's audience reactions toward Love. If a low-skill elf loses a friend, let it compose; the tribute may outperform its normal work.

  • Build workshops before anyone mourns. A mourning elf with no workshop available will wander instead of compose. That means no tribute, no TributeComposed event, no Elegy property, only 200-300 ticks of -5 mood with nothing produced. Build workshops near where your tightest friendships cluster.

  • Notable trees can cause mass mourning. Once a tree becomes Notable, every elf with a TreeBond to it is affected by its death; some refuse mourning, as described above. Tree death is not always avoidable (seasonal die-off, age), and a single notable death can put 3-5 elves into mourning at once. Watch which elves bond to which trees and consider whether the tree is in a stable spot.

  • Elegy refusals damage relationships. A colony with a wide spread of tradition values (some elves below 0.3, some above 0.7) is one notable-tree death away from a RitesDisrespected cascade: each refuser triggers a -10 relationship hit from every offended traditionalist, and -10 per refusal adds up quickly. Consider aesthetic distance, not just population count, when picking arrivals.

  • Grief can start partnerships. When a beloved elf departs, the friends left behind often form partnerships through SharedGrief. Two elves who mourned the same person can become partners.

  • Partner-loss is permanent; friend-loss is not. The PartnerLoss scar shifts root personality (Personality::apply_scar) and persists for the rest of the elf's life unless resolved. A widowed elf grieves harder (300 ticks vs 200), carries the scar forever, and unlocks the +10 emotional bonus composition path when they compose about the partner.