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).
49 lines
1.8 KiB
Plaintext
49 lines
1.8 KiB
Plaintext
//! Emma - The bakers' daughter
|
|
//!
|
|
//! Demonstrates:
|
|
//! - Character using different template (Child vs Baker)
|
|
//! - Different behavior set appropriate to age
|
|
//! - No work schedule (children don't work)
|
|
|
|
use schema::templates::Child;
|
|
|
|
character Emma from Child {
|
|
// Personal details
|
|
age: 12
|
|
|
|
// Child-specific traits
|
|
school_grade: 7
|
|
curiosity: 0.9
|
|
|
|
// General traits
|
|
energy: 0.9
|
|
mood: 0.85
|
|
|
|
---backstory
|
|
Emma is the bright, energetic daughter of Martha and Jane. She is
|
|
fascinated by the chemistry of baking — why dough rises, how yeast
|
|
works, what makes bread crusty — and has turned that curiosity into
|
|
her school science fair project: "The Chemistry of Fermentation."
|
|
|
|
She borrowed a microscope from the school lab and has been studying
|
|
Old Maggie under magnification, sketching the yeast colonies and
|
|
tracking how temperature affects their activity. Her poster board
|
|
is covered in hand-drawn diagrams of lactobacillus and graphs of
|
|
rise times at different temperatures. The science fair is Friday
|
|
evening, and she has been rehearsing her presentation to anyone
|
|
who will listen — Henry, the regular customers, even Roland once
|
|
when he stopped by to buy flour.
|
|
|
|
On weekends she helps in the bakery, packaging goods and chatting
|
|
with customers. She is not allowed to work the ovens yet, but she
|
|
knows the recipes by heart. She is quietly proud that her science
|
|
project connects her two worlds: school and the bakery.
|
|
---
|
|
}
|
|
|
|
// Note: Emma inherits from Child template which:
|
|
// - uses behaviors: PlayBehavior, LearnBehavior
|
|
// - uses behaviors: BasicNeeds, SocialInteraction (from Person)
|
|
// - Has NO work schedule (appropriate for a child)
|
|
// - Has different fields than Baker template
|