Examining/Looking at a Room?

How can you manage to get the command for looking or examining the room your currently in work?

The [the location] and [the location of the player] are not being understood as a grammar token when I try to write up an Understand.

Understand "look [the location of the player]" as looking at. Understand "examine [the location of the player]" as looking at.

Looking at is an action applying to one visible thing.

Check looking at:
	say "[description of the location of the player][line break]"

This was written up as a quick way to test something, but I am getting told that it can’t understand the grammer token [the location of the player] . Although if I change it to [any room] (which isnt what I want) and the say "[description of the location of the player][line break]" will work,. I know I am not understanding something, I hope I was able to explain my question.

Basically how can you set up examining/looking at a room using [the location of the player]? Or is it possible?

This is what I use:

[Put the location in scope so the player can refer to it.]
After deciding the scope of the player:
	place the location in scope.

[Make sure the player can refer to the location using the name printed on arrival.]
Understand the printed name property as describing a room.

[Note that each room also has an understands statement to provide other synonyms.]

[We need this to ensure the room isn't considered when TAKE ALL is the command.]
Rule for deciding whether all includes a room:
	it does not.

[This handles cases in which generic words for rooms are used, or no noun is given.]

Beholding is an action applying to nothing.

Understand "examine the/-- room/place/location/space" as beholding.
Understand "search the/-- room/place/location/space" as beholding.
Understand "look at the/-- room/place/location/space" as beholding.
Understand "look around" as looking.
Understand "look around the/-- room/place/location/space" as beholding.
Understand "search" and "examine" and "x" as beholding.

Report an actor beholding:
	say "There's nothing special about the room."

[This handles cases in which the printed name of the room is used in the command.]

Beholding it is an action applying to one thing.
Understand "examine [room]" as beholding it.
Understand "search [room]" as beholding it.
Understand "look at the/-- [room]" as beholding it.

Carry out beholding it (this is the beholding rooms is looking rule):
	try beholding.

Does the player mean doing anything to the location:
	it is unlikely.

Instead of examining a room:
	try beholding instead.

[Since LOOK AROUND means looking, if the player says LOOK AROUND PADDED ROOM, we need to divert this to looking.]

Excessive beholding is an action applying to one thing.
Understand "look around the/-- [room]" as excessive beholding.

Carry out excessive beholding:
	try looking.

And, of course, I didn’t look closely enough at the code before I posted. You actually want a carry out rule for the Beholding action, not the report rule:

Carry out beholding:
	try looking.

The code I posted was from a game in which examining the room does not result in looking.

1 Like

I’m not sure the location can work that way, since it’s a pretty fluid thing (someone will correct me if I’m mistaken). Kinds, numbers, and texts all work.

Inform already has the commands implemented for examining the room. “look at” is a synonym for “examine.”

By default, the room name is not “in scope” for the player. The scope can be changed, but those changes can be quite impactful, so it’s good to be very specific.

Something like this should work:

after deciding the scope of the player while examining:
	place the location in scope.
	
instead of examining the location:
	try looking.

More on scope 18-29

edit: ninja’d

2 Likes

From the bit I understand it, the room name is a special kind of thing and isn’t automatically added to the grammar the player can refer to, and out of scope.

(I had this problem in Transparent when I wanted the player to be able to PHOTOGRAPH ROOM.)

Examining the room is usually a LOOK command. So it might be easier to redirect LOOK [ROOM NAME] or EXAMINE [ROOM NAME] to a generic LOOK command.

Or define it as a mistake and instruct the player to just type “Look”?

1 Like

Rather than trying to reuse the room as an action object (which can get tricky), I just create a second object.

The Kitchen-proxy is scenery in the Kitchen. The printed name is "Kitchen".
Understand "room", "kitchen" as the Kitchen-proxy.

Instead of examining the Kitchen-proxy:
    instead try looking.

This way you don’t have to mess with the verbs at all.

2 Likes

I needed something like this for “Daddy’s Birthday” as my family testing the game tended to type things like “examine kitchen”. Here’s the code I used. From memory, it worked all right.

Book - able to examine room
[Code by otistdog: https://intfiction.org/t/overly-elaborate-looking/50715/2]

After deciding the scope of the player while examining (this is the place the room in scope while looking rule): [limits applicability to when parsing examining action]
	place the location in scope, but not its contents. [everything else should already be in scope if applicable]

Does the player mean doing anything to the location: [still prioritizes examination of things vs rooms]
	it is unlikely.

Instead of examining a room:
	try looking instead.

Here’s a link to the original code: Overly elaborate looking - #2 by otistdog

There’s a poison to be picked, so far as managing this change goes. However the noun is dealt with, there will probably be a need to think about actions that might be applied. Players might reasonably want to search rooms, or lick them.

For most of Marbles, D, and the Sinister Spotlight, four rooms are in scope, as it takes place in a large, open space. My practice was to accept all commands, but redirect/inform as to what might actually be productive.

examining is an approved activity.
touching is an approved activity.

instead of doing something other than an approved activity when the noun is a room:
	say "I am a little cat, and [the noun] was a large place. I could only EXAMINE it or GO TO it."
1 Like