[ZILF] synonyms for adjectives

The ADJ-SYNONYM doesn’t seems to work. I tried to compile “Leather Godesses of Phobos” and ZILF seems to compile it correct (the Venus Flytrap is LARGE and LARGE have lots of synonyms defined). But when I try it with zillib I don’t get it to work (see ode below).

Is this a bug in ZILFs zillib or am I doing something wrong?

<VERSION XZIP>
<CONSTANT RELEASEID 1>

<CONSTANT GAME-BANNER "Test - Adjective synonyms">

<INSERT-FILE "zillib/parser">

<ADJ-SYNONYM GRAY GREY>

<ROUTINE GO () 
    <CRLF>
    <INIT-STATUS-LINE>
    <V-VERSION> <CRLF>
    <SETG HERE ,LAIR>
    <MOVE ,PLAYER ,HERE>
    <V-LOOK>
    <MAIN-LOOP>>

<ROOM LAIR
    (DESC "Wizard's Lair")
    (IN ROOMS)
    (LDESC "You are in the wizards lair.")
    (FLAGS LIGHTBIT)>

<OBJECT CLOAK
	(IN LAIR)
	(SYNONYM CLOAK)
    (ADJECTIVE GRAY)
 	(DESC "cloak")
    (FLAGS TAKEBIT)>

When I compile this, the game compiles fine and “grey” appears in the dictionary, but the game doesn’t acknowledge the word “grey.” Is that what you’re experiencing as well?

Yes, that’s exactly what I mean…

Do the adjective synonyms actually work in your custom build of LGOP? A casual and ignorant glance at ZILF suggests to me that ADJ-SYNONYM is handled by the underlying compiler, not by the library, so…

I made a custom build of LGOP and tried a lot of synonyms to the adjective large with the flytrap and the tree (both early in the game and have the adjective large). In LGOP it works which make me suspect that it is the library.

1 Like

BTW, the DIR-SYNONYM and SYNONYM for verbs work. I havn’t tried PREP-SYNONYM yet.

All the SYNONYM (except BIT-SYNONYM) call the same function so it really doesn’t matter which one you use. In the test case you can use PREP-SYNONYM instead of ADJ-SYNONYM even though its an adjective in the part-of-speech byte.

I suspect you’ve got enough evidence to call an adult/file it on JIRA as a potential ZILF parser issue.

I’m hoping for Jesse to chime in before I do that…

You were testing the original version of LGOP, I’m guessing - have you tried the V5 (Solid Gold) version?

All the SYNONYM commands work by copying the original word’s part of speech data, which works for verbs, prepositions, and directions because those are matched by a number stored in the vocab entry. But they never work for nouns, which are matched as pointers. Adjectives are implemented one way or the other, depending on the Z-machine version.

1 Like

That’s correct. If I change the VERSION to ZIP (version 3) in the test program, the synonyms for adjectives work. So it seems that ADJ-SYNONYM only work on version 3 games not on any other version.

Yeesh. There’s at least one example each of ADJ-SYNONYM being compiled into an Infocom v4, v5, and v6 game.

(tsk tsk, angry frying pan, etc.)

1 Like

I’ve moved on to try the SYNTAX flags.

I added the following to Trinity (version 4) and I don’t think it works like it is described in “Learning ZIL”.

;"<SYNTAX FOOADJACENT OBJECT (FIND TAKEBIT) (ADJACENT) = V-FOO>"
<SYNTAX FOOHAVE OBJECT (FIND TAKEBIT) (HAVE) = V-FOO>
<SYNTAX FOOHELD OBJECT (FIND TAKEBIT) (HELD) = V-FOO>
<SYNTAX FOOCARRIED OBJECT (FIND TAKEBIT) (CARRIED) = V-FOO>
<SYNTAX FOOON-GROUND OBJECT (FIND TAKEBIT) (ON-GROUND) = V-FOO>
<SYNTAX FOOIN-ROOM OBJECT (FIND TAKEBIT) (IN-ROOM) = V-FOO>
<SYNTAX FOOMANY OBJECT (FIND TAKEBIT) (MANY) = V-FOO>
<SYNTAX FOOTAKE OBJECT (FIND TAKEBIT) (TAKE) = V-FOO>
;"<SYNTAX FOOEVERYWHERE OBJECT (FIND TAKEBIT) (EVERYWHERE) = V-FOO>"

<ROUTINE V-FOO () <TELL "You FOO the object." CR> <RTRUE>>

ADJACENT and EVERYWHERE isn’t recognized.
I can’t see any difference between HELD, CARRIED, ON-GROUND and IN-ROOM, they all seems to work like IN-ROOM.

Am I missing something in how to use these?

I can’t see that there is any difference between:
(HAVE)
(HAVE HELD)
or
(HAVE HELD CARRIED)

huh?

I made a “grep” from all Infocom files, sorted the flags. Here is the complete list of search-flags in SYNTAX:

(CARRIED HAVE HELD TAKE)
(CARRIED HAVE HELD IN-ROOM MANY ON-GROUND TAKE)
(CARRIED HAVE HELD IN-ROOM ON-GROUND TAKE)
(CARRIED HAVE HELD IN-ROOM ON-GROUND)
(CARRIED HAVE HELD MANY TAKE)
(CARRIED HAVE HELD MANY)
(CARRIED HAVE HELD ON-GROUND TAKE)
(CARRIED HAVE HELD ON-GROUND)
(CARRIED HAVE HELD TAKE)
(CARRIED HAVE HELD)
(CARRIED HAVE IN-ROOM TAKE)
(CARRIED HELD IN-ROOM MANY ON-GROUND TAKE)
(CARRIED HELD IN-ROOM MANY ON-GROUND)
(CARRIED HELD IN-ROOM ON-GROUND TAKE)
(CARRIED HELD IN-ROOM ON-GROUND)
(CARRIED HELD IN-ROOM)
(CARRIED HELD MANY)
(CARRIED HELD ON-GROUND)
(CARRIED HELD TAKE)
(CARRIED HELD)
(CARRIED IN-ROOM MANY ON-GROUND)
(CARRIED IN-ROOM MANY)
(CARRIED IN-ROOM ON-GROUND)
(CARRIED IN-ROOM)
(CARRIED ON-GROUND)
(EVERYWHERE HAVE)
(EVERYWHERE IN-ROOM MANY ON-GROUND)
(EVERYWHERE IN-ROOM ON-GROUND)
(EVERYWHERE MANY)
(EVERYWHERE)
(HAVE HELD MANY ON-GROUND)
(HAVE HELD MANY TAKE)
(HAVE HELD MANY)
(HAVE HELD TAKE)
(HAVE HELD)
(HAVE MANY TAKE)
(HAVE TAKE)
(HAVE)
(HELD MANY ON-GROUND)
(HELD MANY)
(HELD ON-GROUND TAKE)
(HELD TAKE)
(HELD)
(IN-ROOM MANY ON-GROUND)
(IN-ROOM MANY)
(IN-ROOM ON-GROUND)
(IN-ROOM)
(MANY ON-GROUND)
(MANY TAKE)
(MANY)
(ON-GROUND)
(TAKE)
1 Like

…although it works in both the archived .z5 and .z6 of Zork Zero, whose preserved code includes ADJ-SYNONYM?

>examine huge platter
[You can't see any large platter right here.]

>version

ZORK ZERO: The Revenge of Megaboz
An interactive fantasy story
Copyright (c) 1988 by Infocom, Inc. All rights reserved.
ZORK ZERO is a trademark of Infocom, Inc.
Interpreter 1 Version F
Release 153 / Serial number 880510
> examine teensy platter
[You can’t see any small platter right here.]

> version
ZORK ZERO: The Revenge of Megaboz
Copyright (c) 1988 by Infocom, Inc. All rights reserved.
ZORK is a registered trademark of Infocom, Inc.
Debugging Interpreter version 6.67
Release 393 / Pix 0 / Serial number 890714

Can it be that Zork Zero have the NEW-PARSER?

I guess?

Compiling LGOP-Gold from source does at least prove that it fails there:

<ADJ-SYNONYM WIDE BROAD>

but

Cell
   You are in a large cell with a soft, cushiony floor. A wide door (closed, naturally) forms the southern wall of the cell.
   Hanging on the wall is a painting of a pussy cat.
   You can see a tray, a flashlight, a stool and a blanket here. Sitting on the tray is a hunk of brown food.

>examine wide door
All you can tell is that the wide cell door is closed.

>examine broad door
You can't see any broad door here!
1 Like

I don’t know.

Obsessive repo has both source and binary for Zork Zero 393.

<ADJ-SYNONYM LARGE HUGE BIG GIANT GIGANTIC TREMENDOUS MIGHTY MASSIVE ENORMOUS
	     ;"LARGER HUGER BIGGER MIGHTIER">
.
.
.
<OBJECT REBUS
	(LOC GALLERY)
	(DESC "rebus")
	(DESCFCN REBUS-F)
	(SYNONYM REBUS)
	(ADJECTIVE LARGE FRAMED)
	(FLAGS READBIT SEARCHBIT CONTBIT SURFACEBIT OPENBIT)
	(OWNER WALL)
	(RESEARCH
"\"A rebus is an illustration whose component pictures spell out a word
or words, usually through the addition and subtraction of sounds or letters.
The most famous creator of rebuses was Frobesius Fublius.\"")
	(ACTION REBUS-F)>

The word “gigantic” only appears in two places in the r393 source: ADJ-SYNONYM, and in a room description.

In the Gallery,

> version
ZORK ZERO: The Revenge of Megaboz
Copyright (c) 1988 by Infocom, Inc. All rights reserved.
ZORK is a registered trademark of Infocom, Inc.
Debugging Interpreter version 6.67
Release 393 / Pix 0 / Serial number 890714

>EXAMINE GIGANTIC REBUS

resolves as expected, it (tries to) show the rebus.

Compiling the Github variant in ZILF–which has the same ADJ-SYNONYM and REBUS object, and no other instances of GIGANTIC, returns

 version
 ZORK ZERO: The Revenge of Megaboz
 Copyright (c) 1988 by Infocom, Inc. All rights reserved.
 ZORK is a registered trademark of Infocom, Inc.
 Dec-20 Interpreter version 6.70
 Release 0 / Serial number 200828

 examine gigantic rebus
 [You can't see any gigantic rebus right here.]

1 Like

Those are defined in game/library code (pbitdefs.mud).

AIUI, those flags are basically hints - if the parser can’t find a matching object in the given location, it’ll try again and look everywhere.

The vocab entry for GIGANTIC written by ZILCH in zork0dat.zap seems to define it as a pointer to another word:

Is ZILF’s version different?