heasm66 / scott2zil

Tool for creating converting a SA-game dat-file to ZIL that compiles with ZILF
GNU General Public License v3.0
5 stars 2 forks source link

Handle get/drop for nouns only defined in items #22

Closed heasm66 closed 3 years ago

heasm66 commented 3 years ago

"Another mystery, that I stumbled over again while trying to make a ScottKit compiler, is if an “autogetable” object needs to have an entry present in the noun table. In The ADVENTURE Data Base Format Allan Moluf mentions that:

The name does not have to be a noun in the vocabulary for this pick up or drop to work.

ScottFree doesn’t agree with this, and the following game file refuses to let me pick up an object, because it’s name isn’t present as a noun in the vocabulary table:

Copy to clipboard

 0 
 0 
 1 
 18 
 1 
 6 
 1 
 0 
 3 
 125 
 2 
 1 
 300 
 2 
 0 
 0 
 0 
 0 
 150 
 0 
 300 
 5 
 0 
 0 
 0 
 0 
 300 
 0 
"AUT"
"ANY"
"GO"
"NOR"
"LOO"
"SOU"
""
"EAS"
""
"WES"
""
"UP"
""
"DOW"
""
""
""
""
""
""
"GET"
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
"DRO"
""
 0 
 0 
 0 
 0 
 0 
 0 
""
 0 
 0 
 1 
 0 
 0 
 0 
"forest"
""
"There are some keys on the ground"
"There's nothing here"
"Ring of skeleton keys/KEY/" 1 
""
""
 416 
 1 
 0

ScottKit automatically adds the noun for every “autogetable” object to the noun table. Since ScottKit’s interpreter is based on ScottFree which requires this, it makes sense. Every game out there works fine in ScottFree, which implies that this behavior is “as designed”. At the same time, the number of nouns is a limited resource, and it would be nice to be able to save space in this table.

Oddly, The Adventure System Manual contradicts Allan Moluf’s statement:

The name of the object must be a noun in the list of vocabulary entries for the automatic pick up and drop feature to work. The object name must also be a primary noun, not a synonym."