/
t-f-odds-ends.html
176 lines (168 loc) · 24.8 KB
/
t-f-odds-ends.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<!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 - Odds & Ends</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}
#Oobj32 {position:absolute;z-index:1;visibility:visible;text-align:left;left:414px;top:66px;width:400px;height:49px;}
#Oobj33 {position:absolute;z-index:2;visibility:visible;text-align:left;left:207px;top:120px;width:753px;height:4059px;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;}
#Oobj76 {position:absolute;z-index:7;visibility:visible;text-align:left;left:222px;top:4110px;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="Oobj32">
<div id="Ggeo85" class="dfltt">
<div align="center"><font face="Bookman Old Style" class="fsx06"><B>SWAT TUTORIAL<br>
Odds & Ends<br></B></font></div>
</div>
</div>
<div id="Oobj33">
<div id="Ggeo86" class="dfltt">
<font face="Bookman Old Style" class="fsx04"><I>To get the most from these tutorials, follow the instructions on <a href="tutorials.html">downloading SWAT and joining the Authors' Guild</a> before you begin. <br><br></I></font><div align="center"><font face="Bookman Old Style" class="fsx04"><a href="t-f-odds-ends.html#deikto">About Deikto</a> - <a href="t-f-odds-ends.html#about-sappho">About Sappho</a> - <a href="t-f-odds-ends.html#boxes">Boxes</a> <br><br></div><div align="left"><a name="deikto"></a><br>
<hr><br>
<B>About Deikto</B></font><br>
<br>
<font face="Bookman Old Style" class="fsx04">Interactive storytelling is controlled by the language of interaction. The basic rules of interaction are these:</font><ul><font face="Times New Roman" class="fsx04">
<li></font><font face="Bookman Old Style" class="fsx04">If you can't say it or hear it, you can't interact.</font><font face="Times New Roman" class="fsx04"> </font><font face="Bookman Old Style" class="fsx04">
<li>You can't say much with the devices we use for computer input (mouse, keyboard, etc.).</font><font face="Times New Roman" class="fsx04"> </font><font face="Bookman Old Style" class="fsx04">
<li>The obvious solution is language, but real language can't be done on a computer.</font><font face="Times New Roman" class="fsx04"> </font><font face="Bookman Old Style" class="fsx04">
<li>It's impossible because of the Sapir-Whorf hypothesis: our language mirrors the reality in which we live.</font><font face="Times New Roman" class="fsx04"> </font><font face="Bookman Old Style" class="fsx04">
<li>Reality is too big to fit inside a computer.</font><font face="Times New Roman" class="fsx04"> </font><font face="Bookman Old Style" class="fsx04">
<li>Ergo, we can't fit natural language (which mirrors reality) into the computer.</ul></font><font face="Times New Roman" class="fsx04"></font><font face="Bookman Old Style" class="fsx04">The solution is to create a toy language to go along with the toy reality of interactive storytelling.</font><br>
<br>
<font face="Bookman Old Style" class="fsx04">Usually we define the toy reality, then try to make a language to fit it. That never works, because language is itself very complicated. The Deikto solution is to make the language and the reality one and the same. Define the reality by defining the words of the language in terms of what they do.</font><br>
<br>
<font face="Bookman Old Style" class="fsx04">Deikto (DEEK-toh) is a system for generating toy languages. It provides the grammar, the authors provides the words that plug into that grammar. Deikto appears in Storyteller, the software you used to play a storyworld. This is an example of a Deikto sentence:</font><br>
<br>
<font face="Bookman Old Style" class="fsx04"><center><img src="images/t-f01-a.jpg" width="700" height="129"></center></font><br>
<br>
<font face="Bookman Old Style" class="fsx04">Deikto is displayed to the player in Storyteller, the storyworld playing software. Each Deikto word has a form the author has to fill out to define it. The form depends on the type of word (</font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Actor</font><font face="Bookman Old Style" class="fsx04">, </font><font face="Bookman Old Style" class="fsx04" color="#ff8000">Stage</font><font face="Bookman Old Style" class="fsx04">, </font><font face="Bookman Old Style" class="fsx04" color="#ff00ff">Prop</font><font face="Bookman Old Style" class="fsx04">, etc). You will find these forms in SWAT, (StoryWorld Authoring Tool), the software you use to create a storyworld.</font><br>
<font face="Bookman Old Style" class="fsx04"><a name="about-sappho"></a><br>
<hr></font><br>
<font face="Bookman Old Style" class="fsx04"><B>About Sappho</B></font><br>
<br>
<font face="Bookman Old Style" class="fsx04">Sappho (<I>SAF-foh</I>) is the scripting language for Storytronics. It is the language you use in SWAT to fill out the forms for the Deikto words that the player sees. It's a very strange—and very powerful—scripting language, which is designed for writers and other storytelling professionals. It has many special features:</font><ul><font face="Bookman Old Style" class="fsx04">
<li>Syntax errors (saying something that confuses the language) are impossible.
<li>Initialization errors (forgetting to set things up properly) are impossible.
<li>Point-and-click editing (no typos to cause big trouble)
<li>Argument prompts (when you need to fill in a blank, it tells you)</font><font face="Bookman Old Style" class="fsx04">
<li>Scripting is organized in a tree structure (easier on the eyes)</font><font face="Bookman Old Style" class="fsx04">
<li>Only legal Operators are made available at any given moment</ul><br>
Color-coded strong data typing:<br>
<br>
</font><font face="Bookman Old Style" class="fsx04" color="#ff0000">Bright Red Bounded or Unipolar Number </font><br>
<font face="Bookman Old Style" class="fsx04"> </font><font face="Bookman Old Style" class="fsx04" color="#c00000">Dark Red Regular Number</font><br>
<font face="Bookman Old Style" class="fsx04"> </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Blue Actor</font><br>
<font face="Bookman Old Style" class="fsx04"> </font><font face="Bookman Old Style" class="fsx04" color="#008000">Green Verb</font><br>
<font face="Bookman Old Style" class="fsx04"> Black Boolean<br>
</font><font face="Bookman Old Style" class="fsx04" color="#ff00ff">Magenta Prop</font><br>
<font face="Bookman Old Style" class="fsx04"> </font><font face="Bookman Old Style" class="fsx04" color="#ff0000">Orange Stage</font><br>
<font face="Bookman Old Style" class="fsx04"> </font><font face="Bookman Old Style" class="fsx04" color="#00ffff">Cyan Event</font><br>
<font face="Bookman Old Style" class="fsx04"> </font><font face="Bookman Old Style" class="fsx04" color="#008080">Blue-Green Trait</font><br>
<font face="Bookman Old Style" class="fsx04"> </font><font face="Bookman Old Style" class="fsx04" color="#800080">Purple Quantifier</font><br>
<font face="Bookman Old Style" class="fsx04"> </font><font face="Bookman Old Style" class="fsx04" color="#808080">Gray Comment</font><br>
<br>
<font face="Bookman Old Style" class="fsx04">This means that you can't accidently mix apples and oranges (or </font><font face="Bookman Old Style" class="fsx04" color="#ff00ff">Props</font><font face="Bookman Old Style" class="fsx04"> and </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Actors</font><font face="Bookman Old Style" class="fsx04">) because it won't let you put a </font><font face="Bookman Old Style" class="fsx04" color="#ff00ff">Prop</font><font face="Bookman Old Style" class="fsx04"> into a slot meant for an </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Actor</font><font face="Bookman Old Style" class="fsx04">, or vice versa. And the colors make it easy to tell the apples from the oranges.<br>
<br>
There are about 600 Operators available—most are simple. There is no "flow control" (branching, looping, or subroutines) as is common in most programming languages. (But there are <I>implicit</I> looping Operators.) Run-time errors generate <a href="t-d-02-poison.html">Poison</a>—a system that protects you from minor scripting mistakes. </font><br>
<br>
<font face="Bookman Old Style" class="fsx04">This is an example of a Sappho script:</font><br>
<br>
<font face="Bookman Old Style" class="fsx04"><center><img src="images/t-f01-b.jpg" width="318" height="366"></center></font><br>
<font face="Bookman Old Style" class="fsx04"><a name="boxes"></a></font><br>
<font face="Bookman Old Style" class="fsx04"><HR></font><br>
<font face="Bookman Old Style" class="fsx04"><B>Boxes</B><br>
<br>
These are temporary places to store intermediate values; they save you time and tedium. There are three kinds of boxes:<br>
<br>
<img src="http://www.storytron.com/Tutorial/images/bullet.gif" width="16" height="16"></font><font face="Wingdings" class="fsx02" color="#000080"> </font><font face="Bookman Old Style" class="fsx04" color="#008000">Verb</font><font face="Bookman Old Style" class="fsx04"> boxes <br>
<img src="http://www.storytron.com/Tutorial/images/bullet.gif" width="16" height="16"></font><font face="Wingdings" class="fsx02" color="#000080"> </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Role</font><font face="Bookman Old Style" class="fsx04"> boxes<br>
<img src="http://www.storytron.com/Tutorial/images/bullet.gif" width="16" height="16"></font><font face="Wingdings" class="fsx02" color="#000080"> </font><font face="Bookman Old Style" class="fsx04">Global boxes</font><br>
<br>
<font face="Bookman Old Style" class="fsx04">Boxes hold onto a particular item for you within a given scope. (For instance, a VerbActorBox will hold onto a specific </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Actor</font><font face="Bookman Old Style" class="fsx04"> designation for use throughout the </font><font face="Bookman Old Style" class="fsx04" color="#008000">Verb</font><font face="Bookman Old Style" class="fsx04">'s scripts. A RoleEventBox will hold onto a particular </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Event</font><font face="Bookman Old Style" class="fsx04"> for use throughout that Role.) Boxes are useful when you have a fairly hairy script, or a script that involves HistoryBook lookups—e.g., </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">PastActor</font><font face="Bookman Old Style" class="fsx04"> of an </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Event</font><font face="Bookman Old Style" class="fsx04"> with a bunch of different parameters, which you want to use multiple times.</font><font face="Times New Roman" class="fsx04"> </font><br>
<br>
<font face="Bookman Old Style" class="fsx04">There are Boxes for each of the major data types: </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Actors</font><font face="Bookman Old Style" class="fsx04">, </font><font face="Bookman Old Style" class="fsx04" color="#ff00ff">Props</font><font face="Bookman Old Style" class="fsx04">, </font><font face="Bookman Old Style" class="fsx04" color="#ff8000">Stages</font><font face="Bookman Old Style" class="fsx04">, </font><font face="Bookman Old Style" class="fsx04" color="#00c0ff">Events</font><font face="Bookman Old Style" class="fsx04">, and </font><font face="Bookman Old Style" class="fsx04" color="#008000">Verbs</font><font face="Bookman Old Style" class="fsx04">, as well as one </font><font face="Bookman Old Style" class="fsx04" color="#ff0000">BNumber</font><font face="Bookman Old Style" class="fsx04"> box. </font><br>
<br>
<font face="Bookman Old Style" class="fsx04">There are also four Global Box sets, again with one Box for each of the listed data types. These Boxes never forget the values you put into them; if you store something into a Box during one calculation, you can come back to it much later in a completely different calculation and it will still have that value in it. </font><br>
<br>
<font face="Bookman Old Style" class="fsx04">Here is an example for how to use Boxes. It is not uncommon to use the same script for an </font><font face="Bookman Old Style" class="fsx04" color="#ff0000">Inclination</font><font face="Bookman Old Style" class="fsx04"> and the Desirable script for a key </font><font face="Bookman Old Style" class="fsx04" color="#0080a0">WordSocket</font><font face="Bookman Old Style" class="fsx04">. Suppose you have a character who might want to run a con, and must choose both whom to run it on, and how likely he is to run the con, based on how gullible the intended target is. In a case like this, you can use a single script to both select a desired </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">DirObject</font><font face="Bookman Old Style" class="fsx04"> for the scam, and to determine how likely the </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">ReactingActor</font><font face="Bookman Old Style" class="fsx04"> is to run the con on that </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">DirObject</font><font face="Bookman Old Style" class="fsx04">.</font><font face="Times New Roman" class="fsx04"> </font><br>
<br>
<font face="Bookman Old Style" class="fsx04">These two uses are confined to a single </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">conman</font><font face="Bookman Old Style" class="fsx04">—so the appropriate Box to use would be a RoleBox. In fact, in this example, you need two Roleboxes: one to pick the proposed </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">DirObject</font><font face="Bookman Old Style" class="fsx04">, and another to give the </font><font face="Bookman Old Style" class="fsx04" color="#ff0000">BNumber</font><font face="Bookman Old Style" class="fsx04"> corresponding to </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">ReactingActor's</font><font face="Bookman Old Style" class="fsx04"> perception of the </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">DirObject</font><font face="Bookman Old Style" class="fsx04">'s gullibility.</font><font face="Times New Roman" class="fsx04"> </font><br>
<br>
<font face="Bookman Old Style" class="fsx04">Before you can use a Box in your scripts, you must first fill it. You do this either in Consequences (for a </font><font face="Bookman Old Style" class="fsx04">Verb</font><font face="Bookman Old Style" class="fsx04">Box) or Emotional Reactions (for a RoleBox). Once it is filled, it becomes available throughout the rest of that </font><font face="Bookman Old Style" class="fsx04" color="#008000">Verb</font><font face="Bookman Old Style" class="fsx04"> or </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Role</font><font face="Bookman Old Style" class="fsx04">, respectively. </font><br>
<br>
<font face="Bookman Old Style" class="fsx04">In our example, the FillRoleActorBox script will look like this:</font><font face="Times New Roman" class="fsx04"> </font><br>
<br>
<font face="Bookman Old Style" class="fsx04">PickBestActor:</font><font face="Times New Roman" class="fsx04"> </font><br>
<font face="Bookman Old Style" class="fsx04"> true</font><br>
<font face="Bookman Old Style" class="fsx04"> </font><font face="Bookman Old Style" class="fsx04" color="#ff0000">BInverse of:</font><br>
<font face="Bookman Old Style" class="fsx04" color="#ff0000"> pGullible_Skeptical of:</font><br>
<font face="Bookman Old Style" class="fsx04"> </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">ReactingActor</font><br>
<font face="Bookman Old Style" class="fsx04"> </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">CandidateActor</font><br>
<br>
<font face="Bookman Old Style" class="fsx04">This picks the </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Actor</font><font face="Bookman Old Style" class="fsx04"> who the </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">conman</font><font face="Bookman Old Style" class="fsx04"> believes is the most gullible (note that to get the most gullible </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Actor</font><font face="Bookman Old Style" class="fsx04">, we needed to invert the </font><font face="Bookman Old Style" class="fsx04" color="#006080">Attribute</font><font face="Bookman Old Style" class="fsx04">).</font><font face="Times New Roman" class="fsx04"> </font><br>
<br>
<font face="Bookman Old Style" class="fsx04">Next you would choose FillRoleBNumberBox. The script would look like this:</font><font face="Times New Roman" class="fsx04"> </font><br>
<br>
<font face="Bookman Old Style" class="fsx04" color="#ff0000">pGullible_Skeptical of:</font><font face="Times New Roman" class="fsx04" color="#ff0000"> </font><br>
<font face="Bookman Old Style" class="fsx04"> </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">ReactingActor</font><font face="Times New Roman" class="fsx04"> </font><br>
<font face="Bookman Old Style" class="fsx04"> RoleActorBox</font><br>
<br>
<font face="Bookman Old Style" class="fsx04">This fills the Box with a </font><font face="Bookman Old Style" class="fsx04" color="#ff0000">BNumber</font><font face="Bookman Old Style" class="fsx04"> corresponding to the </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">conman</font><font face="Bookman Old Style" class="fsx04">'s perception of his chosen target's gullibility.</font><font face="Times New Roman" class="fsx04"> </font><br>
<br>
<font face="Bookman Old Style" class="fsx04">Now you can use the following script for the </font><font face="Bookman Old Style" class="fsx04" color="#ff0000">Inclination</font><font face="Bookman Old Style" class="fsx04"> to run the con:</font><font face="Times New Roman" class="fsx04"> </font><br>
<br>
<font face="Bookman Old Style" class="fsx04">RoleBNumberBox</font><font face="Times New Roman" class="fsx04"> </font><br>
<br>
<font face="Bookman Old Style" class="fsx04">For the </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">DirObject</font><font face="Bookman Old Style" class="fsx04"> Acceptable WordSocket, you would use:</font><font face="Times New Roman" class="fsx04"> </font><br>
<br>
<font face="Bookman Old Style" class="fsx04">AreSameActor:</font><font face="Times New Roman" class="fsx04"> </font><br>
<font face="Bookman Old Style" class="fsx04"> </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">CandidateActor</font><br>
<font face="Bookman Old Style" class="fsx04"> RoleActorBox</font><br>
<br>
<font face="Bookman Old Style" class="fsx04">Ta-da! No muss, no fuss.</font><font face="Times New Roman" class="fsx04"> </font><br>
<br>
<font face="Bookman Old Style" class="fsx04">Where Boxes really save you time and effort is when you have a script that involves numerous </font><font face="Bookman Old Style" class="fsx04" color="#006080">Attributes</font><font face="Bookman Old Style" class="fsx04">, Lookups, and PickBests, which you use multiple times within a given </font><font face="Bookman Old Style" class="fsx04" color="#0000ff">Role</font><font face="Bookman Old Style" class="fsx04"> or </font><font face="Bookman Old Style" class="fsx04" color="#008000">Verb</font><font face="Bookman Old Style" class="fsx04">. If you intend use a script more than once, use Boxes.</font><font face="Times New Roman" class="fsx04"> </font><br>
<br>
<font face="Bookman Old Style" class="fsx04">Here's how you know when to use a VerbBox versus a RoleBox. If the item you want to use in multiple places is confined to a single Role, you must use a Role box. If you intend to use that Box throughout the </font><font face="Bookman Old Style" class="fsx04" color="#008000">Verb</font><font face="Bookman Old Style" class="fsx04">, use a VerbBox. </font><br>
<br>
<font face="Bookman Old Style" class="fsx04">Global Boxes work in a similar way to VerbBoxes and RoleBoxes, but they apply to the storyworld as a whole. Be forewarned: it is all too easy to get into trouble using Global Boxes. We strongly urge that, if you want to use any Global Boxes, you decide at the very beginning exactly what that Global Box will hold and never, ever change that in mid-stream. Otherwise, you'll get confused about the meaning of the Global Box and create monster headaches for yourself.<br><br></div></font><div align="left"><font face="Bookman Old Style" class="fsx04"><hr></font><br>
<font face="Bookman Old Style" class="fsx03">Previous tutorial (Group 5): <a href="t-e-02-engine-operation-detail.html">Engine Operation Detail</a> </font><br>
<br>
<font face="Bookman Old Style" class="fsx04"><hr><br></font></div>
</div>
</div>
</div>
</body>
</html>
<!-- Localized -->