[ZILF] Abbreviations

I’ve been tightening up some code tonight and I was wondering if ZILF supported abbreviations like Inform?

I probably don’t need it, but I was wondering. I couldn’t find anything digging about the Infocom code.

ZAPF supports abbreviations. They aren’t really exposed at the ZIL level, and ZILF itself doesn’t have much involvement in that process (yet).

One of the output files ZILF generates is the “frequent words” file, named something like game_freq.zap. But the version ZILF generates has no words in it and thus has no effect, so to actually abbreviate anything, you’ll need to replace it with one that looks more like this. ZAPF can generate it for you:

zapf -ab game.zap >game_freq.xzap
del game_freq.zap
zapf game.zap

Once that’s done, ZILF will stop generating the dummy file, and you only need to run zapf -ab again if you make enough changes to the text that you want to re-optimize.

(Notice that the .zap file is deleted and replaced with a .xzap file. ZAPF accepts either one, but the convention of using .xzap for the actual frequent words file means you can delete *.zap to clean up, or exclude *.zap from version control, without losing the abbreviations.

This whole workflow is admittedly pretty lame, now that Moore’s law and improvements to the code have made it practical to regenerate abbreviations more often, and it’ll be improved in the future.)

1 Like

I’m glad that ZILF supports it. It’s a crazy work around, but at least you can read the game_freq and see what’s going on. Would be nice if you could put it in the source code down the road, and echo out the results if needed.

Thanks for the help - D