Grief & Tribute
When an elf loses someone they were close to — a friend, a partner, a bonded tree — they don't simply log a mood penalty and move on. They enter mourning: a multi-tick state that pulls them toward the workshop, marks any composition they create as an elegy, and weaves the lost name into the colony's emotional memory.
Grief is one of the few states that overrides an elf's normal task priorities. A mourning elf will leave food gathering, building, and aspiration work to compose. What they make while grieving carries unusual emotional weight — and what they refuse to make can fracture friendships across the settlement.
Overview
The grief arc has four stages:
- Loss — a close friend departs, a partner leaves, or a bonded tree dies.
- Mourning — the bereaved elf gains a
Mourningcomponent with aticks_remainingcountdown and a "Grieving" mood modifier. They prefer composing over other tasks. - Tribute — if a workshop is available, the mourner composes. Any composition created while
Mourningis present gains the Elegy property (+15 emotional). ATributeComposedevent fires. - Resolution — when
ticks_remaininghits zero,grief_systemremoves theMourningcomponent and clears per-episode dedup keys inPendingOriginWrites. The grief is over; the elegy remains.
The arc is gated by emotional closeness. Acquaintances and rivals don't trigger mourning. 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 based on the depth of the loss:
| Loss Type | Source System | Mourning Duration | Conditions |
|---|---|---|---|
| Friend departs in dissatisfaction | satisfaction_system | 200 ticks | Friend relationship strength ≥ 60. Skipped if already mourning. |
| Friend departs in fulfillment | farewell_departure_system | 150 ticks | Friend strength ≥ 60. Bittersweet farewell — shorter than dissatisfied departure. Also Partner. |
| Partner departs | satisfaction_system | 300 ticks | Partnership cleared, PartnerLoss scar applied. Extends existing mourning by +100 if already mourning. |
| Bonded tree dies | tree_death_grief (flora_systems.rs) | 300 ticks | Only 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 — a partnered elf losing their bonded mate carries both penalties simultaneously.
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 — wandering in grief is 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. The dedication is what matters — the mourner pointed their grief at a workshop and made something.
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 hard fork 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:
| Tradition | Outcome |
|---|---|
| ≥ 0.3 | Full mourning: Mourning component (300 ticks, with departed_tree set), -8 "Bonded tree lost" mood for 300 ticks. |
| < 0.3 | Refusal: -8 mood only. No Mourning component. An ElegyRefused event fires. |
A refuser doesn't grieve the bonded-tree-style elegy, but they still take the full mood penalty. They reject the ritual, not the feeling.
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
Relationshipstoward each refuser adjusted by -10 - Emits a
RitesDisrespected { offended_elf, refuser }event per refusal
This is the only place in the sim where a refusal to grieve in the traditional way generates measurable interpersonal damage. A colony with many low-tradition elves and many high-tradition traditionalists can fracture along ritual 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:
- Expire: collect Mournings where
ticks_remaining == 0, capture(entity, elf_name, departed_friend), then remove the component and clear matchingSharedCrisisdedup entries inPendingOriginWritesso the partnership-origin bookkeeping doesn't grow unbounded. - Decay: for every remaining
Mourning, decrementticks_remaining.
Order matters: capture-before-remove ensures the departed name is preserved for pending_origins.clear_crisis_keys_by_departed(...). The clear is scoped per (elf_name, departed_friend) pair — unrelated SharedCrisis entries for the same elf pair (a different departed) are preserved.
There is no event for mourning ending. The Mourning component simply disappears. Player-facing closure comes from the tribute (TributeComposed) or the silence of having composed nothing.
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:
| Event | Fires When | Payload | Display Example |
|---|---|---|---|
MourningBegan | Friend (str ≥ 60) departs in dissatisfaction | { elf, departed } | "Lyra withdraws into grief for Elara" (one of three rotated phrasings) |
TributeComposed | Mourning elf finishes any composition | { composer, departed, composition_name } | "Lyra completes Quiet Hour — a tribute to Elara" |
BondedTreeDied | Notable tree with bond dies | { elf, tree_name } | "The Old Oak falls. Mira's bond breaks." |
ElegyRefused | Low-tradition (< 0.3) elf bonded to a dying notable tree | { elf, tree_name } | "Mira refuses the elegy for The Old Oak" |
RitesDisrespected | High-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 toScarsPersonality::apply_scar(PartnerLoss)permanently shifts root personality (see Scars)- Mourning duration: 300 ticks (vs. 200 for a close friend) — or current
ticks_remaining + 100if already mourning ScarFormedevent fires alongside anyMourningBegan
A partner death is one of the few events that can stack mourning on top of mourning. An elf already grieving a friend whose partner then departs sees their 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 — unlocks the courtship transition.
Two elves who lose the same close friend can spark a courtship from comfort alone, even if they barely knew each other before the loss. This is the "grief bond" — emergent, asymmetric, and unscripted.
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:
- Critical needs (sustenance < 20, rest < 20)
- Discontented elves — only basic survival
- Mourning elves — compose if workshop exists, else wander
- Creative block — skip composing
- Aspiration goals
- Normal idle decisions
A mourning and discontented elf falls into the discontented branch and never composes — discontent overrides grief. This is the one case where grief is silenced rather than expressed.
Source: crates/er-sim/src/sim/systems/behavior.rs:142-191, priority cascade.
Tips
-
Tributes are quiet revolutions. 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 — enough to shift a revel's audience reactions toward Love. If you have a low-skill elf and an unexpected friend-departure, let them compose; the tribute may outperform their normal work.
-
Workshops save grief. A mourning elf with no workshop available will wander instead of compose. That means no tribute, no
TributeComposedevent, no Elegy property — just 200-300 ticks of -5 mood with nothing produced. Build workshops near where your tightest friendships cluster. -
Notable trees are emotional time bombs. Once a tree becomes
Notable, every elf with aTreeBondto it is on a fuse. Tree death is not always avoidable (seasonal die-off, age), and a single notable death can mourn 3-5 elves simultaneously. Watch which elves bond to which trees and consider whether the tree is in a stable spot. -
Tradition fault lines. A colony with a wide spread of
traditionvalues (some elves below 0.3, some above 0.7) is one notable-tree death away from aRitesDisrespectedcascade — each refuser triggers a -10 relationship hit from every offended traditionalist, and -10 per refusal compounds quickly. Track aesthetic distance, not just population count, when picking arrivals. -
Don't fear the grief bond. When a beloved elf departs, the friends they leave behind often form unexpected partnerships through
SharedGrief. Two elves who mourned the same person can become each other's partners. The loss isn't replaced — it's woven into the next bond's origin. -
Partner-loss is permanent in a way friend-loss isn't. The
PartnerLossscar 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 bonuscomposition path when they compose about the partner. Friend-grief is a wave; partner-grief is a tide.