Inform 7 becomes confused about my rooms' names

Since I plan to have a larger game I resorted to have a bit longer room names to avoid name clashes lateron.
However, Inform 7 apparently became confused about two of my rooms, although as far as I’m concerned they appear to have sufficiently differing names:

Doranos Water Plant Corridor To Water Access is a room with printed name "Water Access Corridor".
The description of Doranos Water Plant Corridor To Water Access is "This corridor goes from east to west, with the east end going slightly downwards. It has bright blinking red lights at its walls, indicating some sort of emergency state.

On the walls, arrows with 'Water Access' written above them point east, and arrows with the title 'Examination Lab' point west.".
Doranos Water Plant Corridor To Water Access is east of Water Plant Lower Central Room.
Doranos Water Plant Corridor To Water Access is west of Doranos Water Access.
Doranos Water Access is a room with printed name "Water Access Hall".
The description of Doranos Water Access is "You are in a large hall with a canal carrying water crossing from north to south. A bridge goes over it in the center, and at the west side of the canal, stairs go down to a platform directly at the surface of the water.

Northwest is a gate large enough to allow big vehicles to pass through. At the east side, there is a control terminal with a plant worker in front of it watching the controls. West is the corridor to the lower central room. South is another gate similar to the one leading northwest.
[if Huddleston is in water plant water platform]

Down at the platform, you can see Mr. Huddleston.[end if]".

The corridor is obviously named that way because it leads to the Water Access room.

This code results in the error:

Problem. You wrote 'The description of Doranos Water Access is "You are in a large hall with a can [...] ou can see Mr. Huddleston.[end if]"'  , but in another sentence 'The description of Doranos Water Plant Corridor To Water Access is "This corridor goes from east to we [...] itle 'Examination Lab' point west."'  : but this looks like a contradiction, because the same property seems to be being set in each of these sentences, but with a different outcome.

Is there something I have missed/done wrong? Is this some sort of Inform bug? Or is that sort of naming simply not supported by design? (that would be odd)

Inform uses all the words in the name, but doesn’t care about skipping words. ‘Doranos Water Access’ is an equally valid match for both.

Wouldn’t it at least pick the one that is more likely to match instead of the random first one that fits with skipping words? Is there any chance this could get fixed if I reported it? It seems hard enough to avoid the same room name because there is no sense of scoping for them, now I also need to avoid room names including others… (which in my opinion makes a lot of sense e.g. for corridors leading to rooms etc)

Probably not worth changing. It would change how everything is matched and it would probably break things. IIRC it doesn’t match a random one, it matches whichever it finds first. Likely whichever is defined in the source first.

Anyway. Just smack something onto the name and use that when you need to disambiguate.

Remember that the internal name of a room doesn’t necessarily have to be the same as its printed name, it just happens to be so by default for convenience. You can do something like this:

The plant-to-water corridor is east of Water Plant Lower Central Room.
The printed name of plant-to-water corridor is "Doranos Water Plant Corridor To Water Access".

This would still break if I did doranos-plant-to-water and doranos-water I think. (probably not with doranos-plant-to-water-corridor and doranos-water - but then it would break if I ever had a doranos-corridor!)

What I just don’t like is how even when the room name matches exactly, Inform still guesses something else just because by wildly skipping things that can possibly match aswell :frowning: to avoid that isn’t exactly fun or intuitive.

I suppose I will send a bug report and hope a change is considered (just for the cases where it matches exactly).

No, using hyphenated names will work fine, even if one completely contains the other, because Inform sees the whole hyphenated thing as a single word. doranos-plant-to-water-corridor and doranos-water and doranos-corridor and water-corridor are all quite separate; they don’t even have any words in common! The only problem is that you have to specify the printed name of every room separately, as Juhana does. Also, if you want to use some of Emily Short’s extensions to make navigation easier, you may have to add extra terms to Understand rooms, but in the standard rules there isn’t anything trying to Understand rooms.

Ooohh I hadn’t thought of that :slight_smile: that is nice. I will probably use hyphenated room names then (I mostly specify the printed name separately anyway). Sorry for not getting that right away :smiley:

Or “plant-water-corr” or even “p2w-cd” if you like.

Hi,

I think you can remove the hyphens from room names with one rule (at least it works for me so far):

Code:

Rule for printing the name of a room:
let t be indexed text;
let t be printed name of item described;
replace the regular expression “-” in T with " ";
say “[t]”.

Neil

You know, your original example would’ve worked just fine if you’d simply used that printed names “Water Access Corridor” and “Water Access Hall” as the actual names of the rooms. Or, if you really had several water access corridors or halls in your game, you could’ve made them e.g. “Doranos Water Access Corridor” and “Doranos Water Access Hall”.

Water Access Corridor is a room. "This corridor goes from east to west, with the east end going slightly downwards. It has bright blinking red lights at its walls, indicating some sort of emergency state.[paragraph break]On the walls, arrows with 'Water Access' written above them point east, and arrows with the title 'Examination Lab' point west.".

Water Plant Lower Central Room is west of the Water Access Corridor. [Needs a description.]

Water Access Hall is east of Water Access Corridor. "You are in a large hall with a canal carrying water crossing from north to south. A bridge goes over it in the center, and at the west side of the canal, stairs go down to a platform directly at the surface of the water.[paragraph break]Northwest is a gate large enough to allow big vehicles to pass through. At the east side, there is a control terminal with a plant worker in front of it watching the controls. West is the corridor to the lower central room. South is another gate similar to the one leading northwest[if Huddleston is in Water Access Platform][paragraph break]Down at the platform, you can see Mr. Huddleston[end if].".

Water Access Platform is down of the Water Access Hall. "You are standing on a platform just above the water. Stairs lead up back to the water access hall."
Huddleston is a man in Water Access Platform. The printed name is "Mr. Huddleston".

Well the entire point was not using the printed names, because I don’t want to go back rename everything when I ever have another water access hall in the game.

This might seem stupid for something special like a water access hall, however, I have things like a bathroom of which I will definitely end up with another one in the game, and I didn’t want to disambiguate just some of my rooms and not others (simply for thinking less about room naming and doing it all in the same consistant way).

For the corridor, it simply seemed intuitive to name it corridor to water access hall, since that is what it is.

And yes, I could keep the Doranos in front and simply name the rooms in a fashion so that one name doesn’t start and end the same as the other, but it’s a bit counterintuitive that I need to care about it - and I’d be glad not to do it if Inform 7 was updated to handle it more nicely (=> perfect room name match doesn’t ever match another one with skippy word things), because you know, less things to keep in mind when naming my rooms.

But the hyphen approach will do aswell!

I’m just not a fan of many work arounds. The more rules I need to take care of, the worse. Watching my rooms not ending/starting similarly to others is definitely annoying, hyphen + simple disambiguation by prefixing with area name will be fine for now.

PS: Let me add, “annoying” as in for my brain. It’s just a concept I can not easily wrap myself around. I don’t want to sound thankless for the wonder that is Inform 7 :slight_smile: