r/Inform7 • u/Dex21772 • Oct 04 '26
Issues with location specific Understand rules when the player is sitting in a chair in a room...
Hello folks,
I've come up against a newbie problem I'm hoping someone can help with. I have a room called The Study. In the Study I have several things including a desk chair made functional as a chair with Emily Short's Postures. Things in the room have explicit names, but also 'printed name's. Each thing also has an Understand rule which tells inform to recognize the printed name as the thing when the player is in The Study, ie The Study-Desk has a printed name "Antique Desk". Understand "Antique Desk" and "Desk" as Study-Desk when the player is in The Study. I've also included the code below to make the items outside 'Desk-Chair' visible to the player:
After deciding the scope of the player:
if the player is enclosed by a Desk-Chair:
place the location of the player in scope.
Things in the room are now available to the player when the player is in Desk-Chair *but* only when referenced using their explicit names. When the player is in the chair they can examine the 'Study-Desk' but not the 'Antique Desk'. How do I get inform to make the things available to the player by the terms defined with the Understand rule both when the player is in The Study and also when the player is sitting in Desk-Chair in The Study.
Thanks!
2
u/Olaxan is a person in The Lab Oct 04 '26
I can't test this right now, but I suspect the problem is here:
Here, you use the conditional "the player is in the Study".
And here, you use the more inclusive "the player is enclosed by a Desk-Chair".
I suspect your Understand rule would take effect properly if you wrote it the same way:
Alternatively:
I don't like this nuance of Inform7 very much, but the "X is in Y" gotcha has tripped me up many times. I think Inform doesn't consider the player to be "in the Study" in your case, because they are currently "in the Desk-Chair." I don't even understand which relation it implies -- I just always write the most verbose, safe option to avoid the nuance.
Anyway, let me know if that fixed it, otherwise I can take a second look at it!
1
u/Shardworkx Oct 07 '26
Why are you saying
Understand "Antique Desk" and "Desk" as Study-Desk when the player is in The Study.
instead of just
Understand "Antique Desk" and "Desk" as Study-Desk.