Supplying a missing noun for climbing

With this sample code:

[code]The Lounge is a room.
Some Stairs are in the Lounge.

Rule for supplying a missing noun while climbing:
now the noun is the Stairs.

Instead of climbing the stairs, say “YAY!”

The player holds a hat.[/code]

I’d expect plain “CLIMB” to climb the stairs, but instead:

Rules tracing now switched on. Type “rules off” to switch it off again, or “rules all” to include even rules which do not apply.

(the hat)
[Rule “declare everything initially unmentioned rule” applies.

e.g. the hat is chosen, which is silly, and seems to be chosen before any rules run, so doesn’t let me overrule the silliness.
How does the missing noun get supplied?

Looking in the rules index, there are only missing noun rules for smelling, listening, entering, and going, so presumably this is a completely different mechanism?

The supplying a missing noun activity only runs if there’s a nounless Understand line, so you also need:

Understand "climb" as climbing.

…and yes, the thing that selects the hat is a different mechanism, which is buried deep within the parser and hard to change. The “clarifying the parser’s choice of something” activity is what prints “(the hat)” once that has happened, but you can’t really use that to fix it, I don’t think.

You can nudge the parser towards a sensible decision with

Does the player mean climbing the stairs: it is likely.
1 Like

Ah, thanks both! Both very helpful suggestions (I’d arrived at the “Understand” line but only by trial-and-error, it’s good to have confirmation that it’s a sensible thing to do and not just a coincidence!)