/
t-a-11-emotional-reactions.html
117 lines (107 loc) · 23.1 KB
/
t-a-11-emotional-reactions.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Storytron Tutorials - Emotional Reactions</title>
<meta name="GENERATOR" content="Virtual Mechanics SiteSpinner V2 270f ">
<meta http-equiv="imagetoolbar" content="false">
<style type="text/css"><!--
.fsx01 {font-size: 11px;}
.fsx02 {font-size: 12px;}
.fsx03 {font-size: 13px;}
.fsx04 {font-size: 15px;}
.fsx05 {font-size: 16px;}
.fsx06 {font-size: 19px;}
.fsx07 {font-size: 21px;}
.fsx08 {font-size: 24px;}
.fsx09 {font-size: 27px;}
.fsx10 {font-size: 29px;}
.fsx11 {font-size: 32px;}
.fsx12 {font-size: 35px;}
.fsx13 {font-size: 37px;}
.fsx14 {font-size: 48px;}
.fsx15 {font-size: 64px;}
.fsx16 {font-size: 96px;}
.txdec {text-decoration: none;}
#centered{position:relative;width:984px;height:100%;margin:0px auto 0 auto;text-align:left;padding-left:1px;cursor:default}
#Oobj464 {position:absolute;z-index:1;visibility:visible;text-align:left;left:395px;top:66px;width:400px;height:71px;}
#Oobj465 {position:absolute;z-index:2;visibility:visible;text-align:left;left:207px;top:122px;width:766px;height:2157px;background-color:#ffffff;border-width:6px;border-style:solid;border-color:#ffffff;}
#Oobj446 {position:absolute;z-index:3;visibility:visible;left:0px;top:2px;width:200px;height:147px;}
#Oobj456 {position:absolute;z-index:4;visibility:visible;left:208px;top:-1px;width:775px;height:28px;}
#Oobj457 {position:absolute;z-index:5;visibility:visible;text-align:left;left:220px;top:0px;width:741px;height:27px;}
#Oobj459 {position:absolute;z-index:6;visibility:visible;left:208px;top:27px;width:775px;height:28px;}
#Oobj50 {position:absolute;z-index:7;visibility:visible;text-align:left;left:222px;top:2212px;width:740px;height:185px;}
input,textarea,select {color:#000000;font-family:'Times New Roman';font-size:16px;font-weight:normal;font-style:normal;text-decoration:none;}
.dfltt {font-family:'Times New Roman';font-size:16px;font-weight:normal;font-style:normal;text-decoration:none;text-align:left;color:#000000;}
.dfltc {font-family:'Times New Roman';font-size:16px;font-weight:normal;font-style:normal;text-decoration:none;text-align:left;color:#000000;}
body {margin:0px;text-align:center;height:100%;width:100%;}
-->
</style>
</head>
<body bgcolor="#dec4a6" alink="#ff0000" link="#8c6756" vlink="#747474" >
<div id="centered">
<div id="Oobj464">
<div id="Ggeo51" class="dfltt">
<div align="center"><font face="Bookman Old Style" class="fsx06"><B>SWAT TUTORIAL<br>
Emotional Reactions<br></B></font></div>
</div>
</div>
<div id="Oobj465">
<div id="Ggeo311" class="dfltt">
<font face="Bookman Old Style" class="fsx04">Let's look at the Emotional Reaction menu that we skipped over previously. You'll find it in the second (blue) column of the </font><font face="Bookman Old Style" class="fsx04" color="#008000">Verb</font><font face="Bookman Old Style" class="fsx04"> Editor, just below the AssumeRoleIf Script button. When you click on it, you get this menu:</font><br>
<br>
<font face="Bookman Old Style" class="fsx04"><img align="left" hspace="5" src="images/t11-a.jpg" width="175" height="592">There are three groups of items here: "Adjust____" items, "FillRoleBox" items, and "AdjustP___" items. Let's tackle them in sequence.<br>
<br>
The "Adjust____" items refer to </font><font face="Bookman Old Style" class="fsx04" color="#006080">Debt_Grace</font><font face="Bookman Old Style" class="fsx04">, </font><font face="Bookman Old Style" class="fsx04" color="#006080">Familiarity</font><font face="Bookman Old Style" class="fsx04">, </font><font face="Bookman Old Style" class="fsx04" color="#006080">Disgusted_Aroused</font><font face="Bookman Old Style" class="fsx04">, </font><font face="Bookman Old Style" class="fsx04" color="#006080">Sad_Happy</font><font face="Bookman Old Style" class="fsx04">, </font><font face="Bookman Old Style" class="fsx04" color="#006080">Fearful_Angry</font><font face="Bookman Old Style" class="fsx04">, and </font><font face="Bookman Old Style" class="fsx04" color="#006080">Tired_Energetic</font><font face="Bookman Old Style" class="fsx04">. 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 </font><font face="Bookman Old Style" class="fsx04" color="#ff0000">0.0</font><font face="Bookman Old Style" class="fsx04">. 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.<br>
<br>
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 value</font><font face="Bookman Old Style" class="fsx04">—</font><font face="Bookman Old Style" class="fsx04">whatever it may be</font><font face="Bookman Old Style" class="fsx04">—</font><font face="Bookman Old Style" class="fsx04">and nudge it one way or the other. For these situations, we use Operators that begin with "Adjust." When we use </font><font face="Bookman Old Style" class="fsx04" color="#006080">Tired_Energetic</font><font face="Bookman Old Style" class="fsx04">, we want to use the Adjust Operator, not the Set Operator, because an </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Actor</font><font face="Bookman Old Style" class="fsx04"> who does some labor becomes <I>more</I> tired with each exertion.<br>
<br>
So we have two changes to make in our storyworld. First, we must adjust </font><font face="Bookman Old Style" class="fsx04" color="#006080">Tired_Energetic</font><font face="Bookman Old Style" class="fsx04"> downward each time an </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Actor</font><font face="Bookman Old Style" class="fsx04"> uses the </font><font face="Bookman Old Style" class="fsx04" color="#008000">Verb</font><font face="Bookman Old Style" class="fsx04"> "</font><font face="Bookman Old Style" class="fsx04" color="#008000">hit with</font><font face="Bookman Old Style" class="fsx04">." Second, we must insure that the </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Actor</font><font face="Bookman Old Style" class="fsx04"> hits only as hard as his </font><font face="Bookman Old Style" class="fsx04" color="#006080">Tired_Energetic</font><font face="Bookman Old Style" class="fsx04"> permits.<br>
<br>
The first task is easy: all you do is go to </font><font face="Bookman Old Style" class="fsx04" color="#008000">Verb</font><font face="Bookman Old Style" class="fsx04"> "</font><font face="Bookman Old Style" class="fsx04" color="#008000">hit with</font><font face="Bookman Old Style" class="fsx04">," </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Role</font><font face="Bookman Old Style" class="fsx04"> "</font><font face="Bookman Old Style" class="fsx04" color="#0000ff">hittee</font><font face="Bookman Old Style" class="fsx04">" 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 empty</font><font face="Bookman Old Style" class="fsx04">—</font><font face="Bookman Old Style" class="fsx04">it just shows the prompt "</font><font face="Bookman Old Style" class="fsx04" color="#ff0000">How much?</font><font face="Bookman Old Style" class="fsx04">" Just fill in the </font><font face="Bookman Old Style" class="fsx04" color="#ff0000">BNumberConstant</font><font face="Bookman Old Style" class="fsx04"> -0.5 there. This will adjust </font><font face="Bookman Old Style" class="fsx04" color="#006080">Tired_Energetic</font><font face="Bookman Old Style" class="fsx04"> of the </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">ReactingActor </font><font face="Bookman Old Style" class="fsx04">downward (more tired) every time the </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Role</font><font face="Bookman Old Style" class="fsx04"> is assumed.</font><br>
<br>
<font face="Bookman Old Style" class="fsx04">Here's an extra-credit question. Did you notice what we just did? We just adjusted </font><font face="Bookman Old Style" class="fsx04" color="#0000ff"><I>ReactingActor</I></font><font face="Bookman Old Style" class="fsx04"><I>'</I></font><font face="Bookman Old Style" class="fsx04"><I>s</I> </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Tired_Energetic</font><font face="Bookman Old Style" class="fsx04">! But who is the person who just did the work of </font><font face="Bookman Old Style" class="fsx04" color="#008000">hitting</font><font face="Bookman Old Style" class="fsx04">? It was </font><font face="Bookman Old Style" class="fsx04" color="#0000ff"><I>ThisSubject</I></font><font face="Bookman Old Style" class="fsx04">! To put it another way, let's say </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Fred</font><font face="Bookman Old Style" class="fsx04"> has just </font><font face="Bookman Old Style" class="fsx04" color="#008000">hit</font><font face="Bookman Old Style" class="fsx04"> </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Tom</font><font face="Bookman Old Style" class="fsx04"> with a </font><font face="Bookman Old Style" class="fsx04" color="#ff00ff">whiskey bottle</font><font face="Bookman Old Style" class="fsx04">. </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Fred</font><font face="Bookman Old Style" class="fsx04">, then, is </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">ThisSubject</font><font face="Bookman Old Style" class="fsx04">—the person who did the </font><font face="Bookman Old Style" class="fsx04" color="#008000">hitting</font><font face="Bookman Old Style" class="fsx04">. He's the one doing the work, and he's the one who should be getting tired. But it's </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Tom</font><font face="Bookman Old Style" class="fsx04"> who is getting more tired—not </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Fred</font><font face="Bookman Old Style" class="fsx04">! <br>
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. <br>
It's perfectly OK to take shortcuts like this, as long as you understand what you have done and the limitations of your assumptions.</font><br>
<br>
<br>
<font face="Bookman Old Style" class="fsx04">Now we have to make </font><font face="Bookman Old Style" class="fsx04" color="#006080">Tired_Energetic</font><font face="Bookman Old Style" class="fsx04"> affect the </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Actor</font><font face="Bookman Old Style" class="fsx04">'s behavior. To do this, we'll need to make a change in the </font><font face="Bookman Old Style" class="fsx04" color="#008000">Verb</font><font face="Bookman Old Style" class="fsx04"> "</font><font face="Bookman Old Style" class="fsx04" color="#008000">hit with</font><font face="Bookman Old Style" class="fsx04">." <br>
<br>
Go to that </font><font face="Bookman Old Style" class="fsx04" color="#008000">Verb</font><font face="Bookman Old Style" class="fsx04"> and open the Properties box. Add a </font><font face="Bookman Old Style" class="fsx04" color="#0080a0">WordSocket</font><font face="Bookman Old Style" class="fsx04"> "5Quantifier." This changes the meaning of "</font><font face="Bookman Old Style" class="fsx04" color="#008000">hit with</font><font face="Bookman Old Style" class="fsx04">" to include the notion that an </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Actor</font><font face="Bookman Old Style" class="fsx04"> can hit with varying degrees of force. <br>
<br>
This simple change has had consequences elsewhere in your storyworld, because now you must supply the Acceptable and </font><font face="Bookman Old Style" class="fsx04" color="#c00000">Desirable</font><font face="Bookman Old Style" class="fsx04"> Scripts for the two places in which the </font><font face="Bookman Old Style" class="fsx04" color="#008000">Verb</font><font face="Bookman Old Style" class="fsx04"> "</font><font face="Bookman Old Style" class="fsx04" color="#008000">hit with</font><font face="Bookman Old Style" class="fsx04">" shows up as an </font><font face="Bookman Old Style" class="fsx04" color="#008000">Option</font><font face="Bookman Old Style" class="fsx04">. 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 </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Roles</font><font face="Bookman Old Style" class="fsx04"> in which the </font><font face="Bookman Old Style" class="fsx04" color="#008000">Verb</font><font face="Bookman Old Style" class="fsx04"> you're editing (which should be "</font><font face="Bookman Old Style" class="fsx04" color="#008000">hit with</font><font face="Bookman Old Style" class="fsx04">") is an </font><font face="Bookman Old Style" class="fsx04" color="#008000">Option</font><font face="Bookman Old Style" class="fsx04">. All you do is double-click on one of those listings and poof! you're there, looking at the </font><font face="Bookman Old Style" class="fsx04" color="#008000">Option</font><font face="Bookman Old Style" class="fsx04">. Do so.<br>
<br>
Now we're looking at a </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Role</font><font face="Bookman Old Style" class="fsx04"> with an </font><font face="Bookman Old Style" class="fsx04" color="#008000">Option</font><font face="Bookman Old Style" class="fsx04"> of "</font><font face="Bookman Old Style" class="fsx04" color="#008000">hit with</font><font face="Bookman Old Style" class="fsx04">." There is now an entry for the "</font><font face="Bookman Old Style" class="fsx04" color="#400080">5Quantifier</font><font face="Bookman Old Style" class="fsx04">" </font><font face="Bookman Old Style" class="fsx04" color="#0080a0">WordSocket</font><font face="Bookman Old Style" class="fsx04">, containing both an Acceptable Script and a </font><font face="Bookman Old Style" class="fsx04" color="#c00000">Desirable</font><font face="Bookman Old Style" class="fsx04"> Script. If you look at these two Scripts, you'll realize that they haven't been written yet</font><font face="Bookman Old Style" class="fsx04">—</font><font face="Bookman Old Style" class="fsx04">they just contain Operators with question marks in them. You have to write those two Scripts.<br>
<br>
The first, Acceptable, is pretty easy to write. <I>Any</I> </font><font face="Bookman Old Style" class="fsx04" color="#400080">Quantifier</font><font face="Bookman Old Style" class="fsx04"> is acceptable in this situation</font><font face="Bookman Old Style" class="fsx04">—</font><font face="Bookman Old Style" class="fsx04">except for the one we call the "</font><font face="Bookman Old Style" class="fsx04" color="#400080">Interrogative Quantifier</font><font face="Bookman Old Style" class="fsx04">," which is the term "how much?" So your Acceptable Script has only the task of locking out the </font><font face="Bookman Old Style" class="fsx04" color="#400080">Interrogative Quantifier</font><font face="Bookman Old Style" class="fsx04">. That's done like so:<br>
<br>
NOT<br>
QuantifierIsInterrogative <br>
</font><font face="Bookman Old Style" class="fsx04" color="#400080">CandidateQuantifier</font><br>
<br>
<font face="Bookman Old Style" class="fsx04">The Operator "QuantifierIsInterrogative" is in the Words menu on the right side.<br>
<br>
The </font><font face="Bookman Old Style" class="fsx04" color="#c00000">Desirable</font><font face="Bookman Old Style" class="fsx04"> Script is more difficult to write. Its job is to select the </font><font face="Bookman Old Style" class="fsx04" color="#400080">Quantifier</font><font face="Bookman Old Style" class="fsx04"> that matches the level of </font><font face="Bookman Old Style" class="fsx04" color="#006080">Tired_Energetic</font><font face="Bookman Old Style" class="fsx04"> of the </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Actor</font><font face="Bookman Old Style" class="fsx04">. If the </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Actor</font><font face="Bookman Old Style" class="fsx04"> has a high value of </font><font face="Bookman Old Style" class="fsx04" color="#006080">Tired_Energetic</font><font face="Bookman Old Style" class="fsx04">, then you want to maximum </font><font face="Bookman Old Style" class="fsx04" color="#c00000">Desirability</font><font face="Bookman Old Style" class="fsx04"> for a large Quantifier. If the Actor has a low value of </font><font face="Bookman Old Style" class="fsx04" color="#006080">Tired_Energetic</font><font face="Bookman Old Style" class="fsx04">, then you want maximum </font><font face="Bookman Old Style" class="fsx04" color="#c00000">Desirability</font><font face="Bookman Old Style" class="fsx04"> for a low Quantifier. Fortunately, this is all handled quite nicely for you with a handy-dandy Operator called "</font><font face="Bookman Old Style" class="fsx04" color="#ff0000">Suitability</font><font face="Bookman Old Style" class="fsx04">." The </font><font face="Bookman Old Style" class="fsx04" color="#c00000">Desirable</font><font face="Bookman Old Style" class="fsx04"> Script looks like this:<br>
<br>
</font><font face="Bookman Old Style" class="fsx04" color="#ff0000">Suitability of:</font><br>
<font face="Bookman Old Style" class="fsx04"> </font><font face="Bookman Old Style" class="fsx04" color="#400080">CandidateQuantifier</font><br>
<font face="Bookman Old Style" class="fsx04"> </font><font face="Bookman Old Style" class="fsx04" color="#ff0000">Tired_Energetic of:</font><br>
<font face="Bookman Old Style" class="fsx04"> </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">ReactingActor</font><br>
<br>
<font face="Bookman Old Style" class="fsx04">That's all there is to it. The </font><font face="Bookman Old Style" class="fsx04" color="#ff0000">Suitability</font><font face="Bookman Old Style" class="fsx04"> Operator, which can be found in the Word menu, figures out how the value of its second argument (the </font><font face="Bookman Old Style" class="fsx04" color="#ff0000">BNumber</font><font face="Bookman Old Style" class="fsx04"> argument) fits into the scale of </font><font face="Bookman Old Style" class="fsx04" color="#400080">Quantifiers</font><font face="Bookman Old Style" class="fsx04">, and then compares that fit with the </font><font face="Bookman Old Style" class="fsx04" color="#400080">CandidateQuantifier</font><font face="Bookman Old Style" class="fsx04">. If the match is close, it gives a high value; if the match is not close, it gives a low value. This insures that </font><font face="Bookman Old Style" class="fsx04" color="#006080">Tired_Energetic</font><font face="Bookman Old Style" class="fsx04"> will determine the chosen value of the </font><font face="Bookman Old Style" class="fsx04" color="#400080">Quantifier</font><font face="Bookman Old Style" class="fsx04"> used in </font><font face="Bookman Old Style" class="fsx04" color="#400080">5Quantifier</font><font face="Bookman Old Style" class="fsx04">.<br>
<br>
Go ahead and add these two Scripts. Then go back to the </font><font face="Bookman Old Style" class="fsx04" color="#008000">Verb</font><font face="Bookman Old Style" class="fsx04"> "</font><font face="Bookman Old Style" class="fsx04" color="#008000">hit with</font><font face="Bookman Old Style" class="fsx04">" and check ComeFrom Lizard to make sure that you have fixed both instances of "</font><font face="Bookman Old Style" class="fsx04" color="#008000">hit with</font><font face="Bookman Old Style" class="fsx04">" as an </font><font face="Bookman Old Style" class="fsx04" color="#008000">Option</font><font face="Bookman Old Style" class="fsx04">. (You can use "Copy" to add copies of the scripts to the other </font><font face="Bookman Old Style" class="fsx04" color="#008000">Option</font><font face="Bookman Old Style" class="fsx04">.) When you have taken care of both instances, try out the storyworld. Does it work as you expected?</font><br>
<br>
<font face="Bookman Old Style" class="fsx04"><hr><br></font><div align="center"><font face="Bookman Old Style" class="fsx03">Previous tutorial: <a href="t-a-10-attributes.html">Attributes</a> Next tutorial: <a href="t-a-12-consequences.html">Consequences</a><br><br></div></font><div align="left"><font face="Bookman Old Style" class="fsx04"><hr><br></font></div>
</div>
</div>
<div id="Oobj456">
<img name="Ggeo288" src="http://www.storytron.com/Tutorial/geometry/obj456geo288shd7p407.jpg" alt="" border = "0" width="775" height="28"></div>
<div id="Oobj457">
<div id="Ggeo289" class="dfltt">
<div align="center"><font face="Bookman Old Style" color="#ffffff"><a href="index.html" class="txdec"><font class="txdec" color="#f9f3ee">Home</font></a> <a href="http://www.storytron.com/Tutorial/sitemap.html" class="txdec"><font class="txdec" color="#f9f3ee">SiteMap</font></a> <a href="http://www.storytron.com/Tutorial/feedback.html" class="txdec"><font class="txdec" color="#f9f3ee">Feedback</font></a> <a href="http://www.storytron.com/Tutorial/faq.html" class="txdec"><font class="txdec" color="#f9f3ee">FAQ</font></a> <a href="http://www.storytron.com/Tutorial/pressroom.html" class="txdec"><font class="txdec" color="#ffffff">Press Room</font></a> <a href="http://www.storytron.com/Tutorial/privacy-policy.html" class="txdec"><font class="txdec" color="#ffffff">Privacy Policy</font></a> <a href="http://www.storytron.com/Tutorial/ipb/index-54403.html" target="_blank" class="txdec"><font class="txdec" color="#ffffff">Login</font></a><br></font></div>
</div>
</div>
</body>
</html>
<!-- Localized -->