I modded “Experiment 1” to produce prosier prose than what he had, and to let your mind drift a little (in Aaron’s code I think the theme, the last thing everything reminds you of, remains the same unless you wait; in mine it moves one step by the symbolizing relation every turn). What I wound up with produces something that looks to me like a mildly acceptable stream of consciousness on individual turns, but turn by turn it gets very repetitive. One way of dealing with that might be by a rotating table of quips for each theme; I’m not sure how far that would get you toward something that wasn’t obviously generated by procedurally stringing together a bunch of quips. One thing that would definitely help is better writing (though to do that I’d probably have to write my own story).
Anyway, for the curious, it’s below the rant tag. Something like half or maybe more of the code is Aaron’s. Comments not beginning “MW:” are his. If you want to paste this into your IDE, hit the “quote” button and copy out the relevant parts; that should preserve the tab stops. (Thanks to whoever came up with that trick!)
Oh, and I’m still running 5Z; there’s a hack in there to work around a bug that apparently has been fixed in later versions.
[rant][code]“Aaron Reed’s Experiment 1” by Matt Weiner
Use serial comma.
The story description is “Giving objects in a story world symbolic weight has often been done by hand, but rarely procedurally. Here’s one method for doing so.”.
When play begins:
say “Lost in the cold, you can only hope for rescue.”
Include Plurality by Emily Short.
The Wilderness is a room. “The sky is full of stars you could never see in the city.”
Instead of doing something other than looking, taking inventory, examining, and waiting:
say “All you can do is look through your belongings and hope for rescue.”
Instead of taking the compass:
say “It’s broken. It won’t do you any good.”
[MW: The next rule is a hack. For some reason – apparently a 5Z bug – the previous rule triggered when taking inventory. Fortunately I’ve stopped you from changing your inventory, so it doesn’t much matter now.]
Instead of taking inventory:
say "You are carrying ";
list the contents of the player, as a sentence, including contents, giving inventory information;
[Let’s imagine a basic story about a young astronomer alone on a backpacking trip. He’s engaged to be married, but is worried about how this will affect his career. He’s also starting to worry that he may be lost, and strange hallucinations make him wonder if he is losing his mind. How might we encode these thematic elements into our story?]
A theme is a kind of thing. being lost, the wild, fear, change, cold, astronomy, what’s really important, career, marriage, and senility are themes.
[MW: Each theme produces different text, something briefer if it’s being used as the transition to another theme, something longer if it’s the last thing that gets mentioned.]
A theme has some text called transition. A theme has some text called resolution.
Being lost has transition "Will you ever get home? ". Being lost has resolution "You wonder whether anyone will ever find you. "
The wild has transition "You’re far from civilization. ".
The wild has resolution "The wilderness is harsh and unforgiving, but you couldn’t live without adventure. ".
Fear has transition "You could die out here. ". Fear has resolution "You start to tremble, not from the cold but from sheer terror that soon you may be dead. ".
Change has transition "And your life is changing. ". Change has resolution "Things will be different when you get back. You’re not sure how, but they will. ".
Cold has transition "How cold it is! ". Cold has resolution "The wind is cutting through your flimsy jacket. You wonder whether you’ll ever be warm again. ".
Astronomy has transition "The stars burn down from the sky, their secrets locked away. ". Astronomy has resolution "You look up at the stars again. Will you ever be able to decipher their secrets? ".
What’s really important has transition "Have you been devoting your life to the right things? ". What’s really important has resolution "When you’re faced with death, you start wonder whether you’ve really been devoting yourself to what’s important. But what exactly is that? ".
Career has transition "You’ve been spending so much time at the observatory. ". Career has resolution "You’ll need to put in some late nights at the observatory when you return – if you return. Your research is at a critical stage. ".
Marriage has transition "Elizabeth – will you ever see her again? ". Marriage has resolution "Soon you’ll be in a new home, married to Elizabeth, always with her. If you survive. How will she cope if you don’t? ".
Senility has transition "You’ve been seeing some strange things here. ". Senility has resolution "You’re not sure whether what you’ve been seeing is real anymore. Is your brain beginning to shut down? ".
[The various things in our story world should connect to these abstract ideas.]
Symbolizing relates one theme (called the metaphor) to one thing. The verb to symbolize (he symbolizes, they symbolize, he symbolized, it is symbolized, he is symbolizing) implies the reversed symbolizing relation.
The player holds a water bottle. The description of the water bottle is “Precious water, the only thing that can keep you alive in the wilderness.” The bottle symbolizes the wild. The player wears a pendant. The description of the pendant is “Elizabeth’s picture; you like to think of it lying next to your heart.” The pendant symbolizes marriage. The stars are a plural-named backdrop. “The stars here are as rich and full as on the mountain peaks.” They are everywhere. They symbolize astronomy. Understand “sky” as the stars. [MW: I typed “x sky” and got “you can’t see any such thing” in a game I was programming myself. Sheesh.] The player wears a jacket. The description of the jacket is “A light jacket, too thin.” The jacket symbolizes cold. A broken compass is here. The initial appearance is “Your broken compass is here.” The description is “Your compass broke and you think you’ve lost the trail.” It symbolizes being lost.
The description of the player is “You’re an astronomer, and right now, you’re lost, cold and worrying that you might be going crazy.”
[What’s interesting, though, is how the themes relate to each other.]
Suggesting relates various themes to each other. The verb to suggest (he suggests, they suggest, he suggested, it is suggested, he is suggesting) implies the suggesting relation.
Being lost suggests fear and the wild. The wild suggests what’s really important and change. Fear suggests change and senility. Change suggests what’s really important and senility. Cold suggests the wild and astronomy. Astronomy suggests career and what’s really important. What’s really important suggests marriage and change. Senility suggests fear. Marriage suggests change.
[Now, we can trace a path of connection between any object in the game world and any theme. Let’s say that, at any point in our story, one theme is dominant.]
The dominant metaphor is a theme that varies.
[Let’s find the connection between any object acted upon and the dominant metaphor.]
Instead of examining:
carry out the finding meaning in activity with the noun.
Finding meaning in something is an activity.
[MW: I’ve changed Aaron’s loop, because the intermediate steps of the chain are different from the first step. Actually if you’re finding meaning in something that symbolized the current theme, it should probably go to its resolution rather than its transition, which is not what happens now.]
For finding meaning in something (called the token):
say the description of the token;
say " ";
let current idea be the metaphor of the token;
if current idea is not a theme:
now the current idea is a random theme;
say the transition of the current idea;
while current idea is not the dominant metaphor:
let the next idea be the next step via the suggesting relation from current idea to the dominant metaphor;
if the next idea is not a theme:
otherwise if the next idea is not the dominant metaphor:
say the transition of the next idea;
now current idea is next idea;
say the resolution of the next idea;
now current idea is next idea;
say “[line break]”.
[MW: I wanted to have the PC’s mind wander from theme to theme as he thought; printing the same resolution every turn would be boring.]
Advancing is an action applying to nothing.
let the next metaphor be a random theme suggested by the dominant metaphor;
if the next metaphor is not nothing:
now the dominant metaphor is the next metaphor.
[To test this, let’s create a method for setting and revealing the dominant metaphor.]
When play begins: now the left hand status line is “[the dominant metaphor]”.
Carry out waiting: now the dominant metaphor is a random theme.
[Now we have a crude but procedural method of tying any object to any theme, which reveals interesting things about the player character in a way that doesn’t rely on hand-authored text. For instance, examining the stars when the dominant metaphor is “change” finds a path between through “what’s really important,” which reveals that both astronomy and change are important to our protagonist. ]
if the turn count is greater than 5:
say “You hear voices coming from the trail above you, and then you see flashlights and hear someone calling your name. Forgetting everything else, you shout in response, and then your rescuers burst through the underbrush.”;
end the game saying “Saved!”.
[MW: originally I was totes going to have him freeze to death. Also, as you can probably tell, I know nothing about backpacking.]