Completion kept hanging by failed action?

An odd bit from my transcript:

> unlock cage

With what?

> key

You sling the key into the lock, but as you turn it, the rusted metal snaps off inside. The crumbling fragments fall to the ground as you slam your fist against the wire mesh in frustration. This is not your day.

> l

Break Room

Shadows and grime linger in dark corners of this dismal room with just one tiny frosted window. Some rotting picnic tables strewn with layers of sand and crumbling trash are pushed against one wall. On the opposite wall is a closed wire mesh cage, in which is an emergency blanket. A clunky old-fashioned emergency radio sits on a table.

Open doorways lead west and north.

> tune radio

(I only understood you as far as wanting to unlock the wire mesh cage with something.)

I have to dig into the stdlib code, but it feels like the (asking for object in $) is having trouble because the response, key hits a (instead of [unlock * with #rusted-key]) rule. I’ll look into it.

I played through a whole game where periodically I’d get disambigution questions unnecessarily, always referencing that metal cage.

1 Like

I tried to reproduce this with minimal code, but couldn’t. This is what I tried:

Code
#player
(current player *)
(* is #in #room)

#room
(name *)        break room
(room *)

#cage
(name *)        cage
(* is #in #room)
(lockable *)

(instead of [unlock * with #key])
        Doing something instead.

#key
(name *)        key
(item *)
(* is #heldby #player)
Output
An Interactive Fiction
An interactive fiction by Anonymous.
Release 1. Serial number DEBUG.
Dialog Interactive Debugger (dgdebug) version 0m/01. Library version 0.44.

Break room
You are here.

> unlock cage
With what?

> key
Doing something instead.

> l
Break room
You are here.

> tune radio
(I'm sorry, I didn't understand what you wanted to do.)

My suggestion is to hook into the read-parse-act loop and show what the current implicit action is:

(parse action sequence $Words)
        (log) {
                p. a. s. $Words
                (if) (implicit action is $A) (then)
                        implicit $A
                (else)
                        no implicit
                (endif)
        }
        (fail)

And maybe also:

(asking for object in $Template)
        (log) { setting implicit $Template }
        (fail)

Do you have any custom grammar rule that might produce [unlock #cage with $]?

I’ll try adding your logging and see if I can reproduce in my code (which is now public, on github btw).