§17.16. Understanding things by their relations

Sometimes it makes sense for the name of something to involve the names of other things to which it is related. For instance, if we say TAKE THE BOTTLE OF WINE, we mean that the bottle currently contains wine - if it were the very same bottle containing water, we would call it something else.

For names which must involve related names, a special form of token is provided. For instance, we could say:

A box is a kind of container. Understand "box of [something related by containment]" as a box.

The Toyshop is a room. The red box is a box in the Toyshop. Some crayons are in the red box.

and now TAKE BOX OF CRAYONS will work, because CRAYONS matches against "[something related by containment]" for the red box - or it does for as long as the crayons are there. We can have similar matches against relations of all kinds, but have to name the relation explicitly. (See the examples at the end of this section for plenty of cases.)

We can also reverse the sense. If we write:

A box is a kind of container. Understand "box in [something related by reversed containment]" as a box.

The Toyshop is a room. The crate and the hammock are in the Toyshop. In the crate is a box. In the hammock is a box.

then TAKE THE BOX IN THE HAMMOCK will work: here, the relation goes the other way, because the box is being contained by the other-named item, rather than doing the containing.


arrow-up.pngStart of Chapter 17: Understanding
arrow-left.pngBack to §17.15. Understanding things by their properties
arrow-right.pngOnward to §17.17. Context: understanding when

*ExampleWhither?
A door whose description says where it leads; and which automatically understands references such as "the west door" and "the east door" depending on which direction it leads from the location.

*ExampleCinco
A taco shell that can be referred to (when it contains things) in terms of its contents.

By default, when something is not present, Inform does not allow a player to refer to it. But there are times when we might like to acknowledge that the thing mentioned in a command does exist somewhere in the game; it just happens not to be on hand right now.

One way to do this is to make an object that appears everywhere and responds to the name of its owner only when the owner itself is not in view.

paste.png "Puncak Jaya"

A ghost is a kind of person. A man-ghost is a kind of ghost. A man-ghost is always male. A woman-ghost is a kind of ghost. A woman-ghost is always female.

We make the ghost a person rather than some other kind of thing so that it will be able to respond to commands such as KISS BOB or (even trickier) BOB, JUMP: if Inform did not recognize the ghost as an animate creature, it would not accept such input.

Representation relates one ghost to one person. The verb to represent means the representation relation.

One man-ghost represents every man. One woman-ghost represents every woman.

This is, technically, an assembly -- except instead of saying that every device has a button part, or that there are three daffodils in every garden room, the assembly is based on a non-physical relation that we just designed.

Based on the "representation" relation, we now devise a conditional relation that applies only when the represented thing is not itself in view:

Indication relates a ghost (called X) to a person (called Y) when X represents Y and Y is not visible.

Understand "[something related by indication]" as a ghost.

When play begins:
    now every ghost is in the concept-repository.

Instead of doing something to a ghost:
    say "You seem to have left [a random person which is represented by the noun] behind."

Instead of doing something when the second noun is a ghost:
    say "You seem to have left [a random person which is represented by the second noun] behind."

The concept-repository is an open unopenable transparent container. It is part of the air. The air is a backdrop. It is everywhere.

Base of Puncak Jaya is a room. Temple, Kippax, and Huizenga are men in Base. Peak of Puncak Jaya is above Base of Puncak Jaya.

Test me with "x kippax / up / x kippax / kiss kippax / kippax, hello".

Further complications of this example might require that the player meet a character before being able to refer to him or her.

*ExamplePuncak Jaya
When a character is not visible, responding to such commands as EXAMINE PETER and PETER, HELLO with a short note that the person in question is no longer visible.

By default, when something is not present, Inform does not allow a player to refer to it. But there are times when we might like to acknowledge that the thing mentioned in a command does exist somewhere in the game; it just happens not to be on hand right now.

One way to do this is to make an object that appears everywhere and responds to the name of its owner only when the owner itself is not in view.

paste.png "Puncak Jaya"

A ghost is a kind of person. A man-ghost is a kind of ghost. A man-ghost is always male. A woman-ghost is a kind of ghost. A woman-ghost is always female.

We make the ghost a person rather than some other kind of thing so that it will be able to respond to commands such as KISS BOB or (even trickier) BOB, JUMP: if Inform did not recognize the ghost as an animate creature, it would not accept such input.

Representation relates one ghost to one person. The verb to represent means the representation relation.

One man-ghost represents every man. One woman-ghost represents every woman.

This is, technically, an assembly -- except instead of saying that every device has a button part, or that there are three daffodils in every garden room, the assembly is based on a non-physical relation that we just designed.

Based on the "representation" relation, we now devise a conditional relation that applies only when the represented thing is not itself in view:

Indication relates a ghost (called X) to a person (called Y) when X represents Y and Y is not visible.

Understand "[something related by indication]" as a ghost.

When play begins:
    now every ghost is in the concept-repository.

Instead of doing something to a ghost:
    say "You seem to have left [a random person which is represented by the noun] behind."

Instead of doing something when the second noun is a ghost:
    say "You seem to have left [a random person which is represented by the second noun] behind."

The concept-repository is an open unopenable transparent container. It is part of the air. The air is a backdrop. It is everywhere.

Base of Puncak Jaya is a room. Temple, Kippax, and Huizenga are men in Base. Peak of Puncak Jaya is above Base of Puncak Jaya.

Test me with "x kippax / up / x kippax / kiss kippax / kippax, hello".

Further complications of this example might require that the player meet a character before being able to refer to him or her.

By default, when something is not present, Inform does not allow a player to refer to it. But there are times when we might like to acknowledge that the thing mentioned in a command does exist somewhere in the game; it just happens not to be on hand right now.

One way to do this is to make an object that appears everywhere and responds to the name of its owner only when the owner itself is not in view.

paste.png "Puncak Jaya"

A ghost is a kind of person. A man-ghost is a kind of ghost. A man-ghost is always male. A woman-ghost is a kind of ghost. A woman-ghost is always female.

We make the ghost a person rather than some other kind of thing so that it will be able to respond to commands such as KISS BOB or (even trickier) BOB, JUMP: if Inform did not recognize the ghost as an animate creature, it would not accept such input.

Representation relates one ghost to one person. The verb to represent means the representation relation.

One man-ghost represents every man. One woman-ghost represents every woman.

This is, technically, an assembly -- except instead of saying that every device has a button part, or that there are three daffodils in every garden room, the assembly is based on a non-physical relation that we just designed.

Based on the "representation" relation, we now devise a conditional relation that applies only when the represented thing is not itself in view:

Indication relates a ghost (called X) to a person (called Y) when X represents Y and Y is not visible.

Understand "[something related by indication]" as a ghost.

When play begins:
    now every ghost is in the concept-repository.

Instead of doing something to a ghost:
    say "You seem to have left [a random person which is represented by the noun] behind."

Instead of doing something when the second noun is a ghost:
    say "You seem to have left [a random person which is represented by the second noun] behind."

The concept-repository is an open unopenable transparent container. It is part of the air. The air is a backdrop. It is everywhere.

Base of Puncak Jaya is a room. Temple, Kippax, and Huizenga are men in Base. Peak of Puncak Jaya is above Base of Puncak Jaya.

Test me with "x kippax / up / x kippax / kiss kippax / kippax, hello".

Further complications of this example might require that the player meet a character before being able to refer to him or her.

**ExampleClaims Adjustment
An instant camera that spits out photographs of anything the player chooses to take a picture of.