A vocabulary list is a collection of words to be rcognized by the game's parser. They
are used for objects, actions and modifiers.
Examples of vocabulary are nouns, adjectives, adverbs, prepositions. Each vocab has a different format and purpose. It contains the game's vocabulary. For example, if the player
types "look", it checks this to see if the word is in the game's vocabulary. If it is, it checks what type of word it is (ie. noun, verb, etc.) and evaluates it.
- All words that can be inputted by the user must reside in the vocabulary in order for the parser to accept the user input, with the exception of word suffixes (see
below).
- It is critical that the correct parts of speech are associated to each vocab word for the parser to interpret what the user is attempting to communicate. It is not recommended
to change parts-of-speech of a word just to get the desired result in your code. There is an occasional need for it, but before doing it explore all other avenues.
- Note that the template game has most (if not all) of the vocabulary words from all SCI0 games. This means that the need for adding new words will probably be limited to nouns
and qualifying adjectives (and perhaps some imperative verbs & adverbs). When adding new words, it is recommended to find other similar words & model the parts-of-speech
from them.
- Word suffixes: It is not necessary to add word suffixes to the vocabulary words unless the game developer would like to make a distinction in their
code (specifically in the Said() string syntax) between two words with the same root word (example: tree vs. trees, jump vs. jumping, etc). Suffixes are predefined in another
vocab resource not directly accessible for modification within SCI Studio. This means that if 'tree' is defined in the vocab (and it's plural is not), the user is free to enter
the word 'trees' & the parser will accept the input, ultimately converting the word down to it's base word 'tree'.
- Synonyms: The use of synonyms is encouraged. Any number of synonyms can be used for a word; they reside with the word in vocabulary, separated with the vertical bar (|) character.
Using synonyms limit the amount of code a developer needs to write to handle various inputs & makes it easier to the game player for find a word that matches the intended
meaning. Take for example the word 'door'. It could by matched in the input phrase 'open door'. However, if we added a few synonyms to door (like this: 'door | portal | gateway
| opening'), then the user could enter 'open portal' or 'open gateway', and the developer's code would work as if the user inputted 'open door'.
You can use the Vocabulary Editor To create and edit vocabulary lists.