Pine 4

Flashback with multiple endings
Example 167
★★★

Pine: Adding a flashback scene that, instead of repeating endlessly, repeats only until the Princess has understood the point.

Suppose in addition to our pathetic little family history, we have another secret to convey to the Princess, this one a little more peculiar. She either gets it or she doesn't; once she gets it, we do not revisit that flashback, though it is still possible to keep visiting the poverty flashback.

"Pine"
Part 1 - The Set-up
A person can be asleep or awake. A person can be active or passive.
The Spinning Tower is a room. "A remote corner of the old castle, reserved for spinning and weaving tasks."
Sleeping Beauty is an asleep woman in the Spinning Tower. "[if asleep]Sleeping Beauty lies here, oblivious to your presence[otherwise]Sleeping Beauty stands beside you, looking [attitude][end if]." The description is "She is even more magnificent than the rumors suggested." Understand "woman" or "girl" or "princess" or "lady" as Sleeping Beauty.
Discovery is a scene. Discovery begins when play begins. Discovery ends when Sleeping Beauty is awake. Marriage Proposal is a scene. Marriage Proposal begins when Discovery ends.
When Discovery ends: say "Throughout the palace you can hear the other sounds of stirring and movement as the spell of centuries is broken."; now Beauty is passive.
Instead of waking an awake person: say "Redundant."
Instead of waking an asleep person: say "Yes, but how?"
Instead of waiting in the presence of an asleep person (called snorer): say "You are alone with the sound of [the snorer] snoring sonorously."
Instead of attacking an asleep person:
   now the noun is awake;
   say "[The noun] sits bolt upright. 'Hey! Ow!' So much for that true love's kiss nonsense."
Instead of kissing an asleep person:
   now the noun is awake;
   say "[The noun] slowly stirs to wakefulness!"
Instead of throwing water at an asleep person:
   now the second noun is awake;
   now the noun is nowhere;
   say "You pour out [the noun] on [the second noun].
[The second noun] wakes, shuddering. 'Agh! I had a terrible dream about drowning and then-- Hey!'"
The player carries a jug of water. Understand "pour [something] on [something]" or "splash [something] at/on [something]" as throwing it at.
Table of Conversation
topicreplyquip
"dream/dreams/nightmare/nightmares/sleep""'Sleep well?' you ask solicitously.

'Not really,' she replies, edging away from you. So much for that angle."
"'Ghastly nightmares,' she remarks. You nod politely."
"marriage/love/wedding/boyfriend/beau/lover""'So,' you say. 'This is a little weird since we just met, but, um. Would you like to get married?'

She looks at you nervously. 'Do I have to? I mean, I'd rather not.'

Well, this could get prickly fast."
"'I, er,' she says. 'I hope I'm not supposed to marry you or something.' Uh oh."
"marriage/love/wedding/boyfriend/beau/lover""'I was told I was going to marry you and inherit the kingdom,' you say, apologetically. 'Would that be very bad?' This could be awkward, considering your family circumstances -- you did promise your mother that everything would be better, after this --

'Oh, it's not you -- I'm seeing someone,' she says, smiling quickly.

You try to think how to point out that it's been a hundred years since she last saw her boyfriend."
"'Do you think I could go look for someone? I'm seeing him, you see, and I think I've been... sick... for a while, so he might be worried.'

You try to think how to point out that it's been a hundred years since she last saw her boyfriend. And try not to think how awkward things would be in your family if she refuses to marry you."
"marriage/love/wedding/boyfriend/beau/lover""'Do you think you could consider alternatives if he's no longer interested in you?' you suggest.

She gives you the look of a wounded squirrel. 'My father might not approve of my love for the kitchen boy, but his heart is faithful and true!' she exclaims.

'Right; supposing that he's still around, I'm sure that his love won't have faded,' you say, considering your fingernails. Maybe you'd better come clean with her about your identity, after all: she might be more favorably inclined if she understood that you won't interfere in her base-born romances."
"'I don't expect you to understand,' she says in a low whisper. 'I know it is not considered proper for a princess to love -- and such a one as my William, who works in the kitchen --' Her glance dares you to laugh. '-- but I cannot marry you without telling you this truth.'

Right then. Perhaps you'd better tell her your secret, in exchange?"
"marriage/love/wedding/boyfriend/beau/lover""'You've been up here for a hundred years,' you say. An unpleasant thought occurs to you. 'Was your young man in the castle somewhere?'

She shakes her head mutely."
"She goes to the window and looks out at the now-fading thicket of briar. 'That took a while to grow,' she observes. 'I've been up here longer than I thought.'

You shrug, uncomfortable."
Instead of asking an awake beauty about a topic listed in the Table of Conversation when Marriage Proposal is happening:
   now Beauty is passive;
   say "[reply entry][paragraph break]";
   blank out the whole row.
Instead of telling an awake beauty about something: try asking the noun about it.
Instead of asking an asleep person about something:
   say "[The noun] snores."
Marriage Proposal ends in failure when the number of filled rows in the Table of Conversation is 0.
Every turn during Marriage Proposal:
   if Beauty is active and Beauty is visible:
      repeat through Table of Conversation:
         say "[quip entry][paragraph break]";
         blank out the whole row;
         make no decision.
When Marriage Proposal ends in failure: end the story saying "This is going to take some explaining."
Part 2 - Flashbacks
Instead of asking an awake beauty about a topic listed in the Table of Flashback Material:
   now Beauty is passive;
   say "[reply entry][paragraph break]".
A fact is a kind of thing. A fact can be known or unknown. A fact can be current or past.
The family circumstances is a fact. The secret identity is a fact. The printed name of secret identity is "secret".
Table of Flashback Material
topicreply
"poor/poverty/family/money/mother/circumstances" or "family circumstances" or "my family/mother""[if family circumstances is unknown]'I wish you'd give some thought to marrying me. You see,' you say, your jaw tensing. 'I wouldn't ask if it weren't for my [family circumstances]...'[otherwise]'I don't think you fully understand the [family circumstances],' you say.[end if]"
"secret/identity/gender/girl/female/woman" or "secret identity" or "my secret" or "my secret identity" or "my gender""[if dramatic revelation ended in failure]'Look,' you say, trying again. 'Pay attention: I need you to understand my [secret identity].'[otherwise]You clear your throat and allow your voice to stray upward, into its natural register and out of this husky false tenor you've been affecting. 'There's, er, something you should know about my [secret identity],' you say...[end if][if dramatic revelation ended in success] She looks impatient. 'I get it, you know,' she says. 'I'm not stupid.'"
After printing the name of a fact (called target): now the target is current; now the target is known.
Poverty flashback is a recurring scene. Poverty flashback begins when family circumstances is current. When poverty flashback begins: strip the player; move the player to the Woodcutter's Shack.
The Woodcutter's Shack is a room. "Your family lives in a shack in the forest. There are holes in the roof, and in the winter the snow comes in -- rain, too, for that matter. The walls aren't very well-boarded, and don't keep out the wind, and even though you live in the middle of dense woods, you can never gather enough fuel to keep this place fully heated. And then there's the stench. Pigs wander freely in and out, and your three youngest brothers play on the floor."
Pigs are an animal in the shack. The pigs are scenery. The description is "They really are very grubby, dirty animals, but what's worse than that, the value of pigs has declined a lot over the last few decades. This is hard to explain to someone who has been out of touch with the world for a while, but keeping pigs for meat is a dubious prospect when there's less and less for them to forage on." Instead of smelling the pigs: say "They smell the way animals do, when they live among their own refuse."; increase the pity of Beauty by 2.
The brothers are a man in the shack. The brothers are scenery. The description of brothers is "Hans, Franz, and Lukas. Twins and then the baby. So young, and growing up fatherless; and soon to be orphaned entirely, if your mother's health does not improve." Understand "brother" or "twin" or "twins" or "baby" or "franz" or "hans" or "lukas" as the brothers.
The untidy bed is scenery in the Shack. Mother is a woman on the untidy bed. The description of mother is "She is wasting away of a slow disease, her skin stretched tautly over bone. She hasn't been the same since your father left." On the bed is a folded letter.
The description of the letter is "Many times read over and creased, the letter explains how your father has gone away with a wealthy countess and will not return. Your mother was not able to read it herself, of course, and had to have it explained to her by the parish priest. Now she keeps it by the bed and crumples it in her fits of delirium."
Instead of kissing or touching Mother for the first time:
   say "You place a gentle kiss on her feverish brow. She looks up at you, her oldest -- yes, never mind that bit -- with a look of sincere trust and admiration.
'You'll find a way through this for us,' she says, squeezing your fingers. 'I know you will.'"; increase the pity of Beauty by 3.
Instead of kissing Mother: say "You have no more heart-rending memories of affection to recount; that one incident will have to serve, for rhetorical purposes."
Instead of waiting in the Shack: say "The wind blows sharply through the walls."
Instead of attacking someone in the Shack:
   say "Though sometimes the conditions of your life make you grouchy and impatient, you would never dream of striking a member of your own family. But from time to time you do feel the temptation."
Beauty has a number called pity. After examining something in the Woodcutter's Shack, increment the pity of Beauty. After examining mother, increase the pity of Beauty by 2. After examining the letter, increase the pity of Beauty by 3.
Poverty flashback ends when waiting or the time since poverty flashback began is five minutes.
When Poverty flashback ends:
   now family circumstances is past;
   say "...you finish describing the miserable circumstances of your home life, and allow your attention to return to the present.";
   restore the player;
   now Beauty is passive;
   if Beauty is clever and Beauty is sympathetic:
      say "'I understand,' she says slowly. 'Yes, I do. I'll do it.' She takes a deep breath and looks at you. 'We will be king together! and your family will be royalty!'";
      end the story finally;
   otherwise:
      if Beauty is sympathetic, say "'Oh dear!' she says. 'What a dreadful life!' She wrings her hands. 'No wonder you are eager to improve your lot...! But --' Her brow clears, a new thought occurring. 'You needn't marry me, you know! We could arrange it differently! I am certain that my father would give you a large reward, instead, and then I would not be separated from my current boyfriend!'";
      otherwise say "She makes a disgusted face, but she doesn't seem nearly so heart-wrung as you had hoped to make her. Tough audience, these modern princesses."
Definition: Beauty is sympathetic if the pity of Beauty is greater than 4.
To say attitude:
   if Beauty is sympathetic, say "distressed on your behalf";
   otherwise say "a little confused".
Saved location is a room that varies. Locker is a container. Wardrobe is a container.
To strip the player:
   now every thing carried by the player is in the locker;
   now every thing worn by the player is in the wardrobe;
   now saved location is location.
To restore the player:
   now every thing carried by the player is in the location;
   now every thing in the locker is carried by the player;
   now every thing in the wardrobe is worn by the player;
   move the player to saved location.
Part 3 - The Other Secret

This time, we're waiting for the princess either to understand or not understand -- so we don't want to rerun the scene once it has happened successfully.

Beauty has a number called clue count.
Dramatic revelation is a recurring scene. Dramatic revelation begins when attempting confidence.
To decide whether attempting confidence:
   if dramatic revelation ended in success, no;
   if secret identity is current, yes;
   no.
When dramatic revelation begins:
   strip the player;
   say "You reminisce about one of the many stops on the way here: you had a long journey from your homeland, and it wasn't made any easier by your poverty, the inability to afford decent inns or plentiful food or any kind of ride along the way.";
   move the player to the Forest Clearing;
   move the pack to the player; now the player wears the trousers; now the player wears the shirt.
Forest Clearing is a room. "It's mid-autumn in your memory, the pool clear and cold, gold and red leaves floating on the surface."
The pool is scenery in the Clearing. Understand "reflection" or "surface" or "water" as the pool. "The pool is cold but beautiful, and the stopping place a welcome rest." The leaves are scenery in the clearing. The description is "Bright gold and orange and red: it's been a sharply chilly autumn, as you have reason to know in detail."
The trousers and the shirt are wearable things. The pack is a container. The pack contains ale, food, and skirt. A distraction is a kind of thing. The ale, the food, the pair of trousers, and the shirt are distractions. The description of a distraction is usually "[The item described] is not the point of this story." The shirt and the trousers are wearable. The description of the trousers is "Borrowed from your oldest brother, who is only a year younger than you. They are too long for your legs and overly snug at the hip, but no one around here pays much attention to fashion, and you're getting away with it, more or less." After examining the trousers, increment the clue count of Beauty.
Instead of examining the player during dramatic revelation:
   increment the clue count of Beauty;
   say "You cannot see yourself without reflection, but you can feel your hair loose and unbound over your shoulders."
Rule for printing the name of the skirt while taking inventory: say "one skirt you have not been able to bring yourself to part with". The description of the skirt is "Made for you by your mother, and it looks quite pretty on you. If your primary plan does not work, you may be forced to wear it again, and hope to catch a male eye... but with luck that will not be necessary." After taking inventory: increment clue count of Beauty.
Swimming is an action applying to nothing. Understand "swim" or "dive" as swimming.
Instead of swimming in the presence of the pool:
   increment clue count of Beauty;
   say "You consider going for a swim, but don't dare be caught unclad and unarmed, not here. There are too many men around, and any of them discovering you here would surely take advantage."
Instead of searching or drinking the pool:
   increment clue count of Beauty;
   say "You lean over the pool and look carefully at your reflection, your hair loose and unbound, falling around your face in waves. (That should surely give it away!)"
Instead of waiting during dramatic revelation: say "You wait for the penny to drop, for her to understand."
Dramatic revelation ends in failure when waiting or the time since dramatic revelation began is five minutes. When dramatic revelation ends in failure:
   now secret identity is past;
   restore the player;
   now Beauty is passive;
   say "She wrinkles her nose. 'I don't understand!' she says. 'What are you trying to tell me?'
   You could weep for womankind. But you don't quite dare spell it out in so many words, not when someone might come up the stair and overhear a chance revelation."
Dramatic revelation ends in success when Beauty is clever. When dramatic revelation ends in success:
   restore the player;
   now Beauty is passive;
   say "'You're -- a girl? Like me?'
'Not much like you,' you say, glancing over her petite frame and pert nose. 'But female, at any rate.'"
Definition: Beauty is clever if the clue count of Beauty is greater than 2.

And now, since we don't really want to return to the rest of the 'marriage proposal' scene once she has learned our ID:

Marriage proposal ends in distraction when Dramatic Revelation ends in success.
Compromise proposal is a scene. Compromise proposal begins when Dramatic Revelation ends in success. When Compromise Proposal begins: now Beauty is passive.
Instead of asking an awake beauty about a topic listed in the Table of Secondary Conversation when Compromise Proposal is happening:
   now Beauty is passive;
   say "[reply entry][paragraph break]";
   blank out the whole row.
Every turn during Compromise Proposal:
   if Beauty is active and Beauty is visible:
      repeat through Table of Secondary Conversation:
         say "[quip entry][paragraph break]";
         if the number of filled rows in the Table of Secondary Conversation is greater than 1, blank out the whole row;
         make no decision.
Every turn: now Beauty is active.

Notice that we moved the re-activation rule down here so that the Compromise Proposal rule would fire first. There are other more complicated ways of handling order of every turn rules than by relying on text sequence alone; but we will save that for a later chapter. For now it is sufficient to depend on the order in which the rules are declared.

Table of Secondary Conversation
topicreplyquip
"girls/me/women/female/truth/identity""'Marrying me would be no interference,' you go on. 'You could carry on whatever romances you wished, without your father noticing.' (Probably. You'll let the pragmatic details of this work themselves out later, and hope that any children she has will look vaguely like you.)""'Girls can't rescue people.'

'Wrong,' you say, feeling a little annoyed. 'But you see why marrying me wouldn't be an interference. You could carry on whatever romances you wished, without your father even noticing.'"
"king/man""'If you're thinking that a woman can't be the prince -- and then king -- well, there was a woman Pope, once.'

She looks awed."
"The crease in her forehead does not go away. 'But if everyone thinks you are a man... later you would be king!'

Before she can go on, you say, 'There was a woman Pope, once. Compared to that, a woman king is nothing.'"
"decision/proposal/marriage/choice""'So,' you say. 'What do you think?'

[final decision]"
"Her pretty nose twitches again, which you are coming to recognize as a sign of hard mental labor. 'I think I see,' she says. [final decision]"
To say final decision:
   if Beauty is sympathetic:
      say "She considers the matter silently for some minutes, then says: 'I will do it. My beloved William will be so glad!' You imagine that William's feelings on the matter will be a tad more complex than that, but do not bother quashing her exuberance...";
      end the story finally;
   otherwise:
      say "'I still don't quite understand why you would want this so badly as to go to all that trouble,' she admits uneasily. Evidently you have not explained enough to her about the poverty of your home life."
Test me with "x beauty / pour water on beauty / ask beauty about sleep / tell beauty about poverty / smell pigs / x mother / x letter / kiss mother / ask beauty about marriage / tell beauty about identity / x me / look in water / i / z / ask beauty about marriage".
Test me with "x beauty / pour water on beauty / ask beauty about sleep / tell beauty about poverty / smell pigs / x mother / x letter / kiss mother / ask beauty about marriage / tell beauty about identity / x me / look in water / i / z / ask beauty about marriage".
Spinning Tower
A remote corner of the old castle, reserved for spinning and weaving tasks.

Sleeping Beauty lies here, oblivious to your presence.

>(Testing.)

>[1] x beauty
She is even more magnificent than the rumors suggested.

>[2] pour water on beauty
You pour out the jug of water on Sleeping Beauty.

Sleeping Beauty wakes, shuddering. "Agh! I had a terrible dream about drowning and then-- Hey!"

Throughout the palace you can hear the other sounds of stirring and movement as the spell of centuries is broken.

>[3] ask beauty about sleep
"Sleep well?" you ask solicitously.

"Not really," she replies, edging away from you. So much for that angle.

>[4] tell beauty about poverty
"I wish you'd give some thought to marrying me. You see," you say, your jaw tensing. "I wouldn't ask if it weren't for my family circumstances..."

Woodcutter's Shack
Your family lives in a shack in the forest. There are holes in the roof, and in the winter the snow comes in -- rain, too, for that matter. The walls aren't very well-boarded, and don't keep out the wind, and even though you live in the middle of dense woods, you can never gather enough fuel to keep this place fully heated. And then there's the stench. Pigs wander freely in and out, and your three youngest brothers play on the floor.

On the untidy bed are Mother and a folded letter.

>[5] smell pigs
They smell the way animals do, when they live among their own refuse.

>[6] x mother
She is wasting away of a slow disease, her skin stretched tautly over bone. She hasn't been the same since your father left.

>[7] x letter
Many times read over and creased, the letter explains how your father has gone away with a wealthy countess and will not return. Your mother was not able to read it herself, of course, and had to have it explained to her by the parish priest. Now she keeps it by the bed and crumples it in her fits of delirium.

>[8] kiss mother
You place a gentle kiss on her feverish brow. She looks up at you, her oldest -- yes, never mind that bit -- with a look of sincere trust and admiration.

"You'll find a way through this for us," she says, squeezing your fingers. "I know you will."

...you finish describing the miserable circumstances of your home life, and allow your attention to return to the present.

Spinning Tower
A remote corner of the old castle, reserved for spinning and weaving tasks.

Sleeping Beauty stands beside you, looking distressed on your behalf.

"Oh dear!" she says. "What a dreadful life!" She wrings her hands. "No wonder you are eager to improve your lot...! But --" Her brow clears, a new thought occurring. "You needn't marry me, you know! We could arrange it differently! I am certain that my father would give you a large reward, instead, and then I would not be separated from my current boyfriend!"

>[9] ask beauty about marriage
"So," you say. "This is a little weird since we just met, but, um. Would you like to get married?"

She looks at you nervously. "Do I have to? I mean, I'd rather not."

Well, this could get prickly fast.

>[10] tell beauty about identity
You clear your throat and allow your voice to stray upward, into its natural register and out of this husky false tenor you've been affecting. "There's, er, something you should know about my secret," you say...

You reminisce about one of the many stops on the way here: you had a long journey from your homeland, and it wasn't made any easier by your poverty, the inability to afford decent inns or plentiful food or any kind of ride along the way.

Forest Clearing
It's mid-autumn in your memory, the pool clear and cold, gold and red leaves floating on the surface.

>[11] x me
You cannot see yourself without reflection, but you can feel your hair loose and unbound over your shoulders.

>[12] look in water
You lean over the pool and look carefully at your reflection, your hair loose and unbound, falling around your face in waves. (That should surely give it away!)

>[13] i
You are carrying:
a shirt (being worn)
a trousers (being worn)
a pack
ale
food
one skirt you have not been able to bring yourself to part with

Spinning Tower
A remote corner of the old castle, reserved for spinning and weaving tasks.

Sleeping Beauty stands beside you, looking distressed on your behalf.

"You're -- a girl? Like me?"

"Not much like you," you say, glancing over her petite frame and pert nose. "But female, at any rate."

>[14] z
Time passes.

"Girls can't rescue people."

"Wrong," you say, feeling a little annoyed. "But you see why marrying me wouldn't be an interference. You could carry on whatever romances you wished, without your father even noticing."

>[15] ask beauty about marriage
"So," you say. "What do you think?"

She considers the matter silently for some minutes, then says: "I will do it. My beloved William will be so glad!" You imagine that William's feelings on the matter will be a tad more complex than that, but do not bother quashing her exuberance...




*** The End ***