How to handle input that cannot be bound to game objects

In an interpreter based authoring system, how would it handle input that cannot or should not be bound to real objects in the game? I mean input like “take a break” or “hit the road” (the latter meaning to leave).

Consider this:

(when there is no road object in scope)

hit the road
You don’t see that here.


(when standing on the road)

hit the road
What do you want to hit the road with?

The way I would want the interpreter to respond:

hit the road
Do you mean
1.Leave to the north
2.Leave to the south
3.Break the road surface with something
Enter a number from 1 to 3:

I tried “get some rest” with an Infocom, Inform and 2 Dialog games and they all don’t understand (you don’t see that here, I only understood you willing to take something… ).

Any ideas?

I would handle those as intransitive verbs, like “wait” or “look”. They just so happen to be made up of multiple words.

In Inform, something like Understand "take a/-- break" as waiting. In Dialog, (grammar [take a break] for [wait]). A good parser should be able to distinguish this from taking an object, as long as there’s no “break” in scope.

1 Like

Or, for the other example, Understand "get some/-- rest" as waiting.

The only question is whether you want to support the full object-style range of synonyms (TAKE REST, TAKE A REST, GET REST, GET SOME REST… maybe SLEEP as a synonym for all of the above…)

If you want all of those variations, it might be easier to define a “sleep” object, out of world but always in scope, and go through the regular Taking action. However, you’d have to do some extra fussing to make sure the sleep object was disfavored for disambiguation, excluded from “all”, etc.

As per Zarf’s suggestion I made an in game object called “unbound” with an attribute called “unbound”. Whenever the parser cannot map the first noun to an object in scope, it will load the noun’s word id in the unbound attribute and kick the unbound object.

The object will check if the current action combined with the noun has a special meaning and if so, execute the code that goes with it. Next, control is handed back to the parser. If there was no special meaning, the pasrser will print the “you don’t see …. “ message.

I’m currently testing it and it seems to work.

Heh. I thought I was suggesting After deciding the scope of the player: place the sleep in scope. But if it works, good!

(In fact my suggestion requires additional futzing to bypass the takeability requirements of the TAKE action.)

Uhmm, I’m not on Inform… But the suggestion for a dedicated object really helped.