About default responses using Small Kndness extension.

Hi!

I was surprised in my WIP when testers transcripts showed that the default response upon trying to look/examine unexistent or non present objects had spontaneously changed from the usual “I can’t see such a thing” into “That noun did not make sense in this context”. Other actions as taking or hitting were not affected.

It happened to be a side effect of including Aaron Reed’s Small Kindness extension. In fact, it seems to be related to the examining rooms chapter, as it still happened when instead of installing the whole extension I just copypasted the following part (the one I was interested in):

[code]
Understand “look at/around/in/into the/a/an/some [any player-enclosing room]” or “look at/around/in/into [any player-enclosing room]” or “look [any player-enclosing room]” or “x [any player-enclosing room]” or “examine [any player-enclosing room]” or “search [any player-enclosing room]” as overly elaborate looking.

Overly elaborate looking is an action applying to one thing.

Definition: a room is player-enclosing if it encloses the player.

Carry out overly elaborate looking:
instead try looking;[/code]

It’s not that bad, I mean, after all this other response is as meaningful as the original, but I still feel curious about why it is happening and what could be done (if anything) to get the original output.

It’s because of the “any” token. If Inform can’t find a noun in scope for the grammar line, it says “I can’t see any such thing.” But if the grammar line has an “any” token, it stops assuming that things are out of scope just because you can’t see them.

If you had a “go to [any room]” command and a “talk about [any subject]” command, then “that noun did not make sense in that context” might be the correct error message when a player types “go to the meaning of life.” Unfortunately, most of the time that message makes no sense to the player, who can’t see what grammar lines you’ve written.

Aaron has made some more recent player-friendly extensions, and it might be worth checking them out. The Player Experience Upgrade bundles a bunch of them together, but if you don’t want to go that route, I’d suggest installing Neutral Library Messages and see if that fixes the problem on its own.

Here’s an alternative. This seems to work:

[code]Understand “look at/around/in/into the/a/an/some [room]” or “look at/around/in/into [room]” or “look [room]” or “x [room]” or “examine [room]” or “search [room]” as overly elaborate looking.

Overly elaborate looking is an action applying to one thing.

After deciding the scope of the player when overly elaborate looking:
place the location in scope, but not its contents.

Carry out overly elaborate looking:
instead try looking;[/code]

I’m not totally sure what “but not its contents” does, but my sense is that it will make the operation faster and it will prevent hidden things from being placed in scope by accident.

You could also use something like this to get the normal message back:

Rule for printing a parser error when the latest parser error is the noun did not make sense in that context error: if the player's command includes "look" or the player's command includes "x" or the player's command includes "examine"or the player's command includes "search", say "You can't see any such thing."; otherwise make no decision.

(EDIT: This post turned out to be totally mistaken!)

For some or no – but weird – reason, this overrides the standard response to “X ME” with a looking action.

I haven’t got the slightest clue as to why, but you could add something like this to the carry out rule to prevent it:

Carry out overly elaborate looking: 
	if the noun is a room:
		instead try looking;
	otherwise:
		instead try examining the noun.

Felix, are you sure about that bug? When I try this:

[code]Lab is a room. George is a man in Lab. A thingy is in Lab.

Elaborate looking is an action applying to one thing. Carry out elaborate looking: try looking.
Understand “x [room]” as elaborate looking.
After deciding the scope of the player when elaborate looking: place the location in scope, but not its contents.[/code]

I get the usual response to “x me.”

Could you give us your full source, Felix?

It would probably be good to make sure that the noun is the location at least, in case a rule adds other rooms to scope.

I can confirm that capmike’s rule doesn’t affect the “x me” action in my story and also that SJ_43’s rule is the only one to succesfully bring the “can’t see such a thing” message back so far!

And, of course, thanks to all of you for your answers, I’m learning a lot of things of I7 internals with them!

I’m banging on the grammar a little bit and I did find one problem:

There’s no corresponding grammar line for “look around [something]”, apparently. This would probably work:

Understand "look around [something]" as searching.

I’d really like to see a source that can reproduce the problem. Perhaps there are other Understand lines involved?

Sure, this bug was too weird to be genuine.

I had been playing around with the example without coming up with anything, and then I apparently only pasted part of capmikee’s solution into my source text – ending up with an “x [person]” instead of an “x [room]” in the row of understand lines.
:blush:
Awfully sorry about that.

Could you believe the same happened to me? I only noticed when I started a whole new project with a couple of rooms and objects just to isolate what was happening. Now I have not one but two working alternatives. Thanks again you all! :smiley: