Chapter 9: Props: Food, Clothing, Money, Toys, Books, Electronics
9.1. Food

Inform provides an either/or property called "edible" and action, "eating", for consuming edible things:

The lardy cake is edible. After eating the lardy cake, say "Sticky but delicious."

One of Inform's rules is that a person can only eat what he or she is holding - normally realistic, but it does prevent, say, eating a cherry off the tree. A procedural rule can override this: see Lollipop Guild.

Inform does not normally simulate taste or digestion, but to provide foods with a range of flavours, see Would you...?; to make eating different foods affect the player differently, see Stone, or for the extreme case of poisoning foods, Candy. In MRE, hunger causes the player problems unless he regularly finds and eats food.

* See Liquids for things to drink


327
*** Example  Lollipop Guild
Overriding the rules to allow the player to eat something without first taking it.

WI
48
* Example  Would you...?
Adding new properties to objects, and checking for their presence.

WI
335
* Example  Stone
A soup to which the player can add ingredients, which will have different effects when the player eats.

WI
122
* Example  Candy
One of several identical candies chosen at the start of play to be poisonous.

WI
131
* Example  MRE
Hunger that eventually kills the player, and foodstuffs that can delay the inevitable by different amounts of time.

WI


PreviousContentsNext