Inform 7 bug with adapting [their]?

This should probably be reported at the Inform bug tracker, but I was hoping that somebody might be able to tell if this is in fact an Inform bug.

This bug was reported for Counterfeit Monkey:

I ran into this sentence while facing Atlantida with Alex in charge of the body:

> shoot self with anagramming gun

The gun fires ruggedly into myself, but is unable to make anything
interesting out of a, a, a, d, e, l, n, r, and x. I recoalesce into
or original form.

That or is certainly a bug. When I put on the Britishising goggles, it’s “our original form”; this might say something about the origin of the bug, but I don’t understand Inform well enough to really say what’s going on.

The relevant line of code is this one:

 say "The gun fires ruggedly into [the noun], but is unable to make anything interesting out of [the initial key]. [The noun] [recoalesce] into [their] original form." instead; 

The “or” instead of “our” is not in itself an Inform 7 bug, but is most likely caused by Counterfeit Monkey’s “To say our:” rule:

To say our: 
 	if the player is wearing the Britishizing goggles: 
 		say "our"; 
 	otherwise: 
 		say "or". 

The bug is that it is trying to say “our” in the first place, when it should be adapting “[their]” into “my”. It also seems weird that the “To say our:” rule should affect the text Inform creates itself when adapting the possessive adjective.

EDIT:

"Their" by Administrator

Example Location is a room. 

To recoalesce is a verb.

When story begins:
	now the story viewpoint is first person singular;
	say "[regarding the player][They] [recoalesce] into [their] original form."

results in the correct: “I recoalesce into my original form.”

If I add the To say our: rule from Counterfeit Monkey I get “I recoalesce into or original form.” again.

It seems that the To say our: rule overrides all adapted forms of “their”.

1 Like

I found the following in English Language by Graham Nelson:

To say their:
	let the item be the prior named object;
	if the prior naming context is plural:
		say "their";
	otherwise if the item is the player:
		say "[our]";
	otherwise if the item is a male person and item is not neuter:
		say "his";
	otherwise if the item is a female person and item is not neuter:
		say "her";
	otherwise:
		say "its";

Counterfeit Monkey further makes this distinction about ourselves, ourself, and our body as being the player in Character Models:

Understand “us” or “ourselves” or “we” or “ourself” or “alexandra” or “your/my/our/-- body” or “you/yourself” as yourself.

This might not be exactly what you’re reporting, but it seems like attempts were made to tie the first-person plural specifically to the identity of the player. And if the To say their rule in English Language is what is applied, it does appear to translate that case to the text substitution [our]. Perhaps this is what you’re seeing?

EDIT in case you are reading this in the future: Daniel Stelzer’s reply below contains an important bit of detail that I didn’t say, but I also think is an important detail to call out. The phrase To say our is defined in English Language but is intentionally overridden in Counterfeit Monkey. So the To say their phrase’s case in English Language that will use the [our] text substitution will fall to the overridden To say our phrase in Counterfeit Monkey.

2 Likes

Yup, that’s the issue. You’ll probably want to replace all the [our]'s that mean “or” or “our” depending on the goggles with [our-suffix] or something like that. Or skip the say phrase and replace them all with [if the player is wearing the Britishisizing goggles]our[else]or[end if].

1 Like

There is another important distinction that differs slightly from your test that can also be found in Character Models:

When play begins (this is the set story viewpoint rule):
	now the story viewpoint is first person plural.

Thanks! So not a bug, then. The simplest fix seems to be to add another rule:

To say their:
	let the item be the prior named object;
	if the prior naming context is plural:
		say "their";
	otherwise if the item is the player:
		say "[if the the story viewpoint is first person singular]my[otherwise if the story viewpoint is second person singular]your[otherwise]our[end if]";
	otherwise if the item is a male person and item is not neuter:
		say "his";
	otherwise if the item is a female person and item is not neuter:
		say "her";
	otherwise:
		say "its";

and it all works as intended.

1 Like

Specifically, the issue is that [our] is a text substitution defined in English Language by Graham Nelson:

To say our:
	now the prior named object is the player;
	if the story viewpoint is first person singular:
		say "my";
	if the story viewpoint is second person singular:
		say "your";
	if the story viewpoint is third person singular:
		if the player is male:
			say "his";
		otherwise:
			say "her";
	if the story viewpoint is first person plural:
		say "our";
	if the story viewpoint is second person plural:
		say "your";
	if the story viewpoint is third person plural:
		say "their".

And [their] delegates to it when referring to the player:

To say their:
	let the item be the prior named object;
	if the prior naming context is plural:
		say "their";
	otherwise if the item is the player:
		say "[our]";
	otherwise if the item is a male person and item is not neuter:
		say "his";
	otherwise if the item is a female person and item is not neuter:
		say "her";
	otherwise:
		say "its";

Counterfeit Monkey is overriding this text substitution (because phrases in extensions can be overridden by defining the same phrase in your source code: this is an intentional feature) and thus [their] is delegating to the new [our] instead of the original [our].

The easiest solution is to rename one or the other. I doubt Counterfeit Monkey uses the English Language [our] anywhere (or this bug would have shown up sooner), so you can use that overriding behavior to make [their] instead delegate to [our-us] instead (and define [our-us] to be the code from the English Language [our]).

2 Likes

In the original source code “[our]” was used in some places where a possessive adjective was intended, probably added before the Britishizing goggles, while in others it used plain unadapted “our” even where the rest of the sentence was adapted to the story viewpoint.

At first I created a To say my-your: rule and replaced all occurrences of “our” with “[my-your]”. Then I changed my mind, thinking that it might be intentional that the body was still “our” while the viewpoint was “I” or “you”, so I changed it all back to “our”. I’m still torn on this.