The Reaction Cycle
When one or more Actors learn of an Event, a process begins called the Reaction Cycle. The purpose of this Cycle is to allow these Actors to react to that Event (called "ThisEvent" for the duration of the Reaction Cycle). ThisEvent's Subject is called ThisSubject, ThisEvent's DirObject is called ThisDirObject, and so on for all of ThisEvent's WordSockets.

If ThisEvent has just entered the Historybook, any Consequence Scripts it might have are executed. (Note that SetAnticipatedValue is NOT a Consequence and is NOT executed at this time).

After any Consequence Scripts are executed, the Actors who have just learned of ThisEvent take turns reacting. When it is an Actor's turn to react, she is called the ReactingActor. When an Actor is done reacting, she ceases to be the ReactingActor. Another Actor who has just learned of ThisEvent then gets his turn, and becomes the ReactingActor. See below for the order in which Actors get to react. Each ReactingActor goes through the following steps:

The ReactingActor Assumes a Role

When a ReactingActor's turn begins, the first thing she does is to seek a Role suitable for her, from among ThisEvent's Roles. She does this by going through ThisEvent's Roles in the order in which they are listed in ThisVerb's Role list. She checks each Role's AssumeRoleIf Script. This Script tells her whether or not to assume the Role. When she finds a Role to assume, she assumes it immediately and proceeds to the next step. For the duration of her turn, the Role she has assumed is called the AssumedRole. If she finds no Role to assume, she passes her turn.

The AssumedRole Engenders EmotionalReactions in the ReactingActor

Once the ReactingActor has assumed a Role, if that Role has EmotionalReaction Scripts, those Scripts are executed. This usually causes changes to the ReactingActor's personality profile.

The ReactingActor Decides whether to Make a Reaction Plan

The ReactingActor will now normally want to create a Plan in reaction to ThisEvent. However, if ThisEvent is Hijackable, she might not be able to do so. Hijackable Events restrict the number of Actors who are able to react to them.

The ReactingActor finds the Acceptable Candidates for the Wordsockets of each Option's Verb

The AssumedRole offers the ReactingActor several Options. An Option represents an opportunity to create a Plan based on a certain Verb. The ReactingActor will choose one of these Options to start creating his or her reaction Plan. As a first step in making this decision, she creates a tentative Plan based on each of these Options. To make a tentative Plan with a given Option, she must assign a Word to each WordSocket of that Option's Verb. For each WordSocket, she finds all Words in the storyworld of the correct data type for that WordSocket. She then executes the given Option's Acceptability Script for that WordSocket for each of these candidate Words. The Script determines, for each candidate, whether that candidate is Acceptable or not.

The ReactingActor assigns Words to each Option's WordSockets

Now the ReactingActor creates the tentative reaction Plan with each of the AssumedRole's valid Options. For each WordSocket of a given Option's Verb, she must select one of the WordSocket's Acceptable candidates. That Word will be assigned to the said WordSocket.

If the ReactingActor is the Protagonist, the player may select freely from among each WordSocket's Acceptable candidates.
If the ReactingActor is computer-controlled, she uses Desirability Scripts to select which candidate to assign to each WordSocket. Each Option has a Desirability Script for each of its Verb's WordSockets. The computer-controlled ReactingActor applies that Script to each of that WordSocket's Acceptable candidates. This Script determines the candidate's relative merit compared to the other candidates. She chooses the candidate with the greatest relative merit. That Word is assigned to the Wordsocket.

The ReactingActor Selects a Valid Option

If the ReactingActor is the Protagonist, the player now selects any one of the tentative Plans he has made during the previous steps of the Reaction Cycle. The Option on which this Plan is based is called the SelectedOption for the duration of his turn.

If the ReactingActor is computer-controlled, she checks each valid Option's Inclination Script. This Script allows her to determine that Option's relative merit. She selects the tentative Plan which is based on the Option with the greatest relative merit. This Option is called the SelectedOption for the duration of her turn.

The Reacting Actor Creates the Reaction Plan

Once the ReactingActor has selected the tentative Plan she wishes to carry out, she sets this Plan's PlannedExecutionTime according to its Verb's TimeToPrepare, then adds the Plan to the Planlist. Her turn ends.

A New Reacting Actor is Chosen

The turn now passes to another Actor who has just learned of ThisEvent, and who has not yet had a turn to react. The turn is first passed, in order of Priority, to Actors other than ThisSubject and ThisDirObject. Next, the turn passes to ThisDirObject, and finally to ThisSubject. When ThisSubject has had a chance to react, the Reaction Cycle ends.

Previous:  The Action Cycle                                                                                                       Next:  The Travel Cycle