/
t-e-02-engine-operation-detail.html
115 lines (107 loc) · 23.6 KB
/
t-e-02-engine-operation-detail.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
<!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 - Engine Operation in Detail</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}
#Oobj34 {position:absolute;z-index:1;visibility:visible;text-align:left;left:395px;top:66px;width:400px;height:71px;}
#Oobj35 {position:absolute;z-index:2;visibility:visible;text-align:left;left:207px;top:121px;width:765px;height:1393px;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;}
#Oobj75 {position:absolute;z-index:7;visibility:visible;text-align:left;left:222px;top:1440px;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="Oobj34">
<div id="Ggeo87" class="dfltt">
<div align="center"><font face="Bookman Old Style" class="fsx06"><B>SWAT TUTORIAL<br>
Engine Operation in Detail<br></B></font></div>
</div>
</div>
<div id="Oobj35">
<div id="Ggeo88" class="dfltt">
<font face="Bookman Old Style" class="fsx04">The Engine runs on a cycle. What actually happens can be very complicated, but here is a more thorough (though still simplified) explanation of the process that the Engine uses.<br>
<br>
Top of Cycle:<br>
Advance the clock by one Moment.<br>
Set the clock Hours and Days<br>
Check to see if nothing has happened for at least </font><font face="Bookman Old Style" class="fsx04" color="#ff0000">10 </font><font face="Bookman Old Style" class="fsx04">Moments;<br>
if so, terminate the story.<br>
</font><font face="Bookman Old Style" class="fsx04">Check the clock time; if it's time to do so, trigger the ClockAlarm.</font><br>
<font face="Bookman Old Style" class="fsx04"> For each and every </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Actor</font><font face="Bookman Old Style" class="fsx04">, starting with </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Fate</font><font face="Bookman Old Style" class="fsx04">, do the following: (LOOP)<br>
Relax the </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Actor</font><font face="Bookman Old Style" class="fsx04">'s moods (let them relapse towards normalcy)<br>
For each and every one of the </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Actor</font><font face="Bookman Old Style" class="fsx04">'s </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Plans</font><font face="Bookman Old Style" class="fsx04">, do the following: (LOOP)<br>
</font><font face="Bookman Old Style" class="fsx04">Check that the </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Plan</font><font face="Bookman Old Style" class="fsx04">'s Execution Time has elapsed.<br>
</font><font face="Bookman Old Style" class="fsx04">Check that the </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Actor</font><font face="Bookman Old Style" class="fsx04"> is on the same </font><font face="Bookman Old Style" class="fsx04" color="#ff8000">Stage</font><font face="Bookman Old Style" class="fsx04"> as the </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Plan</font><font face="Bookman Old Style" class="fsx04">'s </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">DirObject</font><font face="Bookman Old Style" class="fsx04">; <br>
if not, skip this </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Plan</font><font face="Bookman Old Style" class="fsx04">.<br>
Check the Audience requirement for the </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Plan</font><font face="Bookman Old Style" class="fsx04">'s </font><font face="Bookman Old Style" class="fsx04" color="#008000">Verb</font><font face="Bookman Old Style" class="fsx04">; <br>
if the Audience requirement is satisfied by the situation, then proceed;<br>
otherwise, skip this </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Plan</font><font face="Bookman Old Style" class="fsx04">.<br>
Check for an Abort Script for this </font><font face="Bookman Old Style" class="fsx04" color="#008000">Verb</font><font face="Bookman Old Style" class="fsx04">; if there is one, execute it;<br>
if it returns "true," then abort executing this </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Plan</font><font face="Bookman Old Style" class="fsx04"> and throw it away.<br>
If we've gotten this far without skipping this </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Plan</font><font face="Bookman Old Style" class="fsx04">, then execute it:<br>
store the </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Plan</font><font face="Bookman Old Style" class="fsx04"> into the HistoryBook as an </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Event</font><font face="Bookman Old Style" class="fsx04">.<br>
execute any Consequence Scripts for this </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Event</font><br>
<font face="Bookman Old Style" class="fsx04"> if this </font><font face="Bookman Old Style" class="fsx04" color="#008000">Verb</font><font face="Bookman Old Style" class="fsx04"> is "</font><font face="Bookman Old Style" class="fsx04" color="#008000">depart for</font><font face="Bookman Old Style" class="fsx04">," do some special things to remove the </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Subject</font><br>
<font face="Bookman Old Style" class="fsx04"> from his current </font><font face="Bookman Old Style" class="fsx04" color="#ff8000">Stage</font><font face="Bookman Old Style" class="fsx04">.<br>
if this </font><font face="Bookman Old Style" class="fsx04" color="#008000">Verb</font><font face="Bookman Old Style" class="fsx04"> is "</font><font face="Bookman Old Style" class="fsx04" color="#008000">arrive at</font><font face="Bookman Old Style" class="fsx04">," do some special things to place the </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Subject</font><font face="Bookman Old Style" class="fsx04"> at his<br>
destination.<br>
Have </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Fate</font><font face="Bookman Old Style" class="fsx04"> react to the </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Event</font><font face="Bookman Old Style" class="fsx04">.<br>
based on the Audience requirement for the </font><font face="Bookman Old Style" class="fsx04" color="#008000">Verb</font><font face="Bookman Old Style" class="fsx04">, decide who on the </font><font face="Bookman Old Style" class="fsx04" color="#ff8000">Stage</font><br>
<font face="Bookman Old Style" class="fsx04"> actually witnesses the </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Event</font><font face="Bookman Old Style" class="fsx04">.<br>
Have each witness in turn react to the </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Event</font><font face="Bookman Old Style" class="fsx04">.<br>
Have the </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">DirObject</font><font face="Bookman Old Style" class="fsx04"> react to the </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Event</font><br>
<font face="Bookman Old Style" class="fsx04"> Have the </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Subject</font><font face="Bookman Old Style" class="fsx04"> react to the </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Event</font><font face="Bookman Old Style" class="fsx04">.<br>
Throw away the </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Plan</font><font face="Bookman Old Style" class="fsx04">.<br>
Do not </font><font face="Bookman Old Style" class="fsx04">execute any more </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Plans</font><font face="Bookman Old Style" class="fsx04"> for this </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Actor</font><font face="Bookman Old Style" class="fsx04"> (unless the </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Actor</font><font face="Bookman Old Style" class="fsx04"> is </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Fate</font><font face="Bookman Old Style" class="fsx04">).</font><br>
<font face="Bookman Old Style" class="fsx04"> End of </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Plans</font><font face="Bookman Old Style" class="fsx04"> loop<br>
Did the </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Actor</font><font face="Bookman Old Style" class="fsx04"> execute any </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Plans</font><font face="Bookman Old Style" class="fsx04">? If so, then proceed to the next </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Actor</font><font face="Bookman Old Style" class="fsx04">. If not, do this:<br>
Consider whether to go to another </font><font face="Bookman Old Style" class="fsx04" color="#ff8000">Stage</font><font face="Bookman Old Style" class="fsx04">:<br>
Does the </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Actor</font><font face="Bookman Old Style" class="fsx04"> have a previously defined </font><font face="Bookman Old Style" class="fsx04" color="#ff8000">TargetStage</font><font face="Bookman Old Style" class="fsx04">? If so, go there.<br>
If not, sort through the </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Plans</font><font face="Bookman Old Style" class="fsx04"> and find the most important </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Plan</font><font face="Bookman Old Style" class="fsx04">.<br>
If there is one, go to the </font><font face="Bookman Old Style" class="fsx04" color="#ff8000">Stage</font><font face="Bookman Old Style" class="fsx04"> where the planned </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">DirObject</font><font face="Bookman Old Style" class="fsx04"> is<br>
(so we can execute the </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Plan</font><font face="Bookman Old Style" class="fsx04"> on the </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">DirObject</font><font face="Bookman Old Style" class="fsx04">).<br>
If the </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Subject</font><font face="Bookman Old Style" class="fsx04"> can't do that, then pick a new </font><font face="Bookman Old Style" class="fsx04" color="#ff8000">Stage</font><font face="Bookman Old Style" class="fsx04"> to go to based on:<br>
how long the </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Actor</font><font face="Bookman Old Style" class="fsx04"> has been sitting around at the current location.<br>
how Unwelcoming_Homey another </font><font face="Bookman Old Style" class="fsx04" color="#ff8000">Stage</font><font face="Bookman Old Style" class="fsx04"> is for this </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Actor</font><br>
<font face="Bookman Old Style" class="fsx04"> End of </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Actor</font><font face="Bookman Old Style" class="fsx04"> loop<br>
End of main loop—go back to the top of the loop<br>
<br>
If it's time to terminate the story, set a </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Plan</font><font face="Bookman Old Style" class="fsx04"> for </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Fate</font><font face="Bookman Old Style" class="fsx04"> to execute "</font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Fate</font><font face="Bookman Old Style" class="fsx04"> </font><font face="Bookman Old Style" class="fsx04" color="#008000">penultimate verb</font><font face="Bookman Old Style" class="fsx04"> </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Protagonist</font><font face="Bookman Old Style" class="fsx04">." This system </font><font face="Bookman Old Style" class="fsx04" color="#008000">Verb</font><font face="Bookman Old Style" class="fsx04"> will then lead to the very last </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Event</font><font face="Bookman Old Style" class="fsx04">, "</font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Fate</font><font face="Bookman Old Style" class="fsx04"> </font><font face="Bookman Old Style" class="fsx04" color="#008000">happily ever after </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Protagonist</font><font face="Bookman Old Style" class="fsx04"> </font><font face="Bookman Old Style" class="fsx04" color="#400080">how much</font><font face="Bookman Old Style" class="fsx04">." </font><font face="Bookman Old Style" class="fsx04">You, the author, may insert intervening </font><font face="Bookman Old Style" class="fsx04" color="#008000">Verbs</font><font face="Bookman Old Style" class="fsx04"> between </font><font face="Bookman Old Style" class="fsx04" color="#008000">penultimate verb </font><font face="Bookman Old Style" class="fsx04">and </font><font face="Bookman Old Style" class="fsx04" color="#008000">happily ever after</font><font face="Bookman Old Style" class="fsx04">; however, if you do so, see the cautionary notes in <a href="t-d-03-system-verbs.html">System Verbs</a>. </font><br>
<br>
<font face="Bookman Old Style" class="fsx04">You may also write </font><font face="Bookman Old Style" class="fsx04" color="#0080a0">WordSocket</font><font face="Bookman Old Style" class="fsx04"> scripts for the </font><font face="Bookman Old Style" class="fsx04" color="#400080">Quantifier</font><font face="Bookman Old Style" class="fsx04"> in the very last sentence, "</font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Fate</font><font face="Bookman Old Style" class="fsx04"> </font><font face="Bookman Old Style" class="fsx04" color="#008000">happily ever after </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">You</font><font face="Bookman Old Style" class="fsx04"> this much: [</font><font face="Bookman Old Style" class="fsx04" color="#400080">Quantifier</font><font face="Bookman Old Style" class="fsx04">]," to reflect how well or poorly your player did. If you wish, however, you can just leave this at it</font><font face="Bookman Old Style" class="fsx04">s default setting of "medium," or you can remove the </font><font face="Bookman Old Style" class="fsx04" color="#400080">Quantifier</font><font face="Bookman Old Style" class="fsx04">. To remove the </font><font face="Bookman Old Style" class="fsx04" color="#008000">happily ever after </font><font face="Bookman Old Style" class="fsx04" color="#400080">Quantifier</font><font face="Bookman Old Style" class="fsx04">, go to System Verbs: </font><font face="Bookman Old Style" class="fsx04" color="#008000">happily ever after</font><font face="Bookman Old Style" class="fsx04">: Properties and eliminate </font><font face="Bookman Old Style" class="fsx04" color="#400080">4Quantifier</font><font face="Bookman Old Style" class="fsx04"> from the list of </font><font face="Bookman Old Style" class="fsx04" color="#0080a0">WordSockets</font><font face="Bookman Old Style" class="fsx04">.<br><br></font><div align="left"><font face="Bookman Old Style" class="fsx04"><hr></font><br>
<font face="Bookman Old Style" class="fsx03">Previous tutorial: <a href="t-e-01-engine-operation-overview.html">Engine Operation Overview</a> <br><br></div><div align="right">This is the last tutorial in this group. One more tutorial: <a href="t-f-odds-ends.html">Odds & Ends</a> <br><br></div></font><div align="left"><font face="Bookman Old Style" class="fsx04"><hr><br></font></div>
</div>
</div>
</div>
</body>
</html>
<!-- Localized -->