Skip to reading
The Text Parser

6. Read Command Preview properly

Edition 0.86.3.4

Teach your adventure verbs and synonyms, add command input and connect typed instructions to real game actions.

Download PDFView illustrations
On this page

Choose the list carefully#

Do not ignore the words that distinguish your puzzle objects. If you remove red, look red key can collapse to look key. If you remove up, your wind up alias loses one of its words. Keep meaningful adjectives, directions and action words unless you have tested the consequence.

An ignored word is removed wherever it matches. It is not restricted to the start of a sentence. Changing the list can affect ordinary commands and custom phrases throughout the project, so retest both.

Capitals and punctuation#

Matching is case-insensitive. Common punctuation such as commas, exclamation marks and question marks is separated out; periods at the edges of words are trimmed. LOOK AT THE CLOCK! can therefore reach the same response as look clock.

Do not assume every symbol is discarded. Hyphens, apostrophes in names and unusual input deserve their own test. An apostrophe is treated as a separator, so a possessive name may split into more words than you expect. Add a simple alternative such as clockmaker if the full name is awkward to type.

Command Preview is the quickest way to find a vocabulary mistake. Type a sentence and read all three result lines. The result updates while you edit; Parse Preview also refreshes it.

Figure 8. An ordinary command preview shows the cleaned words, recognised verb and recognised target.

Source table from 6. Read Command Preview properly, page 12
ResultWhat to check
Cleaned commandAre the meaningful words still there after cleanup?
VerbDid the intended verb win, rather than another matching alias?
TargetDid the intended object, character or inventory record win?
Page 12 of 41Permalink
Go to page