SCI Studio Tutorial Chapter 7 - Editing The Vocabulary
About Vocab Resources
There are a number of vocab resources, each serving different purposes, but to make a game, the only one you need to worry about is vocab.000 ("Words"). |
The words vocab contains all of words in the interpreter's vocabulary. If player types a word, it checks to see if it is in this resource. If it is, it checks what kind of word it is (ie. noun, verb). If it is not found, the player will get a message saying "I don't understand <the word>" and the phrase will not be parsed.
The vocab.000 provided with SCI Studio's template contains 1,389 words. You probably won't need to add many words to it, and may be able to make a complete game without touching it at all. However, there will probably be a few words that you will need to add, so I will explain how to use it.
Using the Vocabulary Editor
In the Resource Explorer, there's a list of the game's resources.
Click on the vocab folder and the list of vocab resources will appear on the right. |
Double click the last vocab resource (named "Words") and the vocabulary editor will open up.
The Vocabulary Editor will load up. |
The Vocabulary Editor
Scroll up and down to see the words in the game's vocabulary. You'll notice that words are grouped together. Words in the same group and considered synonyms by the parser. This means that whether the user types "look door" or "examine door", it considers them to be the same sentence.
To delete a word from the group, simply right click it, and from the menu, select "Delete Word". |
To add a word type to a word group, simply select it from the drop down list and click "Add". |
To delete a word type from the group, simply select it from the list box and click "Delete". |
If you added the word "abcdefg" to group 1035 ("open"), for example, you could type "abcdefg door" or "open door", and it would treat both as the same phrase.
Before adding a word, you should search for it to see if it is already in the vocabulary.
To search for a word, click on the "Find" button. |
That sums up editing the vocabulary files.
If you made any changes, click the save button, and the "Add Resource" window will pop up. As discussed in chapter 3, you just need to click "OK". |
Now that the you've finished editing the vocab and saved it, you can close the Vocabulary Editor.
Back in the Game Explorer, you will see that the vocabulary file has been updated with your changes.
Click on the Run button in the main window's toolbar to play the game with the updated vocabulary. |
Congratulations! You now know how to edit vocabulary resources.
< Previous: Chapter 6 - Editing PicsNext: Chapter 8 - An Introduction To Scripts >