[i7] kissing a thing by default

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.

Thanks!

The “Understand… as something new” thing only applies to single words. So this is more what you want.

Understand the command "kiss" as something new. Understand "kiss [something]" as kissing.

It’s a bug that the things you tried compile, since they can never do anything (at least I think it’s the same bug).

Thanks! That works great now.

I see now it’s section 16.3 of the manual, but for whatever reason, I thought the additional restrictions on “kiss” meant I had to be specific.

Well, this is a good oversight to remember from.

You can also do it like this.

[code]“Test”

Understand “kiss” and “kiss [something]” as kissing.

Rule for supplying a missing noun while kissing:
now the noun is the blarney stone;
say “([the noun])[command clarification break]”.

The block kissing rule is not listed in the check kissing rulebook.

Carry out kissing the blarney stone (this is the kiss the blarney stone rule):
say “You kiss [the noun] and are endowed with the gift of the gab!”.

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 “kiss / kiss stone”.[/code]

This method switches the choosing system to manual mode and gives you more control as to what gets chosen. It’s also mentioned here.

Hope this helps.

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.