Currently we have provided objects for most of what is on the boat, but it's not very interesting to look at. We might want to give some more description to these things.
"Disenchantment Bay"
The Cabin is a room. "The front of the small cabin is entirely occupied with navigational instruments, a radar display, and radios for calling back to shore. Along each side runs a bench with faded blue vinyl cushions, which can be lifted to reveal the storage space underneath. A glass case against the wall contains several fishing rods.
Scratched windows offer a view of the surrounding bay, and there is a door south to the deck. A sign taped to one wall announces the menu of tours offered by the Yakutat Charter Boat Company."
The Cabin contains a glass case. In the glass case is a collection of fishing rods. The case is closed, transparent, and openable. The case is scenery.
The bench is in the cabin. On the bench are some blue vinyl cushions. The bench is enterable and scenery. The cushions are scenery.
Some navigational instruments, some scratched windows, a radar display, and some radios are scenery in the cabin.
The description of the instruments is "Knowing what they do is the Captain's job."
The description of the windows is "They're a bit the worse for wear, but you can still get an impressive view of the glacier through them. There were whales earlier, but they're gone now."
The description of the radar is "Apparently necessary to avoid the larger icebergs."
The description of the radios is "With any luck you will not need to radio for help, but it is reassuring that these things are here."
The order in which we define these things is fairly open. We could also define an object so:
A sign is scenery in the Cabin. The description is "You can get half-day and full-day sight-seeing tours, and half-day and full-day fishing trips."
Where "the description" is assumed to refer to the thing most recently defined, if no object is specified.
The view of the Malaspina glacier is a backdrop. It is everywhere. The description is "The Malaspina glacier covers much of the nearby slope, and -- beyond it -- an area as large as Rhode Island."
Test me with "examine sign / examine glacier / examine instruments / examine windows / examine radar / examine radios / take the cushions / take the glacier".
These last two commands show how scenery and backdrops are automatically impossible for the player to take.
Occasionally it is useful to give something a printed name because we want to call it something extremely long-winded; give one thing a name that is the subset of the name of something else; or use words such as "with" or "and" that are likely to confuse Inform into thinking that the object name ends before it actually does.
Often it is enough to preface these ambiguously-titled things with "a thing called..." or "a supporter called..." or the like, as here:
South of Spring Rolls is a room called Hot and Sour Soup.
prevents Inform from trying to read "Hot and Sour Soup" as two separate rooms, while
The player carries an orange ticket. The player carries a thing called an orange.
creates two objects instead of the one orange ticket that would result if the second sentence were merely "The player carries an orange."
Really long names can be a bit cumbersome. For example:
The player carries a thing called an incriminating photograph of a woman with blonde hair.
So we might instead give the photograph a printed name:
"Laura"
The City of Angels is a room. The incriminating photograph is carried by the player. The printed name of the incriminating photograph is "incriminating photograph of a woman with blonde hair".
Now we've gotten around any awkwardness with printing the name -- but we also need to understand when the player refers to the photograph. When we define the names of objects under normal circumstances, Inform takes care of this automatically, but if we have especially set the printed name, we must also specially define the appropriate terms for the player to use. For this we need "understand", which will be explained in much more depth in a later chapter:
Understand "woman" or "with" or "blonde" or "hair" or "of" or "a" as the incriminating photograph.
Test one with "x photograph / x incriminating photograph of a woman with blonde hair / x hair / x blonde / x woman with blonde hair / x incriminating photograph of a woman".
That's probably as far as we really need to go, and if you are satisfied with this behavior, there is no need to read on.
One possible objection to this solution is that Inform will accept some nonsensical formulations as applying to the photograph: for instance, it will allow >EXAMINE PHOTOGRAPH OF, >X BLONDE PHOTOGRAPH WOMAN INCRIMINATING, or even >X OF ...though in the case there were two items with "of" names, the game would disambiguate with a question such as "Which do you mean, the incriminating photograph of a woman with blonde hair or the essence of wormwood?"
Traditionally, Inform has tended to be fairly flexible about word order, preferring to err in the direction of leniency. On the other hand, there are times when we need more exacting rules in order to distinguish otherwise similar cases.
Two features allow us to specify more exactly if we so desire. The first is that, if we specify a whole phrase as the name of something, all the words in that phrase are required, in the order given. Thus "Understand "blonde hair" as the photograph" would require that both "blonde" and "hair" be present, and would not recognize >X BLONDE, >X HAIR BLONDE, or >X HAIR.
Second, we can create tokens, such as "Understand "blonde hair" or "hair" as "[hair]", and then use these tokens in match phrases. This saves a good deal of time when we want to specify a number of different but fussy alternatives. So, for instance, here is a drawing that would not respond to >X OF, or >X BROWN EYES, but would respond to >X DRAWING OF MAN WITH BROWN EYES, >X MAN WITH BROWN EYES, and so on:
The drawing is carried by the player. The printed name of the drawing is "drawing of a man with brown eyes".
Understand "eyes" or "brown eyes" as "[brown eyes]". Understand "man" or "man with [brown eyes]" or "brown-eyed man" as "[man]". Understand "[man]" or "drawing of [man]" or "drawing of a [man]" as the drawing.
Test me with "test one / test two".
Test two with "x drawing / x man / x of / x drawing of man / x drawing of a man / x drawing of a man with brown eyes / x drawing of a brown-eyed man / x brown eyes".
Further refinements are possible: the "privately-named" attribute tells Inform not to try to understand the source name of an object at all, so if we write
The purple rabbit is a privately-named thing.
...the player will not be able to refer to it as "purple" or "rabbit" or "purple rabbit".
There are also ways to make names to refer to entire kinds of objects (so "dude" will refer to any man in the game); to specify names that only refer to objects in the plural (so GET PICTURES will pick up several pictures together); to reflect an object's properties (so "red apple" works only as long as the apple is in fact red); or even to refer to the object's relationships to other objects (so "bottle of wine" works only when wine is indeed in the bottle). All these refinements are discussed in the chapter on Understanding.