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
| Skill | Governs | Key Threshold |
|---|---|---|
| Music | Composition speed, quality (mastery score) | >= 7: self-selects to compose |
| Building | Construction speed, building XP gains | >= 7: self-selects to build (if queue non-empty) |
| Gathering | Resource 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
| Level | XP to Next Level | Cumulative XP |
|---|---|---|
| 1 | 50 | 0 |
| 2 | 100 | 50 |
| 3 | 150 | 150 |
| 4 | 200 | 300 |
| 5 | 250 | 500 |
| 6 | 300 | 750 |
| 7 | 350 | 1,050 |
| 8 | 400 | 1,400 |
| 9 | 450 | 1,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
| Activity | Skill | XP per Event |
|---|---|---|
| Complete a gathering task | Gathering | +10 |
| Complete a building task | Building | +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 Skill | Ticks to Complete (Normal morale) |
|---|---|
| 1 | 17 |
| 3 | 13 |
| 5 | 10 |
| 7 | 9 |
| 10 | 7 |
(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 Skill | Ticks to Complete (Normal morale) |
|---|---|
| 1 | 17 |
| 3 | 13 |
| 5 | 10 |
| 7 | 9 |
| 10 | 7 |
(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 Skill | Duration (ticks) | Progress/tick |
|---|---|---|
| 1 | 48 | 2 |
| 3 | 44 | 2 |
| 5 | 40 | 2 |
| 7 | 36 | 2 |
| 10 | 30 | 3 |
(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
| Skill | Level | Behavior |
|---|---|---|
| Music | >= 7 | Self-selects to Compose (Step 3c in behavior tree) |
| Building | >= 7 | Self-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.