We provide a bunch of special Operators in Sappho to make your life easier. Here are their definitions:
This___, Past___, Chosen___
These are large groups of operators that apply to specific WordSockets (as well as some other parts) of the Event. There's an Operator called ThisSubject, which returns the Subject of the Event that has just taken place. ThisDirObject refers to the DirObject of the selfsame Event. And so on through all the other WordSockets (e.g., This4Actor, This5Stage, etc.). But there are even more Operators of this sort:
ThisTime: the time at which this Event took place.
ThisLocation: the Stage on which this Event took place.
ThisPageNumber: the page number of this Event.
ThisCausalEvent: the Event that caused this Event to happen.
ThisHijacked: whether or not this Event has been hijacked.
We also have Past___ versions of all the This___ Operators, covering exactly the same material. The only difference is that the Past___ Operator takes an Event as its argument. You have to specify the past Event that you are referring to, like so:
This Operator returns the Subject of the Event that caused ThisEvent.
Notice what that tells you about ThisCausalEvent. If ThisEvent is the event that has just happened, ThisCausalEvent is the Event immediately before that. Let's take an example of a set of interactions:
1. Fred punches Joe
2. Joe passes out
3. Mary calls the police
So, if you are writing scripts to tell the Engine what it should do next for the Verb calls, ThisEvent would be Event #3 above, "Mary calls the police," which means ThisSubject is Mary, and ThisDirObject is the police. ThisCausalEvent would be Event #2, "Joe passes out." The PastSubject of ThisCausalEvent would be Joe.
Here's a challenge: Assume that ThisEvent is Event #3. What is the value of:
This is a good example of a simple situation. However, in more complicated storyworlds, there can be simultaneous activity in different Stages, so it is not necessarily true that ThisCausalEvent immediately precedes ThisEvent; there could be other Events from other Stages between these two Events.
Finally, there are the Chosen___ Operators. These are a little tricky. Their purpose is to let you use decisions that you make in one WordSocket, in a later WordSocket. They store the values of the WordSockets that you have already decided upon in your Option scripts. You can't use these Operators in any place except the Inclination or WordSocket Acceptable and Desirable scripts inside any Option. SWAT won't let you use the Chosen___ Operators improperly. And SWAT will only let you use Chosen___ Operators for WordSockets that precede the WordSocket in which you're working. So if you're writing a Script for the WordSocket 5Prop then you can use ChosenDirObject or Chosen4Stage (if they exist), but you couldn't use Chosen9Actor, because it hasn't been decided as of the time of execution of the Script you're working on.
For these purposes, Inclination is the last Script executed, so you can use any of the Chosen___ Operators in the Inclination Script.
Blending Operators allow you to mix numbers together in differing ratios. They serve a number of useful purposes. Suppose, for example, that you want to write an Inclination Script for Joe's inclination to punch Fred, based on two factors: how angry Joe is, and how much Joe likes Fred. You want to mix the two factors together. Here's one way to write your Script (we're assuming here that PNasty_Nice measures how much the perceiver likes the perceived):
This means "blend Joe's Fear_Anger in equal measure with Joe's PNasty_Nice for Fred." Blend will return the average of the two BNumbers. But here's the really nice part. Suppose that, when you're testing your storyworld, it always seems as if the Fear_Anger part plays too big a role in the final result. Once your Actors get mad, it doesn't seem to matter how much they like a person—they start punching. You want to tone it down and put more emphasis on PNasty_Nice. No problem! Just change that final 0.0 to something a bit more negative. In Blend, the final term, called the "bias factor," biases the result towards one or the other argument. A positive bias factor will put more weight on the upper argument; a negative bias factor will put more weight on the lower argument. So if you put in, say, -0.4, then the PNasty_Nice part will get more weight in Blend than the Fear_Anger part. This feature of the Blend Operator makes it especially useful for fine-tuning your storyworld.
This is another blending Operator that operates in a different fashion. We won't go into the mathematical subtleties involved; We'll just give you a simple rule of thumb: use Blend most of the time. Use BlendBothily only when you want either of the two arguments to stomp out the result if it's -0.99. Here's an example of what we mean:
this returns a value of 0.0—the average of the two. But look at this:
this returns a value of -0.99 (actually, it returns -0.86, but that's even trickier to explain).
BlendBothily doesn't give the average of the two values. In other words, BlendBothily would be only useful in cases where both factors you are considering must be on the high end of the scale. For instance, let's assume you want to create a script for an Option called beg for help, which the ReactingActor will only resort to if both of these conditions are met:
1) they have a high degree of trust in the beggee
2) they are very frightened about something
In such a case, the inclination script might look like this:
This script says that the ReactingActor must have both a strong perception that the ChosenDirObject is trustworthy (that is, they perceive them to have a very high False_Honest value), and the ReactingActor must also be very afraid. If both are not very high numbers (far over on the right side of the number scale), then the Option beg for help will not be chosen.
A few special Operators normally take just two arguments, but in some cases you'd like to include more arguments. For example, consider BSum. It adds together two BNumbers. But suppose that you wanted to add three numbers together? Then you'd have to write something like this:
This is clumsy, so we created two new summing Operators: BSum3, which adds three BNumbers, and BSum4, which adds four BNumbers. We also created similar Operators for logic: OR3, OR4, AND3, and AND4.
There's also a Blend3 and a Blend4. They differ from the regular Blend in that, instead of having a single bias factor, they have separate weighting factors for each argument. Here's an example:
This will blend all three factors together, but Joe's Fear_Anger will get a lot of weight, his PNasty_Nice will get less, and Mary's False_Honest will get very little weight.