Getting "examine [location]" to work

Heya.
A recurrent theme with my testers is that they try “x [the room they’re in]” and get the parser error “You can see no such thing.”

I’m tearing my hair out trying to find the syntax for this. These all fail:

Understand “examine [the location]” as looking.
Understand “examine [the location of the player]” as looking.
Understand “examine [a room]” as looking.
Understand “examine [current location]” as looking.

Is looking a synonym for something else? If so, I can’t find it in any of the documentation.

Gah. This seems so simple, but cannot figure out the correct wording.

1 Like

Maybe the easiest wording would be “Include Small Kindnesses by Aaron Reed.”

But @OtisTDog 's implementation of examining a room here shows that there’s not much code required.

3 Likes

Thank you. Not as simple as I thought, but not bad. That trick of “understand x[thing] as y” had been working great for me until this.

Here’s the definition of looking: Looking is an action applying to nothing. That’s why the compiler was rejecting your understand statements – they all indicated they expected a direct object. It’d be possible to do this…

new-looking is an action applying to one thing.

Understand “examine [a room]” as new-looking.

Before new-looking, instead try looking.

After deciding the scope of the player while new-looking:
    place the location in scope, but not its contents.

because now the understand statement matches the action it’s being paired with. (The above code is just to illustrate that point… it’s basically a worse version of the implementation I linked to.)

1 Like

Yeah. I asked for a problem to be solved and Otis solved it with that code that’s linked to. It’s a considerable advance on the Small Kindnesses version, which is what I had previously been using. Also, don’t add Small Kindnesses to any project casually (or perhaps I should say – with IFComp right around the corner). It changes a lot of things, and you need time to discover and test them all to make sure you agree with them all – and that they don’t have unwanted side-effects or collisions with what you’ve done already, like the ones I got Otis to write me out of.

-Wade

1 Like

Hmm. Maybe I shouldn’t fool with it. How annoying is that as a parser error, do you think? I’ve gotten it many times in games and it didn’t bug me too much… now I know why it happens so often. It does trouble me that quite a few testers tried xing a room and flagged that as irritating to them.

I’d say there’s really little risk from just adding Otis’ solution, and it is a nice feature.

But Wade’s right; given that you’re talking about a completed game intended for the IFComp in the near future, adding Small Kindnesses would be a bad idea; and knowing that was your situation, I should’ve noted that. (I think it’s a decent approach to that and a few other problems for someone not at the end of the project.) And he’s also right that Otis’ approach with its Does the player mean...? qualification is an improvement on Small Kindnesses’ – the reason I knew exactly where to point you is ‘cause I had recorded the URL as a comment in my own personal customize-the-world-model-to-my-tastes extension in a section that replaces Small Kindnesses’ implementation.

1 Like