Enterable Underside by Gavin Lambert


This extension is based on Underside by Eric Eve, extending that to support the player actually entering the underside of objects.

It defines one new action, "entering underneath", which can move the player (or another actor) underneath any object that has had an underside created for it. By default, this requires that the underside (specifically) has been declared as "enterable".

Naturally, the space under things is often quite limited. Underside uses the Bulk Limiter extension (also by Eric Eve) to manage this; see the documentation for that extension for more details on setting the "bulk" (size) of each object and the "bulk capacity" (available space) in the underside. By default, entering underneath will only be allowed if there's enough free space in the underside for the actor to actually fit. (Although note that a little bit of Hammerspace may apply here -- by default the player's inventory is not counted in their bulk, so they can quite happily enter underneath something while carrying something else too large to fit underneath. You can fix this by carefully setting the player's bulk capacity (so that they cannot pick up enough things to not fit) and/or dynamically changing the player's bulk depending on their current inventory.)

Note that this extension only introduces the new action -- it does not introduce any corresponding grammar to allow the player to actually perform it. This is because depending on the specific objects in your story, different commands may make more sense than others. You can define whatever commands you like; for example:

Understand "hide under/beneath [something]" as entering underneath.

You can alternatively trigger "try entering underneath bed" from some other command's rules, as you'd expect, even if you don't define any commands for it.

You may also want to override the default response text to make it more suitable for the commands you're using, for example:

can't enter underneath something not enterable rule response (A) is "[regarding the noun][Those] [aren't] something [we] [can] hide under."

Have a look at the "entering underneath" action in the Index for all the standard responses (and to quickly edit them using the 'set' link).

Since this builds on top of Prepositional Correctness, you're also able to customise the "under" preposition used in the room heading when the player is underneath, or in room descriptions when other objects are:

The preposition of under#bed is "beneath".

Example: * Hide and Seek

"Hide and Seek"

Include Enterable Underside by Gavin Lambert.

Bedroom is a room. It contains a small bed, a table, and a chair.
The bed is an enterable fixed in place supporter.
The table is an enterable fixed in place supporter.
The chair is an enterable fixed in place supporter.
Rule for room heading describing the bed: say "lying on a comfortable bed".

A fluffy pillow is on the bed. The bulk is 2.

An enterable underside called under#bed is part of the bed.
The bulk capacity of under#bed is 5. The bulk of the player is 4.

An enterable underside called under#table is part of the table.
The bulk capacity of under#table is 3.

A large blanket is in under#bed. The bulk is 3.
A small stuffed bear is in under#bed.

Understand "hide under/beneath [something]" as entering underneath.

Test me with "look under bed / get blanket / hide under bed / l / exit".

Example: * The Sweet Life

"The Sweet Life"

Include Enterable Underside by Gavin Lambert.

Understand "hide under/underneath [something]" as entering underneath.

Bedroom is a room.

The bed is an enterable supporter. It is in the bedroom. The player is on the bed. Angelina is a woman on the bed.

The under#bed is an underside. It is part of the bed. It is enterable and transparent.

The shoebox is a container. It is in the under#bed. Roberto is a man. He is in the under#bed.

After looking under the bed for the first time:
     say "'Angelina? How could you -- with Roberto?'".

The bulk of a person is usually 5.

When play begins:
     now the story viewpoint is first person singular;
     say "[italic type](Dedicated to those dubbed Italian comedies from the early 1970s)[roman type][paragraph break]The door to the apartment slams shut. From the hallway, the voice calls out 'Mi amore, I'm home.' Panic-stricken, Angelina looks at me and whispers 'It's Giovanni. Quickly, you must hide!' Giovanni's steps grow softer as he walks toward the kitchen. She breathes a sigh of relief as we hear the refrigerator open. 'Now hide.' She points down, under the bed.".

Arrival is a scene. Arrival begins when the player is in the under#bed.

When arrival begins:
     say "As Giovanni enters the bedroom, he says, 'Mia cara! It's so fine to be home.' Angelina answers, 'O Giovanni, I missed you so. Please buy some wine to celebrate!'[paragraph break]As her husband leaves for the store, she says, 'Both of you, out!'";
     try Roberto exiting.

Test me with "exit / look under bed / hide under bed / take shoebox / hide under bed / exit".

Example: * A Nice Picnic

Undersides are not really intended to model large spaces like this, since they deliberately conceal what lies underneath unless you're actively looking under. But they can -- and until version 2 this sort of thing didn't work due to some quirks in how Inform handles entering and exiting things with component parts, so this serves as a demonstration that this has been worked around successfully.

"A Nice Picnic"

Include Enterable Underside by Gavin Lambert.

Picnic Area is a room. "A bright open area close to a large tree. [if the blanket is carried]You can either set up your picnic out in the open or under the tree.[end if]".
A large tree is scenery in Picnic Area. The description is "An oak, you think."
An underside called under#tree is part of the tree. It is enterable and transparent. The preposition is "beneath".
The verb to go beneath means the reversed containment relation. The entering preposition of under#tree is verb go beneath.

The player carries a large checkered blanket and a small picnic basket. The blanket is an enterable supporter. The basket is a locked container.

Understand "sit under/beneath [tree]" as entering underneath.

Test me with "put blanket under tree / sit on blanket / drop basket / l / exit / exit".