§9.3. Clothing
A person can wear any (portable) thing which has the "wearable" property. (This property seldom needs to be quoted because it is deduced automatically from sentences like "Trevor wears a red hat.")
In most traditional IF, clothing is only used when it is exceptional in some way. That is, we ignore the three to eight different garments most people are wearing at any given time - the everyday clothes which people wear without thinking about them - and only simulate the unexpected extras: a borrowed jaunty red hat, a radiation-proof space suit, and so on.
These unusual garments turn up only occasionally in play and usually one at a time, so Inform does not normally provide rules to restrict how much or little is worn, or in what unlikely combinations. Get Me to the Church on Time categorises clothing by body area (trousers for lower body, shirts for upper); Bogart by layer, distinguishing underwear from outer garments. What Not To Wear combines both into a general-purpose system adequate for most kinds of clothing situations.
See Kitchen and Bathroom for a simple mirror implementation, which could be adapted to reflect what the player is currently wearing
Hays Code is a somewhat stripped down version.
Clothes are normally single things which have no function other than display and concealment, but Being Prepared gives them pockets which act as containers, and Some Assembly Required allows clothes to be stitched together from pieces of cloth.
![]() | Start of Chapter 9: Props: Food, Clothing, Money, Toys, Books, Electronics |
![]() | Back to §9.2. Bags, Bottles, Boxes and Safes |
![]() | Onward to §9.4. Money |
Now we've created the rules that will govern any specific jackets we might happen to put in our game: each one will always have one pocket, which will be able to contain no more than two things. The description of "a list of things" is text with a list, which we will learn about further in a few sections. Next we might want to create the environment and an actual example of the jacket kind:
Notice that, since Inform has created a pocket for the hoodie, we can now refer to it by name in our source, giving it any additional properties we need to define. Here we simply put a few items into it.
Notice that Inform automatically refuses to put the hoodie into its own pocket: as a default, a container cannot contain something of which it is itself a part. |
|
Now we've created the rules that will govern any specific jackets we might happen to put in our game: each one will always have one pocket, which will be able to contain no more than two things. The description of "a list of things" is text with a list, which we will learn about further in a few sections. Next we might want to create the environment and an actual example of the jacket kind:
Notice that, since Inform has created a pocket for the hoodie, we can now refer to it by name in our source, giving it any additional properties we need to define. Here we simply put a few items into it.
Notice that Inform automatically refuses to put the hoodie into its own pocket: as a default, a container cannot contain something of which it is itself a part. |
|
|
|
|
|