Token String Format

The problem for today is to establish the format of token strings. In Erasmotron 1, the following format was used:

 

Substitution equations

Activation equation

Emotional adjustments

Consequence equations

 

The reason for this structure is that there are three different usage contexts for each token string: examining the activation equation (frequently used); applying the emotional adjustments; and executing the consequence equations. All three must be separable; hence the need for the structure.

 

But the old structure required the insertion of emotional adjustment equations in every case, a clumsy, tedious, and wasteful imposition. My goal is to design a new format that does not impose this requirement.

 

Complicating matters is the addition of the macro code; further complicating matters is my desire to break up the substitutions so that they are executed only as needed, rather than all at once at the beginning of the token string.

 

My solution comprises two ideas. First, I shall dispense with the substitution header. Instead, substitutions and macros will immediately precede the equation that uses them. This, however, requires an additional constraint: neither substitutions nor macros may be reused. Although there will be a "push substitute" token, it will never be explicitly assignable by the storybuilder. Instead, it will be inserted only when the storybuilder clicks on the "Substitute" button. This further requires that I increase the number of Substitution variables available. Note, however, that this solution also automatically and completely solves the problem of circular variable definitions.

 

The second idea behind the solution is simply to format the string as follows:

 

Activation equation (terminated by ACTIVATECODE)

Emotional adjustments (terminated by EMADJUSTCODE)

Consequence equations (terminated by TERMINATORCODE)