Replacing a SYNTAX definition from zillib

Hi all,

I found a bug in the ZIL library ZILF uses to compile my game. I want to create a workaround but I am unable to do so. In Borogove I do not have access to the ZIL library, neither do I have access to it from within https://zilf.io, because the library files are outside the visible file list and I seem unable to scroll down to see the files (I am particularly interested in the verbs.zil file which contains the bug):

Basically what I want to do is to replace a SYNTAX definition with one of my own so I can work around the library bug. Can I do this, and if so, how?

@vaporware how can I create a bug report on zillib? I do not have an Atlassian account.

Feedback is very much appreciated!

1 Like

Why not describe the bug here?

Reproduction scenario for @vaporware:

  1. load up Cloak of Darkness demo game
  2. try GO CLOAK
  3. player ends up in darkness with no way out (except UNDO)

I tried playing ARKANEN and it had the same behavior when I tried GO OUTER AIRLOCK as my first move.

In verbs.zil:

<ROUTINE V-WALK ("AUX" PT PTS RM D)
    <COND (<NOT ,PRSO-DIR>
           <TELL <LIBRARY-MESSAGE WALK NO-DIRECTION> CR>)
:
    <GOTO .RM>>

If I understand this code correctly, the first condition evaluates to TRUE (the PRSO is not a direction object), we get the library message, and then drop out of the COND and end up with GOTO .RM. Since RM is an AUX variable which has not been set (default 0 I presume), we will end up in 0 as the room.

I think this first branch in the COND should be corrected into (when looking at the other failure branches):

<ROUTINE V-WALK ("AUX" PT PTS RM D)
    <COND (<NOT ,PRSO-DIR>
           <TELL <LIBRARY-MESSAGE WALK NO-DIRECTION> CR>)
           <SETG P-CONT 0>
           <RTRUE>)

So the routine handles it like all the other non-movement scenarios.

Since I cannot modify this file, I’d like to know how to work around it by replacing
<SYNTAX WALK OBJECT = V-WALK>
with something like
<SYNTAX WALK OBJECT = V-WALK-HACK>
or sth similar to test that initial case and work around the problem.

3 Likes

I think you can just copy the V-WALK routine into your code (with modifications), possibly before inclusion of the zillib files.

2 Likes

You can define your own V-WALK after including the parser. You’ll probably need to <SET REDEFINE T> first.

Alternatively, in recent versions of ZILF (1.0+), you can do <REMOVE-SYNTAX WALK *> and then define a new syntax pointing to a different routine.

I’ve filed bugs for the unscrollable file list and the GO CLOAK issue.

4 Likes