§6.8. Taking, Dropping, Inserting and Putting

We may want to change the default refusal message when the player tries to pick up scenery: Replanting demonstrates this case simply.

Removal modifies responses to successful TAKE commands, with the effect that when the player picks up an item, he gets a response such as "You take the book from the shelf."

Croft modifies the DROP command, so that objects dropped on specific surfaces get reported in a special way. Celadon allows the player to drop even objects he is carrying indirectly, for instance on a tray or in a sack.

Morning After introduces a simple rule that changes the behavior of the whole story: whenever the player takes an item he hasn't already looked at, he automatically examines it. This picks up the pace of exploration passages where the player is likely to be collecting a large number of objects.

By default, when the player tries to put or insert an item that he isn't holding, Inform prints a refusal message; Democratic Process and Sand offer ways instead to have the player first pick up the relevant items. (The former applies to single items the player is trying to place; the latter expands coverage to work even if the player uses a command affecting multiple objects.)

Taking also happens as a result of other commands. Such takes can be made unnecessary by turning off the "carrying requirements rule" under particular circumstances, or presented differently using the implicitly taking activity.


arrow-up.pngStart of Chapter 6: Commands
arrow-left.pngBack to §6.7. Inventory
arrow-right.pngOnward to §6.9. Going, Pushing Things in Directions

*ExampleReplanting
Changing the response when the player tries to take something that is scenery.

*ExampleMorning After
When the player picks something up which he hasn't already examined, the object is described.

*ExampleRemoval
TAKE expanded to give responses such as "You take the book from the shelf." or "You pick up the toy from the ground."

*ExampleCeladon
Using the enclosure relation to let the player drop things which he only indirectly carries.

***ExampleDemocratic Process
Make PUT and INSERT commands automatically take objects if the player is not holding them.

***ExampleCroft
Adding special reporting and handling for objects dropped when the player is on a supporter, and special entering rules for moving from one supporter to another.

As mentioned in this section, the "implicitly taking" activity does not allow us to skip an implicit take entirely. In order to do this, we need to borrow from the chapter on Rulebooks and tell Inform that one of the rules normally built in to the Standard Rules does nothing in certain circumstances:

paste.png "Lollipop Guild"

The carrying requirements rule does nothing when showing something to the guardian.
The can't show what you haven't got rule does nothing when showing something to the guardian.
The block showing rule does nothing.

Candyland is a room. "A fizzing, popping wonderland of sugary delights. A path tiled with butterscotch sweets leads to the horizon."

The butterscotch path is scenery in Candyland.

The player carries a basket. In the basket are a licorice gumdrop and a can of tuna. The gumdrop is edible. The description of the gumdrop is "Covered all over with grains of sugar." The can of tuna is edible. The description of the can of tuna is "A rare import in this place."

The giant lollipop is a fixed in place edible thing in Candyland. "Growing right next to the path, on a trunk of white paper, is a giant lollipop colored green and red and white." The description of the lollipop is "If you were very blind, like Aunt Myrtle, you might mistake it for a young sapling just planted: the lollipop is just that leafy shade of green, with swirls of white and red that might be branches or flowers."

The guardian is a man in Candyland. "Right beside you is a guardian in a mint-colored uniform." The description of the guardian is "A killjoy wielding a gigantic toothbrush." The guardian carries a gigantic toothbrush. The description of the toothbrush is "Bristles as long as your hand. Firm bristles, too, not those soft ones. The guardian doesn't care about your tender gums."

A thing can be sweet. The butterscotch path, the lollipop, and the gumdrop are sweet.

Carry out showing a sweet thing to the guardian:
    say "The guardian shrieks! You don't understand its language, but from its ululations you understand the idea of decay. There may have been a bit in there about a root canal." instead.

Carry out showing something to the guardian:
    say "The guardian nods approvingly at the unsweetened [noun]." instead.

Report eating a sweet thing in the presence of the guardian:
    say "The guardian looks mournful, but unholsters his tube of paste and begins applying it to the toothbrush, as though to say that he really did not want to have to do this...";
    end the story saying "Everything goes minty" instead.

Report eating something:
    say "You consume [the noun] with gusto." instead.

Test me with "x guardian / x toothbrush / show gumdrop to guardian / show path to guardian / show tuna to guardian / look / eat gumdrop".

Note that because we only deactivate the carrying requirements rule for showing purposes, the player still takes the gumdrop before eating it.

***ExampleLollipop Guild
Overriding the rules to allow the player to show something to another character without first taking it.

As mentioned in this section, the "implicitly taking" activity does not allow us to skip an implicit take entirely. In order to do this, we need to borrow from the chapter on Rulebooks and tell Inform that one of the rules normally built in to the Standard Rules does nothing in certain circumstances:

paste.png "Lollipop Guild"

The carrying requirements rule does nothing when showing something to the guardian.
The can't show what you haven't got rule does nothing when showing something to the guardian.
The block showing rule does nothing.

Candyland is a room. "A fizzing, popping wonderland of sugary delights. A path tiled with butterscotch sweets leads to the horizon."

The butterscotch path is scenery in Candyland.

The player carries a basket. In the basket are a licorice gumdrop and a can of tuna. The gumdrop is edible. The description of the gumdrop is "Covered all over with grains of sugar." The can of tuna is edible. The description of the can of tuna is "A rare import in this place."

The giant lollipop is a fixed in place edible thing in Candyland. "Growing right next to the path, on a trunk of white paper, is a giant lollipop colored green and red and white." The description of the lollipop is "If you were very blind, like Aunt Myrtle, you might mistake it for a young sapling just planted: the lollipop is just that leafy shade of green, with swirls of white and red that might be branches or flowers."

The guardian is a man in Candyland. "Right beside you is a guardian in a mint-colored uniform." The description of the guardian is "A killjoy wielding a gigantic toothbrush." The guardian carries a gigantic toothbrush. The description of the toothbrush is "Bristles as long as your hand. Firm bristles, too, not those soft ones. The guardian doesn't care about your tender gums."

A thing can be sweet. The butterscotch path, the lollipop, and the gumdrop are sweet.

Carry out showing a sweet thing to the guardian:
    say "The guardian shrieks! You don't understand its language, but from its ululations you understand the idea of decay. There may have been a bit in there about a root canal." instead.

Carry out showing something to the guardian:
    say "The guardian nods approvingly at the unsweetened [noun]." instead.

Report eating a sweet thing in the presence of the guardian:
    say "The guardian looks mournful, but unholsters his tube of paste and begins applying it to the toothbrush, as though to say that he really did not want to have to do this...";
    end the story saying "Everything goes minty" instead.

Report eating something:
    say "You consume [the noun] with gusto." instead.

Test me with "x guardian / x toothbrush / show gumdrop to guardian / show path to guardian / show tuna to guardian / look / eat gumdrop".

Note that because we only deactivate the carrying requirements rule for showing purposes, the player still takes the gumdrop before eating it.

****ExampleSand
Extend PUT and INSERT handling to cases where multiple objects are intended at once.