Inform and the word "other"

Inform seems to ignore the word ‘other’ when used in the player’s command, which makes sense in most cases.

Dull Example Room is a room. The player carries a red ball. The faraway ball is scenery in Dull Example Room. It is scenery. Understand "other ball" as the faraway ball.

However, here we have a player holding a ball which she can interact with, and there is an identical scenery ball on a high shelf which she can see but never reach. If she just types “ball”, Inform correctly presumes she means the carried ball. But if she types “other ball” to specify the scenery ball, Inform still presumes she means the carried ball. Even renaming the faraway ball ‘other ball’ doesn’t work.

Is there any getting around this?

This is hard-wired into the parser. You’d have to replace the chunk of the Parser.i6t template that refers to OTHER1__WD, OTHER2__WD, OTHER3__WD.

I was expecting something like that. It’s a minor issue, really, so I think I’ll leave well enough alone. Good to know it’s possible though. :smiley:

Might you be able to hack it by using an after reading the command rule to replace “other” with something else, like “different”? Perhaps only in certain circumstances, to preserve whatever reason Inform has for treating “other” as it does?

You can fix this by adding this to your code.

[spoiler][code]Include (-

[ Descriptors o x flag cto type n;
if (wn > num_words) return 0;

for (flag=true : flag :) {
	o = NextWordStopped(); flag = false;

   for (x=1 : x<=LanguageDescriptors-->0 : x=x+4)
		if (o == LanguageDescriptors-->x) {
			flag = true;
			type = LanguageDescriptors-->(x+2);
			if (type ~= DEFART_PK) indef_mode = true;
			indef_possambig = true;
			indef_cases = indef_cases & (LanguageDescriptors-->(x+1));

			if (type == POSSESS_PK) {
				cto = LanguageDescriptors-->(x+3);
				switch (cto) {
				  0: indef_type = indef_type | MY_BIT;
				  1: indef_type = indef_type | THAT_BIT;
					indef_owner = PronounValue(cto);
					if (indef_owner == NULL) indef_owner = InformParser;

			if (type == light)  indef_type = indef_type | LIT_BIT;
			if (type == -light) indef_type = indef_type | UNLIT_BIT;

	!if (o == OTHER1__WD or OTHER2__WD or OTHER3__WD) {
	!	indef_mode = 1; flag = 1;
	!	indef_type = indef_type | OTHER_BIT;
	if (o == ALL1__WD or ALL2__WD or ALL3__WD or ALL4__WD or ALL5__WD) {
		indef_mode = 1; flag = 1; indef_wanted = INDEF_ALL_WANTED;
		if (take_all_rule == 1) take_all_rule = 2;
		indef_type = indef_type | PLURAL_BIT;
	if (allow_plurals) {
		if (NextWordStopped() ~= -1) { wn--; n = TryNumber(wn-1); } else { n=0; wn--; }
		if (n == 1) { indef_mode = 1; flag = 1; }
		if (n > 1) {
			indef_guess_p = 1;
			indef_mode = 1; flag = 1; indef_wanted = n;
			indef_nspec_at = wn-1;
			indef_type = indef_type | PLURAL_BIT;
	if (flag == 1 && NextWordStopped() ~= OF1__WD or OF2__WD or OF3__WD or OF4__WD)
		wn--;  ! Skip 'of' after these
return 0;


[ SafeSkipDescriptors;
@push indef_mode; @push indef_type; @push indef_wanted;
@push indef_guess_p; @push indef_possambig; @push indef_owner;
@push indef_cases; @push indef_nspec_at;


@pull indef_nspec_at; @pull indef_cases;
@pull indef_owner; @pull indef_possambig; @pull indef_guess_p;
@pull indef_wanted; @pull indef_type; @pull indef_mode;


-) instead of “Parsing Descriptors” in “Parser.i6t”.[/code][/spoiler]

Hope this helps.

Sorry to dig up an old topic, but how exactly does Inform deal with “other”, i.e. what does it think it is? Another thread mentions that ‘Inform decides that “another” is basically a null reference’. If I look in the library code, the lines in ScoreMatchL corresponding to OTHER_BIT are commented out. Is this a feature? What’s the thought behind it? (The player should never use ‘another’? Why?)

I’m asking because I have two doors and 2 “standing in front of the door” location, and I’d like to know if it’s possible to understand “the other door” as the one that’s not in the location. (Using I6) Thanks :slight_smile: