How to block doors?

Hi, it’s me again. I’m having a problem in the same story I’m writing where I want to block and entrance/door, but I’m not sure how. I want to be able to push my object to the side to access the hole in the wall.
Cheers

Classic approach is to make your door undescribed until the object is pushed to one side. If you want to block the player even referring to the unrevealed door, make it privately-named too with an ‘Understand “hole” as the secret_door when the bookcase is moved’ (or something similar) so that it can only be referred to after it is revealed.

EDIT: otherwise, although the player will not be able to pass through the door while it is undescribed, they can (or at least try to) open it, close it, lock it, unlock it, examine it etc. like any other door- if they know it’s there and what to call it.

It sounds like you don’t really need a door here. You can make a one-way connection like this:

The Basement is a room. 
The Tunnel is a room.
The basement is east of the tunnel.
West of the basement is nowhere.

I’m presuming there’s no harm in the way east from the tunnel being to the basement from the start, 'cause the player won’t be able to get to the tunnel until the passage is exposed.

And then you can dynamically create the passage with something like:

carry out pushing the chest when the tunnel is not adjacent to the basement:
  now the tunnel is mapped west of the basement;

You’d want an appropriate After or Report rule to describe the revelation of the new passage. Another concern is that if you don’t want the thing to be pushed to be take-able, you’ll want to make it fixed in place, but The can’t push what’s fixed in place rule would then make it un-push-able, too, so you’ll want to selectively deactivate it.

2 Likes

That’s a check rule, and as one natural approach to dealing with this specific pushing action revealing the hole would be an Instead rule rather than a Carry out rule, you could then ignore the ‘can’t push what’s fixed in place rule’

1 Like

Comes down to how interactive you want the player to be able to get with the hole, I suppose. If you want the player to be able to examine it, or sniff it, or enter it (rather than just type ‘go west’) then having a door would be useful.

1 Like

I’m still new to the way these things work so could you maybe make an example using what Zed Lopez has written:

The Basement is a room. 
The Tunnel is a room.
The basement is east of the tunnel.
West of the basement is nowhere.

“Secret_Tunnel” by PB

The Basement is a room. "Cobwebs hang in dark corners of this largely empty square concrete space, dimly lit from far above by the trapdoor you just tumbled through. A heavy oak [bookcase] stands against the east wall.[first time][paragraph break]Since the trapdoor is far beyond your reach, how will you ever escape?[only]". The bookcase is a scenery thing. It is in the Basement. The bookcase can be moved or unmoved. It is unmoved. The Tunnel is a room. 

The tunnel entrance is an undescribed privately-named open unopenable door. It is east of the Basement and west of the Tunnel. The initial appearance is "[if location is Basement]A dark and forboding hole leads east from where the bookcase used to stand.[otherwise]A dim light enters from the basement to the west." The description is "It seems to lead eastwards into a low, earthen tunnel." Understand "dark" or "hole" or "tunnel" or "entrance" as the tunnel entrance when the bookcase is moved.

Instead of pushing the bookcase:
	unless the bookcase is moved:
		now the bookcase is moved;
		now the tunnel entrance is described;
		say "With a grinding heave you move the bookcase aside, revealing a dark hole leading east.";
	otherwise:
		say "It took all your strength to move it the first time!".
		
Instead of smelling the tunnel entrance: say "It smells of damp earth and leaf mould.".
Instead of smelling when the location is the tunnel: try smelling the tunnel entrance.
		

test me with "u/e/enter tunnel/push bookcase/l/x tunnel entrance/enter it/smell tunnel".
1 Like

This is another approach that doesn’t use a true door at all:

The Basement is a room. "Cobwebs hang in dark corners of this largely empty square concrete space, dimly lit from far above by the trapdoor you just tumbled through. A heavy oak [bookcase] stands against the east wall.[first time][paragraph break]Since the trapdoor is far beyond your reach, how will you ever escape?[only]". The bookcase is a scenery thing. It is in the Basement. The bookcase can be moved or unmoved. It is unmoved.

The Tunnel is a room. The Tunnel is east of the Basement.

Check going east in the Basement when the bookcase is unmoved:
	instead say "You can't go that way."

The tunnel entrance is scenery.
The initial appearance is "A dark and forboding hole leads east from where the bookcase used to stand." The description is "It seems to lead eastwards into a low, earthen tunnel." Understand "dark" or "hole" or "tunnel" or "entrance" as the tunnel entrance.

Instead of pushing the bookcase:
	unless the bookcase is moved:
		now the bookcase is moved;
		now the tunnel entrance is in the Basement;
		say "With a grinding heave you move the bookcase aside, revealing a dark hole leading east.";
	otherwise:
		say "It took all your strength to move it the first time!".
		
Instead of smelling the tunnel entrance:
	say "It smells of damp earth and leaf mould.".
Instead of smelling when the location is the tunnel:
	try smelling the tunnel entrance.

Instead of entering the tunnel entrance:
	try going east.

This relies on the fact that it’s very easy to fake a door when you don’t have to worry about OPEN, CLOSE, LOCK, or UNLOCK. The tunnel entrance object is just a scenery object, but we catch the ENTER action and that’s good enough for this example.

(It’s not two-sided like a door, so there’s no response to EXAMINE TUNNEL ENTRANCE when you’re in the Tunnel. But that’s no problem by me. If I cared, I’d make a second “tunnel exit” scenery object in the Tunnel!)

2 Likes

So as it would appear, I don’t really need a door as was plainly shown to me by Zed Lopez. Thank you for all the answers though, as it gives me a lot of extra information.