-
Notifications
You must be signed in to change notification settings - Fork 0
/
props.html
184 lines (167 loc) · 8.48 KB
/
props.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
177
178
179
180
181
182
183
184
<html>
<head>
<title>The MUCK Manual: Overview: Properties</title>
</head>
<body bgcolor="#FFFFFF">
<center>
<a href="flags.html">prev</a>|
<a href="toc.html">toc</a>|
<a href="lists.html">next</a>
</center>
<table>
<tr>
<td width="20%"> </tc>
<td>
<!-- BODY CONTENT HERE -->
<p><b>Properties:</b></p>
<p>A property is a named location on a database object that holds
information. Both the server and user-created programs reference
properties to obtain the data they need in order to carry out specific
operations. For example, when someone looks at you, the server
references your description property ( <code>_/de</code> ), retrieves
the information stored there (your desc), and displays it to the person
who's looking at you. Properties are often called just `props'.</p>
<p>Props are organized into property directories (often called
`propdirs'). The structure and syntax of property directories are very
much like those of file directories in the <code>UNIX</code> or
<code>DOS</code> operating systems, with props being analogous to files
and propdirs being analogous to directories. A directory can contain
props or additional directories; names of props and directories are
separated by a slash; props and directories are organized in a
hiearchical `tree' structure such that each prop has a unique path name.
So, the desc prop mentioned above, <code>_/de</code>, is actually the
<code>de</code> property in the <code>_</code> underscore directory.
</p>
<p>You can view the props on any object you control by examining it,
syntax <code>ex <object> = <path></code>. Typing <code>ex me
= /</code> would show the `first level' or `root directory' of props and
directories stored on your character. Typing <code>ex me = sex</code>
would show your sex property. Typing <code>ex me = _page/</code> would
show properties stored in the propdir created and modified when you use
the <code>page</code> command. Directories will be prefaced by
<code>`dir'</code> and will end with a slash. Properties will be prefaced by
something different (usually <code>str</code> for `string'), and will end with
the value stored in the prop.</p>
<p>Like flags, properties are set and removed with the <code>@set</code>
command, though the syntax is slightly different. The syntax for setting
a prop is <code>@set <object> = <[path/]property>:
<value></code>. For removing a prop, it's <code>@set
<object> = <[path/]property>: </code> (that is, a property
name followed by just a colon). To clear a directory, it's <code>@set
<object> = <propdir>/: </code> You can remove all the
properties you have set on an object by typing <code>@set <object>
= :clear </code>. </p>
<p><code>
====================================<br>
>@set me = obstreperous:yes<br>
Property set.<br>
>@set me = obstreperous:<br>
Property removed.<br>
>@set me = personality_traits/obstreperous:yes<br>
Property set.<br>
>@set me = personality_traits/lascivious:yes<br>
Property set<br>
>@set me = personality_traits/:<br>
Property removed.<br>
>@set me = :clear<br>
All user owned properties removed. <font color="red">(* oops *)</font><br>
====================================<br>
</code></p>
<p>It is common practice to separate words in a property name with
underscores (<code>@set me = my_favorite_color:blue</code>), but spaces
can be used in property names (<code>@set me = my favorite
color:blue</code>). However, spaces at the beginning and end of property
names are removed when the prop is set. (Spaces at the beginning or end
of a property <em>value</em> are not stripped: you can store a string
beginning or ending with spaces, or even a string consisting of only
spaces.)</p>
<p>The number, names, and content of properties are not pre-defined as
they are in the case of flags. You can't `make up' a new kind of flag
and set it on your character (<code>@set me = G</code> or <code>@set me
= 9</code>, say), but you can create and set any property you like and
store any information there, as long as the syntax is correct and the
amount of information stored doesn't exceed certain limits . If you
wanted to do <code>@set me = number_of_pickles_in_my_jar:32</code>, you
could, though the information might not be especially useful. (There are
some restrictions on what properties you can set, discussed in <a
href="specprops.html">Section 2.1.1</a>)</p>
<p>While you can set virtually any property, the server and user-created
commands will expect specific information to be stored in specific,
predefined properties. The server will always reference the
<code>_/de</code> prop when obtaining a desc; the <code>hand</code>
command will always check your <code>_hand_ok</code> prop. So, using a
program or configuring an object is often a matter of determining what
props are referenced (by reading #help or program documentation, or by
asking players or staff) and setting them appropriately. Important and
frequently used properties are stored in the correct location by server
commands: <code>@desc, @success, @osuccess, @drop, @odrop, @fail,
@ofail</code>, and various <code>@lock</code> commands all store
information in the <code>_/</code> directory. (Properties in the
<code>_/</code> directory and their values are often called `messages'
and `locks'. See Sections <a href="messages.html">2.1.2</a> and <a
href="locks.html">2.3.</a>)</p>
<p><code>
====================================<br>
>@create Feep<br>
Feep created with number #1237<br>
>@desc feep = A cute little feep.<br>
Description set.<br>
>@succ feep = You pick up the feep. It warbles contentedly.<br>
Message set.<br>
>@osucc feep = picks up the feep. It warbles contentedly.<br>
Message set.<br>
>@fail feep = You try to pick up the feep, but it scuttles away whimpering!<br>
Message set.<br>
>@ofail feep = tries to pick up the feep, but it scuttles away whimpering!<br>
Message set.<br>
>@drop feep = You set the feep down gently. It nuzzles your ankle.<br>
Message set.<br>
>@odrop feep = sets the feep down gently. It nuzzles %p ankle.<br>
Message set.<br>
>@lock feep = me<br>
Locked.<br>
>@chlock feep = me<br>
Chown lock set.<br>
<br>
> ex feep = _/<br>
lok /_/chlk:Mistral(#100PWX)<br>
str /_/de:A cute little feep.<br>
str /_/dr:You set the feep down gently. It nuzzles your ankle.<br>
str /_/fl:You try to pick up the feep, but it scuttles away whimpering!<br>
lok /_/lok:Mistral(#100PWX)<br>
str /_/odr:sets the feep down gently. It nuzzles %p ankle.<br>
str /_/ofl:tries to pick up the feep, but it scuttles away whimpering!<br>
str /_/osc:picks up the feep. It warbles contentedly.<br>
str /_/sc:You pick up the feep. It warbles contentedly.<br>
====================================<br>
</code></p>
<p>The properties in the <code>_/</code> directory trigger events or
messages when the object is used in a certain way. For example, the
<code>@success</code> message is displayed to a player who Successfully uses
the object. If the object is a thing, `successful use' means picking it up.
For a room, `success' means looking at the room. For an exit, it means passing
through the exit or using the exit as a command. The <code>@osuccess</code>
message uses the same definitions of `success', but in this case the message
is shown to Other players present, rather than the triggering player.</p>
<p><code>@Fail</code> works similarly to <code>@success,</code> but in
this case the message is shown when a player <em>fails</em> to use the
object successfully, usually because it is locked against him (locks are
discussed in <a href="locks.html">Section 2.3</a>), and <code>@ofail</code>
has a similar relationship to <code>@osuccess.</p></code>
<p>On a thing, a <code>@drop</code> message is shown to a player who
drops the object; the <code>@odrop</code> message is shown to other
players present when the object is dropped. When a <code>@drop</code>
message is set on an exit, the message is shown to the player when he
arrives in the destination room. The <code>@odrop</code> message is
shown to other players in the destination room.</p>
<center>
<a href="flags.html">prev</a>|
<a href="toc.html">toc</a>|
<a href="#top">top</a>|
<a href="lists.html">next</a>
</center>
</td>
<td width="20%"> </tc>
</table>
</body>
</html>