| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Emotional Reactions

Page history last edited by Bill Maya 15 years, 1 month ago

Let's look at the Emotional Reaction menu that we skipped over previously. You'll find it in the second (blue) column of the Verb Editor, just below the AssumeRoleIf Script button. When you click on it, you get this menu:

 

There are three groups of items here: "Adjust____" items, "FillRoleBox" items, and "AdjustP___" items. Let's tackle them in sequence.

 

The "Adjust____" items refer to Debt_Grace, Familiarity, Disgusted_Aroused, Sad_Happy, Fearful_Angry, and Tired_Energetic. Except for the first two, these are Moods. A Mood in Storytron is a value that will automatically die down over about 10 moments. So if you bump up a Mood, it will remain significant for about 10 moments, after which time it reverts to a value of 0.0. Let's focus on the last one, AdjustTired_Energetic. This concerns the degree to which a person is feeling exhausted or pumped up. Obviously, if a person is tired, they won't hit as hard. Also, the longer a person fights, the more tired they become. Let's implement this idea.

 

But first, what is meant by "Adjust?" Often we simply want to set a variable to a new value. For those situations, we have Operators that start with the word "Set." However, there are also plenty of situations in which we want to start with the existing valuewhatever it may beand nudge it one way or the other. For these situations, we use Operators that begin with "Adjust." When we use Tired_Energetic, we want to use the Adjust Operator, not the Set Operator, because an Actor who does some labor becomes more tired with each exertion.

So we have two changes to make in our storyworld. First, we must adjust Tired_Energetic downward each time an Actor uses the Verb "hit with." Second, we must insure that the Actor hits only as hard as his Tired_Energetic permits.

 

The first task is easy: all you do is go to Verb "hit with," Role "hittee" and select the menu item "AdjustTired_Energetic" from the EmotionalReaction menu. This adds a Script button "AdjustTired_Energetic in the space just underneath the EmotionalReaction menu. Click on that Script button and you'll see the Script for AdjustTired_Energetic. It's emptyit just shows the prompt "How much?" Just fill in the BNumberConstant -0.5 there. This will adjust Tired_Energetic of the ReactingActor downward (more tired) every time the Role is assumed.

Here's an extra-credit question. Did you notice what we just did? We just adjusted ReactingActor's Tired_Energetic! But who is the person who just did the work of hitting? It was ThisSubject! To put it another way, let's say Fred has just hitTom with a whiskey bottle. Fred, then, is ThisSubject—the person who did the hitting. He's the one doing the work, and he's the one who should be getting tired. But it's Tom who is getting more tired—not Fred!

 

However, it's probably reasonable to assume that the person getting hit is going to get worn out as well. Besides which, since both gents are in a brawl, they will both gradually get more worn out, so this approximation of reality works.

 

It's perfectly OK to take shortcuts like this, as long as you understand what you have done and the limitations of your assumptions.

Now we have to make Tired_Energetic affect the Actor's behavior. To do this, we'll need to make a change in the Verb "hit with."

Go to that Verb and open the Properties box.  Add a WordSocket "5Quantifier."  This changes the meaning of "hit with" to include the notion that an Actor can hit with varying degrees of force.

 

This simple change has had consequences elsewhere in your storyworld, because now you must supply the Acceptable and Desirable Scripts for the two places in which the Verb "hit with" shows up as an Option. How do you find those two places? Easy. Just look under the Lizards menu and select the menu item "ComeFrom Lizard." The little window that pops up shows you all the Roles in which the Verb you're editing (which should be "hit with") is an Option. All you do is double-click on one of those listings and poof! you're there, looking at the Option. Do so.

 

Now we're looking at a Role with an Option of "hit with." There is now an entry for the "5Quantifier" WordSocket, containing both an Acceptable Script and a Desirable Script. If you look at these two Scripts, you'll realize that they haven't been written yetthey just contain Operators with question marks in them. You have to write those two Scripts.

 

The first, Acceptable, is pretty easy to write. Any Quantifier is acceptable in this situationexcept for the one we call the "Interrogative Quantifier," which is the term "how much?" So your Acceptable Script has only the task of locking out the Interrogative Quantifier. That's done like so:

 

NOT

     QuantifierIsInterrogative

CandidateQuantifier

 

The Operator "QuantifierIsInterrogative" is in the Words menu on the right side.

 

The Desirable Script is more difficult to write. Its job is to select the Quantifier that matches the level of Tired_Energetic of the Actor. If the Actor has a high value of Tired_Energetic, then you want to maximum Desirability for a large Quantifier. If the Actor has a low value of Tired_Energetic, then you want maximum Desirability for a low Quantifier. Fortunately, this is all handled quite nicely for you with a handy-dandy Operator called "Suitability." The Desirable Script looks like this:

 

Suitability of:

      CandidateQuantifier

      Tired_Energetic of:

           ReactingActor

 

That's all there is to it. The Suitability Operator, which can be found in the Word menu, figures out how the value of its second argument (the BNumber argument) fits into the scale of Quantifiers, and then compares that fit with the CandidateQuantifier. If the match is close, it gives a high value; if the match is not close, it gives a low value. This insures that Tired_Energetic will determine the chosen value of the Quantifier used in 5Quantifier.

 

Go ahead and add these two Scripts. Then go back to the Verb "hit with" and check ComeFrom Lizard to make sure that you have fixed both instances of "hit with" as an Option. (You can use "Copy" to add copies of the scripts to the other Option.)  When you have taken care of both instances, try out the storyworld. Does it work as you expected?

 

Next Tutorial: Consequences

Previous Tutorial: Attributes

 


Creative Commons License  This tutorial by Storytron, Inc. is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.

 

Comments (1)

Bill Maya said

at 8:37 pm on Mar 12, 2009

Need to update Emotional Reactions menu graphic.

You don't have permission to comment on this page.