§18.27. Choosing notable locale objects for something

1. When it happens. See "printing the locale description". This activity is expected to decide which items ought to be mentioned in a locale description for a given room, enterable container or enterable supporter, and to give each item a priority, which is a number ranging upwards from 1 (which is the top priority). The lower the priority number, the earlier the mention, or at least, the earlier the opportunity to be mentioned: it's up to other activities whether to give it a paragraph of its own or not. This activity only makes something a candidate, and decides what order the candidates will be tried in.

2. The default behaviour. By default, this activity contains only the "standard notable locale objects rule". This chooses exactly those items directly contained by the locale, assigning all of them priority 5. Note that this includes scenery, and other probably unwanted items - those will be excluded later.

3. Examples. (a) In the Misty Moorlands, only large items on the ground are visible through the mist:

paste.png A thing can be large or small. A thing is usually small. The stepladder is a large thing in the Misty Moorlands.

Rule for choosing notable locale objects for the Misty Moorlands:
    repeat with item running through large things in the Misty Moorlands:
        set the locale priority of the item to 5.

Report taking a small thing in the Misty Moorlands:
    say "You grope blindly in the mist and pick up [the noun]." instead.

Note the special phrase

set the locale priority of the item to 5;

which should be used only in rules for locale activities. It makes the given item a candidate and sets its priority. (Setting the priority to 0 forces an item not to be a candidate, and can thus undo the effect of previous rules.)


arrow-up.pngStart of Chapter 18: Activities
arrow-left.pngBack to §18.26. Printing the locale description of something
arrow-right.pngOnward to §18.28. Printing a locale paragraph about

Suppose we want a different treatment of lighting than the usual: the room isn't totally dark, but there's something we can't see unless we turn on a bright light.

paste.png "Low Light"

First we make our environment and its light:

The Workroom is a room. The desk is in the Workroom. The brilliant lamp is a device on the desk.

To decide whether the light level is high:
    if the brilliant lamp is switched off, no;
    if the player cannot see the brilliant lamp, no;
    yes.

To decide whether the light level is low:
    if the light level is high, no;
    yes.

Now we make a shadow so that the player can only refer to it if the shadow is in inventory or the light is on:

The shadow is a privately-named thing on the desk.

Understand "barely-visible" or "barely visible" or "shadow" as the shadow when the light level is high. Understand "invisible" or "shadow" as the shadow when the player encloses the shadow.

And finally a couple of extra touches to make it clear why we're able to interact with the shadow when it's in inventory, even if the light is low:

Before printing the name of the shadow:
    if the light level is high:
        say "barely-visible ";
    otherwise if the player encloses the shadow:
        say "invisible (but tangible) "

After dropping the shadow when the light level is low:
    say "You let it go and it fades into the ambient gloom."

To handle the appearance of the object, we want to set its locale priority to 0: that will prevent it being named in room descriptions.

After choosing notable locale objects:
    unless the light level is high:
        set locale priority of the shadow to 0.

Test me with "look / get shadow / turn on lamp / look / get shadow / i / turn off lamp / i / drop shadow / look / get shadow / turn on lamp / look".

*ExampleLow Light
An object that is only visible and manipulable when a bright light fixture is on.

Suppose we want a different treatment of lighting than the usual: the room isn't totally dark, but there's something we can't see unless we turn on a bright light.

paste.png "Low Light"

First we make our environment and its light:

The Workroom is a room. The desk is in the Workroom. The brilliant lamp is a device on the desk.

To decide whether the light level is high:
    if the brilliant lamp is switched off, no;
    if the player cannot see the brilliant lamp, no;
    yes.

To decide whether the light level is low:
    if the light level is high, no;
    yes.

Now we make a shadow so that the player can only refer to it if the shadow is in inventory or the light is on:

The shadow is a privately-named thing on the desk.

Understand "barely-visible" or "barely visible" or "shadow" as the shadow when the light level is high. Understand "invisible" or "shadow" as the shadow when the player encloses the shadow.

And finally a couple of extra touches to make it clear why we're able to interact with the shadow when it's in inventory, even if the light is low:

Before printing the name of the shadow:
    if the light level is high:
        say "barely-visible ";
    otherwise if the player encloses the shadow:
        say "invisible (but tangible) "

After dropping the shadow when the light level is low:
    say "You let it go and it fades into the ambient gloom."

To handle the appearance of the object, we want to set its locale priority to 0: that will prevent it being named in room descriptions.

After choosing notable locale objects:
    unless the light level is high:
        set locale priority of the shadow to 0.

Test me with "look / get shadow / turn on lamp / look / get shadow / i / turn off lamp / i / drop shadow / look / get shadow / turn on lamp / look".

Suppose we want a different treatment of lighting than the usual: the room isn't totally dark, but there's something we can't see unless we turn on a bright light.

paste.png "Low Light"

First we make our environment and its light:

The Workroom is a room. The desk is in the Workroom. The brilliant lamp is a device on the desk.

To decide whether the light level is high:
    if the brilliant lamp is switched off, no;
    if the player cannot see the brilliant lamp, no;
    yes.

To decide whether the light level is low:
    if the light level is high, no;
    yes.

Now we make a shadow so that the player can only refer to it if the shadow is in inventory or the light is on:

The shadow is a privately-named thing on the desk.

Understand "barely-visible" or "barely visible" or "shadow" as the shadow when the light level is high. Understand "invisible" or "shadow" as the shadow when the player encloses the shadow.

And finally a couple of extra touches to make it clear why we're able to interact with the shadow when it's in inventory, even if the light is low:

Before printing the name of the shadow:
    if the light level is high:
        say "barely-visible ";
    otherwise if the player encloses the shadow:
        say "invisible (but tangible) "

After dropping the shadow when the light level is low:
    say "You let it go and it fades into the ambient gloom."

To handle the appearance of the object, we want to set its locale priority to 0: that will prevent it being named in room descriptions.

After choosing notable locale objects:
    unless the light level is high:
        set locale priority of the shadow to 0.

Test me with "look / get shadow / turn on lamp / look / get shadow / i / turn off lamp / i / drop shadow / look / get shadow / turn on lamp / look".

***ExampleCasino Banale
Creating room descriptions and object descriptions that change as the player learns new facts and pieces things together.