Bigger, Smaller
These are simple Operators; they simply return the bigger or smaller of two BNumbers.
PickUpperIf
This Operator has three arguments: a Boolean to decide whether or not to pick the upper BNumber, an upper BNumber, and a lower BNumber. Here's a quick example:
This will return a 0.5 if ThisSubject is nicer than ThisDirObject; otherwise, it will return 0.0. This is handy for situations where you must make an abrupt choice between two possibilities based on some yes-or-no factor. It can be used in cases where the author wants one Option to override all the others under a special circumstance. An example of such an Inclination Script might look like this:
PickUpperIf of:
SpecialCircumstance
Maxi
Mini
(Maxi and Mini are BNumber constants. Maxi = 0.999 and Mini = -0.999)
This would insure that the Option was a shoo-in when SpecialCircumstance was true, but otherwise was out of the running.
Actor@Sum
You can use this Operator to add up the Attribute (or perceived Attribute) values of all the Actors towards one Actor. For example, suppose you want to find out how trusted Joe is by the female Actors.
First, go to the Actor Editor and click the far right green plus sign to add a trait. Name the new trait Faithless_Honest. Unclick the check box to the right of the trait. This means the trait is not readily detectable when two Actors meet (an example of a visible/detectable trait would be Short_Tall. An example of an invisible or non-detectable trait would be Cowardly_Courageous). Then return to the Verb editor and choose any Desirable or Inclination script.
Now highlight a BNumber term and then select Actor@Sum from the Actor menu, and fill out the other terms to get this:
Actor@Sum of:
Female of:
CandidateActor
PFaithless_Honest of:
CandidateActor
Joe
This would add up all the female Actors' PFaithless_Honest values towards Joe. Note that the first term, the Boolean, allows you to filter out Actors based on whatever acceptability criteria you choose.
Prop@Sum, Stage@Sum, Event@Sum
These Operators function for Props, Stages, and Events, respectively, in the same way that Actor@Sum does for Actors.
These four Operators behave the same way as their ____@Sum counterparts, except that they return the average values of the given Attributes, rather than their totals.
Actor@Tally, Prop@Tally, Stage@Tally, Event@Tally
These Operators use regular numbers, rather than BNumbers. They count up the number of Actors, Props, Stages, or Events that meet a set of criteria you specify. You can then convert them to BNumbers and use them in your scripts.
Suppose you want to have the ReactingActor make a decision on whether to confront a bully or defer the confrontation based on how many allies he or she has. The inclination script might look something like this:
Actor@Tally (we pronounce these operators, by the way, as for instance "ActorTally"—that is, with a silent "@"—reduces the tongue tangles) in the above script counts the number of Actors whose perception of how allied the ReactingActor is to them (that is, their PEnemy_Ally value for ReactingActor) is at least medium-large (i.e., greater than 0.2), and gives you a numerical count from 0 to the total number of Actors in your storyworld (let's call it 4).
Using the Operator Number2BNumber converts this result to a BNumber (all Desirable and Inclination scripts must result in a BNumber). Applying the BNumber magic, 4 allies translates into a willingness to confront the bully of 0.8. Since the BNumber range is about -0.9999 to +0.9999, if you have four allies, 0.8 is pretty high on the scale. A confrontation with the bully is a pretty likely scenario!
You might want to tune this script to make it less sensitive to the number of allies. Let's say you want to make it so your Actor will only confront the bully if he or she has lots of allies. To do so, you can divide the Actor@Tally by, say, 10.0. It would look like this:
It would take a lot more Allies to make ReactingActor confront the bully. If ReactingActor has four allies, this script ends up with 0.29 for Inclination. This script makes a confrontation less likely than the first script above.
Play around with different values for the divisor, and watch what happens in Scriptalyzer to the likelihood of this Option being taken (For extra credit, see if you can make the script take into account to the Actor's personal courage. Hint: the ReactingActor's courage affects how many allies he or she will want, in order to feel safe).
PickBest___
This is one of the most powerful Operators in Sappho. It will pick the best Actor, Prop, Stage, Verb, Event, ActorTrait, PropTrait, StageTrait, MoodTrait, or Quantifier depending upon your specifications. And what are your specifications? Nothing more than the same Acceptable and Desirable subscripts that you use for WordSockets! Here's an example:
Suppose we want to pick the Prop that ReactingActor owns that is most lethal. This would be good if ReactingActor is preparing for a fight.
In the Desirable script choose CorrespondingPropTrait, and then for the PropTrait, select PickBestProp under Picking in the Operator menu. Here's how the script looks:
There will be times when your PickBest___ Operator fails to find anything at all. For example, in the above script, if the ReactingActor doesn't own any Props at all, then PickBestProp will not find anything to return. In this case, PickBestProp will generate Poison that will eliminate the Option from consideration.