heasm66 / mdlzork

Different versions of original mainframe Zork reconstructed and patched to run under Confusion.
15 stars 6 forks source link

791211/810722: Save/Restore during balloon ride #19

Closed heasm66 closed 4 years ago

heasm66 commented 4 years ago

Benjamin Slade writes on https://babbagefiles.xyz/zork-confusion/:

Narrow Ledge
You are on a narrow ledge overlooking the inside of an old dormant
volcano.  This ledge appears to be about in the middle between the
floor below and the rim above. There is an exit here to the south.
There is a very large and extremely heavy wicker basket with a cloth
bag here. Inside the basket is a metal receptacle of some kind.
Attached to the basket on the outside is a piece of wire.
The basket contains:
 A cloth bag
 A braided wire
 A receptacle
 The receptacle contains:
  A newspaper
 A blue label
There is a small hook attached to the rock here.

> untie braided wire from hook

 *ERROR*
 "FIRST-ARG-WRONG-TYPE"
 "First arg to NTH must be structured"
LISTENING-AT-LEVEL 2 PROCESS 1
Atom REP has neither LVAL nor GVAL

I had a similar issue involving the result of a disagreement with a suspicious-looking individual holding a bag. It turns out (thanks to Matthew Russotto for the following information) that this has to do with issues in saving and restoring files, and (failure of) either properly recording or decoding certain values. The balloon issue has to do with a record about the object burning in the receptacle. It is saved as BINF!-FLAG, which should be a boolean-type flag, but at some point it became an object (recording what is burning) and apparently isn’t decoded properly on a restore. Saving-and-restoring during a battle with the suspicious-looking individual produces a similar error to the balloon-burnable error, due to the THIEF-ENGROSSED!-FLAG (which apparently really is a flag) not being saved properly. The upshot (for a player) is that you shouldn’t save during either of these bits of the game.

heasm66 commented 4 years ago

BINF!-FLAG is used to hold the OBJECT that's burning in the receptacle. When restored it is unlikly that the pointer will point to the same OBJECT. To fix this add this line after line 414 in act2.mud:

    <COND (.BINF <SET BINF <SETG BINF!-FLAG <1 <OCONTENTS .CONT>>>>)> ;"Rebind BINF to OBJ burning in receptacle."