Skills

Overview

Every elf has three skill proficiencies -- Music, Building, and Gathering -- each on a 1-10 scale. Skills level up through XP accumulation, improve task efficiency, and influence composition quality. At higher levels, skills can drive autonomous behavior: a Music-7 elf will self-select to compose even without a role assignment.


How It Works

Skill Types

SkillGovernsKey Threshold
MusicComposition speed, quality (mastery score)>= 7: self-selects to compose
BuildingConstruction speed, building XP gains>= 7: self-selects to build (if queue non-empty)
GatheringResource collection speed--

All skills start at level 1 with 0 XP.

(Source: src/sim/components.rs, struct Skills, impl Default for Skills)

XP and Leveling

XP accumulates per-skill. When accumulated XP reaches the threshold for the current level, the elf levels up and excess XP carries over.

XP Threshold = level x 50

(Source: src/sim/components.rs, Skills::xp_threshold())

The maximum skill level is 10. XP gains are ignored at level 10.

(Source: src/sim/components.rs, Skills::add_xp())

Full XP Table

LevelXP to Next LevelCumulative XP
1500
210050
3150150
4200300
5250500
6300750
73501,050
84001,400
94501,800
10-- (max)2,250

Formula: Cumulative XP to reach level L = sum(i=1..L-1) of i*50 = 25 * L * (L-1).

XP Sources

ActivitySkillXP per Event
Complete a gathering taskGathering+10
Complete a building taskBuilding+15
While composing (per tick)Music+1

(Source: src/sim/systems.rs, gathering_system(), building_progress_system(), compose_system())


Values & Formulas

Gathering Progress

progress_rate = (5 + gathering_skill) + work_speed_modifier

Progress starts at 0 and completes at 100. At completion, the elf picks up 5 units and gains 10 Gathering XP.

work_speed_modifier: Inspired = +2, Normal = 0, Stressed = -1. Minimum rate is 1.

Gathering SkillTicks to Complete (Normal morale)
117
313
510
79
107

(Source: src/sim/systems.rs, gathering_system(), work_speed_modifier())

Building Progress

progress_rate = (5 + building_skill) + work_speed_modifier

Same formula as gathering. Completes at 100. Grants 15 Building XP.

Building SkillTicks to Complete (Normal morale)
117
313
510
79
107

(Source: src/sim/systems.rs, building_progress_system())

Composition Speed

Composition duration scales inversely with Music skill:

duration = max(50 - music_skill * 2, 30)

Progress rate per tick = 100 / duration (minimum 1).

Music SkillDuration (ticks)Progress/tick
1482
3442
5402
7362
10303

(Source: src/sim/art.rs, compose_duration())

Composition Quality

Music skill directly drives the mastery quality axis:

mastery = clamp(music_skill * 10 + random(-5..+5), 0, 100)

A level-10 musician produces mastery scores around 95-105 (clamped to 100). A level-1 musician produces mastery around 5-15.

Originality depends on inspiration total; emotional depends on net mood.

(Source: src/sim/art.rs, compute_quality())

Skill-Driven Behavior Thresholds

SkillLevelBehavior
Music>= 7Self-selects to Compose (Step 3c in behavior tree)
Building>= 7Self-selects to Build when build queue is non-empty

These thresholds bypass role assignment -- the elf follows their expertise automatically.

(Source: src/sim/systems.rs, task_decision_system(), lines 491-510)


Interactions

  • Roles -- roles provide a suggestion for default behavior; high skill levels provide an override at Step 3c.
  • Needs & Mood -- morale affects work speed modifier: Inspired (+2), Stressed (-1).
  • Resources -- gathering skill controls how fast resources are collected.
  • Buildings -- building skill controls construction speed; completion awards 15 XP.

Tips

  • XP scales quadratically. Getting from level 1 to 5 takes 550 cumulative XP. Getting from 5 to 10 takes another 1,950. Late levels are a long grind.
  • Music XP trickles in at 1/tick while composing. Even at the slow rate, a composer working full-time levels up steadily. Building XP comes in bigger chunks (15 per completion) but less frequently.
  • Level 7 is the magic number. At Music 7 or Building 7, elves start self-directing. This is the threshold where specialization pays off without needing explicit role assignment.
  • Work speed modifier matters most at low skill. The Inspired +2 bonus on a skill-1 elf increases their rate from 6 to 8 (33% faster). On a skill-10 elf, it goes from 15 to 17 (13% faster). Keep your rookies happy.
  • Composition quality tracks mastery closely with music skill. A skill-10 composer produces consistently excellent mastery. Invest in your top musician for the best compositions.