Autocorrect feature in the parser?

I’m sure we’ve all had that experience where you’re trying to type a word, perhaps a proper noun or a name, and spellcheck autocorrects it to a word you didn’t intend. You backspace and retype it, only for autocorrect to disagree again.

Could something like this be intentionally (and very selectively) implemented into the parser? It would be a way for the player character to silently disagree with the player, no parser response required. For example, a child player character who was afraid of leaving a car could have a parser that auto-edits “exit” or “leave” or “open door” to a list of other options. I’m assuming something like this is at least theoretically possible using Vorple? Just curious.

1 Like

Absolutely, but it would have to be implemented on the interpreter side, rather than the game side. For historical reasons, the interpreter is responsible for getting the player’s input and printing it to the screen, rather than the game—which means if you want to display something that’s not what was typed (or affect it as it’s being typed), that has to happen in interpreter code.

But since the Vorple interpreter is written in JavaScript, it’s not too hard to hack the interpreter code. I don’t have a lot of experience with doing this, but Vorple lets you execute arbitrary JavaScript in the browser, which should be able to modify the input system however you like.

1 Like

Poking at it a bit, this looks like exactly what Vorple Command Prompt Control is for. See the “Manchurian Candidate” example in the docs.

1 Like

If I could heart this twice, I would. Thanks for pointing me in the right direction!

1 Like