Nested room inside a nested room or not?

Hi everyone,

I have a fireplace inside a room. The fireplace is large enough to walk into and you can also climb up inside the chimney, which are 3 rooms stacked up on the fireplace. Originally, I made all these as room objects. This was working for the most part, except for when the PC tried to EXAMINE FIREPLACE from the sittingRoom. The response was ‘You see no fireplace here."‘

I tried to change the fireplace and insideFireplace rooms to booth objects but now the entry into the fireplace booth isn’t listed at all. I am including the code when I had them as room objects. For clarity, the firebox room object is north of a sittingRoom room object (which is not in this section of code).

My question is, how can I code this so if the player tries to EXAMINE FIREPLACE from the sitting room, they get the description of the fireplace.

There are some travelBarriers, too. :slight_smile:


castleFireBox: Room 'fireplace'
"The large fireplace separates the sitting room and dining room. It's large enough to walk into. "

south = sittingRoom  
north: TravelConnector
{
  destination = insideFireBox
  travelBarriers = [fireBarrier, ladderBarrier]
}
;

fireBarrier: TravelBarrier
canTravelerPass(traveler,connector) { return !insideFireBox.fireBurning; }
    explainTravelBarrier(traveler, connector)
    {
      "Surely you wouldn't walk into a fire. ";
    }

;

ladderBarrier: TravelBarrier
canTravelerPass(traveler,connector) { return !ladder.isIn(me); }
    explainTravelBarrier(traveler, connector)
    {
      "The ladder is too big to take into the fireplace. ";
    }

;


insideFireBox: Room 'inside fireplace' 

"Inside the fireplace, dim light filters down from above.
<<if ironKey.isIn(castleChimneyFloor2)>>Looking up, you can just make out something hanging off a hook. It's way out of your reach.<<end>> "

fireBurning = true 
south = castleFireBox
up: TravelConnector
{
  destination = castleChimney
  travelBarriers = [upBarrier, carryLadderBarrier]
}

travelDesc = "You step into the soot covered fireplace. ";

upBarrier: TravelBarrier
canTravelerPass(traveler,connector) { return (leg2.ladderAssembled && ladder.isIn(insideFireBox)); }
    explainTravelBarrier(traveler, connector)
    {
      "You can't simply scale the chimney walls. ";
    }

;
carryLadderBarrier: TravelBarrier
canTravelerPass(traveler,connector) { return (!ladder.isDirectlyIn(me) && ladder.isIn(insideFireBox)); }
    explainTravelBarrier(traveler, connector)
    {
      "You must drop the ladder here first. ";
    }

;

castleChimney: Room 'chimney''space above hearth' 
"The bricks are covered in soot. You're about six feet from the ground. 
<<if ironKey.isIn(castleChimneyFloor2)>>Looking up, you can just make out something hanging off a hook. It's way out of your reach.<<end>>"

up = castleChimneyFloor1
down = insideFireBox

;

castleChimneyFloor1: Room 'chimney''space above hearth'
"This part is getting narrower. You're about ten feet from the ground. "
up = castleChimneyFloor2
down = castleChimney
;

castleChimneyFloor2: Room 'chimney''space above hearth'
"This part of the chimney is very narrow. You can't go up any further. "

down = castleChimneyFloor1

;

2 Likes

The easiest way to deal with this might be to add an Enterable object in the sitting room to represent the exterior of the fireplace as seen from the sitting room and then set its connector property to castleFireBox.

5 Likes

I agree that this seems the easiest solution to the problem. As I was mulling it, it occurred to me I have solved similar problems in my adv3 WIP in… altogether too many different ways (depending on the specifics of the gameplay need). In ranked order of simplicity:

  1. Clearly, Eric’s Enterable which I use so much that I effectively have a pervasive subclass called Facade for this purpose.
  2. Connect the fireplace room with the outer room via SenseConnector. Because of course I would.
  3. Add a Fixture/Decoration in the containing room with appropriate Verb Remaps (on reflection, in its simplest form this one is basically manually recreating the Enterable)
  4. Implement Fireplace as a Booth and make it a connectorStagingLocation for the chimney exit. (Section 11.4/pg 178 of Learning T3 (adv3) and the referenced article from the TADS 3 Technical Manual)

As always, unsure how many of these might work differently under adv3lite.

UPDATE: FTR, Facade code (trivial as it is)

class Facade : Enterable
    nothingUnderMsg = 'That would require some major excavation.  '
;
2 Likes

Sidenote, apropo nested nested rooms: I found myself struggling more than anticipated with this construct if the inner nested room is also a Vehicle. The default behavior is to enter the outer nested room in the vehicle, but >EXIT will have you exit the vehicle into the containing nested room. If it is too large/heavy to lift, there is no default way to get the vehicle back out! Maybe this is ok in some instances, but required a LOT of gymnastics to enable the vehicle to exit the outer nested room…

Was composing a post about this in my head when this thread appeared!

EDIT: correction. enter/no exit behavior is NOT the default Vehicle operation. That was a mid-tweak state that clouded my memory. Default operation is to exit vehicle before entering the other nested room.

2 Likes

I did think about your confession booth in your WIP. That was what led me to try a booth for the fireplace. Eric’s solution worked but thank you for your suggestions. The SenseConnector is pretty awesome.

Deborah

2 Likes