Multiple choice instead of parser in Inform 7?

Hi folks! Is it possible to create IF with Inform 7 that uses a multiple choice interface to send corresponding text to the parser? If so, are there examples of this approach? If not, do any authoring systems with a complex world model support this approach? Thanks, --da’ud vyd

Yes, but I think it might be kind of awkward.

Here’s a very simple example:

[code]“1-3” by Me

This is the handle numbers rule:
if the player’s command matches “[number]”:
if the number understood is 1:
change the text of the player’s command to “north”;
otherwise if the number understood is 2:
change the text of the player’s command to “south”;
otherwise if the number understood is 3:
change the text of the player’s command to “quit”;
otherwise:
say “Number out of range.” instead;
otherwise:
say “Numbers only, please.” instead.

The handle numbers rule is listed first in the after reading a command rulebook.

Middle is a room.
Top is north of middle.
Bottom is south of middle.

When play begins:
now the command prompt is "1=N, 2=S, 3=Q > ".[/code]
You could change the rule to work with a table of values and commands, and “say” the options instead of sticking them in the prompt.

The Questions extension by Michael Callaghan works sort of along these lines.

You can also look at the source code for Bigger Than You Think. eblong.com/zarf/zweb/btyt/btyt-src.html

This supports both keyword and link input. You could fairly easily add a check for a typed number – well, maybe you’ll need some I6 for that.

Thank you.

There is also an extension called “Hybrid Choices” which lets you switch back and forth between parser and choices - or just remain in choice mode if you like.

I don’t remember if it’s in the Library in the Inform IDE, but it’s also here:
inform7.com/extensions/AW%20Frey … index.html