Compositions

Overview

Compositions are the primary creative output of an elven settlement. When an elf with the Composer role (or any elf choosing to compose) finishes a composing task, the simulation generates a unique musical work with a procedurally generated name, title, description, quality scores, and special properties. Compositions are permanent artifacts stored in the settlement's portfolio and performed at Revels.

Every composition encodes the emotional and aesthetic state of its creator at the moment of creation. Two compositions by the same elf in different moods will sound completely different.


How It Works

Composing Duration

The time to compose is determined by music skill. Higher skill means faster work, but there is a floor of 30 ticks:

Duration = max(50 - skill x 2, 30) ticks

Music SkillCompose Time (ticks)
148
540
834
1030

Source: src/sim/art.rs, compose_duration

Genre Families

Every composition belongs to one of three genre families, selected based on the composer's Aesthetic Position and Inspiration.

GenreDescriptionSelection Bias
TraditionalClassical forms, familiar structuresHigh tradition axis
RadicalAvant-garde, experimentalLow tradition axis
PastoralNature-inspired, ambientHigh Nature inspiration (>40)

Genre Selection Algorithm

Genre selection proceeds in two stages: a cross-genre surprise check, then a weighted probability roll with seasonal bias.

Stage 1 -- Cross-genre surprise (8%)

Before any probability calculation, the system rolls a uniform random check. If the roll is below 0.08 (8% chance), a genre is picked uniformly at random from all three families, ignoring the composer's aesthetic position, inspiration, and season entirely. This means roughly once per 20-day session, even a deeply traditional elf might compose something radical.

Source: src/sim/art.rs, select_genre_seasonal -- if surprise < 0.08 at line 97.

Stage 2 -- Weighted probability

If the surprise check does not fire (92% of the time), base probabilities are computed from the composer's state:

ProbabilityFormulaNotes
p_radicalmax((1.0 - tradition - 0.5) x 1.5, 0.0)Rises as tradition axis falls; ~0% at tradition 0.83+, ~15% at tradition 0.5, ~75% at tradition 0.0
p_nature0.6 if Nature is dominant source AND nature > 40; else 0.1Requires both conditions; dominant source alone is not enough
p_traditionalmax(1.0 - p_radical - p_nature, 0.0)Remainder after radical and pastoral claims

All three probabilities are then adjusted by seasonal bias:

SeasonAdjustment
Winterp_nature += 0.2 (Pastoral +20%)
Summerp_radical += 0.2 (Radical +20%)
Springp_traditional += 0.1 (Traditional +10%)
AutumnNo adjustment (most varied season)

After bias is applied, the three values are summed to a total and a weighted random roll selects the genre. The probabilities are not renormalized to 1.0 before rolling -- the roll range is [0, total), so seasonal bias effectively increases the absolute weight of one family rather than redistributing from others.

Example at tradition=0.5, no nature dominance, Summer:

FamilyBaseSeasonalEffective share
Traditional0.15+00.15 / 1.45 = ~10%
Radical0.75+0.20.95 / 1.45 = ~66%
Pastoral0.10+00.10 / 1.45 = ~7%
Cross-genre surprise (pre-roll)8% (uniform)

Source: src/sim/art.rs, select_genre (base logic, lines 55--85) and select_genre_seasonal (with season, lines 89--128)

Base Types (Skill Tiers)

Within each genre, the composer's music skill determines which tier of base type is available. There are 4 tiers per genre (12 total):

SkillTierTraditionalRadicalPastoral
0-3ApprenticeLullaby, Hymn, Folk Song, Ditty, Canticle, AirChant Riff, Drum Circle, Voice Loop, Spoken WordBirdsong, Creek Melody, Windchime, Leaf Rustle
4-6JourneymanBallad, Rondo, Serenade, Nocturne, Madrigal, MinuetBlues Lament, Groove, Free Verse, SyncopationStorm Song, Forest Waltz, River Suite, Dawn Chorus
7-9MasterSonata, Concerto, Rhapsody, Aubade, Fantasia, ElegyJazz Standard, Rock Anthem, Beat Poem, FusionThunder Concerto, Tide Rhapsody, Season Cycle
10+GrandmasterRequiem, Symphony, Magnum Opus, OratorioNoise Symphony, Rap Epic, Punk Requiem, Ambient OpusWorld Song, Elements Symphony, Celestial Harmony, Earthsong, Aurora Opus

Source: src/sim/art.rs, select_base_type


Values & Formulas

Quality Scores

Each composition has three quality dimensions scored 0-100:

DimensionDriverFormula
MasteryMusic skillskill x 10 + random(-5..+5), clamped 0-100
OriginalityInspiration totalinspiration_total x 0.6 + random(0..20), clamped 0-100
EmotionalNet moodmood x 0.5 + 30 + random(0..10), clamped 0-100

Average quality = (mastery + originality + emotional) / 3

Average QualityTier Label
90-100Transcendent
70-89Masterful
50-69Skilled
25-49Modest
0-24Crude

Elegy bonus: Compositions created while an elf is mourning a departed friend receive +15 to the emotional score.

Source: src/sim/art.rs, compute_quality; src/sim/components.rs, quality_avg, quality_tier

Composition Properties

Properties are special tags earned from creation conditions. Each composition carries up to 2 behavioral properties plus an always-present seasonal property and an optional Stormborn premiere marker.

Condition properties (checked in order):

PropertyCondition
CatharticComposer has an active creative block
TranscendentTotal inspiration > 90
DebutFirst composition ever (empty portfolio)
Magnum OpusSkill 10 AND inspiration > 90 AND mood > 50 (once per lifetime)
MasterworkSkill >= 10 (if Magnum Opus not triggered)
ElegyComposed while mourning a departed friend

Compound inspiration properties (require two channels both > 30):

PropertyChannels Required
ManifestoRivalry > 30 AND Social > 30
ObsessiveRivalry > 30 AND Solitude > 30
CommunalNature > 30 AND Social > 30
TimelessNature > 30 AND Solitude > 30
VirtuosicBeauty > 30 AND Rivalry > 30
SublimeBeauty > 30 AND Solitude > 30
BittersweetSocial > 30 AND Solitude > 30
EnchantedNature > 30 AND Beauty > 30
AnthemSocial > 30 AND Beauty > 30

Source: crates/er-sim/src/sim/systems/compose.rs; crates/er-sim/src/sim/components.rs, CompositionProperty

Seasonal Properties

Every composition automatically receives one seasonal property based on the season it was completed in. This does not count toward the 2-property cap -- it's always first in the property list.

PropertySeasonMeaning
VernalSpringBeginnings, renewal, hope
SolstitialSummerAmbition, peak energy, glory
AutumnalAutumnReflection, bittersweet, impermanence
HibernalWinterDepth, memory, stillness

Seasonal properties interact with the resonance scoring system at performance time. A Vernal composition performed in Spring gets +5 audience goodwill; the same composition in Winter gets -1.

Stormborn is a special premiere-time property. When a composition is performed for the first time during Storm weather, it gains the Stormborn property. This is permanent, rare, and stacks with the seasonal property. A "Hibernal Stormborn" composition is a winter piece that debuted in a storm -- the kind of memorable event that defines a colony's cultural history.

Source: crates/er-sim/src/sim/components.rs, CompositionProperty::for_season; crates/er-sim/src/sim/systems/revel.rs, Stormborn attachment.

Lineage Property: InStyleOf

Compositions written by an active apprentice carry an additional InStyleOf({master_name}) property -- displayed as Style: {master_name}. Like seasonal and Stormborn, it is cap-exempt: it is appended after the 2-property truncation, so it never displaces a behavioral property.

The marker is informational only -- it does not affect quality scores, audience reactions, or revel resonance. It exists to record cultural lineage: which master shaped which works. The property is attached only while the apprenticeship bond is active. Compositions written after graduation do not carry it; the lineage instead lives in the student's permanent TrainedBy component.

Source: crates/er-sim/src/sim/systems/compose.rs, lines 189-192; crates/er-sim/src/sim/components.rs, CompositionProperty::InStyleOf.

Creative Block

Three or more consecutive compositions with average quality below 50 give a 30% chance of triggering a creative block. Duration is 100 to 200 ticks (random). During a block, the elf refuses to compose and seeks a Garden instead.

Source: crates/er-sim/src/sim/systems/compose.rs, ConsecutiveMediocre, creative block trigger logic


Name Generation

Composition names follow the structure "{Prefix} {Base Type} {Suffix}".

Prefix is selected from mood tier pools, with two override conditions checked first:

ConditionPoolExamples
Night AND mood < -10HauntedHaunted, Spectral, Moonlit, Shadow-woven
Inspiration > 70 AND mood < 0FierceFierce, Defiant, Tempestuous, Raw
Mood <= -41DevastatedShattered, Grieving, Tormented
Mood -40 to -21SadMelancholic, Mournful, Desolate
Mood -20 to +10ReflectiveContemplative, Wistful, Pensive
Mood +11 to +40ContentSerene, Gentle, Tender
Mood +41 to +70HappyJoyful, Radiant, Exuberant
Mood > +70EuphoricEcstatic, Triumphant, Blazing

Suffix comes from the dominant inspiration source:

SourceExample Suffixes
Nature"of the Silver Wood", "of Falling Rain"
Social"of Fellowship", "of the Long Table"
Rivalry"of the Challenge", "of Defiance"
Beauty"of the Master's Touch", "of Perfect Form"
Solitude"of Midnight", "of the Lonely Peak"

Title Generation

In addition to the composition name, each work gets a short and long title pair. The short title is drawn from a pool matching the dominant inspiration source (e.g., "Still Water", "The Argument"). The long title appends a mood modifier (e.g., "Still Water, in the Rain").

Source: src/sim/art.rs, generate_name, generate_title


Interactions

  • Inspiration -- Originality score and compound properties depend on inspiration channels
  • Aesthetic Position -- Determines genre family selection and composition aesthetic snapshot
  • Revels -- Compositions are performed at revels where audience reactions are computed
  • Needs & Mood -- Mood drives the emotional score and name prefix selection
  • Skills -- Music skill determines mastery score, base type tier, and compose duration
  • Artistic Direction -- Patron direction influences which elves the curator assigns as Composers
  • Seasons & Weather -- Season at completion determines the seasonal property; Storm weather during premiere can trigger Stormborn
  • Apprenticeship -- An apprentice's compositions carry the cap-exempt InStyleOf({master}) lineage marker

Tips

  • A skill-10 elf with high inspiration and good mood can produce a Magnum Opus -- the rarest property in the game. Protect your best musicians from mood crashes.
  • Creative blocks are not purely bad: composing during a block earns the Cathartic property, which is otherwise unobtainable.
  • Seasonal genre bias means Winter is the best time for Pastoral works and Summer for Radical. Plan revel timing accordingly.
  • The 8% cross-genre surprise means even a deeply traditional elf occasionally writes something radical. This is intentional and can spark interesting audience reactions.
  • Compositions with the Elegy property are only possible when an elf is mourning -- these tend to have very high emotional scores due to the +15 bonus.