"Camp Bethel"
Camp Bethel Kitchen is a room.
One use for text alternatives is to change the description of a room after first visiting. We've already seen, in the example "Slightly Wrong", how to do this with "[if visited] ... [otherwise] ... [end if]". But since the first description is printed once and the second description on all subsequent occasions, we could equally well write
The description of Camp Kitchen is "[one of]You've never been into the kitchen before, though you've spent many an hour in the dining lodge. The place is larger than you would have expected, and it has none of the fake rustic touches of the rest of the camp[or]A tidy, efficient industrial kitchen, without any of the kitsch rusticity found elsewhere[stopping]."
We might also want to liven up the behavior of people and animals, who are probably not doing the exact same thing every time we glance in their direction. There are more complex techniques for modeling the behavior of characters, as we will see in the chapters on Advanced Actions and Activities; but if we just want some textual variety, we might write something like:
Jeremy is a man in the Camp Bethel Kitchen. "Jeremy stands at his station, [one of]peeling white onions[or]briskly dicing onions[or]chopping celery[or]peeling carrots[or]tying fresh herbs together with string[or]putting all the vegetables into a large stock pot[or]watching over his boiling vegetable stock[cycling]."
And since (textual variation or not) we do want the player to be able to see all these objects:
Jeremy carries white onions, celery, carrots, and herbs. Jeremy's station is scenery in the kitchen. It is a supporter.
Jeremy is following a sequence of actions to do an implied task (still somewhat robotically, but it will do for now). Animals might be a bit more capricious, though:
Fluffy is an animal in the Camp Bethel Kitchen. "[one of]Fluffy is chasing its tail[or]Fluffy is staring out the window[or]Fluffy is rubbing itself against your leg[purely at random]."
A housefly is an animal in the Camp Bethel Kitchen. "A large housefly [one of]lands on a countertop[or]flies around noisily[or]circles Jeremy's chef hat[at random]."
The housefly's description is merely "at random" rather than "purely at random" because we want to show it doing a different thing each turn, whereas Fluffy could plausibly stare out the window for five turns in a row.
There are more complex ways to change and override the initial descriptions of people and things; if text alternatives do not get us far enough, we can turn to the "rule for writing a paragraph about," documented in the Activities chapter.
Another frequent use of text alternatives is to give characters a bit of variety in things they're likely to say many times in the course of a game:
Instead of telling Jeremy about something:
say "Jeremy looks [one of]surprised[or]intrigued[or]nonplussed[at random]. '[one of]You don't say[or]That's very interesting[or]Do go on[or]I wish I'd known that sooner[at random]!'".
Or, with somewhat more complexity:
Instead of asking Jeremy about something:
say "'[one of]Sorry,[or]I'm afraid[or]Hm,[at random] [one of]I don't know much about that[or]you've got me there[or]I haven't the faintest[at random],' Jeremy [one of]drawls[or]replies[or]comments[or]exclaims[at random]";
say "[one of][or] huskily[or] throatily[or] silkily[or] in a deep manly voice[as decreasingly likely outcomes]."
Notice that, in that last line, our first option is entirely blank. If we put nothing as an element of the text alternatives list, this means that printing nothing at all is a viable alternative. In fact, we've made this the most common probability out of the decreasingly likely outcomes, so that five times in fifteen, or a third of the time the text is run, there will be no modifier printed at all.
Test me with "look / g / g / g / ask Jeremy about his feelings for me / ask jeremy about his amnesia / tell Jeremy about my unborn child".
As this example (alas) reveals, text alternatives will not go all the way toward making our characters into compelling conversationalists; we will have to wait until we know more about Actions. But at least we have abolished the default responses, and given Jeremy a touch of personality, however witless.
"Lean and Hungry"
Substance is a kind of value. The substances are silver, gold, and lead. Everything has a substance. A thing is usually lead.
Definition: a thing is valuable if it is not lead.
The Limestone Cave is a room. "Not very big, and it doesn't go back far, but you'd hoped to find some shelter here. Outside it is raining exceptionally hard."
The sinister gentleman is a man in the Cave. "Leaning against the wall is a sinister gentleman in a threadbare waistcoat." The description is "He looks as though he might once have been quite well off."
After examining the gentleman:
say "[The noun] smiles back at you in an unnerving fashion."
Now we make the rule that governs the gentleman's behavior. Here we're going to invoke the rules that allow characters besides the player to do actions. More about this can be found in the Advanced Actions chapter:
Every turn:
if the sinister gentleman can touch something valuable (called the treasure) which is not carried by a person:
try the gentleman taking the treasure.
Report the gentleman taking something:
say "[The gentleman] slyly acquires [the noun] and tucks it into his pocket." instead.
That "not carried by a person" prevents the gentleman from stealing from the player (or, less plausibly, from himself). If we did want him to pick pockets, we could just have said "which is not carried by the gentleman".
The player is carrying a coin, a bust of Abraham Lincoln, a bottle of sherry, a small pistol, and a wad of Confederate cash. The coin is gold. The pistol is silver.
A locket is in the Cave. The locket is gold. "A broken gold locket lies on the ground, a token of your late Mama."
Test me with "get locket / i / drop locket / z / drop cash / z / x gentleman / drop all / z / z / look".
Suppose we want a game of foosball in which our opponent acts every turn, but does different things depending on where the ball currently lies. We can put together a sequence of every-turn rules to account for this, as follows:
"Text Foosball"
Use scoring.
The Lounge is a room. "The Lounge is appointed with everything necessary to rest and relaxation: a vending machine, a potted palm, a stack of Entertainment Weekly issues from 1993, and -- your pride and joy -- a foosball game."
The foosball game is scenery in the Lounge. Understand "table" or "football" or "foozball" or "fussball" or "soccer" as the foosball game. The game is a supporter. On the game is a small white ball. The ball can be still, approaching, receding, or unreachable. The description of the ball is "Currently [small white ball condition]."
After printing the name of the small white ball, say " ([small white ball condition])".
When play begins:
now left hand status line is "You: [score]";
now right hand status line is "Joey: [Joey's score]".
Some tiny men on sticks are part of the game. Understand "handles" as the tiny men. The description is "Okay, a couple of the tiny men have had their feet broken off, and the table surface itself is a bit warped, and the ball resembles a quail egg in respect of shape and color. This makes for a game of unusual randomness, but skill is overrated."
Instead of attacking or pulling or pushing the game when the ball is unreachable:
say "You give the table a good shove, and the ball moves ever-so-slightly.";
now the ball is still.
Instead of taking the white ball:
say "You'd forfeit the game if you did that."
Instead of turning the tiny men when the ball is unreachable:
say "The ball has somehow gotten to a mystical point on the table where it cannot be reached, no matter what. Close inspection reveals that this point has been marked in chalk with a tiny X. Not that that does any good."
Instead of turning the tiny men when the ball is approaching:
if a random chance of 2 in 3 succeeds:
if a random chance of 1 in 2 succeeds, now the ball is receding;
otherwise now the ball is still;
say "[if the ball is still]Thunk. [otherwise]Thwack! [end if]You keep the ball from reaching its goal! Now it is [small white ball condition].";
otherwise:
let Joey score.
To let Joey score:
now the ball is still;
now Joey's score is Joey's score + 1;
say "The ball rolls neatly into your goal, despite your efforts. ";
if Joey's score < score, say "You put the ball back in the center with a snap. No reason to worry yet; you're still ahead. Joey looks determined, though.";
otherwise say "After allowing a moment or two for Joey's gloating to pass, you replace it at the center."
Instead of turning the tiny men when a random chance of 1 in 13 succeeds:
if the ball is unreachable, continue the action;
now the ball is unreachable;
say "You hit the ball off-center and it rolls sluggishly into a little dip in the surface of the foosball table. ";
if Joey's score > 7, say "'You did that on purpose!' Joey exclaims indignantly.";
otherwise say "You and Joey exchange glances. This is never good."
Instead of turning the tiny men:
say "You madly rotate the tiny men on sticks! ";
if a random chance of 1 in 2 succeeds:
say "Hoorah! You hit the ball!";
now the ball is receding;
otherwise:
say "Somehow you fail to bring your monopodal player into contact with the ball."
Joey is a man in the Lounge. "Joey is hunkered over the foosball handles on his side of the table." Joey can be active or inactive.
Joey's score is a number that varies.
Every turn: now Joey is active.
Every turn when the ball is approaching and Joey is active:
let total be Joey's score + score;
if total > 9, make no decision;
now Joey is inactive;
let Joey score;
rule succeeds.
Every turn when the ball is unreachable and Joey is active:
let total be Joey's score + score;
if total > 9, make no decision;
now Joey is inactive;
say "Joey glares angrily at the stuck ball."
Every turn when the ball is receding and Joey is active:
let total be Joey's score + score;
if total > 9, make no decision;
if the ball is unreachable, make no decision;
now Joey is inactive;
if a random chance of 1 in 2 succeeds:
if a random chance of 1 in 2 succeeds, now the ball is still;
otherwise now the ball is approaching;
say "Joey connects with your shot. Now the ball is [small white ball condition]!";
otherwise:
now the ball is still;
say "Joey tries to block, but misses! Back it goes in the center, where it is [small white ball condition].";
increment the score.
Every turn when the ball is still and Joey is active:
let total be Joey's score + score;
if total > 9, make no decision;
if the ball is unreachable, make no decision;
now Joey is inactive;
if a random chance of 1 in 2 succeeds:
now the ball is approaching;
say "Joey hits the ball solidly down towards your goal. Now it is [small white ball condition].";
otherwise:
say "Joey fails to hit the ball in your direction. It remains [small white ball condition]."
Every turn:
let total be Joey's score + score;
if total > 9:
if Joey's score > score, end the story saying "Rats! Joey wins!";
if Joey's score < score, end the story finally saying "Victory is yours!";
if Joey's score is score, end the story saying "A perfect tie."