Scenery description of an eventual room and disambiguation

This is probably fairly simple, but at the moment i’m entirely stumped. I have a textual description of the entrance to a cave , which i then present as scenery; It later becomes possible to enter said cave (and the connecting tunnels underneath), thus i need to implement it as a room.

Initially the Understand “cave” statement is used to understand the cave as scenery. However after a milestone, “enter cave” should be understood as per the room, and not the scenery object. (this is particularly tricky because the cave is initially not enterable due to x plot point!)

I feel like i’m missing something obvious here, and that this is yet another disambiguation post, and i’ve already done one of those, but i’m not quite sure how to search the index for this question,and oddly enough the forum has nothing on the matter.

Use an instead clause:

Outside Cave is a room. "There is a cave to the east."

The cave-room is east of Outside Cave. The printed name is "Cave".
The cave-room is inside of Outside Cave.

The cave-scenery is scenery in Outside Cave. It is privately-named. The printed name is "cave". Understand "cave" as the cave-scenery.

Instead of entering the cave-scenery:
	try going east;
	
Instead of exiting when the location is the cave-room:
	try going west;
3 Likes

Only thing to add is that, per your note that you might want behavior to shift after a milestone, you can add a condition to the rules:

Instead of entering the cave-scenery when the foo is barred:

3 Likes

But of course an instead clause covers this. Thanks a lot, i’ve been struggling with this one for a while and i’m now just left dumbfounded.

1 Like

Doors are enterable and can be scenery, so this does much of what you want:

Outside-cave is a room with printed name "Outside Cave".
cave-room is a room with printed name "The Cave".
The cave is a scenery open unopenable door. 
The cave is east of Outside-Cave.
cave-room is east of the cave.
before exiting in cave-room, instead try going west.
before going inside when the location is outside-cave, instead try going east.
before going outside when the location is cave-room, instead try going west.

A complication, though, is that now there’s a touchable thing called cave within both outside-cave and the cave-room, and the player can try to do all the things with it that one can try with any touchable thing. (Of course, that part was already true for the Outside Cave case in the above code.)

2 Likes

One problem with that solution:

Outside Cave
>enter cave

The Cave
>enter cave

Outside Cave
>

Of course, my solution yields “You can’t see any such thing.” :laughing:

So make it a backdrop.

Outside Cave is a room. "There is a cave to the east."

The cave-room is east of Outside Cave. The printed name is "Cave".
The cave-room is inside of Outside Cave.

The cave-scenery is a backdrop. It is in Outside Cave and cave-room. It is privately-named. The printed name is "cave". Understand "cave" as the cave-scenery.

Instead of entering the cave-scenery in outside cave:
	try going east;
	
Instead of entering the cave-scenery in the cave-room:
	say "You are already in the cave!";
	
Instead of exiting when the location is the cave-room:
	try going west;
1 Like

I’d actually written a few more lines of sample code that addressed examining the cave and entering the cave when in the cave-room, but I concluded that noting that there are a bunch of potential interactions to consider made for a more useful answer than me trying to consider them all, so I struck them.

1 Like

Frankly i have this as a last minute interaction sort of thing as i’m scrambling to have a half finished product for the springthing, i’ll double back to it probably friday.
Backdrop with a property that makes it non-interactable in a touchable way (very confusing wording for a relatively simple implementation) and an instead will address the issue i think.