listing items on a container or in a supporter

Here is my source text:

Playroom is a room.  The description of Playroom is "Along the south wall is a [bookcase] with some books."

A bookcase is in playroom.  The bookcase is a container.  The bookcase is fixed in place.  The description of the bookcase is "You can see your favorite books here: [pigeonbook] and [greeneggs].

pigeonbook is in the bookcase.  The printed name of pigeonbook is "[italic type]Don't Let the Pigeon Drive the Bus[roman type]".

greeneggs is in the bookcase.  The printed name of greeneggs is "[italic type]Green Eggs and Ham[roman type]".

Based on previous teachings, I had hoped that by putting the words in brackets in the descriptions, it would eliminate the “In the bookcase are…” message. Turns out I was wrong, as you can see.

There are actually a couple of things I would like to try doing with the bookcase. For one, I’d like it so that if the player examines the bookcase, all he/she sees is books, but if the player actually examines the books, then the titles of the books will show up. I’m fairly confident it’s feasible, as I’m quickly learning that pretty much anything is possible in writing IF, even if done in a roundabout way. However, if it’s not possible, I’m still satisfied with having just the listed books in the bookcase so long as they’re not “double-listed”, if that makes any sense. Can anyone help me? I’m looking at Room Description Control by Emily Short right now, thinking there’s something in there, but I’m having some trouble understanding it and would appreciate it if someone could dumb things down a bit for me.

Thanks for your time and knowledge, I am grateful as always.

The “double listing” comes from a Standard Rule called the “examine containers” rule. The debugging verb “rules” can be used to help you figure out what’s going on in a situation like this.

Disabling it for the bookcase is pretty straightforward:

The examine containers rule does nothing when the current action is examining the bookcase.

You probably don’t want to hardwire the books on the shelf into the description of the shelf, because of what happens if someone removes a book from the shelf and then examines the bookshelf again. You can use “[list of things in the bookcase]” (or similar) in the bookcase description instead.

Also, your books need better names, since the player’s very unlikely to guess “pigeonbook” or “greeneggs” – the only parser-recognizable names.

Thanks otistdog. I will try this. As for the bookcase specifically, I was planning on having a selection of books that could be removed from the bookcase along with other books that merely serve as scenery, to make the bookcase seem more full. I am aware of giving the books better names, I was going to have the printed name be “Don’t Let the Pigeon Drive the Bus (the pigeon book)” and an Understand “pigeon” as pigeonbook, or something like that. This was merely to get an idea of how to get rid of the double listing. Thanks again!

Alternatively, writing something like “In the bookcase is a thing called Don’t Let the Pigeon Drive the Bus. Understand “book” as Pigeon Bus,” will work just fine.