concealing objects from room description

Hi guys, how are you?

I’m a total n00b, so consider this my haphazard introduction and also call for help. I just started using Inform 7, and I’m soaking in as much information as possible. In particular, I’m struggling a bit with how to hide objects from the room description. For example, I have a room with a nightstand in it, and on the nightstand I want there to be a wristwatch that can be taken by the main character. I guess my question is: a) How do I conceal the object from the room description (such that the description doesn’t say “There is a wristwatch here on the nightstand”)? and b) What’s an elegant way to have the noun “removed from play” completely such that once the main character takes the wristwatch, the description of the nightstand won’t say “There is a wristwatch here”?

Hope that question was somewhat clear. I’m a bit sleep deprived and still a tad traumatized from my foray into TADS3 and then Inform 7. Programming is definitely not my strong suit.

Thanks in advance for your help :slight_smile:

Basic way:

[code]“Bedroom” by “Jizaboz”

The bedroom is a room. The description of the bedroom is usually “You are in your bedroom.”

The dresser is a supporter in the bedroom. It is fixed in place. The description of the dresser is usually “Your wooden dresser.”.

The wristwatch is a wearable thing. The wristwatch is on the dresser.
[/code]

This will produce:

One method of “concealing” the wristwatch:

"Bedroom" by "Jizaboz"


The bedroom is a room. The description of the bedroom is usually "You are in your bedroom. Beside you is a dresser."

The dresser is a supporter in the bedroom. It is fixed in place. The description of the dresser is usually "Your wooden dresser.".

For printing a locale paragraph about the dresser:
	set the locale priority of the dresser to 0;
	continue the activity.	

The wristwatch is a wearable thing. The wristwatch is on the dresser.

This will produce:

Both methods cleanly remove the wristwatch from the dresser and its description when you ‘take wristwatch’

It’s not entirely clear what effect you want. If you post the relevant part of what code you have got, it will be easier to help you improve on it.

Anyway, if Jizaboz’s suggestion happens to be not what you’re after, then perhaps this produces the effect you want?

[code]“Bedroom” by Your Self

The Bedroom is a room. “Your average bedroom: a bed, a nightstand beside the bed[if the wristwatch is on the nightstand] with a wristwatch on it[end if].”

First for printing the locale description when the wristwatch is on the nightstand: now the wristwatch is mentioned.

A nightstand is a scenery supporter in the bedroom. On it is a wristwatch.

A bed is a scenery container in the bedroom. [/code]

Producing this output:

The line «First for printing the locale description when the wristwatch is on the nightstand: now the wristwatch is mentioned.» tricks the game into thinking that it has already mentioned the wristwatch and so need not do it again. It’s a slightly roundabout way of doing it, but it’s a relativley easy one.

The conditional «[if the wristwatch is on the nightstand] with a wristwatch on it[end if]» in the description of the bedroom pretty much explains itself, I guess.

Thanks for the replies. These are certainly potential solutions for what I’m looking for! I’ll play around with a bit of the code you posted.

Sorry for being a bit vague in my initial post; the output I’m looking for is sort of like this:

I’m mostly interested in eliminating the automatic description of “There is a wristwatch here.” or “You can see a nightstand (on which there is a wristwatch) here.” My main goal is to take more control of the narrative, and not have descriptions pop up automatically based on the code. Any suggestions for going about this?

Two suggestions:

  1. don’t hide important things in the room description.
  2. just make the nightstand scenery. (It is scenery. – at the end of its description.

To have the phrase you want to be’ displayed only once:

After examining the nightstand for the first time… Etc

Sorry for being lame but i’m on an iPhone and it’s a pain to tag things :slight_smile:

A common (or even the standard) way of making a thing appear to the player only after something else is examined is creating the thing without putting it in any room at all, and then moving it to its proper place when the something else is being examined:

[code]The wristwatch is a wearable thing.
Understand “watch” as the wristwatch.

A dingy nightstand is a scenery supporter in the bedroom. The description of the nightstand is “A plywood nightstand that you vaguely remember buying for five bucks off the Internet. Nothing terribly interesting.[first time][paragraph break]Just as you’re about to turn away, you notice the wristwatch you’ve been looking for all month. So that’s where it went![only]”.

After examining the nightstand for the first time: now the wristwatch is on the nightstand.[/code]

Thanks for the suggestions, everyone. It was super helpful. I’m struggling to shift into the IF genre, since usually I write straight-up short fiction :slight_smile: It’s definitely a different mindset.

Another quick question for you guys: I tried to include a story description to appear before the title, but despite the source code compiling properly, nothing shows up. I took a look at Emily Short’s “Bronze” source code and did something to that effect:

[code]“MBTest” by englerj.

The story genre is “Science Fiction”. The release number is 1. The story headline is “An Interactive Story”. The story description is “‘This is filler text similar to the story description I tried to use.’[paragraph break]
Hopefully, the story will be complete soon…” The story creation year is 2012.
[/code]

I tried putting a period after the ellipsis as well as using a colon format that I’ve seen in other people’s documentation. Alas, it was to no avail. Thoughts?

The story description doesn’t show up in the game, I don’t think; if you release it with a web page it’ll show up there. For instance, here the part starting “A demonstration…” is the story description.

What you want is this:

When play begins: say "The thing you want to appear before the story title."