6.8. Taking, Dropping, Inserting and Putting

| Chapter 6: Commands |

| 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 game: 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 with a procedural rule to turn off the "carrying requirements rule" under particular circumstances, or presented differently using the implicitly taking activity.

See Modifying Existing Commands for procedural rules to adjust carrying requirements

15
| Example Replanting Changing the response when the player tries to take something that is scenery. |
WI

200
| Example Removal TAKE expanded to give responses such as "You take the book from the shelf." or "You pick up the toy from the ground." |
WI

202
| Example Croft 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. |
WI

Suppose that we have a design in which the player spends lots of time on enterable supporters, and in which we want to report certain actions -- dropping things onto those supporters, or leaping from one to another -- in a new way. We might begin by adding some action variables to help us keep track of the situation: "Croft" The dropping action has an object called the container dropped into (matched as "into"). The dropping action has an object called the supporter dropped onto (matched as "onto"). Rule for setting action variables for dropping: if the actor is in a container (called C), now the container dropped into is C; if the actor is on a supporter (called C), now the supporter dropped onto is C. Report dropping a heavy thing onto a metallic thing: say "You drop [the noun], and [the supporter dropped onto] clangs protestingly." instead. Report someone dropping a heavy thing onto a metallic thing: say "[The actor] drops [the noun] onto [the supporter dropped onto], which clangs protestingly." instead. A thing can be heavy or light. A thing can be metallic or ordinary. A thing is usually ordinary. A thing is usually light. The Ancient Cambodian Temple is a room. "A vast space built for ancient and forgotten rituals. The stone floor crawls with vermin. Well above the floor, and separated by some feet, are twin platforms built into the wall: the one carved of jointed wood, the other of sheets of graven bronze." A platform is a kind of supporter. A platform is always enterable. A platform is usually scenery. The bronze platform is a metallic platform in the Temple. Lara is a woman. She is on the bronze platform. She wears safari pants and a tank top. She carries a gun and a map. The gun is heavy. The wood platform is an ordinary platform in the Temple. The player is on the wood platform. The player carries a rope, an Ancient Cambodian/English Phrasebook, a pickaxe, and a precious idol. The idol and the pickaxe are heavy. Persuasion rule: persuasion succeeds. The entering action has an object called the place left (matched as "from"). Check entering a platform from a platform: if actor is the player, say "You leap into midair to cross the distance..."; otherwise say "[The actor] leaps gracefully across the distance..."; move the actor to the holder of the noun, without printing a room description. Because this rule occurs before the "implicitly pass through other barriers rule", that rule will not occur when we move from platform to platform; we'll use our own custom rule instead. Rule for setting action variables for entering: now the place left is the holder of the actor. Report entering a platform from a platform: say "You land in a cat-like crouch on [the noun]." instead. Report Lara entering a platform from a platform: say "Lara lands soundlessly on [the noun][if the noun supports the player] beside you[end if]." instead. Report entering a platform from the location: say "You jump, catch the edge of [the noun] in your hands, and -- exerting considerable upper-body strength -- pull yourself up onto it." instead. Report Lara entering a platform from a location: say "Lara jumps, catches the edge of [the noun], and is standing upright on it, all in less time than it takes to tell." Instead of examining a person who is not the player: say "[The noun] carries [list of things carried by the noun] and wears [list of things worn by the noun]." Instead of climbing a platform, try entering the noun. Test me with "Lara, drop map / lara, drop gun / drop idol / enter bronze platform / drop pickaxe / get off / climb wood".

225
| Example Celadon Using the enclosure relation to let the player drop things which he only indirectly carries. |
WI

90
| Example Morning After When the player picks something up which he hasn't already examined, the object is described. |
WI

86
| Example Democratic Process Make PUT and INSERT commands automatically take objects if the player is not holding them. |
WI

87
| Example Sand Extend PUT and INSERT handling to cases where multiple objects are intended at once. |
WI

Previous | Contents | Next