Add comprehensive example demonstrating all major features of the Storybook DSL through Lewis Carroll's Alice in Wonderland. Contents: - 12 characters (Alice, WhiteRabbit, CheshireCat, MadHatter, etc.) - 7 relationships with named participant blocks - 3 institutions (tea parties, royal court) - 1 schedule (Mad Tea Party eternal rotation) - 12 behavior trees using new syntax features - 1 life arc (Alice's journey) Demonstrates: - Cross-file template resolution (schema/templates.sb) - Template inheritance and includes - Strict template validation - Action parameters and repeater decorators - Named participant relationship blocks - Species-based character typing - Rich prose blocks throughout All content validates successfully.
170 lines
5.4 KiB
Plaintext
170 lines
5.4 KiB
Plaintext
use schema::core_enums::{
|
|
GovernmentType, GovernmentStyle, HierarchyStyle,
|
|
Temperament, Power, JudicialPresumption, Sentence,
|
|
GatheringType, Purpose, SeatRotation, Enforcement
|
|
};
|
|
|
|
institution CourtOfHearts {
|
|
type: monarchy
|
|
government_style: absolute_tyranny
|
|
hierarchy: rigid
|
|
rule_of_law: false
|
|
|
|
// Leadership
|
|
monarch: QueenOfHearts
|
|
consort: KingOfHearts
|
|
monarch_temperament: volatile
|
|
actual_power: queen_only
|
|
|
|
// Court composition
|
|
soldiers: 10 // Clubs
|
|
courtiers: 10 // Diamonds
|
|
royal_children: 10 // Hearts
|
|
gardeners: 3 // Spades
|
|
executioner: 1 // Rarely needed, thanks to King's pardons
|
|
|
|
// Judicial system
|
|
trial_procedure: "sentence first, verdict afterwards"
|
|
presumption: "guilt"
|
|
most_common_sentence: "beheading"
|
|
actual_executions: 0 // King pardons everyone
|
|
|
|
// Cultural norms
|
|
bowing_required: true
|
|
contradiction_forbidden: true
|
|
winning_at_games_forbidden: true // Only Queen may win
|
|
|
|
---description
|
|
The tyrannical monarchy ruling Wonderland. Led by the Queen
|
|
of Hearts, whose primary form of governance is shouting
|
|
"Off with their heads!" at any perceived slight.
|
|
|
|
The King serves as a moderating force, quietly pardoning those
|
|
the Queen condemns. This creates a strange equilibrium: the Queen
|
|
maintains authority through terror, but no one actually dies.
|
|
---
|
|
|
|
---power_structure
|
|
Nominal Structure:
|
|
Queen (absolute power)
|
|
├─ King (theoretical co-ruler)
|
|
├─ Knave (herald, blamed for tart theft)
|
|
├─ Soldiers (enforcers)
|
|
├─ Courtiers (advisors, sycophants)
|
|
└─ Gardeners (groundskeepers)
|
|
|
|
Actual Power Flow:
|
|
Queen (rage and threats)
|
|
└─ King (secret pardons, actual mercy)
|
|
|
|
The entire institution runs on the contradiction between
|
|
apparent severity and actual leniency.
|
|
---
|
|
}
|
|
|
|
institution MadTeaParty {
|
|
type: eternal_social_gathering
|
|
purpose: tea_consumption
|
|
stuck_in_time: true
|
|
time_frozen_at: 18:00
|
|
|
|
// Members
|
|
permanent_members: 3
|
|
temporary_visitors: 0..5 // Like Alice
|
|
member_sanity: 0.0
|
|
|
|
// Rules (such as they are)
|
|
logic_required: false
|
|
personal_remarks: encouraged
|
|
riddles_must_have_answers: false
|
|
changing_seats_mandatory: true
|
|
wine_offering_despite_absence: true
|
|
|
|
// Temporal properties
|
|
can_wash_dishes: false // No time between teas
|
|
solution_to_dirty_dishes: rotation
|
|
|
|
---description
|
|
An eternal tea party hosted by the Mad Hatter and March Hare,
|
|
with the Dormouse as perpetual cushion. Stuck in a time loop
|
|
at 6 o'clock because the Hatter offended Time itself.
|
|
|
|
The party follows the logic of madness: riddles have no answers,
|
|
wine is offered but doesn't exist, personal remarks are standard,
|
|
and when dishes get dirty, they simply move to the next seat
|
|
around the infinite table.
|
|
---
|
|
|
|
---social_dynamics
|
|
The Hatter and March Hare function as a unit of coordinated
|
|
madness, building on each other's nonsense. They speak in
|
|
contradictions and circular arguments.
|
|
|
|
The Dormouse serves both as furniture (cushion) and occasional
|
|
entertainment (drowsy stories). He's simultaneously part of
|
|
the institution and subjected to it (pinched, used as pillow,
|
|
tea poured on his nose).
|
|
|
|
Visitors like Alice are immediately drawn into the madness,
|
|
forced to participate in unanswerable riddles and illogical
|
|
debates. Escape is possible only by declaring "I'll never come
|
|
here again! It's the stupidest tea-party I ever was at!"
|
|
---
|
|
}
|
|
|
|
institution WonderlandDreamLogic {
|
|
type: fundamental_reality_framework
|
|
governs: "all of Wonderland"
|
|
consistency: none
|
|
predictability: zero
|
|
|
|
// Physical laws
|
|
gravity: negotiable
|
|
size: mutable
|
|
time: optional
|
|
causality: reversed // Effect before cause is common
|
|
|
|
// Social laws
|
|
hierarchy: based_on_volume // Loudest voice wins
|
|
authority: arbitrary
|
|
punishment: threatened_constantly_executed_never
|
|
madness: mandatory
|
|
|
|
// Linguistic laws
|
|
words_mean: "what I choose them to mean"
|
|
statements: often_self_contradicting
|
|
questions: frequently_unanswerable
|
|
logic: deliberately_violated
|
|
|
|
---description
|
|
The overarching "institution" of Wonderland itself - the dream
|
|
logic that governs every interaction and event. This is not an
|
|
organization but the fundamental rule system (or lack thereof)
|
|
of the world.
|
|
|
|
In Wonderland:
|
|
- Size changes based on food and drink
|
|
- Time can be quarreled with and stopped
|
|
- Cats can vanish, leaving only grins
|
|
- Tea parties last forever
|
|
- Playing cards serve as people
|
|
- Executions are ordered but never happen
|
|
- Caucus races have no winners (everyone wins)
|
|
---
|
|
|
|
---philosophical_foundation
|
|
Wonderland operates on dream logic, which is to say: the logic
|
|
of the unconscious mind, where contradictions coexist, authority
|
|
is absurd, and rules change moment to moment.
|
|
|
|
Alice's attempts to apply normal-world logic fail constantly.
|
|
Her lessons in mathematics don't work underground. Her recitation
|
|
of poems comes out wrong. Her Victorian manners are useless against
|
|
the Queen's rage.
|
|
|
|
The only way to survive Wonderland is to either embrace the
|
|
madness (like the Hatter) or maintain a core of sanity while
|
|
surfing the absurdity (like Alice eventually learns).
|
|
---
|
|
}
|