Inform 7 Home Page / Documentation


§12.4. Persuasion

"Asking ... to try ..." actions run through their Before and Instead rules like any other actions, but then (if no rule has intervened) something different happens: Inform has to decide whether the person asked consents to try the action or not. By default, the answer is always no, and text like the following will be printed:

> will, go west
Will has better things to do.

However, we can intervene to make the answer "yes", using a special kind of rule which produces a yes/no answer. The following examples show how we can give broad or narrow permission, as we choose:

Persuasion rule for asking people to try going: persuasion succeeds.
Persuasion rule for asking Will to try going west: persuasion succeeds.

Such a rule can either declare that "persuasion succeeds", or that "persuasion fails", or make no decision and leave it to another rule to say. If it decides that persuasion fails, it is also allowed to say something, describing why: in that event, the standard message ("Will has better things to do.") is suppressed. For example,

Persuasion rule for asking Will to try going:
    say "Will looks put out, and mutters under his breath.";
    persuasion fails.

The following rule, which is really only suitable for testing, makes everybody infinitely obliging:

paste.png Persuasion rule for asking people to try doing something: persuasion succeeds.

Supposing that Will does decide to cooperate, a new action is generated:

Will going west

and this is then subject to all of the usual action machinery. For instance, we could write a rule such as:

Instead of Will going west, say "He runs out into the waves, but soon returns, rueful."

So in this case the new action ("Will going west") failed: but the original action, "asking Will to try going west", is still deemed to have succeeded - after all, Will did try. To put it more formally, "asking X to try A" succeeds if the persuasion rules succeed, and otherwise fails.

Note also that "Instead of..." rules written for other people will be treated by Inform as failures, even if we write something like

Instead of Will pulling the cord:
    say "The bell rings."

and thus may produce unsatisfactory results such as

>WILL, PULL CORD
The bell rings.

Will is unable to do that.

If we wish to write new successful actions for another character, we will need to create appropriate carry out and report rules for them: these will be explained in the sections to follow.

(Finally, note that the mechanism Inform uses to see if we have printed a refusal message of our own, in the event of persuasion rules failing, can be fooled if we write a persuasion rule explicitly ending with a "[paragraph break]" text substitution.)


arrow-up.png Start of Chapter 12: Advanced Actions
arrow-left.png Back to §12.3. Giving instructions to other people
arrow-right.png Onward to §12.5. Unsuccessful attempts

*ExampleThe Hypnotist of Blois
A hypnotist who can make people obedient and then set them free again.

*ExamplePolice State
Several friends who obey you; a policeman who doesn't (but who takes a dim view of certain kinds of antics).