Cheese-makers
As we have seen, there are a number of different ways of controlling conversation in interactive fiction, and the best choice of way will depend quite a lot on what kind of work we're writing.
One common model is to replace Inform's default ASK and TELL commands with a TALK TO command. This gives the player less control than he would otherwise have: instead of asking a character about any topic under the sun, he's restricted to seeing (or not seeing) a single sequence of text that the author has written in advance. On the other hand, such a system is harder for the player to break (since he can never ask about a topic that the author hasn't implemented), and easier for the author to tie into plot developments. If we give TALK TO different output at each scene, we get conversation that is always tied to the current state of the plot.
This is a design approach that works best in a game with a large number of short, focused scenes. For other kinds of conversation system design, compare the other examples listed in the Recipe Book.
Here, using some techniques that will be discussed in the chapter on Understanding, we get rid of Inform's default handling of ASK and TELL, and create our own TALK TO action instead:
Now, suppose we have a situation -- say, a stage play -- in which it is appropriate to talk to different characters at different times. During the prologue of the play, no one else is on-stage, and the player is to address the audience directly:
But there might follow a scene in which the player shouldn't talk at all:
output |
"The chorus now begins its entry, accompanying with anapestic song its march up the eisodos." |
"The chorus draws nearer, stomping and clomping and swinging their baskets of cheese." |
"You stand aside as the chorus fills the orchestra and dances to and fro." |
"The tune of the aulos-player grows more and more frenzied and then breaks off." |
This last rule is a refinement borrowing from the Activities chapter, which gives characters different appearances in room descriptions depending on when we happen to look; because of the action of the play, we want to show the chorus and audience doing different things during different scenes.
And now a scene in which the player can talk several times to a character (Heracles) but has no useful dialogue with the chorus, the audience, or himself. The prohibition from talking to the audience after the Prologue is already written, but we'll supply some appropriate responses for talking to the player or the chorus during this scene:
output |
"With a fart and a roar, Heracles asks the world at large, and you in particular, where his dinner might be." |
"In epic diction, Heracles invites the dairy-mistresses, whey-matrons, and concubines of curd to supply him a supper from their ample baskets." |
"Heracles and the chorus banter about the proclivities of cheese-wives. The chorus suggest that Heracles, as a son of Zeus, must know something about the appetites of which they speak." |
"Heracles boasts that a man like himself can perform any feat, but only when his belly is full. Coyly, the matrons prance and dance, skip and gambol out of his grasp, singing mockingly about heads of garlic and loaves of sesame-crusted bread." |
"The song of the feta fanciers now turns to pots of honey and new-made wine, borrowing verses from last year's Lenaia winner, 'The Bees'. With a jolt, you realize that you've missed your cue and the chorus are filling in for you." |
"Playing for time, the chorus-leader elaborates a whole banquet: rabbit stew, shanks of lamb, spitted quails, eels from lake Copais. Heracles looks as near swooning as any girl fresh from Brauron." |
"The chorus-leader extends the list of delicacies to include ox-brains, ham-hocks, barley, mullet, carrots, pigeons, lentils, radishes, peas, and apples both wine-dark and golden. The audience shifts on the benches. An expression of gloom settles over the Priest of Dionysus in the front row." |
"Inspired by Euripides['] own Muse, the chorus-leader invents a mock-Alcaean hymn on the merits of chervil. This is clearly his swan-song: if you don't speak at last, the play will come to a halt." |
"Silence descends." |
Test me with "ask audience about me / tell audience about me / audience, hello / audience, jump / talk to me / talk to audience / g / talk to chorus / look / x heracles / talk to me / talk to audience / z / look / talk to heracles / g".
The usual audience looks on: the priests and judges in the front row, and then Athenians, metics, and foreigners.
>(Testing.)
>[1] ask audience about me
(To communicate in The Cheese-makers, TALK TO a character.)
>[2] tell audience about me
(To communicate in The Cheese-makers, TALK TO a character.)
>[3] audience, hello
(To communicate in The Cheese-makers, TALK TO a character.)
>[4] audience, jump
(To communicate in The Cheese-makers, TALK TO a character.)
>[5] talk to me
There will be plenty of occasion for muttered asides later in the play, but for now you must prepare the audience for things to come.
>[6] talk to audience
Drawing breath, you turn to the audience, and offer them a genial, witty, colorful, and of course crude synopsis of what they are about to see; describing all the characters in unmistakable terms and not omitting the most important of them all, your august self.
The chorus now begins its entry, accompanying with anapestic song its march up the eisodos.
>[7] g
You may only direct monologues to the audience when the other actors are off-stage. Otherwise, their characters might have to notice.
The chorus draws nearer, stomping and clomping and swinging their baskets of cheese.
>[8] talk to chorus
Sssh: this moment belongs to the chorus. They've worked so hard on it, after all.
You stand aside as the chorus fills the orchestra and dances to and fro.
>[9] look
Theater of Dionysus
The chorus are dancing and singing their way into position in the orchestra. The audience appear to be pricing their costumes to the nearest obol: woe to the producer who cheats them of their due share of spectacle.
The tune of the aulos-player grows more and more frenzied and then breaks off.
The chorus falls silent, which is the cue: Heracles bursts out of the scene building.
>[10] x heracles
Hard to mistake in his lion skin and boots, and carrying a formidable club.
With a fart and a roar, Heracles asks the world at large, and you in particular, where his dinner might be.
>[11] talk to me
"By the dog, he'll eat me if he gets a chance," you mutter aside.
"What's that you say, my ignoble friend?" demands Heracles, hefting his club. He's not entirely joking: you've left the script just now.
>[12] talk to audience
You may only direct monologues to the audience when the other actors are off-stage. Otherwise, their characters might have to notice.
>[13] z
Time passes.
In epic diction, Heracles invites the dairy-mistresses, whey-matrons, and concubines of curd to supply him a supper from their ample baskets.
>[14] look
Theater of Dionysus
Heracles stands at the center of the orchestra, with members of the chorus ranged on either side.
The audience appear to be reserving their judgement, though they show signs of restiveness at the usual jokes: must there be a Heracles in every play?
Heracles and the chorus banter about the proclivities of cheese-wives. The chorus suggest that Heracles, as a son of Zeus, must know something about the appetites of which they speak.
>[15] talk to heracles
"Dear Heracles, friendly Heracles," you begin, cringing out of the way as he responds with one of his affectionate ox-killing punches to the shoulder.
But Heracles falls still, and looks almost thoughtful, as tell him you know how he may rout the Spartans, woo all twenty-four lactic ladies, and tame his savage gut with a bathtubful of porridge.
"Speak on, little man," he says.
>[16] g
It takes several exchanges for him to wrap his one-inch brain around your ten-inch plan; but in the end he embraces the scheme, the women, and your humble self.
That, of course, is your cue: you're to come back on as Pan thirty verses from now, and it takes time to put on the hooves and the woolly-legged trousers.
*** You exit ***