Hiding item inventory in description

In an Inform6 guide, I found an example of hiding inventory items in the description, so that it won’t be so obvious to the player that the item is important.

The example showed how to replace something like

with

Sorry for the crummy paraphrasing.

The Inform6 way to do this doesn’t seem to work in Inform7. Can anyone point me to a tutorial on how to do this?

On a vaguely related note, I gave a hat to a character named Granny to wear. The game didn’t tell the player that Granny had on a hat, even after “examine Granny”. How is the player supposed to know there’s a hat?

If I say

The description of Granny is “Granny is an old lady; she’s wearing a hat”

Then her description will be out of date if I allow her hat to fall off or get stolen.

As always, any advice is appreciated. Thanks!

If you just want the turkey to be a static object in the room – not mentioned in a separate description, or takeable by the player, but examinable, you could just make it scenery (ch 3.8). If you want it to be a normal object, just not listed separately in either the list of nondescript items or its own paragraph, modify the “writing a paragraph about” activity (ch 17.22). Marking an item as “mentioned” will tell inform it’s been taken care of and doesn’t need to be listed again. In any case, you’re allowed to put “[if…][otherwise][end if]” tags in text. See below:

[code]The Farm is a room. “You are on a farm, the sky is blue, so forth and so on. [if the turkey is in the location]A turkey scratches around nearby.[end if] It is cold, blah, blah…”

Rule for writing a paragraph about the turkey when the location is the farm:[see ch 17.22]
now the turkey is mentioned.

North of the farm is The Barn.

A turkey is an animal in the farm. It is wearing a hat. The description is “Just your usual turkey[if the item described wears something]… other than the fact it’s wearing [a list of things worn by the item described][end if].”

Persuasion rule: rule succeeds. [makes the turkey follow commands]

test me with "x turkey / turkey, drop hat / x turkey / turkey, go north / l / n ".
[/code]
Also FYI, “inventory items” generally refers to items actually in inventory (carried by the player). I’m guessing you meant “objects”.

Ah yes, I meant objects. Thanks Mike, this looks like it will work out great.

You’re welcome! FWIW, technically speaking, it would probably be more correct to add a rule before the “listing the nondescript items of something” activity (ch 17.23) which is the activity that prints out the extra items at the end of a room desc. (the stuff followed by, "You can also see… ") In the above example, replace the rule for writing a paragraph about with:Before listing nondescript items of the farm: now the turkey is not marked for listing. The results (in this case) are the same.

Oh, excellent. That’s actually going to help me with a lot of various issues.

I’ve always been annoyed when I play an IF game and encounter something like this:

On the other hand, you don’t need the moon for the game play, so it’s nice if you can just define it, to deal with the likelihood that the player will look at it, and then keep it out of the way.

I understand “scenery” and “backdrop” are useful here, or making an item a part of another item, but I appreciate that last tip as another way to deal with the problem.

Back on this topic…

Code:

Before entering the hammock when the bird is on the hammock and Granny is on the hammock and Granny is wearing the ghat: say "You climb onto the hammock and snuggle in close to Granny, causing the hammock to bounce and rock. The movement upsets the bird, which flies around the hut a bit, grabs Granny's hat in its beak, and flies out the door with it."; remove the ghat from play; remove the bird from play.

Play:

I don’t want the game repeating those last two lines, when I did a good job describing that stuff in the paragraph. I tried “instead” code instead, tried “rule for writing a paragraph about the hammock…” and other things, but I can’t get it to stop reporting. I also want it to stop only for this incident, and not throughout the game.

help appreciated as always!

Change the before rule into an after rule, that should override the normal reporting if nothing else in the code comes into way.

Weird, I wouldn’t have thought of that as something that would have worked here. But it did! Thanks Nitku!