Apprenticeship
A skilled elf and a novice working at the same craft near each other can form a master-student bond. While the bond lasts, the apprentice gains bonus XP, their aesthetic drifts toward the master's, and their compositions carry the master's name as a style property. When the apprentice reaches skill 10, the bond resolves, with pride or resentment from the master.
Overview
Apprenticeship is a one-to-one bond between two elves working the same skill. There is no manual assignment: the simulation matches eligible pairs every 50 ticks based on skill, proximity, and current task. Bonds form without an event, apply their effects while the pair stays close, and resolve at graduation when the student reaches skill 10.
A master can hold at most one active apprentice. A student can have at most one master. Bonds dissolve if either elf departs the colony, and lapse if 500 ticks pass without proximity.
Three tick systems run the lifecycle, all every 50 ticks:
- Formation -- match eligible pairs, dissolve stale and dead-master bonds
- Effects -- award proximity XP, refresh master mood, count bond strength
- Graduation -- detect skill-10 students, sever the bond, apply social effects
A separate aesthetic drift system runs once per day to slowly pull the apprentice's aesthetic position toward the master's.
Source: crates/er-sim/src/sim/systems/apprenticeship.rs; crates/er-sim/src/sim/systems/aesthetics.rs, apprenticeship_aesthetic_drift_system.
How It Works
Formation Eligibility
Every 50 ticks the formation system snapshots all elves and looks for unbonded pairs that match all of:
| Condition | Threshold |
|---|---|
| Master skill in current-task skill | >= 8 |
| Student skill in same skill | <= 3 |
| Same exercised skill (Music / Building / Gathering) | both must currently be performing the matching task |
| Manhattan distance between master and student | <= 5 tiles |
| Master not already mentoring | no HasApprentice component |
| Student not already apprenticed | no Apprenticeship component |
Only Compose, Build, and Gather tasks count as skill exercises. A master idling does not exercise their skill, and so cannot form a bond that tick. A pair must be actively working the same craft, near each other, for the match to fire.
The matcher takes the first eligible student per master (sequential pass; no scoring). One student per master per pass.
Source: crates/er-sim/src/sim/systems/apprenticeship.rs, apprenticeship_formation_system -- task_to_skill, eligibility filters at lines 137-148.
Bond Strength
bond_strength (0--255) increments by +1 every 50 ticks the pair stays within 5 tiles. It counts the proximity ticks the bond has accumulated and never decreases except by dissolution. Graduation bonus depends on three thresholds:
| Bond Strength | Graduation Bonus |
|---|---|
| 0 -- 99 | +15 relationship |
| 100 -- 199 | +20 relationship |
| 200+ | +25 relationship |
Reaching 200 takes 200 proximity ticks = 10,000 ticks of continuous near-master work. A bond can persist longer than that without graduating if the student's skill is still climbing.
Source: crates/er-sim/src/sim/systems/apprenticeship.rs, apprenticeship_effects_system; graduation tiers at lines 322-324.
Effects (Per 50-tick Tick)
While the pair is within 5 tiles:
| Effect | Target | Value |
|---|---|---|
| Bonus XP in shared skill | Student | +1 XP (on top of normal compose/build/gather drip) |
| "Teaching" mood modifier | Master | +2 for 50 ticks (refreshed each cycle) |
bond_strength increment | Bond | +1 |
last_bond_tick update | Bond | set to current tick |
Over a full apprenticeship a student typically gains hundreds of bonus XP from proximity alone.
Source: crates/er-sim/src/sim/systems/apprenticeship.rs, apprenticeship_effects_system -- proximity check at line 217, mutations at lines 224-243.
Aesthetic Drift
Once per day, every apprentice within 5 tiles of their master drifts 0.02 along each aesthetic axis (structure, tradition, emotion, social) toward the master's value. This is 2x the friend drift rate. The drift always moves toward the master's value and is clamped to [0.0, 1.0].
An apprentice under a traditional master gradually becomes more traditional, even if they entered the bond as a radical.
The drift persists in the student's aesthetic position after graduation.
Source: crates/er-sim/src/sim/systems/aesthetics.rs, apprenticeship_aesthetic_drift_system -- APPRENTICE_DRIFT_RATE = 0.02, proximity check at 5 tiles.
Graduation
When a student's skill in the bonded craft reaches 10, the next graduation pass resolves the bond:
- Remove
Apprenticeshipfrom student andHasApprenticefrom master. - Attach a permanent
TrainedBy { master_name, skill }component to the student. - Apply mutual relationship bonus (+15, +20, or +25 depending on bond strength).
- Push "Graduated" mood +8 on the student for 300 ticks.
- Emit a
Graduationevent (notable priority, shows in event feed).
The TrainedBy component is permanent and visible in the elf detail panel as Trained by {master} ({skill}). It records lineage even after the master has departed.
Source: crates/er-sim/src/sim/systems/apprenticeship.rs, apprenticeship_graduation_system -- skill 10 gate at line 279, bonus tiers at lines 322-324.
The Surpass Branch
If the graduating student's skill is strictly greater than the master's at graduation time, a StudentSurpassedMaster event fires. The master's reaction depends on their tradition axis:
| Master Tradition | Reaction | Effects |
|---|---|---|
| > 0.6 (traditional) | Resentment | Master: -10 relationship to student; +5 Rivalry inspiration |
| <= 0.6 (open) | Pride | Master: +10 relationship to student; +4 "Proud Teacher" mood for 200 ticks |
A traditional master takes the apprentice's success as a slight against the lineage. An open master takes it as the system working as intended.
This branch fires once per (student, master) pair for the lifetime of the colony, tracked by the surpass_acknowledged set. A student who surpasses a master, leaves the colony, and returns will not re-trigger the event.
Source: crates/er-sim/src/sim/systems/apprenticeship.rs, apprenticeship_graduation_system -- surpass check at line 348, tradition threshold 0.6 at line 352.
Maintenance and Dissolution
The formation system also handles cleanup every 50 ticks:
| Condition | Action |
|---|---|
| Master entity no longer exists | Remove student's Apprenticeship component silently |
tick - last_bond_tick > 500 (no proximity for 500+ ticks) | Dissolve bond: remove Apprenticeship and HasApprentice |
| Either elf departs the colony | Cleanup runs; if student loses master, they get -8 "Mentor departed" mood for 200 ticks |
Stale bonds dissolve quietly (no event). A master and student who drift apart (because tasks reassign or one moves to a distant zone) lose the bond after about 10 game days of separation.
Source: crates/er-sim/src/sim/systems/apprenticeship.rs, apprenticeship_formation_system -- staleness at line 104; cleanup_apprenticeship_on_departure.
Interactions
Composition Style
Every composition by an active apprentice gets the InStyleOf({master_name}) composition property. It is cap-exempt (does not count toward the 2-property limit), inserted alongside the seasonal property.
A composition titled Wistful Sonata of Fellowship written by an apprentice of a master named Calenor will display the property as Style: Calenor. The property is attached only while the bond is active. Post-graduation compositions do not carry it; the lineage lives in the TrainedBy component instead.
Source: crates/er-sim/src/sim/systems/compose.rs, lines 189-192; crates/er-sim/src/sim/components.rs, CompositionProperty::InStyleOf.
Mentor Relationships
The master-student bond is a separate component and does not show up in the relationship list while the apprenticeship is active. At graduation the two elves exchange a permanent +15..+25 relationship strength bonus, which generally pushes them into Friend territory or beyond.
The surpass branch changes this: a traditional master who is surpassed loses 10 relationship to the student (net result: typically still positive, but smaller). An open master gains an extra +10.
Lifecycle and Departure
When a master departs, their student loses the bond and takes a -8 mood penalty. The aesthetic drift the student has accumulated remains. The TrainedBy component, if already set by an earlier graduation under a different master, is preserved. A student can only have one TrainedBy at a time, but lineage records are not retroactively erased.
Elder masters who depart through fulfilled departure leave students who must finish learning on their own. The master's name stays as master_name in the now-orphaned lineage record.
Aesthetic Position Convergence
Pairs that maintain the bond for a full season can drift up to 0.02 x days in each axis, enough to shift an apprentice's aesthetic position noticeably. Two elves who started 0.4 apart in tradition can converge to within 0.2 over a long apprenticeship.
Apprenticeship is one of the few systems that changes an elf's aesthetic position after personality maturation. Most aesthetic shifts come from environmental drift; apprenticeship drift is directed toward the master.
Tips
-
Pair masters and apprentices in the same workshop. The matching system requires both elves to be actively performing the same task within 5 tiles. Co-locating composer huts, builder yards, and gathering paths gives the matcher more candidate pairs.
-
Aesthetic alignment is not required for formation. Only skill and proximity matter. A radical apprentice can bond with a traditional master, and the drift system will pull them toward the master's aesthetic over time. You can use this to shift a colony's aesthetic balance: pair elders who hold the values you want to preserve with apprentices, and the apprentices will drift toward them.
-
Watch for the surpass event. If your master's tradition is high (> 0.6), a strong apprentice will eventually surpass them and trigger resentment. The master's +5 Rivalry inspiration can fuel new compositions (Manifesto, Obsessive, Virtuosic require Rivalry > 30), but the -10 relationship change can also push them toward departure if they were already strained.
-
Long apprenticeships are not punished. A bond at strength 200+ gives a +25 relationship bonus at graduation, vs +15 for a quick match. There is no maximum duration; bonds can run thousands of ticks. The only cost is opportunity: a low-skill student bonded to one master cannot be matched with another.
-
InStyleOf is a lineage marker with no quality effect. The property does not affect mastery, originality, or emotional scores. A composition's quality still depends on the composer's own skill, inspiration, and mood. The marker records which master shaped which compositions and does not affect revel performance.
-
Don't over-cluster apprenticeships in one craft. A master can only hold one apprentice. If you have three skill-9 builders and only one skill-2 builder, two of your masters will sit unbonded. Spread skill levels across crafts to get more active mentorships.
-
Bonds dissolve quietly. If a master is reassigned to a task that doesn't exercise the bonded skill, the pair will stop accumulating proximity ticks and the bond will lapse after 500 ticks of inactivity. There is no warning. The apprentice loses the bond and will be re-matched (potentially to a different master) on the next formation pass.