Way to rewrite the command line AFTER parsing the command?

So, I’m writing a conversation-based game (using Threaded Conversation by Chris Conley) and I’d like to be able to treat the command line as the player’s speech rather than using the “comment” function, by erasing whichever keywords the player typed and replacing it with the full phrasing. Rewrite the Command Line by Ron Newcomb allows this, but only as an “after reading the command,” which happens before it’s parsed. Is there a way, either through Inform or through an extension to change (or even just erase) the line after parsing it?

You mean on the screen? There’s no way to rewrite text once it’s printed.

I’m hoping to process the command, identify the quip that the keywords are referencing, and then print the name of the quip rather than the player’s command as written.

Okay. I should have thought more before posting… this is possible, but it’s a low-level switch and I don’t know what the current state is of doing this through I7 extensions.

The I6-level switch is calling glk_window_set_echo_stream() on the main window (when play begins). Then the interpreter won’t print the player’s command at all; it will leave it up to you. Print any line using the “input” style. You can do this after input processing.

Someone else will have to chime in with the easy way to do this.

1 Like