disabling some reporting functions

I tried searching for the answer in the topics, but wasn’t sure what to search for, so I apologize if this has already been answered in a different topic. I’m a relative newbie to Inform and am trying to teach myself as I go with various manuals (like Jim Aikin’s) and websites (sibyl moon’s tutorials).

I’m trying to eliminate two of Inform’s automatic reporting functions.

  1. I would rather not have Inform report what objects are listed in a room. Currently I’m using this syntax “The steel door, two first level windows, the second level window, a cement back porch, a hose, a plastic kiddie pool, and a steel awning are in the Back.” where the Back is a room. I know that’s causing the extraneous reporting I don’t want, but I don’t know how to place the objects in the room without getting it to report that they’re there when the room is entered.

  2. I also would rather not have Inform say that a thing is in a container. Currently I have a hose I need placed in a kiddie pool. I would like only my description of the hose in the pool to show when the pool is examined instead of the double of my description with Inform’s own reporting.

Thanx in advance for any help and ideas.

Hi and welcome to the forum!

For the first thing, if you just don’t want the things to show up in the room description, you can make them “scenery.”

The Back is a room. "You are in back of the house. The cement back porch with a steel awning leads up to the steel door to the north. The first level window and second level window are above the awning." The first level window, the second level window, a cement back porch, and a steel awning are scenery in the Back.

Doors can also be scenery but they won’t be in the room, they’ll be in a direction from the room:

The steel door is a scenery door. It is north of the Back and south of the Kitchen.

(Note that this automatically creates the Kitchen as a room!)

Scenery objects are going to be fixed in place, which is probably a good thing for the porch and stuff, but might not be for everything else. If you want something portable to get a description that’s not just “You can see…” you can use an initial appearance. If you put something in quotes after defining a non-scenery object, it’ll become the initial appearance property, which prints when the object is there and not handled:

Some toys are in the Back. "Some toys lie scattered across the lawn."

(When you put a quoted sentence after a scenery object, it’s the description, because initial appearance doesn’t make sense for scenery. This can be confusing. If you get mixed up, you can always explicitly say “The initial appearance of the toys is…” or “The description of the toys is…”)

You can also use a “rule for writing a paragraph about,” which would run anytime the toys were in the room, no matter whether they’d been handled or not.

Rule for writing a paragraph about the toys when the location is the Back: Say "Some toys lie scattered across the lawn."

For the second question, there’s a sort of standard trick–"(in which is a hose)" gets printed by the rule for printing the name of the hose, so you have to rewrite that and tell it to knock it off:

[code]
The kiddie pool is in the Back. The hose is in the kiddie pool.

For printing the name of the kiddie pool:
say “kiddie pool”;
omit contents in listing.[/code]

See §18.10 of the documentation.

Thanx for thr help (and the welcome)!

Okay, I got the scenery thing to work thanks to the tips, but I’m still having issues with the listing of contents. I want the description of the pool to change based on whether the hose is in the pool or not, but I want to use my description and not Inform’s default description. I have this code, but it’s still telling me both my description and the “In the plastic kiddie pool is a hose.”

[code]For printing the name of the plastic kiddie pool:
say “the plastic kiddie pool”;
omit contents in listing.

The description of the plastic kiddie pool is “[if the hose is not in the plastic kiddie pool]It’s the standard blue plastic kid’s pool. There are some brown leaves and a few dead bugs in the bottom of the pool. The bottom of the pool has a series of raised fish that appear to be swimming through long fronds of seaweed. One vacation with Corey, you and he had filled it with rocks, dirt and some water and then tried to get a family of frogs to live in the pool. They always jumped out, but you both had a blast trying to find ways to keep them in.[otherwise]With the hose draped over the edge, the pool looks like it’s waiting for something to happen.”[/code]

Any help would be appreciated.

The description (response to EXAMINE) or the name? This code is intended to change the name.

After I have placed the hose in the pool, when I examine the pool I get this result from Inform that includes my description and Inform’s contents listing:

"With the hose draped over the edge, the pool looks like it’s waiting for something to happen.

In the plastic kiddie pool in the hose."

I’m trying to get the contents listing to not be there at all, so obviously I’ve mixed two things together that shouldn’t be together. I just don’t know how to fix it.

The Standard Rules has an “Examine containers” rule which prints the contents of the container after its description (if it has one). If you want to disable that, try this:

The examine containers rule does nothing when examining the kiddie pool.

And then you’ll have to make sure that you can’t put anything else in the pool, or it won’t show up when you examine it. Or you could substitute a new rule that checks to see whether anything but the hose is in the pool, and if so prints a list of them after the description of the pool.

This is independent of the “omit contents…” business, which as Draconis says works when printing the name of the pool (in response to the LOOK command, for instance).

It might be better if the examining action for containers/supporters followed the same principle as the looking action — that things which have been “officially” mentioned in the main description are not mentioned again at the end. So if you wrote

The description of the pool is "With [the hose] draped over the edge, the pool looks like it's waiting for something to happen." 

then Inform would know, after printing that description, that the hose has already been dealt with.

This isn’t the default behaviour, but I don’t see any downside to it. This code (which I’ve cobbled together from the Standard Rules, and haven’t tested rigorously) ought to be sufficient.

First carry out examining a container:
	repeat with X running through things in the noun:
		if X is not scenery and X is not the player:
			now X is unmentioned.
First carry out examining a supporter:
	repeat with X running through things in the noun:
		if X is not scenery and X is not the player:		
			now X is unmentioned.
After printing the name of something while examining:
	now the item described is mentioned.
	
For deciding the concealed possessions of a container:
	if the particular possession is mentioned, yes.
For deciding the concealed possessions of a supporter:
	if the particular possession is mentioned, yes.

This is the new examine containers rule:
	if the noun is a container:
		if the noun is open or the noun is transparent:
			if something described which is unmentioned is in the noun:
				say "In [the noun] " (A);
				list the contents of the noun, as a sentence, tersely, not listing
					concealed items, prefacing with is/are;
				say ".";
				now examine text printed is true;
			otherwise if examine text printed is false:
				if the player is in the noun:
					make no decision;
				say "[The noun] [are] empty." (B);
				now examine text printed is true;
The new examine containers rule is listed instead of the examine containers rule in the carry out examining rules.				

This is the new examine supporters rule:
	if the noun is a supporter:
		if something described which is unmentioned is on the noun:
			say "On [the noun] " (A);
			list the contents of the noun, as a sentence, tersely, not listing
				concealed items, prefacing with is/are, including contents,
				giving brief inventory information;
			say ".";
			now examine text printed is true.
The new examine supporters rule is listed instead of the examine supporters rule in the carry out examining rules.

Thank you all for the different approaches. I appreciate your thoughts and efforts.

When I get another free moment this week, I’ll give them a try.