Counterfeit Monkey — 36 of 292

Emily Short

Release 5

Book 4 - Default World Model Tweaks

Part 1 - Parsing and Verb Handling

Section 1 - Smarter Parser

[These libraries by Aaron Reed are designed to make life a little easier on the novice player, and sometimes even on the advanced player, by looking for common errors when there's a parser failure, and by giving the player a greater range of control when disambiguating items with related names.]

Include Smarter Parser by Aaron Reed.

Include Numbered Disambiguation Choices by Aaron Reed.

[Use empty Smarter Parser rulebook.]

To announce the reparsed command:

say "[first custom style]([unless saved Smarter Parser error is empty][saved Smarter Parser error] Retrying that as '[reborn command]'.)[roman type][command clarification break]".

To explain the reborn command:

say "[first custom style][saved Smarter Parser error][roman type][line break]".

The unnecessary movement rule is not listed in any rulebook.

The too many words rule is not listed in any rulebook. [conversation commands can be quite long.]

[And we want to make sure that we're not listing tutorial prompts in the middle of command reparses:]

The offer new prompt rule is not listed in any rulebook.

Before reading a command when tutorial mode is true (this is the alternate new prompt rule):

if sp reparse flag is false and identification is not happening:

follow the instructional rules.

The stripping failed with rule is not listed in any rulebook. [There are too many actions in the game where "with" IS fruitful, so this often gives a misleading response.]

[A smarter parser rule when sp_normal (this is the new stripping failed with rule):

unless propping something with or attacking something with or blindfolding something with or selecting something with or shooting something with:

if stripping "(with|using|by) (the|a|some|my)? ?\w*" is fruitful:

identify error as stripping failed with rule;

reparse the command. ]

When play begins:

choose row with SP rule of asking unparseable questions rule in the Table of Smarter Parser Messages;

now the message entry is "If you're trying to converse with other characters, the suggestions in the text provide possible phrasings; so if you read 'I might ask about lentils.', you might phrase your command ASK ABOUT LENTILS. Introducing other words or variant phrasings that weren't part of the suggestion may confuse the game.

Alternatively, if you just want to take an action in the game world, try giving a direct command, such as EXAMINE THE ASP or WAVE THE P-REMOVER AT THE PHONEY."