Cloak of Darkness, by Roger Firth, is a short work which demonstrates the common capabilities of interactive fiction authoring systems. Below is a transcript from a Quoth performance in which Cloak of Darkness is created.

      notes on the Quoth transcript format

      A Quoth transcript departs from the traditional "Z-machine" format in several ways. Most notably, the player is always speaking to a particular item in the virtual space, rather than to the system itself. The "prompt" presented to the player is a set of quotation marks. As the session proceeds, the transcript reads like an excerpt from a book, or a screenplay. The player's utterances are marked by leading hyphens, for easier reference.

      The system employs several interactive effects which are somewhat difficult to convey in a static transcript. Sometimes the player will type something which makes more sense in the narrative as an action, rather than an utterance. When this happens, the system automatically erases the original words typed by the player and rephrases them as an action in the third person. For example, a player might type:
-	"Speak to the table."
but the system might instead display:
-	You turn to speak to the table.
      In the transcript below, both the player's original utterances and the system's rephrasings are shown. Normally, during play, a blank line separates every paragraph. In the transcript below, rephrased text follows the corresponding original utterance on the very next line. For example:
-	"Speak to the table."
	You turn to speak to the table.
      The player can issue a few out-of-band commands to the system while typing an utterance, by typing control characters. These are indicated in the transcript with the caret character. For example, pressing the control key and the "t" key at the same time (also known as "control-t") is indicated as "^t".

      Finally, note that the system provides a great deal of auto-completion assistance to the player; the player doesn't actually have to type out all the utterances one sees in a transcript. When the player types control-d, the system provides a list of words with which the player may complete the current utterance. When the player types the "TAB" character, the system completes the current utterance as far as it can without ambiguity.

      For example, if the item with which the player is current speaking understands "Jump in the lake." (and no other phrase starting with "j"), and the player types a "j" followed by TAB, the system will automatically supply "Jump in the lake." for the player. The system also provides various bits of punctuation automatically, such as quotation marks and periods.

      For more details on the operation of the system, and my motivations for implementing it, please read my introduction to Quoth. You can also watch a short movie of the system in action (in a completely different scenario, which uses sound). It features examples of the auto-completion features mentioned above.

      I would very much appreciate any feedback!


      Craig Latta

      27 February 2004
      26 September 2005
      9 May 2006

	Time passes; the work listens intently.

-	Eventually you say, "You're called 'Cloak of Darkness'. Your
maxiumum score is two. Your subtitle is 'a basic IF demo'. When play
begins: say 'Hurrying through the rainswept November night, you're
glad to see the bright lights of the Opera House. It's surprising that
there aren't more people about but, hey, what do you expect in a cheap
demo game...?'."

	"Okay," replies the work.

-	"Make and enter a room called 'the Foyer'."

	"Okay," says the Foyer.

-	"Make and enter a room to the west called 'the Cloakroom'."

	"Okay," says the Cloakroom.

-	"Make an item called a 'hook'."

	"Hi there," says the hook.

-	"You are unmovable. You can support other things."

	"Okay," replies the hook.

-	"Your description is this: 'It's just a small brass hook,';
are you supporting something? If so: add 'with'; list what you're
holding; add 'hanging on it'. If not: add 'screwed to the wall'."

	"Okay," replies the hook.

-	"Look at the hook."
	You look at the hook.

	It's just a small brass hook screwed to the wall.

-	"Make an item called a 'cloak'."

	"Hi there," replies the cloak.

-	"You are also known as: 'velvet', 'dark', 'black', or
'satin'. You are wearable."

	"Okay," replies the cloak.

-	"You have an aspect called 'has been hung'. Your 'has been
hung' aspect can be: true or false. Your 'has been hung' aspect is:

	"Okay," replies the cloak.

-       "Your description is this: 'A handsome cloak, of velvet
trimmed with satin, and slightly spattered with raindrops. Its
blackness is so deep that it almost seems to suck light from the

        "Okay," replies the cloak.

-	"When the player hangs you on the hook: is your 'has been
hung' aspect true? If not: set your 'has been hung' aspect to true;
increment the score."

        "Okay," replies the cloak.

-	"When the player drops you: are you in this room? If not: say
'This isn't the best place to leave a smart cloak lying around.';
cancel the player's action."

        "Okay," replies the cloak.

-	"Put the cloak on the hook."
	You put the cloak on the hook.

	Time passes; the cloak listens intently.

-	"Look at the hook."
	You look at the hook.

	It's just a simple brass hook, with a cloak hanging on it.

-	"Speak to the room."
	You turn to speak to the room.

	"Hi there," says the Cloakroom.

-	"Your description is this: 'The walls of this small room were
clearly once lined with hooks, though now only one remains. The exit
is a door to the east.'."

	"Okay," replies the Cloakroom.

-	"Put on the cloak."
	You take the cloak from the hook and put it on.

	Time passes; the Cloakroom listens intently.

-	"Make and enter a room to the south of the Foyer called 'the

	"Hi there," says the Bar.

-	"Make an item called a 'message'."

	"Hi there," says the message.

-	"You are also known as: 'floor' or 'sawdust'."

	"Okay," replies the message.

-	"You have an aspect called 'neatness'. Your neatness can be:
neat, scuffed, or trampled. Your neatness is: neat."

	"Okay," replies the message.

-	"Your description is this: what is your neatness? If trampled:
'The message has been carelessly trampled, making it difficult to
read. You can just distinguish the words... "You have lost."'."
Otherwise: increment the score; 'The message, neatly marked in the
sawdust, reads "You have won."'. End the game."

	"Okay," replies the message.

-	"Speak to the room."
	You turn to speak to the room.

	"Hi there," says the Bar.

-	"Your description is this: 'The bar, much rougher than you'd
have guessed after the opulence of the foyer to the north, is
completely empty. There seems to be some sort of message scrawled in
the sawdust on the floor.'."

	"Okay," replies the Bar.

-	"When the player does anything here in the dark: is the player
leaving? If so: increment the message's neatness; say 'In the dark?
You could easily disturb something.'. When the player attempts to move
here in the dark: did the player leave the room? If not: the message
is trampled; say 'Blundering around in the dark isn't a good idea!'."

	"Okay," replies the Bar.

-	"Speak to the cloak."
	You turn to speak to the cloak.

	"Hi there," says the cloak.

-	"When you enter this room: this room becomes dark."

	The room becomes dark.

	"Okay," replies the cloak.

-	"When you leave this room: this room becomes lit."

	"Okay," replies the cloak.

-	"Go to the Foyer."
	You go the Foyer.

	"Hi there," says the Foyer.

-	"Your description is this: 'You are standing in a spacious
hall, splendidly decorated in red and gold, with glittering
chandeliers overhead. The entrance from the street is to the north,
and there are doorways south and west.'."

	"Okay," replies the Foyer.

-	"This is the initial player-character state."

	"Okay," replies the work.

      To recap, here's what the author did:
  • set the work's attributes
  • make and enter the Foyer
  • make and enter the Cloakroom
  • make the hook
  • set the hook's attributes
  • describe the hook (and check it while there's nothing hung)
  • make the cloak
  • set the cloak's synonyms and wearable attribute
  • describe the cloak
  • put the cloak on the hook (and recheck the description of the hook)
  • set what happens when the player hangs the cloak on the hook
  • set what happens when the player drops the hook
  • describe the Cloakroom
  • put on the cloak
  • make and enter the Bar
  • make the message
  • set the message's synonyms
  • set the message's neatness attribute
  • set what happens when the message is read
  • describe the Bar
  • set what happens when the player acts in the dark
  • associate the darkness of the Bar with the cloak's presence
  • go back to the Foyer and describe it
  • set the initial PC state