I looked at Epistemology by Eric Eve to track what the player has seen but apparently it does not quite do that (it declares e.g. possessions of NPCs as “seen / familiar / known” even if the player never looked at NPCs) so I roll my own solution.
however I am not sure how activities are using the while statement
After printing the name of something (called X) while looking or examining:
As part of a hint mechanic, I also print names of something in an Every Turn statement. Apparently this rule also triggers at that time. I can work around this, but I am wondering: does the ‘while A’ part also include any every turn rules firing after the player does A?
I did a test and it appears that it does. Also, don’t forget that the looking action occurs not just when the player types LOOK, but automatically every time they enter a room.
Well, in technical Inform terms, things carried by NPCs are visible to the player unless you conceal them – check section 3.24 of the docs “Concealment”. So Episemology is following Inform’s default ideas about seen and unseen. Perhaps by making use of the concealment mechanism on NPC posessions, you can continue to use Epistemology rather than having to produce your own alternative. Maybe you will need to use your alternative anyway, but if what you’re trying to do can be done by systems that already exist, the’re worth knowing about.
Maybe we differ on views, but I think it is more logical that we only consider things the player knows about, so e.g.
 The player cannot know what an NPC carries or wears unless they look at the NPC and the game is programmed to report what the NPC wears and carries (that is exactly what I am doing now, but my point is, the player needs to look at the NPC first.)
 The player cannot know about things not immediately visible when doing a look (either implicit when walking into a room or explicit), e.g. some things may only be mentioned by looking at other things (e.g. examine a desk to find a button etc)
Hence my use of the technique of “whenever it is mentioned in a look or examine result, we know the player has really ‘seen’ it and we can assume the player is aware of it”.
Just my 2 cents.
You should definitely use whatever system or degree of realism you want. The first page of the documentation on concealment mentions the issue of realism.
But in this sense, I think some of Inform’s behaviour is already realistic. If an NPC wearing a coat is in the room with me, I will have seen their coat. Epistemology automatically flags the coat as ‘seen’. This implies no deep player knowledge of the coat, or even that we have examined it, only that we have seen it around the place.
If the same character has a wallet, maybe we wouldn’t be able to see that in real life just by being in the same room (it might be in a pocket or something.) Inform takes the easy way out in default behaviour - it lets you see the wallet, the way it lets you see any other NPC possession. But the author can keep the wallet out of scope with a concealment rule.
All I’m saying about the LOOK action is – when you enter a room, the act of the description being printed counts as a look. So if a condition of your epistemology rule is WHILE LOOKING OR EXAMINING, you’re not keeping an NPC’s coat out of view if the NPC is wearing it when you enter their room. It will be seen. Only a concealment rule could do that.
What you would be doing by using this condition is preventing the player automatically seeing things carried by NPCs who enter the room after the PC… unless the player looks again after the NPC has entered.
Actually, Epistemology does it wrong here, and ignores the concealed property. But fixing it is simple:
In the first rule of the extension add the highlighted text:
Carry out looking (this is the mark items as seen when looking rule):
unless in darkness:
now every backdrop in the location is seen;
repeat with item running through things that are enclosed by the location:
if the item is not enclosed by an opaque closed container **and the item is unconcealed**:
now the item is familiar;
now the item is seen;
I guess this is all because I am relatively new to Inform compared to all the old hands on the forum. A case in point: I tried using
Include Tutorial Mode by Emily Short. (to save some work and stand on the shoulders of the proverbial giants). Then I get a result like this:
You can find out more if you LOOK AT THE SUN (or shorten it to L SUN).
The noon sun, a merciless inferno in the cloudless sky,
scorches the land with waves of heat.
There are other things around here that you can look at too, if you like.
You can check out other things in your surroundings,
or LOOK AT ME to see yourself.
As good-looking as ever.
You can pick things up when you see them,
like this: TAKE THE BLUE ROBE.
And that blue robe is in scope, so the PC (player character) is technically aware of it, but the player (the person playing the game) is not. Even though the item in question is a piece of clothing worn by the PC. So the tutorial suggests to  pick up something which is already worn, and  refers to something the player is not even aware of unless they did a
take inventory first. Maybe I am nitpicking here, but I prefer a tutorial to  provide sensible commands, and  not refer to things not yet seen by the player behind the keyboard (thats cheating IMHO).
Yes, that tutorial mode extension is generic. It has a set of default lessons and tries to plug them into the contents of whatever game it’s added to, so often the results are also generic, or unsatisfying. It just can’t know any better because it doesn’t understand your particular game. Making a good tutorial that works for your game can be quite a challenge! (e.g. see forum topics like Writing a Tutorial Mode in Inform 7) It’s often best done once you have a complete game, or lots of game. I wouldn’t worry about it early.
Sorry if I’ve caused you any confusion with my nitpicking on Epistemology, and seen and unseen, etc. If you start to get your knowledge system going – whether it’s Epistemology, or a modified version, or something new – and find you need any help with it, let me/us/them know.