How to Build an Expression

 

 

In this essay, I will walk through the process by which a storybuilder creates an expression. His starting point is the default entry made by the editor upon creation of a consequence for a role:

 

Weight[Punch] = 0

 

The storybuilder clicks on the 0; this selects and highlights it. Now the storybuilder selects an entry from the Globals menu; let's say he chooses Volatility. That term now replaces the 0:

 

Weight[Punch] = Volatility

 

Next, the storybuilder wishes to subtract the character's affection for the Subject. So he double-clicks on the term. This tells the editor to expand the term by adding parentheses around it and an operator in it:

 

Weight[Punch] = (Volatility ? ?)

 

The question marks are undefined operators; they indicate that an operator MUST be inserted into that location at some point in the future. To do so, the storybuilder clicks on it once and then clicks on one of the operators in the icon bar, replacing it:

 

Weight[Punch] = (Volatility + ?)

 

At this point, the operator can now substitute the next term by clicking once on the remaining question mark, highlighting it, and then selecting the affection term:

 

Weight[Punch] = (Volatility + Affection[?])

 

Note that there's a new question mark now, representing the undefined object of the affection. The storybuilder clicks once on this and selects and item from the This Substory menu:

 

Weight[Punch] = (Volatility + Affection[Subject])

 

Now suppose that he wants to insert a function call. First he expands the expression by double-clicking on the plus sign:

 

 

Weight[Punch] = ((Volatility + Affection[Subject]) ? ?)

 

He selects the new zero, clicks on the "Functions" button and is presented with a dialog box presenting lots of functions. He clicks on one of the function names and its definition appears in a pane in the dialog box. Satisfied that this is in fact the function he wants, he hits RETURN to insert this function at the selected location:

 

Weight[Punch] = ((Volatility + Affection[Subject]) ? SearchHistory(?,?))

 

At this point the storybuilder is ready to fill in the other items in the expression. The only other detail left to describe is the insertion of a variable. Whenever the storybuilder selects an argument, he can fill it in with an argument from the various argument menus, one of which is the Local Variables menu. When such a choice is made, the local variable is inserted into the expression, and a defining equation is also added, like so:

 

Weight[Punch] = ((Volatility + Affection[Subject]) ? SearchHistory(x,?))

Where x = ?

 

This can then be edited in the usual way.

 

Numerals can be directly typed for a selected argument.

 

Boldface elements cannot be clicked on; they are frozen by the editor.