Instead of opening the door... (first opening the door)


I am a bit confused with the report (first opening the door), which appears even if I use an “instead of opening” rule for a door:

Instead of opening the red door, say "'Don't you touch that handle, kiddo!' cries poppa."

This gives the result:

… which, well, sucks. How do I work around it?


Try “Before opening the red door: [do something] instead.”

I think that will give the same result. The “(first opening the red door)” is being printed by the rules for the going action, before the opening action is called.

The idea behind this response is to explain to the player why they’re getting responses for an opening action when what they typed was a GO command. (The player might not have realized there was a door in the way.) It’s a reasonable default, but you could change it to something else if you wanted. It’s called the “can’t go through closed doors rule response (A)”. You’ll find it in the Actions Index, in the check rules for the going action.

You probably just want to write an extra rule to cover the situation.

Instead of going east in the lounge when the red door is closed: say "You reach out to open the red door. 'Don't you touch that handle, kiddo!' cries poppa."

Alternately, include Implicit Actions by Eric Eve, which would by default change the message to “(first trying to open the door)”, and allows it to be customized quite extensively or suppressed.

Thank you all.

What jrb says solves the issue.

Another note is that if one tries…

Instead of going through a closed door...

… one gets the same (first opening…) message, probably because going through comes after opening, while going east comes before.

By the way, since we’re at it, how can I write a general rule that covers the direction where the door is, without specifically writing “east”?

[code]An exit is a kind of door.

Instead of going the direction of a closed exit:
say “Hey, you are not going anywhere, etc.”[/code]

This shouldn’t happen. The Instead rule runs before the Check rule which produces the (first opening…) message, and should prevent it from firing.

If there’s only going to be one door in any location, you can pick out its direction with “the direction of a random visible door from the location.” You can define a word for it:

To decide which direction is doorward: decide on the direction of a random visible door from the location.

If you might have several doors in a location, maybe it’s better to define an adjective meaning “towards a door”. This isn’t elegant but it works:

Definition: a direction (called D) is doorwise if the door D from the location is not nothing.

(If you’re only interested in closed doors, you can build that in as part of the definition too.)

Either of these can be used in rule conditions.

Instead of going doorward: ...
Instead of going doorwise: ...

There is another very clever shortcut that I cannot search in the book because I don’t know the name of it.

It’s something like “The red door leads [direction of red door from the location].”

I think that’s it…

That problem sounds familiar.

The Examples linked to 3.5 in the Recipe Book suggest some good tricks. Example 321 “Whither” has a definition which is quite like my suggestion.

Thanks guys!

As for…


Oops! I just figured out why it did happen: I had only linked the door with one room, not giving it a destination room!

So, after all, I think

Instead of going through a closed door

completely covers my intentions and is very simple. Is there something I should be aware of?

That’s interesting. I thought that the condition “going through a closed door” only depended on the “door gone through” variable, but apparently it looks at the “room gone to” as well. So it’s not synonymous with “going when the door gone through is a closed door”.

Also (as an irrelevant aside), I hadn’t noticed before that the “room gone to” variable actually gets set twice: once in the “setting action variables” stage, and then again during the check stage (the determine map connections rule). I guess that’s to cater for some before rule jiggering up the map connections in between.