[I7] Problems with assemblies

It’s been a while since I’ve worked on anything in I7, but I missed it, so I am now messing around with assemblies trying to get the hang of them, but it’s not going so great.

I have the following simple code:

[code]Bedroom is a room.

A desk is a kind of container. A desk is always openable. A desk is usually fixed in place. A desk is usually closed.
A desktop is a kind of supporter. A desktop (called top of it) is part of every desk.
Before putting something on a desk when a desktop (called the item) is part of the second noun:
try putting the noun on the item instead.

The bedroom dresser is a desk in bedroom. The dress is in bedroom.[/code]

  1. So part of my issues is with naming the desktops ‘top of _____’ because I end up with no articles so I get output that doesn’t sound quite right:
  1. I am getting some really annoying parser choice clarification messages now:

I feel like these should be easy to fix, but I’ve been tinkering around with them for a while and can’t seem to get it. Any help would be greatly appreciated.

The “(called desktop of it)” part of your code makes the internal name of every desktop contain the name of the desk it is part of (e.g. “desktop of bedroom dresser” and “bedroom dresser”), so Inform has to disambiguate between the desktop of bedroom dresser and bedroom dresser and promptly announces the result (through the Clarifying The Parser’s Choice Of Something Activity)
The default internal name of this assembly would be “bedroom dresser’s desktop” which doesn’t contain the word “dresser” – only the similar but different word "dresser’s –, and in that case the command X DRESSER would be unambiguous.

One way around this would be to tell Inform not to ‘clarify the choice of’ a desk. Like so: Rule for clarifying the parser's choice of a desk: do nothing. But you might possibly want that activity to run when the game chooses the desk over something other besides its own desktop; and I don’t think it is possible to tell the activity do be as discriminating as all that.

So my suggestion is to leave the default internal names of desktops as is (“bedroom dresser’s desktop” etc.) and give desktops a different ‘printed name’ instead: The printed name of a desktop is "desktop of [the component parts core of the item described]".

That will take care of the missing definite article as well.
(You could of course have told Inform to put the definite article in to name of desktops ("(called desktop of the it)"); but putting the article inside a text substitution in a printed name will prevent the article from being printed in cases where it shouldn’t be – like if a desk happens to have a proper name or something …)

Thank you for the thorough response! Changing the printed name is what I did originally, but I had difficulty with figuring out how to get the parser to understand the player referring to a desktop as “x top of the dresser”. I’ll tinker around with it some more; I most likely had a simple error in syntax. I should probably start rereading the documentation since it’s been so long. Thanks again for your help!

EDIT:
Ah, I just had a thought. If/when I work that out, I’d be recreating the disambiguity problem, I think. Hmmm…

I think this should work:

Understand "top of [something related by reversed incorporation]" as a desktop.

This gets “put the dress on top of the dresser” to put the dress on the desktop, and it doesn’t reintroduce the clarifying the choice of the parser messages because the object is still named “bedroom dresser’s desktop” and “x dresser” doesn’t match the line we just added.

If you’re going to have the printed name be “desktop of the bedroom dresser” you should add an understand line for “desktop of [something related by reversed incorporation]” too, though for my money having the printed name be “top of the bedroom dresser” reads much more naturally.

Oops. Ariiell’s not to blame for that. That was me and my faulty sense of English introducing that monstrosity.