Having trouble with a room description

Hi, I am new to Inform 7 and trying to learn how to do basic room descriptions. I would like to have a paragraph describe the room. The player can then examine each item in the room as they like. Here is what I have:

[mycode]

The Study is a room. The Study is east of the Main Hall. “The study is draped in oak paneling, an incarnation of Victorian-era excess. A fireplace dominates the the wall to the left, holding court to a claw-footed couch. To the west is a solid-looking door leading to the Main Hall. Books line the wall opposite the door from floor to ceiling. To the right is a large wooden desk.”

The fireplace is in the Study. The description is “A huge stone fireplace with an empty fire iron charred and warped from generations of use.”

The couch is in the Study. The description is “Will fill in later”

The solid-looking door is in the Study. The description is “Will fill in later”

The books are in the Study. The description is “Will fill in later”

The desk is in the Study. The description is “Will fill in later”

[/mycode]

Here is the output when the player enters the Study:

[my_output]

Study
The study is draped in oak paneling, an incarnation of Victorian-era excess. A fireplace dominates the the wall to the left, holding court to a claw-footed couch. To the west is a solid-looking door leading to the Main Hall. Books line the wall opposite the door from floor to ceiling. To the right is a large wooden desk.

You can see a fireplace, a couch, a solid-looking door, a books and a desk here.

[/my_output]

I don’t want the “You can see a fireplace, a couch, a solid-looking door, a books and a desk here.”, which is already handled by the main room description. Is there a way to suppress that? Also, I guess i need to figure out how to handle plural objects (‘a books’) but I can work that out later. I tried looking in the manual, such as the Descriptions chapter, but I couldn’t find anything specific to what I am trying to do. Am I thinking about this wrong?

Make them scenery.
a fireplace is scenery in The Study.
or
a fireplace is in the study. fireplace is scenery.

2 Likes

Make them a scenery.

@HanonO, Thank you! That worked.

Also be aware that if you have scenery that is a supporter (like your desk) it will show up in the “You can also see” paragraph if anything is on the desk (supported by the supporter)

Good to know. I’m actually trying to get a “book in a bookcase” functionality working, where upon examining a bookcase tips the player off to the book being there (x bookcase = “you notice a dusty tome…”). This context will help.

@Juhana, thanks for the plurality tip.

BTW, to make something show up as code, you can write three backticks ``` on separate lines before and after, or write [code] instead of [mycode].

@matt_weiner, I did so, but it was creating horizontal scrollbars in the preview that I thought would be annoying to read. Will remember for the future.

If you define them as “some books” they’ll be plural (manual chapter 3.18.)

Some books are in the Study.
1 Like

Another thing about making things scenery is that it automatically makes them fixed in place as well–the default when you create something is that the player can pick it up, which you probably don’t want for the fireplace! So if you make it scenery you don’t have to worry about that.

BTW, to make something show up as code, you can write three backticks ``` on separate lines before and after, or write [code] instead of [mycode].

2 Likes

Also be aware that if you have scenery that is a supporter (like your desk) it will show up in the “You can also see” paragraph if anything is on the desk (supported by the supporter)

http://inform7.com/book/WI_3_8.html

If a supporter is scenery, it may still be mentioned in the room description after all, but only as part of a paragraph about other items, such as

On the teak table are a candlestick and a copy of the Financial Times.

If the player takes the candlestick and the Times, the teak table will disappear from mention. (Scenery containers do not behave in this way: their contents are assumed to be less immediately visible, and will be mentioned only if the player looks inside them.)

One other method around this if you like it better is to give your items (not scenery) an initial description paragraph that blends with your room description. That will take them out of “You can also see”.

The Study is a room. "The study is draped in oak paneling, an incarnation of Victorian-era excess."
A fireplace is in the study. "A fireplace dominates the wall to the left, holding court with a claw-footed couch."
A couch is in the study. It is scenery.
The fireplace and couch will get its own paragraph, and the couch won’t be mentioned as scenery. Unless something is on the couch.

Yeah I guess that’s a tradeoff! The thing is that when you get into more complicated Inform code you’ll need to use indentation, and the indentations don’t show up unless you use code tags. The code tags also create a button that lets people quickly copy the code in case they want to test it themselves.

You can mark each line individually with single backticks instead of marking a code block. You won’t get one-click copying, but it will allow the text to wrap properly.

(Seems to me that in 2020, formatting in modern forum software should allow for the possibility of punch cards with more than 80 columns, but whatever.)

Slightly off-topic, but I’ve made a custom CSS rule for the forum that wraps long lines in code blocks. If you install an extension that lets you add extra CSS to individual web sites, for example Stylebot for Chrome, and add this rule:

.code-highlight .hljs {
    white-space: pre-wrap;
}

Then I7 code becomes much easier to read because you don’t need to scroll horizontally.

4 Likes