the-infocom-files / moonmist

Moonmist
4 stars 3 forks source link

Maybe add <ORDER-TREE? REVERSE-DEFINED> #4

Open eriktorbjorn opened 3 years ago

eriktorbjorn commented 3 years ago

At some point in late 1985, it appears the behavior of ZILCH changed in how it generates the object tree. ZILF, by default, emulates the older behavior. Usually the object trees aren't identical, but the children of an object are generally ordered the same way as in the original release.

In practical terms, that means that from Ballyhoo and onwards, ZILF generates object trees that are markedly different unless you include the directive <ORDER-TREE? REVERSE-DEFINED>. It's probably a good idea to put it in the main ZIL file. before including any further ZIL code. (This is a simplification. Some games were re-released after the switch. Perhaps most noticeably, the order of the spells in your spellbook differ in some releases of the Enchanter series. But we should probably try to follow the original release in that respect.)

I do not have any example of any bug caused by this, but I have verified with the "infodump" tool that the object tree matches the one of the original release much more closely. One example where this makes a visible (albeit unimportant) difference is with your luggage. This is what it looks like in the current ZILF compiled version:

>OPEN LUGGAGE
You open it and see a tourist brochure, a dinner outfit, an exercise outfit and
a nightshirt.

In the original, it looks like this:

>OPEN LUGGAGE
You open it and see a dinner outfit, an exercise outfit, a nightshirt and a
tourist brochure.

Making the suggested change makes the ZILF compiled version match the original here.