I7 possible "has been in location" bug

Hello,

I was going to post this directly on the bug tracker but it suggested to pass it by the forum folks first, so here I am.

I’ve been playing around with the “is/was/has been/had been” conditionals and just stumbled upon an unintuitive behavior:

"HasBeenRoom" by Monele

The Blue Room is a room. "This room has blue walls. There is an exit to the south."

The Red Room is south of the blue room. "This room has red walls. There is an exit to the north."

[The player is in the blue room.]		[[(Un)comment this to test the difference]]


Test me with "south / north / z".

Test alt with "z / south / z / north / z".


Every turn:
	if the player is in the blue room:
		say "<is in blue room>[line break]";
	if the player was in the blue room:
		say "<was in blue room>[line break]";
	if the player has been in the blue room:
		say "<has been in blue room>[line break]";
	if the player is in the red room:
		say "<is in red room>[line break]";
	if the player was in the red room:
		say "<was in red room>[line break]";
	if the player has been in the red room:
		say "<has been in red room>[line break]";

If you run this test case with “test me” under Inform 7 6G60 (win32 in case it’s important), you will get this:

Blue Room
This room has blue walls. There is an exit to the south.

>test me
(Testing.)

>[1] south

Red Room
This room has red walls. There is an exit to the north.

<is in red room>
<has been in red room>

It considers the player was not, nor has ever been in the blue room.

Now just uncomment “The player is in the blueroom” line, explicitely stating where the player starts and you get this:

Blue Room
This room has blue walls. There is an exit to the south.

>test me
(Testing.)

>[1] south

Red Room
This room has red walls. There is an exit to the north.

<was in blue room>
<has been in blue room>
<is in red room>
<has been in red room>

If the line is commented, you also get the player’s presence in the blue room acknowledged if you stay at least one turn in the room (see “test alt”). This leads me to think the game has the player in limbo when it starts and moves him/her afterwards… thus, he was not in the blue room when the turn started.

Is it meant to act differently just because in one case the player is not explicitely put in a room? Or is this a bug indeed?

Actually, this is the expected behaviour. It results from the fact that in the startup rulebook the update chronological records rule (which keeps track of conditions like “if the player has been in the blue room”) runs before the position player in model world rule.

This is discussed in Appendix A (the commented version of Standard Rules) A/sr2§23:

Perhaps that is a wise choice of design, too, since the behaviour, when it is unwanted, can apparently be remedied simply by the explicit assertion of where the player is at startup.

A fair point. No bug then!

As an aside, where might one find this commented version of the Standard Rules?

Thanks for the help.

The Standard Rules can be downloaded over on the Inform site from here.

Ah, thanks! I remember stumbling upon this page once but couldn’t find how to reach it again.