The player's possessions are normally thought of as being held in
the hands, but there are two alternative possibilities: some items
might be being carried indirectly in a bag or other container (see
§12 next), while others might be worn as
clothing. Wearing a hat is evidently different from carrying it. Some
consequences are left to the designer to sort out, such as taking
account of the hat keeping the rain off, but others are automatically
provided: for instance, a request to “drop all” will not
be taken as including the hat, and the hat will not count towards
any maximum number of items allowed to be held in the player's hands.
The library provides two actions for clothing:
Disrobe. There is already an action called
for taking items out of containers, which is why the name
is not used for taking clothes off.
‘Ruins’ contains only one item of clothing, found resting on an altar in the Shrine: it summons a priest.
Treasure -> -> mask "jade mosaic face-mask" with description "How exquisite it would look in the Museum.", initial "Resting on the altar is a jade mosaic face-mask.", name 'jade' 'mosaic' 'face-mask' 'mask' 'face', cultural_value 10, after [; Wear: move priest to Shrine; if (location == Shrine) "Looking through the obsidian eyeslits of the mosaic mask, a ghostly presence reveals itself: a mummified calendrical priest, attending your word."; Disrobe: remove priest; ], has clothing;
clothing signifies that
the mask can be worn. During the time something is worn, it
has the attribute
worn. The library's standard rules
An object can only have
worn if it is
in player, that is, if
it is an immediate possession of the player.
If you use
shift items of clothing in your own code, or give or take away the
worn attribute, then you too should follow this principle.
▲ A risk of providing clothing for the player is that it's hard to resist the lure of realism. A tweed jacket would add some colour to ‘Ruins’. But if a jacket, why not plus-four trousers, an old pair of army boots and a hat with a mosquito net? And if trousers, why not underwear? What are the consequences if the player strips off? Too much of this kind of realism can throw a game off balance, so: no tweed.
Design a pair of white silk gloves, left and right, which are a single object called “pair of white gloves” until the player asks to do something which implies dividing them (typing “wear left glove”, say, or “put right glove in drawer”). They should automatically rejoin into the pair as soon as they are together again. (By Richard Tucker. Hint:
before rules are all you need.)
For designers who do want to go down the “if trousers, why not underwear?” road, Denis Moskowitz's library extension "clothing.h" models clothing by layer and by area of body covered. •For players who also want to, the road to take is ‘I-0’, by Adam Cadre.