The 'you-can-also-see' rule

In a game, I have the following code–

[code]Jade is a woman. “[jadeapp]”. The description is “She was, of course, quite a bit older than I remembered her. I hadn’t seen her in many years, half my life ago. But I could still see the youthful beauty of her face, although there was no makeup, and her eyes had a vague frown. Her dark, Asian hair was done up in a top knot, and she was sitting there, only half-relaxed, in her own lady’s trench coat. Her legs weren’t even crossed, as if she were there purposefully.”

To say jadeapp:
say “Jade was sitting there, on the park bench, staring at me intently with her dark eyes[period]”

The describe what’s on scenery supporters in room descriptions rule does nothing when the item described is the holder of Jade.
The examine supporters rule does nothing when the noun is the holder of Jade.
After the player examining the holder of Jade:
say “[jadeapp][paragraph break]”;
if there is a notjade thing on the holder of Jade:
say “[line break]Next to Jade, you can see [a list of notjade things which are on the holder of Jade].”

Rule for printing a locale paragraph about the holder of Jade:
if the holder of Jade is not a room:
if the player is not enclosed by the holder of Jade:
say “[jadeapp][paragraph break]”.

Definition: a thing is notjade if it is not Jade and it is not the yourself.[/code]

It seems that whenever my NPC Jade is on the park bench, and the player is not, ‘I could see nothing here.’ appears at the end of a room description in response to a look. I found that this was a response to a ‘you-can-also-see rule’. I suspect this was brought on by the locale paragraph rule above, but I can’t see how…?? I added that rule (and cancelled the ‘describe’ rule) so that Jade’s initial appearance paragraph would be printed when the player looks, instead of the bland ‘On the bench is Jade’.

Any ideas?

Thanks.

It’s a little more difficult with only partial code, but I think that “the holder of Jade” is the room if she isn’t on a supporter, so the “Rule for printing a locale paragraph about the holder of Jade” gets called when printing the room description. You can test this by adding an “otherwise” clause that prints something.

If I’m right, maybe the fix is something like:

Rule for printing a locale paragraph about the holder of Jade: if the holder of Jade is not a room: if the player is not enclosed by the holder of Jade: say "[jadeapp][paragraph break]"; otherwise: rule succeeds.

I’m not in front of a computer with Inform, so this is only a reasonable guess for now.

You need to add a command to your “printing a locale paragraph rule”, something like

now the holder of Jade is mentioned;

Thanks, JRB, as always. I added that line at the end of the rule, aligned with the first ‘if’ clause. Of course, ‘the holder of Jade’ is always going to be a scenery supporter, so I guess with it being marked as ‘mentioned’, that will also override the ‘you-can-also-see’ rule, so things that are ‘on’ anything will not be ‘marked for listing’…? Am I right?

Thanks again.

There’s a Standard Rules rule for writing a locale paragraph, the “don’t mention scenery in room descriptions rule”, which usually stops scenery objects getting listed. But your “writing a locale paragraph about the supporter of Jade” rule gets in first, and ends the activity. So the other rule never fires, and Inform thinks the object still needs to be mentioned. That’s what you need to correct for.

(The scenery object still doesn’t actually get mentioned, because at the very end of you-can-also-see rule the whole job is handed over to the content listing activity for the room, with the “not listing concealed items” flag set, which ignores scenery. But that’s too late to prevent the rule itself from running.)

Another way you could fix the problem would be to put [park bench] in square brackets in the “To say jadeapp” rule. That substitution calls the “printing the name of something”, which automatically causes that thing to be mentioned.

As regards preventing auto-listing of contents: yes, you just need to stop this rule from firing:

For printing a locale paragraph about a thing (called the item)
	(this is the describe what's on scenery supporters in room descriptions rule):
        [etc]

which you can do by overriding it explicitly or (what you’re doing) pre-empting it with a more specific rule.

Thanks a lot JRB. I am always fascinated by the intricacies of Inform 7.