I’ve been trying to get the code below to work. Well, not with a photograph, but…the point remains. I know the Standard Rules have “kiss [someone]” defined. I’ve tried to redefine the action, but any combination of the “understand” commands below doesn’t work.
[code]“photograph” by Andrew
understand the command “kiss [someone]” as something new.
understand “kiss [someone]” as kissing.
understand the command “kiss [something]” as something new.
understand “kiss [something]” as kissing.
room 1 is a room.
the photograph is a thing in room 1. description is “A photograph of the girl who dumped you.”
does the player mean kissing photograph: it is very likely.
instead of kissing photograph:
say “(Insert maudlin text here.)”;
test kis with “kiss/kiss photograph”
does the player mean kissing the player: it is very unlikely.[/code]
How can I make it so kiss defaults to the photograph? I suspect I’m missing something simple, again.
If you want this to work for all the synonyms for “kiss” (like “hug”) you have to do those too.
Actually I’m not sure why this is necessary. It seems to be a source code order thing – if “kiss [someone]” is first in the source code, then I7 tries to fill “kiss” in according to that and ignores the “kiss [something]” line and the DTPM rule. Testing:
Freebling is an action applying to one thing.
Understand "freeble [someone]" as freebling.
Understand "freeble [something]" as freebling.
Report freebling: say "You freeble [the noun]."
does the player mean freebling the player: it is very unlikely.
Then “freeble” leads to freebling the player. But if we switch the two “Understand” lines, then “freeble” leads to freebling the photograph.
Oh geez. Did I ask this before? Somehow, I forgot to bookmark it. I try to do that, for threads that teach me something.
Well, it’s good to have the extra perspective. I think a big problem was, I thought you had to do something tricky with an already-defined verb. You don’t. Of course it makes sense that it’s done this way.
Also, thanks for the reminder about the kiss synonyms. I saw that in the standard rules and forgot.
While this is indeed true, this only applies when Inform automatically chooses the noun (or second noun in some cases). You can bypass this entirely by replacing the does the player mean rule with a rule for supplying a missing noun and the relevant understand line, like so.
[code]Freebling is an action applying to one thing. Understand “freeble”, “freeble [someone]” and “freeble [something]” as freebling.
Rule for supplying a missing noun while freebling:
now the noun is the blarney stone;
say “([the noun])[command clarification break]”.
Report freebling: say “You freeble [the noun].”.
The Blarney Castle is A Room. The blarney stone is in the blarney castle. The indefinite article of the blarney stone is “the”.
Test me with “freeble / freeble stone”.[/code]
This will also deal with synonyms of freeble in one fell swoop. Hope this helps.