Rewrote the baker-family example around a unified story: the annual Harvest Baking Competition is Saturday. Martha's sourdough starter Old Maggie is sluggish from a cold snap, Jane is secretly entering the FreeStyle category, Emma's science fair project is "The Chemistry of Fermentation", Henry is judging for the first time and worried about impartiality, and Roland is defending last year's title. The week's schedules (Mon guild meeting → Tue test bakes → Wed sourcing → Thu dough prep → Fri science fair → Sat competition → Sun recovery) are now fully populated with narrative-specific actions. Files split for composability: - behaviors/baker_behaviors.sb → 5 focused files by character/domain - schema/types.sb → 4 files (core, baking, world, social) - schedules/work_schedules.sb → 4 files (one per schedule) - relationships/baker_family_relationships.sb → family + bakery Strong typing: replaced all enumerable string fields with concepts (BakerSpecialty, Occupation, LocationType, InstitutionType, ParentingStyle, Intensity, BakeryDomain, BakingDiscipline, ManagementDomain, CompetitiveAdvantage). Remove new-syntax-demo.sb (superseded by baker-family example).
55 lines
2.0 KiB
Plaintext
55 lines
2.0 KiB
Plaintext
//! Martha - Master baker and family matriarch
|
|
//!
|
|
//! Demonstrates:
|
|
//! - Character inheriting from template with resources
|
|
//! - Template provides both behaviors and schedule
|
|
//! - Field overrides from template
|
|
|
|
use schema::templates::Baker;
|
|
|
|
character Martha from Baker {
|
|
// Personal details
|
|
age: 34
|
|
|
|
// Baker-specific traits
|
|
specialty: Sourdough
|
|
baking_skill: 0.9
|
|
customer_relations: 0.95
|
|
skill_tier: Master
|
|
|
|
// General traits (inherited from Person template)
|
|
energy: 0.7
|
|
mood: 0.8
|
|
|
|
// Work ethic (from Worker template)
|
|
work_ethic: 0.95
|
|
occupation: MasterBaker
|
|
|
|
---backstory
|
|
Martha learned to bake from her grandmother, who passed down Old
|
|
Maggie — a sourdough starter that has been alive for thirty years.
|
|
Old Maggie is the soul of Martha's bread, and Martha tends to her
|
|
like a third child: daily feedings, temperature checks, and quiet
|
|
conversations when the bakery is empty.
|
|
|
|
She has won the Harvest Baking Competition three out of the last
|
|
five years, always in the Signature category with her sourdough.
|
|
Last year, Roland took the title with a dark rye that the judges
|
|
called "revelatory," and Martha has been determined to reclaim it
|
|
ever since. The rivalry deepened when Roland hired away her former
|
|
apprentice, Thomas, last spring — a betrayal she has not forgotten.
|
|
|
|
This week, Old Maggie is sluggish from a cold snap that dropped
|
|
the bakery's overnight temperature. Martha has been wrapping the
|
|
starter in blankets and moving her near the oven, but the rise is
|
|
still not where it needs to be for Saturday's competition. She is
|
|
quietly worried but will not show it.
|
|
---
|
|
}
|
|
|
|
// Note: Martha inherits from Baker template which:
|
|
// - uses behaviors: BakingSkills, CustomerService (from Baker)
|
|
// - uses behaviors: BasicNeeds, SocialInteraction (from Person via Worker)
|
|
// - uses schedule: BakerSchedule (from Baker)
|
|
// - uses schedule: WorkWeek (base for BakerSchedule)
|