Inform 7 Home Page / Documentation


§6.18. Alternatives To Standard Parsing

Very occasionally, for out-of-the-ordinary games, we want to make major changes to the way that Inform ordinarily understands commands.

Cloves shows how we might read adverbs in the player's command: adverbs are challenging because they can legitimately appear anywhere in a command structure, so must be found and accounted for before the rest of the command is understood.

Fragment of a Greek Tragedy goes further, substituting a keyword-recognition parser for the usual structure of commands and objects.

Less drastically, menus of numbered options can temporarily replace or augment standard commands. Down in Oodville demonstrates how to add a list of transporter destinations from which the player may choose by numeral.

* See Traits Determined By the Player for ways to ask the player a question at the beginning of play

* See Saying Simple Things for a way to ask the player a yes-no question any time during play


arrow-up.png Start of Chapter 6: Commands
arrow-left.png Back to §6.17. Clarification and Correction
arrow-right.png Onward to Chapter 7: Other Characters: §7.1. Getting Acquainted

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

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

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