Examples in Thematic Order

Preface

1
* Example  About the examples
An explanation of the examples in this documentation, and the asterisks attached to them. Click the heading of the example, or the example number, to reveal the text.

WI
11
* Example  Midsummer Day
A few sentences laying out a garden together with some things which might be found in it.

WI


Disenchantment Bay

13
* Example  Disenchantment Bay 1
A running example in this chapter, Disenchantment Bay, involves chartering a boat. This is the first step: creating the cabin.

WI
15
* Example  Disenchantment Bay 2
Disenchantment Bay: creating some of the objects in the cabin's description.

WI
16
* Example  Disenchantment Bay 3
Disenchantment Bay: adding a view of the glacier.

WI
17
* Example  Disenchantment Bay 4
Disenchantment Bay: fleshing out the descriptions of things on the boat.

WI
19
* Example  Disenchantment Bay 5
Disenchantment Bay: adding the door and the deck to our charter boat.

WI
22
* Example  Disenchantment Bay 6
Disenchantment Bay: locking up the charter boat's fishing rods.

WI
24
* Example  Disenchantment Bay 7
Disenchantment Bay: making the radar and instruments switch on and off.

WI
27
** Example  Disenchantment Bay 8
Disenchantment Bay: a pushable chest of ice for the boat.

WI
29
* Example  Disenchantment Bay 9
Disenchantment Bay: enter the charter boat's Captain.

WI
32
* Example  Disenchantment Bay 10
Disenchantment Bay: things for the player and the characters to wear and carry.

WI
33
* Example  Disenchantment Bay 11
Disenchantment Bay: making a holdall of the backpack.

WI
35
**** Example  Disenchantment Bay 12
A final trip to Disenchantment Bay: the scenario turned into a somewhat fuller scene, with various features that have not yet been explained.

WI


Information Only

383
*** Example  Backus-Naur form for rules
The full grammar Inform uses to parse rule definitions, in a standard computer-science notation.

WI
223
*** Example  Formal syntax of sentences
A more formal description of the sentence grammar used by Inform for both assertions and conditions.

WI
243
*** Example  Mathematical view of relations
Some notes on relations from a mathematical point of view, provided only to clarify some technicalities for those who are interested.

WI
244
*** Example  Graph-theory view of relations
Some notes on relations from the point of view of graph theory.

WI
403
* Example  About Inform's regular expression support
Some footnotes on Inform's regular expressions, and how they compare to those of other programming languages.

WI


Varying What Is Written

178
* Example  M. Melmoth's Duel
Three basic ways to inject random or not-so-random variations into text.

WI
169
* Example  Ahem
Writing a phrase, with several variant forms, whose function is to follow a rule several times.

WI
71
* Example  Fifty Ways to Leave Your Larva
Using text substitution to make characters reply differently under the same circumstances.

WI
72
*** Example  Fifty Times Fifty Ways
Writing your own rules for how to carry out substitutions.

WI
428
* Example  Curare
A phrase that chooses and names the least-recently selected item from the collection given, allowing the text to cycle semi-randomly through a group of objects.

WI
294
*** Example  Straw Into Gold
Creating a Rumpelstiltskin character who is always referred to as "dwarf", "guy", "dude", or "man" -- depending on which the player last used -- until the first time the player refers to him as "Rumpelstiltskin".

WI
440
* Example  Odins
Making [is-are] and [it-they] say tokens that will choose appropriately based on the last object mentioned.

WI
60
*** Example  Ballpark
A new "to say" definition which allows the author to say "[a number in round numbers]" and get verbal descriptions like "a couple of" or "a few" as a result.

WI
174
* Example  Numberless
A simple exercise in printing the names of random numbers, comparing the use of "otherwise if...", a switch statement, or a table-based alternative.

WI
330
* Example  Prolegomena
Replacing precise numbers with "some" or other quantifiers when too many objects are clustered together for the player to count at a glance.

WI
444
* Example  Blink
Making a "by atmosphere" token, allowing us to design our own text variations such as "[one of]normal[or]gloomy[or]scary[by atmosphere]".

WI
410
* Example  Blackout
Filtering the names of rooms printed while in darkness.

WI
401
* Example  Rocket Man
Using case changes on any text produced by a "to say..." phrase.

WI


Varying What Is Read

18
** Example  Laura
Some general advice about creating objects with unusual or awkward names, and a discussion of the use of printed names.

WI
41
** Example  Vouvray
Adding synonyms to an entire kind of thing.

WI
10
* Example  First Name Basis
Allowing the player to use different synonyms to refer to something.

WI
312
* Example  Quiz Show
In this example by Mike Tarbert, the player can occasionally be quizzed on random data from a table; the potential answers will only be understood if a question has just been asked.

WI
360
** Example  North by Northwest
Creating additional compass directions between those that already exist (for instance, NNW) -- and dealing with an awkwardness that arises when the player tries to type "north-northwest". The example demonstrates a way around the nine-character limit on parsed words.

WI
314
* Example  Pot of Petunias
Responding sensibly to a pot of petunias falling from the sky.

WI


Using the Player's Input

305
*** Example  Terracottissima Maxima
Flowerpots with textual names that might change during play.

WI
411
** Example  Mr. Burns' Repast
Letting the player guess types for an unidentifiable fish.

WI
367
*** Example  Xot
Storing an invalid command to be repeated as text later in the game.

WI
409
* Example  Igpay Atinlay
A pig Latin filter for the player's commands.

WI


Room Descriptions

321
* Example  Ant-Sensitive Sunglasses
What are activities good for? Controlling output when we want the same action to be able to produce very flexible text depending on the state of the world -- in this case, making highly variable room description and object description text.

WI
344
* Example  Priority Lab
A debugging rule useful for checking the priorities of objects about to be listed.

WI
345
* Example  Low Light
An object that is only visible and manipulable when a bright light fixture is on.

WI
343
** Example  The Eye of the Idol
A systematic way to allow objects in certain places to be described in the room description body text rather than in paragraphs following the room description, and to control whether supporters list their contents or not.

WI
341
* Example  Rip Van Winkle
A simple way to allow objects in certain places to be described in the room description body text rather than in paragraphs following the room description.

WI
348
*** Example  Copper River
Manipulating room descriptions so that only interesting items are mentioned, while objects that are present but not currently useful to the player are ignored.

WI
3
** Example  Slightly Wrong
A room whose description changes slightly after our first visit there.

WI
152
* Example  Infiltration
A room whose description changes depending on the number of times the player has visited.

WI
147
* Example  Night Sky
A room which changes its description depending on whether an object has been examined.

WI


Map

4
* Example  Port Royal 1
A partial implementation of Port Royal, Jamaica, set before the earthquake of 1692 demolished large portions of the city.

WI
7
* Example  Port Royal 2
Another part of Port Royal, with less typical map connections.

WI
9
* Example  Port Royal 3
Division of Port Royal into regions.

WI
101
** Example  A&E
Using regions to block access to an entire area when the player does not carry a pass, regardless of which entrance he uses.

WI
125
* Example  Bee Chambers
A maze with directions between rooms randomized at the start of play.

WI
134
* Example  Zork II
A "Carousel Room", as in Zork II, where moving in any direction from the room leads (at random) to one of the eight rooms nearby.

WI
38
** Example  Prisoner's Dilemma
A button that causes a previously non-existent exit to come into being.

WI
78
* Example  All Roads Lead to Mars
Layout where the player is allowed to wander any direction he likes, and the map will arrange itself in order so that he finds the correct "next" location.

WI
276
* Example  Indirection
Renaming the directions of the compass so that "white" corresponds to north, "red" to east, "yellow" to south, and "black" to west.

WI
39
** Example  The World of Charles S. Roberts
Replacing the ordinary compass bearings with a set of six directions to impose a hexagonal rather than square grid on the landscape.

WI


Position Within Rooms

63
* Example  When?
A door whose description says "...leads east" in one place and "...leads west" in the other.

WI
65
*** Example  Whence?
A kind of door that always automatically describes the direction it opens and what lies on the far side (if that other room has been visited).

WI


Continuous Spaces and The Outdoors

309
* Example  Whither?
A door whose description says where it leads; and which automatically understands references such as "the west door" and "the east door" depending on which direction it leads from the location.

WI
128
* Example  Higher Calling
All doors in the game automatically attempt to open if the player approaches them when they are closed.

WI
150
** Example  Elsie
A door that closes automatically one turn after the player opens it.

WI
23
** Example  Neighborhood Watch
A locked door that can be locked or unlocked without a key from one side, but not from the other.

WI
21
*** Example  Garibaldi 1
Providing a security readout device by which the player can check on the status of all doors in the game.

WI
236
* Example  Wainwright Acts
A technical note about checking the location of door objects when characters other than the player are interacting with them.

WI
43
* Example  Something Narsty
A staircase always open and never openable.

WI
89
* Example  Hayseed
A refinement of our staircase kind which can be climbed.

WI


Doors, Staircases, and Bridges

106
** Example  One Short Plank
A plank bridge which breaks if the player is carrying something when he goes across it. Pushing anything over the bridge is forbidden outright.

WI
6
*** Example  Starry Void
Creating a booth that can be seen from the outside, opened and closed, and entered as a separate room.

WI
199
* Example  Further Reasons Why All Poets Are Liars
The young William Wordsworth, pushing a box about in his room, must struggle to achieve a Romantic point of view.

WI
212
** Example  Carnivale
An alternative to backdrops when we want something to be visible from a distance but only touchable from one room.

WI
213
** Example  Eddystone
Creating new commands involving the standard compass directions.

WI
216
* Example  Waterworld
A backdrop which the player can examine, but cannot interact with in any other way.

WI
80
*** Example  A View of Green Hills
A LOOK [direction] command which allows the player to see descriptions of the nearby landscape.

WI
62
** Example  Tiny Garden
A lawn made up of several rooms, with part of the description written automatically.

WI
352
** Example  Rock Garden
A simple open landscape where the player can see between rooms and will automatically move to touch things in distant rooms.

WI
353
*** Example  Stately Gardens
An open landscape where the player can see landmarks in nearby areas, with somewhat more complex room descriptions than the previous example, and in which we also account for size differences between things seen at a distance.

WI
79
** Example  Hotel Stechelberg
Signposts such as those provided on hiking paths in the Swiss Alps, which show the correct direction and hiking time to all other locations.

WI


Windows

20
** Example  Escape
Window that can be climbed through or looked through.

WI
116
* Example  Vitrine
An electrochromic window that becomes transparent or opaque depending on whether it is currently turned on.

WI
261
** Example  Port Royal 4
A cell window through which the player can see people who were in Port Royal in the current year of game-time.

WI
217
** Example  Dinner is Served
A window between two locations. When the window is open, the player can reach through into the other location; when it isn't, access is barred.

WI
181
*** Example  A Haughty Spirit
Windows overlooking lower spaces which will prevent the player from climbing through if the lower space is too far below.

WI


Lighting

49
** Example  The Undertomb 2
Flickering lantern-light effects added to the Undertomb.

WI
333
*** Example  Zorn of Zorna
Light levels vary depending on the number of candles the player has lit, and this determines whether or not he is able to examine detailed objects successfully.

WI
301
* Example  Hymenaeus
Understanding "flaming torch" and "extinguished torch" to refer to torches when lit and unlit.

WI
25
** Example  Down Below
A light switch which makes the room it is in dark or light.

WI
194
* Example  The Dark Ages Revisited
An electric light kind of device which becomes lit when switched on and dark when switched off.

WI
338
* Example  Reflections
Emphasizing the reflective quality of shiny objects whenever they are described in the presence of the torch.

WI
334
** Example  Hohmann Transfer
Changing the way dark rooms are described to avoid the standard Inform phrasing.

WI
335
*** Example  Four Stars
An elaboration of the idea that when light is absent, the player should be given a description of what he can smell and hear, instead.

WI
349
* Example  Peeled
Two different approaches to adjusting what the player can interact with, compared.

WI
81
*** Example  Unblinking
Finding a best route through light-filled rooms only, leaving aside any that might be dark.

WI
280
**** Example  Cloak of Darkness
Implementation of "Cloak of Darkness", a simple example game that for years has been used to demonstrate the features of IF languages.

WI


Sounds

48
* Example  The Undertomb 1
A small map of dead ends, in which the sound of an underground river has different strengths in different caves.

WI
95
*** Example  The Art of Noise
Things are all assigned their own noise (or silence). Listening to the room in general reports on all the things that are currently audible.

WI
350
* Example  Scope for listening different from scope for seeing
Using "deciding the scope" to change the content of lists such as "the list of audible things which can be touched by the player".

WI


Passers-By, Weather and Astronomical Events

131
* Example  Weathering
The automatic weather station atop Mt. Pisgah shows randomly fluctuating temperature, pressure and cloud cover.

WI
132
*** Example  Uptown Girls
A stream of random pedestrians who go by the player.

WI
157
* Example  Full Moon
Random atmospheric events which last the duration of a scene.

WI
120
*** Example  Orange Cones
Creating a traffic backdrop that appears in all road rooms except the one in which the player has laid down orange cones.

WI
164
* Example  Night and Day
Cycling through a sequence of scenes to represent day and night following one another during a game.

WI
144
** Example  Totality
To schedule an eclipse of the sun, which involves a number of related events.

WI


The Passage Of Time

142
* Example  Situation Room
Printing the time of day in 24-hour time, as in military situations.

WI
249
*** Example  Zqlran Era 8
Creating an alternative system of time for our game, using new units.

WI
391
* Example  Uptempo
Adjust time advancement so the game clock moves fifteen minutes each turn.

WI
183
*** Example  The Hang of Thursdays
Turns take a quarter day each, and the game rotates through the days of the week.

WI
398
* Example  Timeless
A set of actions which do not take any game time at all.

WI
399
** Example  Endurance
Giving different actions a range of durations using a time allotment rulebook.

WI
364
* Example  The Big Sainsbury's
Making implicit takes add a minute to the clock, just as though the player had typed TAKE THING explicitly.

WI


Scripted Scenes

159
*** Example  Day One
A scene which plays through a series of events in order, then ends when the list of events is exhausted.

WI
155
** Example  Entrapment
A scene in which the player is allowed to explore as much as he likes, but another character strolls in as soon as he has gotten himself into an awkward or embarrassing situation.

WI
162
* Example  The Prague Job
Scenes used to provide pacing while the player goes through his possessions.

WI
160
*** Example  Bowler Hats and Baby Geese
Creating a category of scenes that restrict the player's behavior.

WI


Event Scheduling

141
** Example  IPA
Shops which each have opening and closing hours, so that it is impossible to go in at the wrong times, and the player is kicked out if he overstays his welcome.

WI
340
**** Example  Air Conditioning is Standard
Uses "writing a paragraph about" to make person and object descriptions that vary considerably depending on what else is going on in the room, including some randomized NPC interactions with objects or with each other.

WI
146
*** Example  Hour of the Wren
Allowing the player to make an appointment, which is then kept.

WI


Scene Changes

156
* Example  Age of Steam
The railway-station examples so far put together into a short game called "Age of Steam".

WI
119
** Example  Meteoric I and II
A meteor in the night sky which is visible from many rooms, so needs to be a backdrop, but which does not appear until 11:31 PM.

WI
163
*** Example  Entrevaux
Organizing the game by scenes, where each scene has a location and prop lists so that it can be set up automatically.

WI
158
** Example  Space Patrol - Stranded on Jupiter!
We'll be back in just a moment, with more exciting adventures of the... Space Patrol!

WI


Flashbacks

165
*** Example  Pine 3
Pine: Allowing the player to visit aspects of the past in memory and describe these events to the princess, as a break from the marriage-proposal scene.

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

WI


Plot Management

209
*** Example  Fate Steps In
Fate entity which attempts to make things happen, by hook or by crook, including taking preliminary actions to set the player up a bit.

WI


The Human Body

56
*** Example  The Night Before
Instructing Inform to prefer different interpretations of EXAMINE NOSE, depending on whether the player is alone, in company, or with Rudolph the Red-nosed Reindeer.

WI
245
* Example  rBGH
The player character's height is selected randomly at the start of play.

WI
381
** Example  Slouching
A system of postures allowing the player and other characters to sit, stand, or lie down explicitly or implicitly on a variety of enterable supporters or containers, or in location.

WI


Traits Determined By the Player

405
* Example  Identity Theft
Allowing the player to enter a name to be used for the player character during the game.

WI
441
*** Example  Pink or Blue
Asking the player to select a gender to begin play.

WI
298
*** Example  Baritone, Bass
Letting the player pick a gender (or perhaps other characteristics) before starting play.

WI


Characterization

73
* Example  Finishing School
The "another" adjective for rules such as "in the presence of another person".

WI
109
* Example  Dearth and the Maiden
Our heroine, fallen among gentleman highwaymen, is restrained by her own modesty and seemliness.

WI
85
* Example  Bad Hair Day
Change the player's appearance in response to EXAMINE ME.

WI


Background

266
* Example  Merlin
A REMEMBER command which accepts any text and looks up a response in a table of recollections.

WI
290
* Example  One of Those Mornings
A FIND command that allows the player to find a lost object anywhere

WI


Memory and Knowledge

308
* Example  Puncak Jaya
When a character is not visible, responding to such commands as EXAMINE PETER and PETER, HELLO with a short note that the person in question is no longer visible.

WI
149
* Example  Tense Boxing
An overview of all the variations of past and present tenses, and how they might be used.

WI
148
*** Example  Zero
A box which called "horribly heavy box" after the player has tried to take it the first time.

WI
346
*** Example  Casino Banale
Creating room descriptions and object descriptions that change as the player learns new facts and pieces things together.

WI


Viewpoint

121
*** Example  Terror of the Sierra Madre
Multiple player characters who take turns controlling the action.

WI
445
** Example  Uncommon Ground
Making a "by viewpoint" token, allowing us to design our own text variations such as "[show to yourself]quaint[to Lolita]thrilling[to everyone else]squalid[end show]" depending on the identity of the player at the moment.

WI
51
*** Example  The Crane's Leg 1
A description text that automatically highlights the ways in which the object differs from a standard member of its kind.

WI
377
* Example  The Crane's Leg 2
A description text generated based on the propensities of the player-character, following different rulebooks for different characters.

WI


Modifying Existing Commands

214
*** Example  Slogar's Revenge
Creating an amulet of tumblers that can be used to lock and unlock things even when it is worn, overriding the usual requirement that keys be carried.

WI


Looking

2
* Example  Verbosity 1
Making rooms give full descriptions each time we enter, even if we have visited before.

WI
380
* Example  Verbosity 2
Making rooms give full descriptions each time we enter, even if we have visited before, and disallowing player use of BRIEF and SUPERBRIEF.

WI


Examining

324
*** Example  Crusoe
Adding a "printing the description of something" activity.

WI
42
* Example  Odin
Replacing "You see nothing special..." with a different default message for looking at something nondescript.

WI
284
*** Example  The Left Hand of Autumn
The possibility of using a [things] token opens up some interesting complications, because we may want actions on multiple items to be reported differently from actions on just one. Here we look at how to make a multiple examination command that describes groups in special ways.

WI
68
** Example  Beekeeper's Apprentice
Making the SEARCH command examine all the scenery in the current location.

WI


Looking Under and Hiding

98
* Example  Beachfront
An item that the player can't interact with until he has found it by searching the scenery.

WI
233
* Example  Beneath the Surface
An "underlying" relation which adds to the world model the idea of objects hidden under other objects.

WI
218
* Example  Flashlight
Visibility set so that looking under objects produces no result unless the player has a light source to shine there (regardless of the light level of the room).

WI
172
* Example  Matreshka
A SEARCH [room] action that will open every container the player can see, stopping only when there don't remain any that are closed, unlocked, and openable.

WI


Inventory

177
** Example  Equipment List
Overview of all the phrase options associated with listing, and examples of how to change the inventory list into some other standard formats.

WI
64
*** Example  Persephone
Separate the player's inventory listing into two parts, so that it says "you are carrying..." and then (if the player is wearing anything) "You are also wearing...".

WI
414
* Example  Oyster Wide Shut
Replacing Inform's default printing of properties such as "(closed)", "(open and providing light)", etc., with our own, more flexible variation.

WI
204
*** Example  Trying Taking Manhattan
Replacing the inventory reporting rule with another which does something slightly different.

WI


Taking, Dropping, Inserting and Putting

14
* Example  Replanting
Changing the response when the player tries to take something that is scenery.

WI
198
* Example  Removal
TAKE expanded to give responses such as "You take the book from the shelf." or "You pick up the toy from the ground."

WI
202
*** Example  Croft
Adding special reporting and handling for objects dropped when the player is on a supporter, and special entering rules for moving from one supporter to another.

WI
225
* Example  Celadon
Using the enclosure relation to let the player drop things which he only indirectly carries.

WI
90
* Example  Morning After
When the player picks something up which he hasn't already examined, the object is described.

WI
86
*** Example  Democratic Process
Make PUT and INSERT commands automatically take objects if the player is not holding them.

WI
87
**** Example  Sand
Extend PUT and INSERT handling to cases where multiple objects are intended at once.

WI


Going, Pushing Things in Directions

108
*** Example  Zorb
Replacing the message the player receives when attempting to push something that isn't pushable, and also to remove the restriction that objects cannot be pushed up or down.

WI
103
*** Example  Bumping into Walls
Offering the player a list of valid directions if he tries to go in a direction that leads nowhere.

WI
5
** Example  Up and Up
Adding a short message as the player approaches a room, before the room description itself appears.

WI
100
* Example  Veronica
An effect that occurs only when the player leaves a region entirely.

WI
200
* Example  The Second Oldest Problem
Adapting the going action so that something special can happen when going from a dark room to another dark room.

WI
104
* Example  Mattress King
Adding extra phrasing to the action to PUSH something in a direction.

WI
379
* Example  Saint Eligius
Adding a first look rule that comments on locations when we visit them for the first time, inserting text after objects are listed but before any "every turn" rules might occur.

WI
295
* Example  Misadventure
A going by name command which does respect movement rules, and accepts names of rooms as commands.

WI
296
** Example  Safari Guide
The same functionality, but making the player continue to move until he reaches his destination or a barrier, handling all openable doors on the way.

WI
107
*** Example  Provenance Unknown
Allowing something like PUSH TELEVISION EAST to push the cart on which the television rests.

WI
102
*** Example  Polarity
A "go back" command that keeps track of the direction from which the player came, and sends him back.

WI
358
* Example  Minimal Movement
Supplying a default direction for "go", so that "leave", "go", etc., are always interpreted as "out".

WI
179
*** Example  Owen's Law
OUT always means "move to an outdoors room, or else to a room with more exits than this one has"; IN always means the opposite.

WI
246
** Example  Wonderland
Hiking Mount Rainier, with attention to which locations are higher and which lower than the present location.

WI


Entering and Exiting, Sitting and Standing

299
* Example  Lies
Commands to allow the player to lie down in three different ways.

WI
278
* Example  Anchorite
By default, Inform understands GET OFF, GET UP, or GET OUT when the player is sitting or standing on an enterable object. We might also want to add GET DOWN and DOWN as exit commands, though:

WI
206
* Example  Get Axe
Changing the check rules to try automatically leaving a container before attempting to take it. (And arranging things so that other people will do likewise.)

WI


Waiting, Sleeping

374
* Example  Nine AM Appointment
A WAIT [number] MINUTES command which advances through an arbitrary number of turns.

WI
375
** Example  Delayed Gratification
A WAIT UNTIL [time] command which advances until the game clock reaches the correct hour.

WI
45
** Example  Change of Basis
Implementing sleeping and wakeful states.

WI


Magic Words

275
* Example  XYZZY
Basics of adding a new command reviewed, for the case of the simple magic word XYZZY.

WI


Remembering, Converting and Combining Actions

88
* Example  Fine Laid
Making writing that can be separately examined from the paper on which it appears, but which directs all other actions to the paper.

WI
92
* Example  Lucy
Redirecting a question about one topic to ask about another.

WI
220
* Example  Cactus Will Outlive Us All
For every character besides the player, there is an action that will cause that character to wither right up and die.

WI
423
* Example  I Didn't Come All The Way From Great Portland Street
In this fiendishly difficult puzzle, which may perhaps owe some inspiration to a certain BBC Radio panel game (1967-), a list is used as a set of actions to help enforce the rule that the player must keep going for ten turns without hesitation, repetition, or deviating from the subject on the card.

WI
419
* Example  Leopard-skin
A maze that the player can escape if he performs an exact sequence of actions.

WI
222
** Example  Anteaters
The player carries a gizmo that is able to record actions performed by the player, then force him to repeat them when the gizmo is dropped. This includes storing actions that apply to topics, as in "look up anteater colonies in the guide".

WI


Actions on Multiple Objects

283
* Example  Shawn's Bad Day
Allowing the player to EXAMINE ALL.

WI
400
** Example  Escape from the Seraglio
Replacing the usual response to TAKE ALL so that instead of output such as "grapes: Taken. orange: Taken.", Inform produces variable responses in place of "grapes:".

WI
417
** Example  Formicidae
Manipulating the order in which items are handled after TAKE ALL.

WI
420
** Example  The Facts Were These
Creating a variant GIVE action that lets the player give multiple objects simultaneously with commands like GIVE ALL TO ATTENDANT or GIVE THREE DOLLARS TO ATTENDANT or GIVE PIE AND HAT TO ATTENDANT. The attendant accepts the gifts only if their total combined value matches some minimum amount.

WI


Alternate Default Messages

382
* Example  We
Replacing the standard action report rules to reflect our own design.

WI


Clarification and Correction

279
* Example  Alpaca Farm
A generic USE action which behaves sensibly with a range of different objects.

WI
354
* Example  Apples
Prompting the player on how to disambiguate otherwise similar objects.

WI
356
*** Example  Walls and Noses
Responding to "EXAMINE WALL" with "In which direction?", and to "EXAMINE NOSE" with "Whose nose do you mean, Frederica's, Betty's, Wilma's or your own?"

WI
413
*** Example  Cave-troll
Determining that the command the player typed is invalid, editing it, and re-examining it to see whether it now reads correctly.

WI
366
* Example  WXPQ
Creating a more sensible parser error than "that noun did not make sense in this context".

WI


Alternatives To Standard Parsing

361
** Example  Cloves
Accepting adverbs anywhere in a command, registering what the player typed but then cutting them out before interpreting the command.

WI
359
** Example  Fragment of a Greek Tragedy
Responding to the player's input based on keywords only, and overriding the original parser entirely.

WI
293
** Example  Down in Oodville
Offering the player a choice of numbered options at certain times, without otherwise interfering with his ability to give regular commands.

WI


Getting Acquainted

30
* Example  Belfry
You can see a bat, a bell, some woodworm, William Snelson, the sexton's wife, a bellringer and your local vicar here.

WI
31
** Example  Gopher-wood
Changing the name of a character in the middle of play, removing the article.

WI
303
** Example  Peers
The peers of the English realm come in six flavours - Baron, Viscount, Earl, Marquess, Duke and Prince - and must always be addressed properly. While a peerage is for life, it may at the royal pleasure be promoted.

WI
237
*** Example  A Humble Wayside Flower
Relations track the relationships between one character and another. Whenever the player meets a relative of someone he already knows, he receives a brief introduction.

WI
238
* Example  Meet Market
A case in which relations give characters multiple values of the same kind.

WI
135
* Example  Clueless
A murderer for the mystery is selected randomly at the beginning of the game.

WI


Liveliness

67
** Example  Camp Bethel
Creating characters who change their behavior from turn to turn, and a survey of other common uses for alternative texts.

WI
153
* Example  Annoyotron Jr
A child who after a certain period in the car starts asking annoying questions.

WI
76
*** Example  Lean and Hungry
A thief who will identify and take any valuable thing lying around that he is able to touch.

WI
140
**** Example  Text Foosball
A game of foosball which relies heavily on every-turn rules.

WI


Reactive Characters

96
* Example  Zodiac
Several variations on "doing something other than...", demonstrating different degrees of restriction.

WI
187
* Example  Police State
Several friends who obey you; a policeman who doesn't (but who takes a dim view of certain kinds of antics).

WI
197
*** Example  Noisemaking
Creating a stage after the report stage of an action, during which other characters may observe and react.

WI
36
*** Example  Search and Seizure
A smuggler who has items, some of which are hidden.

WI
154
* Example  Pine 1
Pine: Using a scene to watch for the solution of a puzzle, however arrived-at by the player.

WI
112
**** Example  A Day For Fresh Sushi
A complete story by Emily Short, called "A Day for Fresh Sushi", rewritten using Inform 7. Noteworthy is the snarky commenter who remarks on everything the player does, but only the first time each action is performed.

WI
82
**** Example  Revenge of the Fussy Table
A small game about resentful furniture and inconvenient objects.

WI


Barter and Exchange

378
** Example  Bribery
A GIVE command that gets rid of Inform's default refusal message in favor of something a bit more sophisticated.

WI
207
*** Example  Barter Barter
Allowing characters other than the player to give objects to one another, accounting for the possibility that some items may not be desired by the intended recipients.

WI


Combat and Death

191
* Example  Red Cross
A DIAGNOSE command which allows the player to check on the health of someone.

WI
130
* Example  Lanista 1
Very simple randomized combat in which characters hit one another for a randomized amount of damage.

WI
282
** Example  Lanista 2
Randomized combat in which the damage done depends on what weapons the characters are wielding, and in which an ATTACK IT WITH action is created to replace regular attacking. Also folds a new DIAGNOSE command into the system.

WI
201
** Example  Puff of Orange Smoke
A system in which every character has a body, which is left behind when the person dies; attempts to do something to the body are redirected to the person while the person is alive.

WI
127
*** Example  Technological Terror
A ray gun which destroys objects, leaving their component parts behind.

WI
113
*** Example  Don Pedro's Revenge
Combat scenario in which the player's footing and position changes from move to move, and the command prompt also changes to reflect that.

WI


Getting Started with Conversation

110
*** Example  Mimicry
People who must be greeted before conversation can begin.

WI
317
* Example  The Gorge at George
If the player tries to TALK TO a character, suggest alternative modes of conversation.

WI


Saying Simple Things

91
* Example  Sybil 1
Direct all ASK, TELL, and ANSWER commands to ASK, and accept multiple words for certain cases.

WI
93
** Example  Sybil 2
Making the character understand YES, SAY YES TO CHARACTER, TELL CHARACTER YES, ANSWER YES, and CHARACTER, YES.

WI
171
** Example  Proposal
Asking the player a yes/no question which he must answer, and another which he may answer or not as he chooses.

WI
286
** Example  Nameless
ASKing someone about an object rather than about a topic.

WI


Saying Complicated Things

270
** Example  Farewell
People who respond to conversational gambits, summarize what they said before if asked again, and provide recap of conversation that is past.

WI
271
** Example  Sweeney
A conversation where each topic may have multiple questions and answers associated with it, and where a given exchange can lead to new additions to the list.

WI
168
*** Example  Cheese-makers
Scenes used to control the way a character reacts to conversation and comments, using a TALK TO command.

WI
362
*** Example  Complimentary Peanuts
A character who responds to keywords in the player's instructions and remarks, even if there are other words included.

WI


Character Emotion

170
** Example  Ferragamo Again
Using the same phrase to produce different results with different characters.

WI
388
* Example  Being Peter
A set of rules determining the attitude a character will take when asked about certain topics.

WI


Character Knowledge and Reasoning

241
** Example  Murder on the Orient Express
A number of sleuths (the player among them) find themselves aboard the Orient Express, where a murder has taken place, and one of them is apparently the culprit. Naturally they do not agree on whom, but there is physical evidence which may change their minds...

WI
267
*** Example  Questionable Revolutions
An expansion on the previous idea, only this time we store information and let characters answer depending on their expertise in a given area.

WI
268
*** Example  The Queen of Sheba
Allowing the player to use question words, and using that information to modify the response given by the other character.

WI
235
*** Example  The Problem of Edith
A conversation in which the main character tries to build logical connections between what the player is saying now and what went immediately before.

WI
328
**** Example  Chronic Hinting Syndrome
Using name-printing rules to keep track of whether the player knows about objects, and also to highlight things he might want to follow up.

WI


Characters Following a Script

161
*** Example  Pine 2
Pine: Adding a conversation with the princess, in which a basic set of facts must be covered before the scene is allowed to end.

WI
415
* Example  Robo 1
A robot which watches and records the player's actions, then tries to repeat them back in the same order when he is switched into play-back mode.

WI
418
*** Example  Robo 2
A robot which watches and records the player's actions, then tries to repeat them back in the same order when he is switched into play-back mode.

WI
426
* Example  Your Mother Doesn't Work Here
Your hard-working mother uses a list as a stack: urgent tasks are added to the end of the list, interrupting longer-term plans.

WI


Traveling Characters

77
* Example  Mistress of Animals
A person who moves randomly between rooms of the map.

WI
263
** Example  Odyssey
A person who follows a path predetermined and stored in a table, and who can be delayed if the player tries to interact with her.

WI
185
*** Example  Latris Theon
A person who can accept instructions to go to new destinations and move towards them according to the most reasonable path.

WI
291
** Example  Actaeon
A FOLLOW command allowing the player to pursue a person who has just left the room.

WI
37
** Example  Van Helsing
A character who approaches the player, then follows him from room to room.

WI
396
**** Example  Patient Zero
People who wander around the map performing various errands, and in the process spread a disease which only the player can eradicate.

WI


Obedient Characters

186
* Example  The Hypnotist of Blois
A hypnotist who can make people obedient and then set them free again.

WI
239
*** Example  For Demonstration Purposes
A character who learns new actions by watching the player performing them.

WI
188
** Example  Generation X
A person who goes along with the player's instructions, but reluctantly, and will get annoyed after too many repetitions of the same kind of unsuccessful command.

WI
184
* Example  Virtue
Defining certain kinds of behavior as inappropriate, so that other characters will refuse indignantly to do any such thing.

WI
205
**** Example  Under Contract
Creating a person who accepts most instructions and reacts correctly when a request leads implicitly to inappropriate behavior.

WI
357
* Example  Latin Lessons
Supplying missing nouns and second nouns for other characters besides the player.

WI
412
** Example  Northstar
Making Inform understand ASK JOSH TO TAKE INVENTORY as JOSH, TAKE INVENTORY. This requires us to use a regular expression on the player's command, replacing some of the content.

WI


Goal-Seeking Characters

203
** Example  The Man of Steel
An escaping action which means "go to any room you can reach from here", and is only useful to non-player characters.

WI
208
* Example  Reporting rules for other characters' behavior
Elaborating the report rules to be more interesting than "Clark goes west."

WI
189
* Example  IQ Test
Introducing Ogg, a person who will unlock and open a container when the player tells him to get something inside.

WI
190
**** Example  Boston Cream
A fuller implementation of Ogg, giving him a motivation of his own and allowing him to react to the situation created by the player.

WI


Social Groups

176
** Example  Strictly Ballroom
People who select partners for dance lessons each turn.

WI
342
** Example  Happy Hour
Listing visible characters as a group, then giving some followup details in the same paragraph about specific ones.

WI
229
* Example  Unthinkable Alliances
People are to be grouped into alliances. To kiss someone is to join his or her faction, which may make a grand alliance; to strike them is to give notice of quitting, and to become a lone wolf.

WI
231
* Example  The Abolition of Love
A thorough exploration of all the kinds of relations established so far, with the syntax to set and unset them.

WI
339
** Example  Emma
Social dynamics in which groups of people form and circulate during a party.

WI
424
* Example  Lugubrious Pete's Delicatessen
In this evocation of supermarket deli counter life, a list is used as a queue to keep track of who is waiting to be served.

WI


Bicycles, Cars and Boats

47
** Example  Straw Boater
Using text properties that apply only to some things and are not defined for others.

WI
105
* Example  No Relation
A car which must be turned on before it can be driven, and can only go to roads.

WI
26
* Example  Peugeot
A journey from one room to another that requires the player to be on a vehicle.

WI
28
*** Example  Hover
Letting the player see a modified room description when he's viewing the place from inside a vehicle.

WI


Ships, Trains and Elevators

8
* Example  The Unbuttoned Elevator Affair
A simple elevator connecting two floors which is operated simply by walking in and out, and has no buttons or fancy doors.

WI
260
*** Example  Dubai
An elevator which connects any of 27 floors in a luxury hotel.

WI
40
*** Example  Fore
Understand "fore", "aft", "port", and "starboard", but only when the player is on a vessel.

WI
145
** Example  Empire
A train which follows a schedule, stopping at a number of different locations.

WI


Animals

386
* Example  Feline Behavior
A cat which reacts to whatever items it has handy, returning the result of a rulebook for further processing.

WI
99
** Example  Today Tomorrow
A few notes on "In the presence of" and how it interacts with concealed objects.

WI
408
* Example  Fido
A dog the player can name and un-name at will.

WI


Furniture

83
** Example  Yolk of Gold
Set of drawers where the item the player seeks is always in the last drawer he opens, regardless of the order of opening.

WI
173
* Example  Princess and the Pea
The player is unable to sleep on a mattress (or stack of mattresses) because the bottom one has something uncomfortable under it.

WI
57
*** Example  U-Stor-It
A "chest" kind which consists of a container which has a lid as a supporter.

WI
393
** Example  Swigmore U.
Adding a new kind of supporter called a perch, where everything dropped lands on the floor.

WI
347
* Example  Kiwi
Creating a raised supporter kind whose contents the player can't see or take from the ground.

WI
12
* Example  Tamed
Examples of a container and a supporter that can be entered, as well as nested rooms.

WI
427
* Example  Circle of Misery
Retrieving items from an airport luggage carousel is such fun, how can we resist simulating it, using a list as a ring buffer?

WI


Kitchen and Bathroom

438
** Example  Modern Conveniences
Exemplifying the kind of source we might use in writing extensions for kitchen and bathroom appliances.

WI
75
** Example  Versailles
A mirror which will reflect some random object in the room.

WI


Food

365
*** Example  Lollipop Guild
Overriding the rules to allow the player to eat something without first taking it.

WI
196
*** Example  Delicious, Delicious Rocks
Adding a "sanity-check" stage to decide whether an action makes any sense, which occurs before any before rules, implicit taking, or check rules.

WI
46
* Example  Would you...?
Adding new properties to objects, and checking for their presence.

WI
376
* Example  Stone
A soup to which the player can add ingredients, which will have different effects when the player eats.

WI
133
* Example  Candy
One of several identical candies chosen at the start of play to be poisonous.

WI
143
* Example  MRE
Hunger that eventually kills the player, and foodstuffs that can delay the inevitable by different amounts of time.

WI


Bags, Bottles, Boxes and Safes

287
* Example  Safety
A safe whose dial can be turned with SPIN SAFE TO 1131, and which will open only with the correct combination.

WI
421
* Example  Eyes, Fingers, Toes
A safe with a multi-number combination, meant to be dialed over multiple turns, is implemented using a log of the last three numbers dialed. The log can then be compared to the safe's correct combination.

WI
327
** Example  Trachypachidae Maturin 1803
Bottles with removable stoppers: when the stopper is in the bottle, the bottle is functionally closed, but the stopper can also be removed and used elsewhere. Descriptions of the bottle reflect its state intelligently.

WI
310
* Example  Cinco
A taco shell that can be referred to (when it contains things) in terms of its contents.

WI
326
* Example  Shipping Trunk
A box of baking soda whose name changes to "completely ineffective baking soda" when it is in a container with something that smells funny.

WI
331
* Example  Unpeeled
Calling an onion "a single yellow onion" when (and only when) it is being listed as the sole content of a room or container.

WI
329
** Example  Hudsucker Industries
Letters which are described differently as a group, depending on whether the player has read none, some, or all of them, and on whether they are alike or unlike.

WI
59
*** Example  Fallout Enclosure
Adding an enclosure kind that includes both containers and supporters in order to simplify text that would apply to both.

WI


Clothing

44
*** Example  Get Me to the Church on Time
Using kinds of clothing to prevent the player from wearing several pairs of trousers at the same time.

WI
234
*** Example  Bogart
Clothing for the player that layers, so that items cannot be taken off in the wrong order, and the player's inventory lists only the clothing that is currently visible.

WI
242
** Example  What Not To Wear
A general-purpose clothing system that handles a variety of different clothing items layered in different combinations over different areas of the body.

WI
325
* Example  Hays Code
Clark Gable in a pin-striped suit and a pink thong.

WI
54
* Example  Being Prepared
A kind for jackets, which always includes a container called a pocket.

WI
319
* Example  Some Assembly Required
Building different styles of shirt from component sleeves and collars.

WI


Money

253
* Example  Frozen Assets
A treatment of money which keeps track of how much the player has on him, and a BUY command which lets him go shopping.

WI
272
*** Example  Introduction to Juggling
Assortment of equipment defined with price and description, in a table.

WI
254
** Example  Money for Nothing
An OFFER price FOR command, allowing the player to bargain with a flexible seller.

WI
251
*** Example  Nickel and Dimed
A more intricate system of money, this time keeping track of the individual denominations of coins and bills, specifying what gets spent at each transaction, and calculating appropriate change.

WI
258
** Example  Fabrication
A system of assembling clothing from a pattern and materials; both the pattern and the different fabrics have associated prices.

WI
252
* Example  Widget Enterprises
Allowing the player to set a price for a widget on sale, then determining the resulting sales based on consumer demand, and the resulting profit and loss.

WI


Dice and Playing Cards

264
** Example  Jokers Wild
A deck of cards which can be shuffled and dealt from.

WI
306
*** Example  Tilt 1
A deck of cards with fully implemented individual cards, which can be separately drawn and discarded, and referred to by name.

WI
389
*** Example  Tilt 2
A deck of cards with fully implemented individual cards; when the player has a full poker hand, the inventory listing describes the resulting hand accordingly.

WI
175
* Example  Wonka's Revenge
A lottery drum which redistributes the tickets inside whenever the player spins it.

WI
129
* Example  Do Pass Go
A pair of dice which can be rolled, and are described with their current total when not carried, and have individual scores when examined.

WI


Reading Matter

94
*** Example  Costa Rican Ornithology
A fully-implemented book, answering questions from a table of data, and responding to failed consultation with a custom message such as "You flip through the Guide to Central American Birds, but find no reference to penguins."

WI
292
* Example  Pages
A book with pages that can be read by number (as in "read page 3 in...") and which accepts relative page references as well (such as "read the last page of...", "read the next page", and so on).

WI
313
** Example  Bibliophilia
A bookshelf with a number of books, where the player's command to examine something will be interpreted as an attempt to look up titles if the bookshelf is present, but otherwise given the usual response.

WI
322
** Example  AARP-Gnosis
An Encyclopedia set which treats volumes in the same place as a single object, but can also be split up.

WI
281
* Example  The Trouble with Printing
Making a READ command, distinct from EXAMINE, for legible objects.

WI
432
* Example  The Fourth Body
Notebooks in which the player can record assorted notes throughout play.

WI
433
** Example  The Fifth Body
An expansion on the notebook, allowing the player somewhat more room in which to type his recorded remark.

WI


Painting and Labeling Devices

297
* Example  Palette
An artist's workshop in which the canvas can be painted in any colour, and where painterly names for pigments ("cerulean") are accepted alongside everyday ones ("blue").

WI
53
*** Example  Early Childhood
A child's set of building blocks, which come in three different colours - red, green and blue - but which can be repainted during play.

WI
34
*** Example  Brown
A red sticky label which can be attached to anything in the game, or removed again.

WI


Simple Machines

61
* Example  Control Center
Objects which automatically include a description of their component parts whenever they are examined.

WI
55
** Example  Model Shop
An "on/off button" which controls whatever device it is part of.

WI
50
*** Example  Signs and Portents
Signpost that points to various destinations, depending on how the player has turned it.

WI
416
* Example  What Makes You Tick
Building a fishing pole from several component parts that the player might put together in any order.

WI


Televisions and Radios

323
*** Example  Aftershock
Modifying the rules for examining a device so that all devices have some specific behavior when switched on, which is described at various times.

WI
66
* Example  Radio Daze
A radio that produces a cycle of output using varying text.

WI
300
* Example  Aspect
Understanding aspect ratios (a unit) in the names of televisions.

WI
304
** Example  Channel 1
Understanding channels (a number) in the names of televisions.

WI
307
*** Example  Channel 2
Understanding channels (a number) in the names of televisions, with more sophisticated parsing of the change channel action.

WI


Telephones

226
*** Example  Four Cheeses
A system of telephones on which the player can call distant persons and have conversations.

WI


Clocks and Scientific Instruments

288
* Example  Tom's Midnight Garden
A clock kind that can be set to any time using "the time understood"; may be turned on and off; and will advance itself only when running. Time on the face is also reported differently depending on whether the clock is analog or digital.

WI
351
** Example  Ginger Beer
A portable magic telescope which allows the player to view items in another room of his choice.

WI
180
* Example  Witnessed 2
A piece of ghost-hunting equipment that responds depending on whether or not the meter is on and a ghost is visible or touchable from the current location.

WI


Cameras and Recording Devices

262
* Example  If It Hadn't Been For...
A sound recording device that records the noises made by player and non-player actions, then plays them back on demand.

WI
311
** Example  Claims Adjustment
An instant camera that spits out photographs of anything the player chooses to take a picture of.

WI
355
* Example  Originals
Allowing the player to create models of anything in the game world; parsing the name "model [thing]" or even just "[thing]" to refer to these newly-created models; asking "which do you mean, the model [thing] or the actual [thing]" when there is ambiguity.

WI
406
* Example  Mirror, Mirror
The sorcerer's mirror can, when held up high, form an impression of its surroundings which it then preserves.

WI
221
** Example  Actor's Studio
A video camera that records actions performed in its presence, and plays them back with time-stamps.

WI


Gases

74
*** Example  Only You...
Smoke which spreads through the rooms of the map, but only every other turn.

WI
392
** Example  Lethal Concentration 1
A poisonous gas that spreads from room to room, incapacitating or killing the player when it reaches sufficient levels.

WI
395
*** Example  Lethal Concentration 2
Poisonous gas again, only this time it sinks.

WI


Liquids

122
* Example  Beverage Service
A potion that the player can drink.

WI
193
*** Example  3 AM
A shake command which agitates soda and makes items thump around in boxes.

WI
192
*** Example  Frizz
Liquid flows within containers and soaks objects that are not waterproof; any contact with a wet object can dampen our gloves.

WI
385
* Example  Flotation
Objects that can sink or float in a well, depending on their own properties and the state of the surrounding environment.

WI
277
** Example  Xylan
Creating a new command that does require an object to be named; and some comments about the choice of vocabulary, in general.

WI
117
* Example  Thirst
A waterskin that is depleted as the player drinks from it.

WI
255
*** Example  Lemonade
Containers for liquid which keep track of how much liquid they are holding and of what kind, and allow quantities to be moved from one container to another.

WI
256
*** Example  Savannah
Using the liquid implementation demonstrated in Lemonade for putting out fires.

WI
265
*** Example  Noisy Cricket
Implementing liquids that can be mixed, and the components automatically recognized as matching one recipe or another.

WI
320
*** Example  Lakeside Living
Similar to "Lemonade", but with bodies of liquid that can never be depleted, and some adjustments to the "fill" command so that it will automatically attempt to fill from a large liquid source if possible.

WI


Dispensers and Supplies of Small Objects

124
** Example  Extra Supplies
A supply of red pens from which the player can take another pen only if he doesn't already have one somewhere in the game world.

WI
363
* Example  Pizza Prince
Providing a pizza buffet from which the player can take as many pieces as he wants.

WI


Glass and Other Damage-Prone Substances

97
* Example  Ming Vase
ATTACK or DROP break and remove fragile items from play.

WI
123
* Example  Spring Cleaning
A character who sulks over objects that the player has broken (and which are now off-stage).

WI
387
** Example  Kyoto
Expanding the effects of the THROW something AT something command so that objects do make contact with one another.

WI
302
** Example  Terracottissima
The flowerpots once again, but this time arranged so that after the first breakage all undamaged pots are said to be "unbroken", to distinguish them from the others.

WI
195
** Example  Paddington
A CUT [something] WITH [something] command which acts differently on different types of objects.

WI


Volume, Height, Weight

247
** Example  Dimensions
This example draws together the previous snippets into a working implementation of the weighbridge.

WI
259
** Example  The Speed of Thought
Describing scientifically-measured objects in units more familiar to the casual audience.

WI
257
* Example  Depth
Receptacles that calculate internal volume and the amount of room available, and cannot be overfilled.

WI
248
*** Example  Lead Cuts Paper
To give every container a breaking strain, that is, a maximum weight of contents which it can bear - so that to put the lead pig into a paper bag invites disaster.

WI
232
* Example  Swerve left? Swerve right? Or think about it and die?
Building a marble chute track in which a dropped marble will automatically roll downhill.

WI


Ropes

250
*** Example  Snip
A string which can be cut into arbitrary lengths, and then tied back together.

WI
228
*** Example  Otranto
A kind of rope which can be tied to objects and used to anchor the player or drag items from room to room.

WI


Electricity and Magnetism

139
*** Example  Witnessed 1
A kind of battery which can be put into different devices, and which will lose power after extended use.

WI
397
* Example  Electrified
Adding a rule before the basic accessibility rule that will prevent the player from touching electrified objects under the wrong circumstances.

WI
332
* Example  Rules of Attraction
A magnet which picks up nearby metal objects, and describes itself appropriately in room descriptions and inventory listings, but otherwise goes by its ordinary name.

WI


Fire

151
** Example  Bruneseau's Journey
A candle which reacts to lighting and blowing actions differently depending on whether it has already been lit once.

WI
118
* Example  Thirst 2
A campfire added to the camp site, which can be lit using tinder.

WI
407
** Example  The Cow Exonerated
Creating a class of matches that burn for a time and then go out, with elegant reporting when several matches go out at once.

WI
384
*** Example  In Fire or in Flood
A BURN command; flammable objects which light other items in their vicinity and can burn for different periods of time; the possibility of having parts or contents of a flaming item which survive being burnt.

WI


Heat

84
* Example  Grilling
A grill, from which the player is not allowed to take anything lest he burn himself.

WI
315
* Example  Masochism Deli
Multiple potatoes, with rules to make the player drop the hot potato first and pick it up last.

WI
318
*** Example  Hot Glass Looks Like Cold Glass
Responding to references to a property that the player isn't yet allowed to mention (or when not to use "understand as a mistake").

WI
182
* Example  Entropy
All objects in the game have a heat, but if not kept insulated they will tend toward room temperature (and at a somewhat exaggerated rate).

WI


Magic (Breaking the Laws of Physics)

227
* Example  Transmutations
A machine that turns objects into other, similar objects.

WI
215
* Example  Magneto's Revenge
Kitty Pryde of the X-Men is able to reach through solid objects, so we might implement her with special powers that the player does not have...

WI
390
* Example  Access All Areas
The Pointy Hat of Liminal Transgression allows its wearer to walk clean through closed doors.

WI
224
* Example  Interrogation
A wand which, when waved, reveals the concealed items carried by people the player can see.

WI


Mathematics

422
* Example  The Fibonacci Sequence
The modest Leonardo Fibonacci of Pisa will be only too happy to construct his sequence on request, using an array.

WI
425
* Example  Sieve of Eratosthenes
The haughty Eratosthenes of Cyrene will nevertheless consent to sieve prime numbers on request.

WI
240
* Example  Number Study
The parity and joint magnitude relations explored.

WI


Start-Up Features

368
* Example  Bikini Atoll
Delaying the banner for later.

WI
429
* Example  Alien Invasion Part 23
Keeping a preference file that could be loaded by any game in a series.

WI
126
** Example  Hatless
It's tempting to use "now..." to distribute items randomly at the start of play, but we need to be a little cautious about how we do that.

WI


Saving and Undoing

211
*** Example  A point for never saving the game
In some of the late 1970s "cave crawl" adventure games, an elaborate scoring system might still leave the player perplexed as to why an apparently perfect play-through resulted in a score which was still one point short of the supposed maximum. Why only 349 out of 350? The answer varied, but sometimes the last point was earned by never saving the game - in other words by playing it right through with nothing to guard against mistakes (except perhaps UNDO for the last command), and in one long session.

WI
210
* Example  Spellbreaker
P. David Lebling's classic "Spellbreaker" (1986) includes a room where the game cannot be saved: here is an Inform implementation.

WI


Helping and Hinting

111
* Example  Y ask Y?
Noticing when the player seems to be at a loss, and recommending the use of hints.

WI
394
** Example  Solitude
Novice mode that prefaces every prompt with a list of possible commands the player could try, and highlights every important word used, to alert players to interactive items in the scenery.

WI
316
* Example  Query
Catching all questions that begin with WHO, WHAT, WHERE, and similar question words, and responding with the instruction to use commands, instead.

WI
52
*** Example  Real Adventurers Need No Help
Allowing the player to turn off all access to hints for the duration of a game, in order to avoid the temptation to rely on them overmuch.

WI
273
* Example  Food Network Interactive
Using a menu system from an extension, but adding our own material to it for this game.

WI
285
* Example  Ish.
A (very) simple HELP command, using tokens to accept and interpret the player's text whatever it might be.

WI
274
** Example  Trieste
Table amendment to adjust HELP commands provided for the player.

WI
230
*** Example  The Unexamined Life
An adaptive hint system that tracks what the player needs to have seen or to possess in order to solve a given puzzle, and doles out suggestions accordingly. Handles changes in the game state with remarkable flexibility, and allows the player to decide how explicit a nudge he wants at any given moment.

WI


Scoring

137
*** Example  No Place Like Home
Recording a whole table of scores for specific treasures.

WI
219
* Example  Bosch
Creating a list of actions that will earn the player points, and using this both to change the score and to give FULL SCORE reports.

WI
136
** Example  Mutt's Adventure
Awarding points for visiting a room for the first time.

WI
269
*** Example  Goat-Cheese and Sage Chicken
Implementing a FULL SCORE command which lists more information than the regular SCORE command, adding times and rankings, as an extension of the example given in this chapter.

WI
166
*** Example  Panache
Replacing the score with a plot summary that records the events of the plot, scene by scene.

WI
431
*** Example  Rubies
A scoreboard that keeps track of the ten highest-scoring players from one playthrough to the next, adding the player's name if he has done well enough.

WI


Ending The Story

369
* Example  Battle of Ridgefield
Completely replacing the endgame text and stopping the game without giving the player a chance to restart or restore.

WI
370
* Example  Finality
Not mentioning UNDO in the final set of options.

WI
372
** Example  Xerxes
Offering the player a menu of things to read after winning the game.

WI
371
* Example  Jamaica 1688
Adding a feature to the final question after victory, so that the player can choose to reveal notes about items in the game.

WI
430
** Example  Labyrinth of Ghosts
Remembering the fates of all previous explorers of the labyrinth.

WI
138
*** Example  Big Sky Country
Allowing the player to continue play after a fatal accident, but penalizing him by scattering his possessions around the game map.

WI


Typography

443
* Example  Chanel Version 1
Making paired italic and boldface tags like those used by HTML for web pages.

WI
70
*** Example  The Über-complète clavier
This example provides a fairly stringent test of exotic lettering.

WI
69
* Example  Garibaldi 2
Adding coloured text to the example of door-status readouts.

WI
439
** Example  Tilt 3
Displaying the card suits from our deck of cards with red and black colored unicode symbols.

WI


The Status Line

373
* Example  Blankness
Emptying the status line during the first screen of the game.

WI
402
* Example  Capital City
To arrange that the location information normally given on the left-hand side of the status line appears in block capitals.

WI
115
*** Example  Centered
Replacing the two-part status line with one that centers only the room name at the top of the screen.

WI
442
* Example  Status line with centered text, the hard way
A status line which has only the name of the location, centered.

WI
336
* Example  Ways Out
A status line that lists the available exits from the current location.

WI
337
** Example  Guided Tour
A status line that lists the available exits from the current location, changing the names of these exits depending on whether the room has been visited or not.

WI
114
* Example  Politics as Usual
Have the status line indicate the current region of the map.

WI


Footnotes

289
** Example  Ibid.
A system which allows the author to assign footnotes to descriptions, and permits the player to retrieve them again by number, using "the number understood". Footnotes will automatically number themselves, according to the order in which the player discovers them.

WI


Glulx Multimedia Effects

434
*** Example  Flathead News Network
Using external files, together with a simple Unix script running in the background, to provide live news headlines inside a story file.

WI


Testing

58
* Example  Bic
Testing to make sure that all objects have been given descriptions.

WI
404
* Example  Alpha
Creating a beta-testing command that matches any line starting with punctuation.

WI


Publishing

435
* Example  Baedeker
Creating a floorplan of the cathedral using the locations from previous examples.

WI
437
* Example  Bay Leaves and Honey Wine
Creating a map of Greece using the locations from previous examples.

WI
436
* Example  Port Royal 5
Port Royal scenario given instructions for an EPS map.

WI