1. What the text parser does
On this page
The text parser lets a player type an instruction such as look at the clock instead of choosing Look and clicking the clock. It connects typed words to the commands and responses you have already made for your game.
You do not need to write a new script for every sentence. Give Look a few useful synonyms, give the clock a few useful names, and several sentences can lead to the same response.
| The player types | The game uses |
|---|---|
| look at the clock | Look + Workshop Clock |
| examine the timepiece | Look + Workshop Clock |
| please inspect the clock! | Look + Workshop Clock |
| wind up the clock | Wind + Workshop Clock |
| help | A custom command that calls a script |
Words, commands and responses#
A verb is the action: Look, Talk, Use or Wind. A target is the thing receiving that action: the clock, Elias or a brass key. A synonym is another accepted word or phrase for the same record. A response is what you author in the target's actions.
For an ordinary one-object command, PCA 3D cleans the sentence, finds a verb, finds a target and passes them to the interaction system. That system runs the target's response. The parser chooses the instruction; the actions decide what happens next.
A custom command works differently. You enter a complete phrase, such as help, and choose the script to run. It does not need an object or a verb record. Custom commands are useful for instructions, status checks and other commands that do not belong to one visible object.
Start small: one object, one Look response and one working sentence. Add synonyms after that works. Add custom commands and two-object sentences later.
What it will not work out for you#
The parser matches the vocabulary you supply. It does not correct misspellings, invent puzzle solutions or work out the meaning of any sentence a player might write. Inspect works when you add it as a synonym. Insepct is a different word.
