Some peculiar disambiguation behaviour I’ve noticed. In this scenario, the player is permanently carrying around an object that is understood as map
, but will occasionally run across some other maps out in the world. The rule I want is that x map
always refers to a map other than the one you’re carrying, if there’s an ambiguity, which is easy enough. The weirdness ensues when I tried to print a message when preventing taking another map:
Limbo is a room. "An ethereal space, empty save for a paper map mysteriously floating in midair."
The player carries Grandpa's Map. The description is "Your grandfather's old map."
Instead of dropping Grandpa's Map, say "No, no, you'll get utterly lost without a map."
A paper map is scenery in Limbo. The description is "An ancient tattered paper map."
Instead of taking the paper map, say "The map is too old, it would fall to pieces if you tried that."
Does the player mean examining or taking Grandpa's Map: it is unlikely.
Does the player mean examining or taking the paper map: it is likely.
Test me with "rules all / x map / take map".
In the rules output for x map
the DTPM rules are run and it does examine the paper map instead of Grandpa’s map, as intended.
For take map
, on the other hand, it doesn’t even look at them; it just decides to go with the carried map regardless.
The main trigger for this appears to be that the paper map is tagged as scenery
(and undescribed
does the same thing). Somehow both these things appear to make Inform decide that the player couldn’t possibly want to take it, to the point that it doesn’t even check the disambiguation rules. Oddly, whatever causes this, it doesn’t appear to affect examining, just taking.
Removing those tags makes it run the DTPM rules and then it correctly selects the paper map in both cases.
Is there any way to teach it the error of its ways without removing the scenery tag? (I do know a workaround, but that still requires removing the scenery tag and using another method to hide it from the contents list. But I’d prefer something tidier.)