§3.24. Concealment

Though realism can become tiresome in interactive fiction, there are times when we cannot go along with Inform's normal assumption that all of a person's possessions are visible to everybody else. People are not like containers, which either show all of their holdings or not, according to whether they are open or transparent. If a man is carrying a fishing rod and a wallet, one will be on open show, the other not. Some clothing is outwardly visible, but not all.

Whether or not something is concealed is not like the either/or properties we have seen so far - such as being "open" or "closed" - because it is not really a property of the thing itself, but depends on the habitual behaviour of its current owner. To talk about behaviour we have to use sentences of a kind not seen so far, and which will not fully be explained for some chapters to come.

But straightforward cases are easy to write, if only by imitating the following examples.

Here we make the Cloaked Villain invariably conceal anything she is holding or wearing:

Rule for deciding the concealed possessions of the Cloaked Villain: yes.

At which point we think about it more carefully, and then rewrite:

Rule for deciding the concealed possessions of the Cloaked Villain: if the particular possession is the sable cloak, no; otherwise yes.

(A rule which says neither "yes" nor "no" will decide yes, but it's best to spell out exactly what's wanted.)

Parts are treated exactly as if clothes or items being held, and the following will make the face and inscription on a coin invisible unless the player is holding it - the idea being that they are too small to be seen from farther away.

paste.png The coin is in the Roman Villa. The face and inscription are parts of the coin. Rule for deciding the concealed possessions of the coin: if the coin is carried, no; otherwise yes.

There is also an either/or property called "described"/"undescribed", intended to be used only as a last resort, but which has the ability to hide something from room descriptions. This not really hiding: the idea is that "undescribed" should be used only for cases where some other text already reveals the item, or where its presence is implicit. Even then, it should only be used when the item is intended to be taken or moved by the player at some point - if the item isn't intended to move, it's much better to make it "scenery". (There's only one commonly-found example - the player's own body, the "yourself", is undescribed.)

Note that the "undescribed" property is automatically removed from anything carried by, worn by or part of the player, even indirectly; and that nothing on top of an "undescribed" supporter will be visible in a room description, even if it itself is "described". (Scenery supporters don't suffer from that restriction, which is one reason scenery is a better option when possible.)


arrow-up.pngStart of Chapter 3: Things
arrow-left.pngBack to §3.23. Parts of things
arrow-right.pngOnward to §3.25. The location of something

Suppose we want a character who carries hidden objects, but only while he is wearing his jacket. If we deprive him of this, his other possessions become known. Furthermore, if we ever search him, his possessions also become known, and can thereafter be mentioned by us.

paste.png "Search and Seizure"

Size is a kind of value. The sizes are small, medium, and large. A thing has a size. A thing is usually small.

A thing can be licit or contraband. A thing is usually licit.

A thing can be discovered or secret. A thing is usually secret.

Now, we want the character to be able to hide small things if he has some sort of concealing garment on. We also want to be able to see anything that the player has already found once, perhaps by using the >SEARCH PERSON command. So:

Rule for deciding the concealed possessions of someone (called the suspect):
    if the particular possession is discovered, no;
    if the suspect wears something and the particular possession is small, yes;
    otherwise no.

The following rule, borrowed from a later chapter, assures that any items that are ever mentioned to the player will be treated as known from then on:

Before printing the name of something (called discovery): now the discovery is discovered.

The Customs House is a room. The smuggler is a man in the Customs House. The smuggler wears a leather jacket. He carries a bottle of Altairan rum, some raspberries, and a laser pistol. The pistol is large. The jacket is large. The rum and the raspberries are contraband. The description of the smuggler is "He has a bestubbled chin and a sinister eye."

The tourist is a woman in the customs house. The description is "The type who walks off home with a dozen contraband items in her pocket not because she means to steal things but because she's too stupid to understand that the law applies to herself." She wears a tight-fitting dress. The dress is large. The tourist carries a grapevine and an archaeological artifact. The grapevine is large and contraband. The artifact is contraband.

Report examining someone: say "[The noun] is [if the noun is wearing something]wearing [a list of unconcealed things worn by the noun] and [end if]carrying [a list of unconcealed things carried by the noun]."

Report examining someone who is concealing something contraband:
    say "[The noun] looks nervous. You can just tell."

Report examining someone who is carrying an unconcealed contraband thing:
    say "Your eye goes at once to [the list of unconcealed contraband things carried by the noun] which [the noun] is unable to hide";
    if an unconcealed licit thing is had by the noun, say ", though [if the noun is female]s[end if]he also has [a list of unconcealed licit things had by the noun]";
    say "." instead.

Notice that we can talk about what the smuggler wears, what he carries, and what he "has": things the smuggler has can be either worn or carried, so the phrase is useful if we don't care to make that distinction.

Instead of searching someone:
    say "[The noun] is revealed to be carrying [a list of things carried by the noun]."

Instead of confiscating the dress:
    say "You are not allowed to perform strip-searches in the public customs area."

Understand "confiscate [something]" as confiscating.

Confiscating is an action applying to one thing.

Check confiscating:
    unless the noun is had by someone who is not the player:
        say "You can only confiscate other people's possessions." instead.

Carry out confiscating:
    now the noun is carried by the player.

Report confiscating:
    say "Through the authority vested in you by the power of the Sovereign of Centauri Proxima, you make [the noun] your own."

Test me with "x smuggler / search smuggler / x smuggler / confiscate jacket / x smuggler / confiscate rum / confiscate pistol / x smuggler / confiscate raspberries / x smuggler".

Test more with "x tourist / confiscate dress / confiscate grapevine / x tourist / search tourist / confiscate artifact / x tourist".

***ExampleSearch and Seizure
A smuggler who has items, some of which are hidden.

Suppose we want a character who carries hidden objects, but only while he is wearing his jacket. If we deprive him of this, his other possessions become known. Furthermore, if we ever search him, his possessions also become known, and can thereafter be mentioned by us.

paste.png "Search and Seizure"

Size is a kind of value. The sizes are small, medium, and large. A thing has a size. A thing is usually small.

A thing can be licit or contraband. A thing is usually licit.

A thing can be discovered or secret. A thing is usually secret.

Now, we want the character to be able to hide small things if he has some sort of concealing garment on. We also want to be able to see anything that the player has already found once, perhaps by using the >SEARCH PERSON command. So:

Rule for deciding the concealed possessions of someone (called the suspect):
    if the particular possession is discovered, no;
    if the suspect wears something and the particular possession is small, yes;
    otherwise no.

The following rule, borrowed from a later chapter, assures that any items that are ever mentioned to the player will be treated as known from then on:

Before printing the name of something (called discovery): now the discovery is discovered.

The Customs House is a room. The smuggler is a man in the Customs House. The smuggler wears a leather jacket. He carries a bottle of Altairan rum, some raspberries, and a laser pistol. The pistol is large. The jacket is large. The rum and the raspberries are contraband. The description of the smuggler is "He has a bestubbled chin and a sinister eye."

The tourist is a woman in the customs house. The description is "The type who walks off home with a dozen contraband items in her pocket not because she means to steal things but because she's too stupid to understand that the law applies to herself." She wears a tight-fitting dress. The dress is large. The tourist carries a grapevine and an archaeological artifact. The grapevine is large and contraband. The artifact is contraband.

Report examining someone: say "[The noun] is [if the noun is wearing something]wearing [a list of unconcealed things worn by the noun] and [end if]carrying [a list of unconcealed things carried by the noun]."

Report examining someone who is concealing something contraband:
    say "[The noun] looks nervous. You can just tell."

Report examining someone who is carrying an unconcealed contraband thing:
    say "Your eye goes at once to [the list of unconcealed contraband things carried by the noun] which [the noun] is unable to hide";
    if an unconcealed licit thing is had by the noun, say ", though [if the noun is female]s[end if]he also has [a list of unconcealed licit things had by the noun]";
    say "." instead.

Notice that we can talk about what the smuggler wears, what he carries, and what he "has": things the smuggler has can be either worn or carried, so the phrase is useful if we don't care to make that distinction.

Instead of searching someone:
    say "[The noun] is revealed to be carrying [a list of things carried by the noun]."

Instead of confiscating the dress:
    say "You are not allowed to perform strip-searches in the public customs area."

Understand "confiscate [something]" as confiscating.

Confiscating is an action applying to one thing.

Check confiscating:
    unless the noun is had by someone who is not the player:
        say "You can only confiscate other people's possessions." instead.

Carry out confiscating:
    now the noun is carried by the player.

Report confiscating:
    say "Through the authority vested in you by the power of the Sovereign of Centauri Proxima, you make [the noun] your own."

Test me with "x smuggler / search smuggler / x smuggler / confiscate jacket / x smuggler / confiscate rum / confiscate pistol / x smuggler / confiscate raspberries / x smuggler".

Test more with "x tourist / confiscate dress / confiscate grapevine / x tourist / search tourist / confiscate artifact / x tourist".

Suppose we want a character who carries hidden objects, but only while he is wearing his jacket. If we deprive him of this, his other possessions become known. Furthermore, if we ever search him, his possessions also become known, and can thereafter be mentioned by us.

paste.png "Search and Seizure"

Size is a kind of value. The sizes are small, medium, and large. A thing has a size. A thing is usually small.

A thing can be licit or contraband. A thing is usually licit.

A thing can be discovered or secret. A thing is usually secret.

Now, we want the character to be able to hide small things if he has some sort of concealing garment on. We also want to be able to see anything that the player has already found once, perhaps by using the >SEARCH PERSON command. So:

Rule for deciding the concealed possessions of someone (called the suspect):
    if the particular possession is discovered, no;
    if the suspect wears something and the particular possession is small, yes;
    otherwise no.

The following rule, borrowed from a later chapter, assures that any items that are ever mentioned to the player will be treated as known from then on:

Before printing the name of something (called discovery): now the discovery is discovered.

The Customs House is a room. The smuggler is a man in the Customs House. The smuggler wears a leather jacket. He carries a bottle of Altairan rum, some raspberries, and a laser pistol. The pistol is large. The jacket is large. The rum and the raspberries are contraband. The description of the smuggler is "He has a bestubbled chin and a sinister eye."

The tourist is a woman in the customs house. The description is "The type who walks off home with a dozen contraband items in her pocket not because she means to steal things but because she's too stupid to understand that the law applies to herself." She wears a tight-fitting dress. The dress is large. The tourist carries a grapevine and an archaeological artifact. The grapevine is large and contraband. The artifact is contraband.

Report examining someone: say "[The noun] is [if the noun is wearing something]wearing [a list of unconcealed things worn by the noun] and [end if]carrying [a list of unconcealed things carried by the noun]."

Report examining someone who is concealing something contraband:
    say "[The noun] looks nervous. You can just tell."

Report examining someone who is carrying an unconcealed contraband thing:
    say "Your eye goes at once to [the list of unconcealed contraband things carried by the noun] which [the noun] is unable to hide";
    if an unconcealed licit thing is had by the noun, say ", though [if the noun is female]s[end if]he also has [a list of unconcealed licit things had by the noun]";
    say "." instead.

Notice that we can talk about what the smuggler wears, what he carries, and what he "has": things the smuggler has can be either worn or carried, so the phrase is useful if we don't care to make that distinction.

Instead of searching someone:
    say "[The noun] is revealed to be carrying [a list of things carried by the noun]."

Instead of confiscating the dress:
    say "You are not allowed to perform strip-searches in the public customs area."

Understand "confiscate [something]" as confiscating.

Confiscating is an action applying to one thing.

Check confiscating:
    unless the noun is had by someone who is not the player:
        say "You can only confiscate other people's possessions." instead.

Carry out confiscating:
    now the noun is carried by the player.

Report confiscating:
    say "Through the authority vested in you by the power of the Sovereign of Centauri Proxima, you make [the noun] your own."

Test me with "x smuggler / search smuggler / x smuggler / confiscate jacket / x smuggler / confiscate rum / confiscate pistol / x smuggler / confiscate raspberries / x smuggler".

Test more with "x tourist / confiscate dress / confiscate grapevine / x tourist / search tourist / confiscate artifact / x tourist".