Do not understand "hair" for hair clip.

Sorry for troubling everyone and so soon, but I can’t seem to get Inform to not understand certain words as other words.

I fixed the hair clip on by spelling “hair clip” as “hairclip”, which I should have done in any case, but the same issue popped up again elsewhere.

In the wardrobe, the player has her clothes for the day (a shirt and a pair of pants), which are wearable, and her other clothes (called some other clothes), which are not wearable and not portable. When you open the wardrobe, this happens:

open wardrobe
You open the wardrobe, revealing a shirt, pants and some other clothes.

Which is exactly what I want, but as a result, if the player enters “x clothes”, the game will say “Your clothes for another day”.

It’s not a big problem, but it does seem silly since the shirt and pants are obviously still clothes, just not some other clothes.

Is there a way for I7 to not understand certain variations as the word in question?


You can use the privately-named property (manual ch. 16.17), although in this case I would advice against it; you’ll end up with something like this:

I would rather add clothes as a synonym to the shirt and pants as well, so you’ll get a much more sensible answer:

I was going to suggest that, but then I tested it. It solves the problem but creates another. Inform 7 seems to recognise ‘other’ as some sort of keyword, and refuses to interpret either ‘other’ or ‘other clothes’ as referring to the other clothes if there are any other objects around with the synonym ‘clothes’. It picks the shirt, instead (probably because it’s the first one). So I don’t really know how to solve it while still allowing you to refer to ‘other clothes’, besides just changing the word ‘other’ to something Inform doesn’t trip over, like ‘more’.

I don’t know why Inform 7 handles ‘other’ as a special keyword – I can’t recall any commands that suggest the use of ‘other’ as part of their grammar. Besides, other than what? How would the game figure that out, if there is any automatic processing going on with that word?


Thank you Paul.

I had clothes as a synonym for all clothes before and ran into that exact problem, which is why I asked here.

I changed “some other clothes” to “clothes for another day”, and it works perfectly now.

Thanks Juhana for the advice as well.

It looks like Inform used to use “other”/“another” to disambiguate commands like “put green plate on another plate”. However, that functionality is now commented out. Now it’s just parsed as a general article like “a”/“an”. Possibly that too should be removed, but I can’t say offhand whether it would be an improvement or not.

I can see the uses of not throwing up an error if the player just decides spontaneously to add ‘other’ before a word, but is there a way to override its status as an article in a particular case, without necessarily removing that flexibility from the Inform library, so that authors can name things ‘other this’ or ‘other that’ if they wish?

P.S. Also, if it’s just an article, than why don’t the ambiguity rules kick in? Why pick the shirt? Weird.

Well, it’s an indefinite article, which signals the parser to pick one rather than asking for disambiguation. I.e.:

>get the apple
Which do you mean, the red apple or the green apple?

>get an apple
(the red apple)

This makes sense for “another”. I’m not convinced it makes sense for “other” – making those synonymous made sense for the commented-out functionality, but not for what’s there now.

(In case you’re curious, “get the other apple” winds up the same as “get an apple”.)

For a single object you could do something like:

[code]Understand “other-clothes” as the other clothes.

After reading a command:
if the player’s command includes “other” and the player can see the clothes:
replace the matched text with “other-clothes”.[/code]

Always curious. Thanks man, your explanation and view of the whole situation make sense to me.

That is a great hack Juhana – I can see that sort of clause coming in handy in all sorts of last-resort situations. Squirrelled away! 8)