Does anyone know of a good way to extract the object descriptions from a zcode game? I tried using ztools but the object “descriptions” infodump extracts aren’t the descriptions I’m after. They’re just the name / title of the object. I’m trying to extract the text that comes up when you type “look” in a room or “examine” an object. Using txd I noticed that these descriptions do appear as strings at the bottom of the disassembly output. But I have no way of linking the strings to their proper objects.
“Objects” in a Z-code file contain a short string, which Infocom called the DESC, that’s generally used for the short name/printed name of that object.
But that’s the only string property that’s actually built into the Z-machine like that. For “look” and “examine”, all the output is handled by the game code. Usually there’ll be a property on the object that’s a pointer into the string table (what you’re seeing at the bottom of the disassembly output), but this isn’t a requirement: in Inform, for example, it’s not uncommon to store a pointer to a routine that prints the description instead.