Buildings

Overview

Buildings are permanent structures placed on the map via the build queue. They provide shelter from weather, enable critical tasks (eating, resting, composing), and buff nearby elves. Four building types cover the settlement's needs: housing, crafting, aesthetics, and communal gathering.


How It Works

Building Types

BuildingDescription
DwellingLiving quarters. Speeds rest recovery. Counts as shelter.
WorkshopCrafting space. Required for composing. Counts as shelter.
GardenBeauty and creative block recovery. Does NOT count as shelter.
Feast HallCommunal eating. Social gathering space. Counts as shelter.

(Source: src/sim/components.rs, enum BuildingType)

Build Costs

BuildingWoodStoneFineWood
Dwelling10----
Workshop1010--
Garden5----
Feast Hall155--

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

Build Queue

Buildings are constructed through the build queue system:

  1. The patron or AI curator adds a QueuedBuild (type + site position) to CulturalPolicies::build_queue.
  2. build_queue_system() checks if the settlement can afford the top item.
  3. If affordable, it assigns an idle elf (preferring Builders) and deducts resources immediately.
  4. The assigned elf pathfinds to the build site and begins construction.
  5. Only one build is active at a time (no double-assignment).

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

Builder Assignment Priority

When a build is ready to start:

PriorityCandidate
1stIdle elf with Builder role
2ndAny idle elf
3rdBuilder-role elf on a non-critical task (Sustenance >= 40, Rest >= 40)

Builder-role elves on critical tasks (Eat, Rest, Build, ClearForest) or with low needs are not reassigned.

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


Values & Formulas

Construction Progress

progress_rate = (5 + building_skill) + work_speed_modifier

Construction completes when progress reaches 100. Minimum rate is 1.

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

Building SkillTicks to Complete (Normal)Ticks (Inspired)Ticks (Stressed)
1171320
3131015
510812
79710
10768

On completion, the builder gains 15 Building XP.

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

Shelter Radius

Buildings classified as shelter (Dwelling, Workshop, Feast Hall) protect elves within Manhattan distance <= 2 from weather penalties.

is_indoors = any shelter building within Manhattan distance 2 of elf

Garden does not count as shelter.

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

Weather Mood Effects (Shelter-Dependent)

WeatherOutdoors EffectIndoors Effect
Rain"Caught in rain" -1 (50 ticks)None
Snow"Snow-covered landscape" +2 (50 ticks)None
Storm"Sheltering from storm" +0 (50 ticks)"Sheltering from storm" +0 (50 ticks)

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

Rest Recovery

Resting elves recover at different rates depending on proximity to a Dwelling:

LocationRest Recovery RateMood on Completion
At Dwelling+5 per tick"Slept in dwelling" +3 (100 ticks)
Outdoors+2 per tick"Slept on ground" -3 (50 ticks)

Resting completes when Rest reaches 80 ("Fulfilled" threshold).

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

Eating

Elves perform the Eat task at any building tile (not just Feast Halls). Eating consumes 1 Food from the stockpile and restores +30 Sustenance.

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

Composing

Composing requires presence at a Workshop tile with no remaining path. Composition duration scales with Music skill (see Skills for the formula).

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

Garden and Creative Block

Elves with Creative Block seek a Garden. The Garden does not directly restore beauty via a building buff -- instead, Gardens are typically placed near forest tiles where the terrain_effect_system provides passive beauty restoration. Creative Block drives the elf to the Garden as a waypoint.

(Source: src/sim/systems.rs, task_decision_system(), Step 2)


Interactions

  • Resources -- build costs are deducted from the stockpile when construction starts; deposits require proximity to any building.
  • Needs & Mood -- Dwellings provide faster rest recovery (+5 vs +2) and a positive mood modifier; sheltered buildings prevent rain mood penalties.
  • Roles -- Builder role elves are prioritized for construction assignments.
  • Skills -- Building skill determines construction speed; completion grants 15 XP.
  • Terrain -- buildings must be placed on walkable tiles; Gardens are most effective near forest terrain for beauty synergy.

Tips

  • Build order matters. A Dwelling first ensures Rest recovery is efficient. A Workshop second enables composing and Stimulation restoration. Garden third handles Beauty needs.
  • Feast Hall is expensive but versatile. At 15 Wood + 5 Stone, it is the costliest building. But it serves as shelter, eating location, and social gathering point for elves pursuing social aspirations.
  • Garden is cheap and essential. At only 5 Wood, it is the most cost-effective building. Place it adjacent to AncientForest tiles to maximize beauty synergy.
  • Shelter radius is Manhattan 2. Buildings placed 1 tile apart create overlapping shelter zones. Cluster buildings to cover the most elves.
  • One build at a time. The system prevents multiple simultaneous constructions. Queue your builds in priority order; the next one starts automatically when the current one finishes.
  • Resources are deducted immediately when a build starts, not when it finishes. If a builder gets interrupted, the resources are still consumed. Make sure your builder has adequate needs before starting expensive constructions.
  • Outdoor resting gives a mood penalty. Without a Dwelling, elves who rest get "Slept on ground" (-3 for 50 ticks). This stacks with weather effects and can spiral morale downward in early game.