[MUD-Dev] Re: Verb binding
malachai at iname.com
Thu Apr 24 12:57:11 New Zealand Standard Time 1997
Chris Gray wrote:
> I was thinking about this last night, and Nathan's note reminded me...
> What about a situation like this: there is an apple tree, and you want
> to be able to pick apples from it. I do this by having two kinds of
> apples, one on the tree, and the other in the hand. So, you can refer
> to 'apple' whether or not you have picked one. The 'pick' verb is global,
> so it has no trouble generating a new apple for you, whether or not you
> have one in your hand. How would you guys do this with verbs bound to
> objects? The 'pick' verb on the apple in your hand would get called, and
> its going to have to go out and figure out whether an apple tree is
> nearby, and do the right stuff to generate a new apple. This is exactly
> what a global 'pick' verb does. In that case you have to first search
> for the verb (likely finding it on the apple being carried, but perhaps
> you have some way to force it to happen for the hidden on-tree apple),
> and then the verb has to search for a tree.
Parser looks for an apple (starting in char's inv/equ then room contents).
Finds apple in your hand.
Parser tells apple to "pick" itself.
That fails (silent, but noted), since apple is already in inv/equ.
Parser looks for apple in room's contents.
That fails, since (I assume) there are no loose apples.
Since no indirect object (implied "tree") was given, find one.
Parser queries each of the room's items' to see if they know about apple.
Finds match on "tree".
Tells tree to "pick apple".
Tree looks for apple in its contents.
Finds apple, tells apple to "pick" itself.
Apple goes to subject (player).
My parser is still nebulous and vague in places, but that's the way I'm
visualizing it so far.
"People that are really very weird can get into sensitive
positions and have a tremendous impact on history."
- Dan Quayle
More information about the MUD-Dev