§7.4. Barter and Exchange

By default, Inform characters are a bit grudging about giving and sharing objects: they react with disinterest when they're shown things and refuse everything they're offered.

If we'd like to change this, we can simply remove the default "block giving" rule, as in

The block giving rule is not listed in the check giving it to rules.

If we do this, giving items to characters will have the result of moving our possessions to the other person's inventory. Of course, without more customization, the player may not ever be able to persuade the other character to return his possessions. Bribery demonstrates a scenario in which a character will accept gifts if they are interesting to him, and respond with a changed attitude to the player.

Barter Barter expands further on this by allowing other characters to trade things with one another.

* See Modifying Existing Commands for ways to allow the player to give or show things that he isn't currently holding

* See Actions on Multiple Objects for an implementation of giving that allows the player to offer multiple objects at once, where their combined value determines whether they are accepted

* See Money for ways to keep track of cash flow, physical money objects, and price negotiations

arrow-up.pngStart of Chapter 7: Other Characters
arrow-left.pngBack to §7.3. Reactive Characters
arrow-right.pngOnward to §7.5. Combat and Death

A GIVE command that gets rid of Inform's default refusal message in favor of something a bit more sophisticated.

***ExampleBarter Barter
Allowing characters other than the player to give objects to one another, accounting for the possibility that some items may not be desired by the intended recipients.