Properties & attr aliases et al

Hi there,

I’ve recently discovered ZILF and I’m reading thru as many docs as possible to try and learn how to work with it. I’m just an adventure writer but I’ve always been deeply attracted by LISP as a programming language although it takes quite an effort to grasp the paradigm, given my basic programming background. I understand that I will only be able to work on the top most level, meaning the game definition layer, and forget about fiddling with the library or any MDL whatsoever. Anyways, i’ll endure!

A question here please: is there a way to create synonyms for properties and attributes at the game design level? Meaning I feel more comfortable using e.g. ISTURNEDON rather than ONBIT or any other -BIT combination. AFAIK, bit-synonym merely makes two pre existing props/attrs equivalent. But I can’t seem to find further reference in the existing docs.

Also, as to props/attrs, reading thru the several release notes of ZILF versions, there seems to be props/attrs renamed no longer compliant with Learning ZIL and, I guess, updated in the library but not documented elsewhere. Is it so?

Finally, while a bit confused by the several repositories of Infocom source codes available, I understand that ZILF 0.9 is capable of compiling these Infocom’s source code to working games, meaning ZILF is a fully operative system. Is it so? When is version 1 expected to be due?

I’m loving the beauty and simplicity of ZIL code, opposite to what the looks of Inform, while a terrific system, have always looked to me and have kept me away from trying it.

Thanks in advance!

0.9 is a misnumbered 1.

back when this forum melted down because of the (unofficial) release of the actual Infocom source code, I tested ZILF 0.9 against this corpus of the most genuine and kosher ZIL sources, and with my huge surprise, ALL sources compiles without hitch, only editing the includes for the cAsE sENtiVitY of Linux, proving beyond unreasonable doubt to be a mature compiler.

Best regards from Italy,
dott. Piergiorgio.

This is from ZILF Reference Guide:


<BIT-SYNONYM first synonyms ...>

ZIL parser library

BIT-SYNONYM creates synonyms to flag-bits.



If you, for example, want to use ISTURNEDON instead of ONBIT in your code you just have to define <BIT-SYNONYM ONBIT ISTURNEDON> somewhere in your code.

Hope this answers your question. I can’t write testcode at the moment but I’ll return later with an example.

EDIT: BIT-SYNONYM can be very useful,because the number of attributes are limited, max 32 in z-version 1-3 and max 48 in later z-versions but objects and rooms often have very different needs for attributes and therefore can use the same attribute slot for different purposes.

1 Like

Properties are a bit different. Some like FLAGS and DESC are a bit hardwired to the compiler and where its result should be stored inside the z-code, others like FDESC, LDESC, ACTION and so on are only connected and used by the parser code and you could, if you do it in all libraries, changed the name of these by a simple search-and-replace.