The Inform Designers' Manual

Third edition, by Graham Nelson. 4th September 1996

(A full textual version of the manual is available for download, thanks to Stephen van Egmond. See also the original TeX version of the manual.)


Book one: Programming

Chapter I: The Inform Programming Language

  1. The language of routines
  2. The language of data
  3. The language of objects

Chapter II: Using the Compiler

The language of Inform
ICL (Inform Control Language); Include; conditional compilation: If..., Ifnot, Endif; Message; linking in the library; writing new modules to link in.
Compiler options and memory settings
Switches; memory sizes; typical memory usage; raising memory settings.
All the Inform error messages
Fatal errors; errors, including linker and assembler errors; warnings, including obsolete usage warnings.

Book two: Designing

Chapter III: Fundamentals

Getting started
Beginning to lay Ruins; including the library files; the Initialise routine; some properties of mushrooms; name, description and initial; edible foodstuffs; introducing before and after rules; the stone steps; self-destructing rules.
Introducing messages and classes
Recap of message-sending: a parrot; classes for treasure artifacts: the pygmy statuette, the honeycomb; how clashes are sorted out in class inheritance, additivity.
Actions and reactions
Actions are attempts; generating them with <, <<; the action, noun and second variables (and inp1, inp2); the ## notation; the standard actions, in Groups 1 to 3; creating new actions, the Blorple example; fake actions like ThrownAt; how actions are processed, over Before, During and After stages.

Chapter IV: The Model World}

Places, scenery, directions and the map
Giving Ruins a small map; n_to, d_to, etc.; when you cant_go; scenery objects; default rules; rooms have before and after too; a mist object, present in many rooms, using found_in; the five senses and reaction rules; direction objects in the compass.
Containers, supporters and sub-objects
Containers: container, supporter, capacity, open, openable; locks and keys: locked, lockable, with_key; LetGo and Receive to trap use of a container: a horrifying chasm; the Search action; transparent objects have visible sub-objects; a television set with buttons.
How to create a door; door_to, door_dir; when_open, when_closed; a stone door for Ruins; a two-way door, the Advent grate; why door_dir is needed and how to trap every attempt to go through.
Switchable objects
switchable and on: when_on, when_off; the Gotham City searchlight; a sodium lamp; describe taking precedence.
Things to enter, travel in and push around
enterable objects: a slab altar; vehicles: KAR 1; special rule about the Go action when inside something enterable; the PushDir action: a huge pumice-stone ball; pushing up and down.
Reading matter and consultation
The Consult action, look up; consult_from and consult_words: a dictionary of glyphs, Tyndale's Bible; making read and examine different.
Living creatures and conversation
animate objects and the life rule; a mummified priest, Blofeld, a coiled snake; some people are transparent; orders: actions for other people; talkable objects; parsing conversation: Zen and Charlotte; untypeable verbs; fake fake actions; several voice-activated machines; applications of scope: telepathy and phone calls.
The light and the dark
Light and darkness is automatically managed; the definition of when there is light; OffersLight and HasLightSource; going from darkness to darkness and the DarkToDark entry point; modifying the darkness object.
Daemons and the passing of time
Daemons and the daemon property; starting and stopping them; background daemons; timers (fuses); time_left and time_out; each_turn events for places and nearby objects; the time of day; changing it with SetTime; on the status line; midnight, sunrise, sunset; the exact sequence of events at end-of-turn.
Starting, moving, changing and killing the player
What Initialise should do; the location; initial restoration; teleportation and the PlayerTo routine; what happens when the room changes: NewRoom, initial for a room, visited; giving the player his own before rule; using ChangePlayer to transform him into any object; multi-character games; life and deadflag; the DeathMessage routine; resurrection and the AfterLife routine.
Miscellaneous constants and scoring
Story and Headline; MAX_CARRIED; the automatic rucksack SACK_OBJECT; amusing rewards for the victorious; two scoring systems: MAX_SCORE, OBJECT_SCORE, ROOM_SCORE; tasks: TASKS_PROVIDED, NUMBER_TASKS, task_scores, PrintTaskName; rankings and PrintRank; automatic score notification and notify_mode; objects and places verbs, removable with NO_PLACES.
Extending and redefining the Library
Enriching the model; amulets and their spells; making a new library file; new common properties; changing default values of these; the LibraryMessages system for changing messages like Dropped.; changing the prompt; the last resort, using Replace directives; even on 'hardware' functions like random.

Chapter V: Describing and Parsing

Describing objects and rooms
print (The) obj, ... (the) obj and so on; indefinite and definite article; proper nouns; the short_name of an object; invent strings and routines; exactly how inventory lines are printed; a matchbook; describe routines; exactly how rooms are described; Locale.
Listing and grouping objects
The list-maker WriteListFrom; its style bitmap; examples: tall and wide inventories; grouping similar items together in lists: foodstuffs, Scrabble pieces and denominations of coin.
How nouns are parsed
How name is used; a fried green tomato turning red; the parser breaks text into a stream of words; wn and NextWord; reading words as numbers or from their raw text; a parse_name routine is much more flexible than name; the ParseNoun entry point; distinguishing adjectives from nouns.
Plural names for duplicated objects
Collections of indistinguishable objects; a bag of six coins; the plural property for printing out plurals; definition of indistinguishable; writing parse_name routines to allow plurals to be understood; class of crowns.
How verbs are parsed
The parser's fundamental method; BeforeParsing entry point; the actor and verb word; synonyms for verbs; definitions of grammar, line and token; action_to_be; Verb directive: a simplified take grammar; meta verbs; grammar creates actions; creating an xyzzy verb; how to Extend grammar for an existing verb: pushing numbered buttons; priority: replace, first, last; splitting synonymous verbs apart with Extend only; the UnknownVerb and PrintVerb entry points.
Tokens of grammar
Full list of grammar tokens; prepositions; noun and held; implicit taking; tokens allowing multiple objects like all; filtering out nouns by attribute: use verb; and by general routine: free verb; parsing numbers: type verb, ParseNumber; general parsing routines; reading from the parser's raw text buffer and parse table; exercises, including French, telephone and floating-point numbers, times of day, adding a third parameter to a grammar line.
Scope and what you can see
The definition of in scope; which applies to other people as well; answering questions: what is a grue; scope=... tokens with programmable scope; scope_stage, ScopeWithin and PlaceInScope; changing the global definition of in scope using InScope; scope_reason; looping over and testing scope; making the rules more sensitive to darkness; a long room divided by a glass wall; the add_to_scope property for component parts of containers.
Helping the parser out of trouble
Parser error messages and ParserError; ambiguity-resolution and influencing it with ChooseObjects; making eat prefer edible objects; redefining all.

Chapter VI: Testing and Hacking

Debugging verbs and tracing
Suite of debugging verbs: purloin, abstract, tree, scope, goto, gonear, actions, routines, timers, trace, recording, replay, random; transcriptions; the random-number generator; Infix-format debugging files; how to crash the game interpreter at run-time; the levels of parser tracing; compiling with debugging code.
Limitations on the run-time format
Formats of the Z-machine; restrictions: memory, vocabulary, dictionary resolution, attributes, properties, names, special effects, objects, memory management, global variables, undo verb, function arguments; using Abbreviate to save run-time memory.
Boxes, menus and drawings
Asking yes/no questions with YesOrNo; the status line; character graphics, escape characters; proportional- and fixed-pitch fonts, font; epigrams in boxes and box; menus of text options, DoMenu, pretty_flag, menu_item; an example menu; submenus are allowed; changing the text style to bold-face, underlining, reverse video.
Descending into assembly language
Assembly language @; reliability of interpreters; table of opcodes worth knowing about; upper and lower windows: splitting, setting the window, moving the cursor, clearing the screen, word-breaking; the colour scheme; a bell sound; keyboard reading in real-time; function and cursor keys; tokenising with dictionaries; encoding dictionary entries; input/output streams; the stack frame: throw and catch; examples: a title page, drawing status lines, formatting and centering text.

Appendix: Tables and summaries

  1. Inform operators
  2. Inform statements
  3. Inform directives
  4. Grammar
  5. Library attributes
  6. Library properties
  7. Library actions
  8. Library message numbers
  9. Library-defined objects and routines
  10. Entry points and meaningful constants
  11. What order the program should be in
  12. A short Inform lexicon
  13. Answers to all the exercises

(Tutorial) NEXT
(Downloadables) PREV
(Codeface index)   UP

Andrew Clover