# [i7] show chart: overriding "preferably held" once

In the following code, I want the player to show the wall chart to biff, not the astrological chart. But it appears

Understand “show [something preferably held] to [someone]” as showing it to.

Trumps “does the player mean showing the wall chart to: it is very likely.”

Is there any way to do this simply for one case besides

Understand “show [something] to [someone]” as showing it to.
does the player mean showing something showy: it is very likely

[code]“showing” by Andrew Schultz

room 1 is a room.

the wall chart is scenery in room 1.

biff is a person in room 1.

the astrological chart is a thing.

the player carries the astrological chart.

does the player mean showing the wall chart to: it is very likely.

test sc with “show chart”[/code]

The work-around I tried with “preferably” also doesn’t work and I’m not sure why.

[spoiler][code]“showing” by Andrew Schultz

Understand “show [something preferably showy] to [someone]” as showing it to.

to decide whether (a - a thing) is showy:
if a is held, decide yes;
if a is showable, decide yes;
decide no;

a thing can be showable.

room 1 is a room.

the wall chart is showable scenery in room 1.

biff is a person in room 1.

the astrological chart is a thing.

the player carries the astrological chart.

does the player mean showing the wall chart to: it is very likely.

[definition: a thing is showy if it is showable or it is held by the player.] [this doesn’t work either]

test sc with “show chart”[/code][/spoiler]

I noticed “preferably held” is the only preferably indicated in the inform docs but I couldn’t find how or why in the I6 reserved files.

Thanks!

I think the main problem is that, by trying to use the “showing it to” action, you have to fight the Standard Rules on a couple of levels:

1. “Showing it to is an action applying to one carried thing and one visible thing.” The action definition wants the noun to be carried, but you want to show Biff a scenery thing that also by Standard Rules definition can’t be carried.

2. Even transforming the wall chart to non-scenery will try to generate implicit takes to match the “showing it to” action definition, and those will fail, and then you’ll run into a Standard Rule called the “can’t show what you haven’t got” rule.

Maybe you can get around it by something like:

[code]Directing the attention of it to is an action applying to two visible things. Understand “show [something not held] to [someone]” as directing the attention of it to (with nouns reversed). Understand “show [someone] [something not held]” as directing the attention of it to. [noun = thing shown, second noun = person being shown noun]

Report directing the attention of it to (this is the default report directing attention rule):
say “[The noun] glances briefly at [the second noun].”

A wall chart is scenery in Place. A pie chart is scenery in Place.

Biff is a person in Place.

The player carries a thing called an astrological chart.

Does the player mean directing the attention of Biff to the wall chart: it is very likely. [not really functional unless there are other non-held charts around]

test sc with “show chart to Biff / show pie chart to Biff / show astrological chart to Biff” [“show chart” assumes directing the attention of it to for disambiguation but will match “showing it to” if supplied with “astrological” as a disambiguation response][/code]

Note that the understand lines for the new action “directing attention to it” build in the idea that the shown thing is not held, to be complementary to the understand lines for “showing it to”. That means the player’s command won’t generate implicit takes of X for “show X to Y” any more, which may not be a desirable side-effect. If not, there is still room to work with this approach:

```Check directing the attention of someone to something (this is the try to get a regular showing it to instead of a directing the attention of it to rule): if the second noun is fixed in place: [all scenery and backdrops should be fixed in place] continue the action; otherwise: silently try taking the second noun; if the player carries the second noun: say "(after picking up [the second noun])"; try showing the second noun to the noun instead.```

You could check out Mike Ciul’s Flexible Action Requirements (discussed here and a short snippet here that might be all you need).

Whoah, thanks. Somehow, I never saw this response, so thanks to both of you.