Runtime semantics

Glue vs keywords, sharing toys, greedy trait, all trait effects, pronouns, mood.

Rules that are easy to miss from grammar alone. For writing stories, see Writing stories.

Story glue vs keywords

KindExamplesBehaviour
Story glueis, has, my, the, stash, pile, …Ignored unless heard
Stash slotsfirst, second, last, …Heard keywords. Used in stash grammar
Control flowwhen, if, then, while, buryMust lead the line (except otherwise when …)
Inside "quotes"anythingPrinted text only

Branch grammar: Control flow.

Sharing toys

When dogs share toys (no stash), toys are split with integer division. Any remainder stays with the giver.

Example: labrador has 7 toys and shares with beagle and husky (3 dogs):

DogToys after share
labrador (giver)3 (2 + 1 remainder)
beagle2
husky2

Stash sharing round-robins items and clears the stash. Grammar: Share, pass, tricks.

Story syntax: her cookie jar holds …, she whimpers as she wants the first biscuit from her cookie jar, her cookie jar is empty.

Greedy trait

Default: after 3 feeds, gulps, or shares in a row, a greedy dog loses 1 treat (food only, not toys). Counter resets after the penalty.

Per-breed defaults live in traits.json. See Traits.

Trait effects (runtime)

TraitEffect
loudDog-voiced bark/barks → growl (UPPERCASE); narrator bark unchanged
lazywait sleeps twice as long
wetwhine / whimper doubled
fetchySame print twice → tail THUMP THUMP — same stick, still the best stick on stdout, then the line again
chaserEach loop tick adds +1 toy to that dog's items (same field as squirrels in stories)
playfulDog speaks → output reversed before formatting; narrator bark unchanged. Defaults: bearded collie, border collie, flat-coated retriever, Nova Scotia duck toller, papillon, shetland sheepdog

Mood (all dogs)

Dog speaks (she bark, labrador woof): 0 toys → lowercase even though the verb is bark; loud → uppercase.

Narrator (bark "…", I bark "…"): as written.

Trait assignment grammar: Traits.

Pronouns

Full grammar: Registering and pronouns.

  • she / her → last dog described with feminine voice (She is 2.)
  • he / his / him → last dog described with masculine voice
  • Introducing another dog (I have a beagle.) does not rebind she from the first