Changing default rulebook for trying to move in a nonexistent direction

I’m trying to add some colorful description and want to override the default report “You can’t go that way.” when a player attempts to go in a direction where there is nothing. I want to override it with room-specific text.

I looked in the Standard Rules but didn’t see any text that matched “You can’t go that way.”

I tried a rule like:

Instead of going west:
If location is home:
say “The weeds are in the way! Try another direction.”.

…but that rule gets checked every time a player goes west, whether there is a connecting room or not and forces me to reintroduce and specify every valid path from scratch.

If I could start a rule with:
If location is home…
that would solve the problem, but the syntax does not allow that.

Is there some straightforward way to do this? I can’t seem to get it right. Thanks for any suggestions. I’m really grateful for the community help on this forum.

Does this get you what you’re after?

A room has some text called the nowhere-going.  The nowhere-going is usually "You can't go that way."

The Lawn is a room.  The nowhere-going of the lawn is "The weeds are in the way."

The Street is south of the lawn.  The nowhere-going of the street is "The traffic is too dangerous!"

Instead of going nowhere, say "[the nowhere-going of the location][line break]"

(Note that this will get you the relevant text if the player tries going up or down, as well as in or out, which may or may not make sense for the game world you’re building. So you might need additional rules to deal with those cases).


Thank you so much! It works perfectly!

1 Like

If there’s only a few locations where you want this sort of treatment, you can also just write it specifically for each room:

Instead of going nowhere from the Lawn, say "The weeds are in the way."

If you want it to only affect a specific direction, then you need to use a slight variation:

Instead of going west in the Lawn, say "The weeds are in the way."

The key is to say in the Lawn rather than from the Lawn. To Inform, the former will match whenever the player is in that room regardless of the actual map, but the latter will only match if there’s actually a map connection from the Lawn to the west. (This is useful because it lets you write rules that only trigger when the player is successfully going somewhere rather than nowhere, without needing to know precisely which directions are valid.)

This is all explained in WI7.13.


Thank you! I missed that in the documentation.