| 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
| Example Replanting Changing the response when the player tries to take something that is scenery. | |
| 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." | |
| Example Celadon Using the enclosure relation to let the player drop things which he only indirectly carries. | |
| Example Morning After When the player picks something up which he hasn't already examined, the object is described. | |
Suppose we want to make the player's life slightly easier by examining everything he picks up, if he hasn't already examined it.
"Morning After"
A thing can be examined or unexamined.
After taking something unexamined:
say "Taken. [run paragraph on]";
try examining the noun.
Carry out examining something:
now the noun is examined.
Carry out rules are explained in more detail in the chapter on advanced action handling. For now, it may be enough to know that what we put into this carry out rule for examining will happen any time anything is examined, but that it will not interfere with the rest of the predefined behavior of the action. The player will still see the object description and so on, as usual.
The Red Door Saloon is a room. "This old place is in pretty bad shape since the mine shut down. Now there's not much to see but the pair of deep gouges in the floorboards where they dragged away the Sheriff's corpse with the spurs still on."
Jed is a man in the Red Door Saloon. "At 8:30 AM the only person around is old Jed, collecting his hangover cure."
The pistol is a thing in the Red Door Saloon. The description of the pistol is "It ain't too accurate, but for two dollars you can't expect much."
The hangover cure is a thing in the Red Door Saloon. The description of the hangover cure is "Two yellow egg-yolks unbroken in a red-brown liquid. Yep."
Test me with "x pistol / get all".
|