1
<HTML><HEAD><TITLE>Section A5: Library attributes</TITLE></HEAD>
2
<BODY BGCOLOR="#FFFFFF">
4
<TR><TD Valign="top"><A HREF="contents.html">Contents</A><BR><A HREF="sectionA4.html">Back</A><BR><A HREF="sectionA6.html">Forward</A><TD bgcolor="#F5DEB3"><BLOCKQUOTE><H3>A5. Library attributes</H3></BLOCKQUOTE><TR><TD><TD>
5
Here is a concise account of all the normal rules concerning
6
all the library's attributes, except that: rules about how
7
the parser sorts out ambiguities are far too complicated to
8
include here, but should not concern designers anyway; and the
9
definitions of 'scope' and 'darkness' are given in
10
<A HREF="section28.html">Section 28</A> and <A HREF="section17.html">Section 17</A> respectively. These rules are the result
11
of pragmatism and compromise, but are all easily
16
<DT><B><TT>absent</TT></B><DD>
18
A 'floating object' (one with a
19
<TT>found_in</TT> property, which can appear in many different rooms)
20
which is <TT>absent</TT> will in future no longer appear in the game. Note that
21
you cannot make a floating object disappear merely by giving it
22
<TT>absent</TT>, but must explicitly <TT>remove</TT> it as well.
25
<DT><B><TT>animate</TT></B><DD>
27
"Is alive (human or animal).'' Can be spoken to in "richard, hello'' style;
28
matches the <TT>creature</TT> token in grammar; picks up "him'' or "her''
29
(according to gender) rather than "it'', likewise "his''; an object the
30
player is changed into becomes <TT>animate</TT>; some messages read "on whom'',
31
etc., instead of "on which''; can't be taken; its subobjects "belong to''
32
it rather than "are part of'' it; messages don't assume it can be
33
"touched'' or "squeezed'' as an ordinary object can; the actions <TT>Attack</TT>,
34
<TT>ThrowAt</TT> are diverted to <TT>life</TT> rather than rejected as being 'futile
38
<DT><B><TT>clothing</TT></B><DD>
43
<DT><B><TT>concealed</TT></B><DD>
45
"Concealed from view but present.''
46
The player object has this; an object which was the player until
47
<TT>ChangePlayer</TT> happened loses this property; a <TT>concealed</TT> <TT>door</TT> can't be
48
entered; does not appear in room descriptions.
51
<DT><B><TT>container</TT></B><DD>
53
Affects scope and light; object lists
54
recurse through it if <TT>open</TT> (or <TT>transparent</TT>); may be described as closed,
55
open, locked, empty; a possession will give it a <TT>LetGo</TT> action if the
56
player tries to remove it, or a <TT>Receive</TT> if something is put in; things can
57
be taken or removed from it, or inserted into it, but only if it is <TT>open</TT>;
58
likewise for "transfer'' and "empty''; room descriptions describe using
59
<TT>when_open</TT> or <TT>when_closed</TT> if given; if there is no defined <TT>description</TT>,
60
an <TT>Examine</TT> causes the contents to be searched (i.e. written out) rather
61
than a message "You see nothing special about...''; <TT>Search</TT> only reveals
62
the contents of <TT>container</TT>s, otherwise saying "You find nothing''.
65
<DT><B><TT>door</TT></B><DD>
67
"Is a door or bridge.'' Room descriptions
68
describe using <TT>when_open</TT> or <TT>when_closed</TT> if given; and an <TT>Enter</TT>
69
action becomes a <TT>Go</TT> action. If a <TT>Go</TT> has to go through this
70
object, then: if <TT>concealed</TT>, the player "can't go that way'';
71
if not <TT>open</TT>, then the player is told either that this cannot
72
be ascended or descended (if the player tried "up'' or
73
"down''), or that it is in the way (otherwise);
74
but if neither, then its <TT>door_to</TT> property is consulted to
75
see where it leads; finally, if this is zero, then it is said
76
to "lead nowhere'' and otherwise the player actually moves to
80
<DT><B><TT>edible</TT></B><DD>
82
"Can be eaten'' (and thus removed from game).
85
<DT><B><TT>enterable</TT></B><DD>
87
Affects scope and light; only an <TT>enterable</TT> on the floor can be
88
entered. If an <TT>enterable</TT> is also a <TT>container</TT> then it can
89
only be entered or exited if it is <TT>open</TT>.
92
<DT><B><TT>female</TT></B><DD>
94
This object has a feminine name. In games written in English,
95
this makes her a female person, though in other languages it might
96
be inanimate. The parser uses this information when considering
97
pronouns like "her''. (In English, anything <TT>animate</TT> is assumed
98
to be male unless <TT>female</TT> or <TT>neuter</TT> is set.)
101
<DT><B><TT>general</TT></B><DD>
103
A general-purpose attribute, defined by
104
the library but never looked at or altered by it. This is left
105
free to mean something different for each object: often used by
106
programmers for something like "the puzzle for this object has been
110
<DT><B><TT>light</TT></B><DD>
112
"Is giving off light.'' (See <A HREF="section17.html">Section 17</A>.) Also: the parser understands
113
"lit'', "lighted'', "unlit'' using this; inventories will
114
say "(providing light)'' of it, and so will room descriptions if the
115
current <TT>location</TT> is ordinarily dark; it will never be automatically
116
put away into the player's <TT>SACK_OBJECT</TT>, as it might plausibly be
117
inflammable or the main light source.
120
<DT><B><TT>lockable</TT></B><DD>
122
Can be locked or unlocked by a player
123
holding its key object, which is given by the property <TT>with_key</TT>;
124
if a <TT>container</TT> and also <TT>locked</TT>, may be called "locked'' in
128
<DT><B><TT>locked</TT></B><DD>
130
Can't be opened. If a <TT>container</TT>
131
and also <TT>lockable</TT>, may be called "locked'' in inventories.
134
<DT><B><TT>male</TT></B><DD>
136
This object has a masculine name. In games written in English,
137
this makes him a male person, though in other languages it might
138
be inanimate. The parser uses this information when considering
139
pronouns like "him''. (In English, anything <TT>animate</TT> is assumed
140
to be male unless <TT>female</TT> or <TT>neuter</TT> is set.)
143
<DT><B><TT>moved</TT></B><DD>
145
"Has been or is being held by the player.'' Objects
146
(immediately) owned by the player after <TT>Initialise</TT> has run are given
147
it; at the end of each turn, if an item is newly held by the player
148
and is <TT>scored</TT>, it is given <TT>moved</TT> and <TT>OBJECT_SCORE</TT> points are
149
awarded; an object's <TT>initial</TT> message only appears in room
150
descriptions if it is un<TT>moved</TT>.
153
<DT><B><TT>neuter</TT></B><DD>
155
This object's name is neither masculine nor feminine. (In English,
156
anything without <TT>animate</TT> is assumed neuter, because only people and
157
higher animals have gender. Anything <TT>animate</TT> is assumed male
158
unless <TT>female</TT> or <TT>neuter</TT> is set. A robot, for instance, might be
159
an <TT>animate</TT> object worth making <TT>neuter</TT>.)
162
<DT><B><TT>on</TT></B><DD>
164
"Switched on.'' A <TT>switchable</TT> object with this
165
is described by <TT>with_on</TT> in room descriptions; it will be called
166
"switched on'' by <TT>Examine</TT>.
169
<DT><B><TT>open</TT></B><DD>
171
"Open door or container.'' Affects scope and light; lists (such as
172
inventories) recurse through an <TT>open</TT> <TT>container</TT>; if a <TT>container</TT>, called
173
"open'' by some descriptions; things can be taken or removed from an <TT>open</TT>
174
<TT>container</TT>; similarly inserted, transferred or emptied. A <TT>container</TT> can
175
only be entered or exited if it is both <TT>enterable</TT> and <TT>open</TT>. An <TT>open</TT>
176
<TT>door</TT> can be entered. Described by <TT>when_open</TT> in room descriptions.
179
<DT><B><TT>openable</TT></B><DD>
181
Can be opened or closed, unless <TT>locked</TT>.
184
<DT><B><TT>pluralname</TT></B><DD>
186
This single object's name is in the plural. For instance, an
187
object called "seedless grapes'' should have <TT>pluralname</TT> set.
188
The library will then use the pronoun "them'' and the indefinite
189
article "some'' automatically.
192
<DT><B><TT>proper</TT></B><DD>
194
Its short name is a proper noun, and never preceded
195
by "the'' or "The''. The player's object must have this (so something
196
changed into will be given it).
199
<DT><B><TT>scenery</TT></B><DD>
201
Not listed by the library in room descriptions; "not portable'' to be
202
taken; "you are unable to'' pull, push, or turn it.
205
<DT><B><TT>scored</TT></B><DD>
207
The player gets <TT>OBJECT_SCORE</TT> points for picking
208
it up for the first time; or, if a room, <TT>ROOM_SCORE</TT> points for visiting
209
it for the first time.
212
<DT><B><TT>static</TT></B><DD>
214
"Fixed in place'' if player tries to take, remove,
218
<DT><B><TT>supporter</TT></B><DD>
220
"Things can be put on top of it.'' Affects scope and light;
221
object lists recurse through it; a possession will give it a
222
<TT>LetGo</TT> action if the player tries to remove it, or a <TT>Receive</TT>
223
if something is put in; things can be taken or removed from it,
224
or put on it; likewise for transfers; a player inside it is said
225
to be "on'' rather than "in'' it; room descriptions list
226
its contents in separate paragraphs if it is itself listed.
229
<DT><B><TT>switchable</TT></B><DD>
231
Can be switched on or off; listed
232
as such by <TT>Examine</TT>; described using <TT>when_on</TT> or <TT>when_off</TT>
233
in room descriptions.
236
<DT><B><TT>talkable</TT></B><DD>
238
Player can talk to this object in
239
"thing, do this'' style. This is useful for microphones and
240
the like, when <TT>animate</TT> is inappropriate.
243
<DT><B><TT>transparent</TT></B><DD>
245
"Contents are visible.'' Affects scope and light;
246
a <TT>transparent</TT> container is treated as if it were <TT>open</TT> for
247
printing of contents.
250
<DT><B><TT>visited</TT></B><DD>
252
"Has been or is being visited by the player.''
253
Given to a room immediately after a <TT>Look</TT> first
254
happens there: if this room is <TT>scored</TT> then <TT>ROOM_SCORE</TT> points
255
are awarded. Affects whether room descriptions are abbreviated
259
<DT><B><TT>workflag</TT></B><DD>
261
Temporary flag used by Inform internals,
262
also available to outside routines; can be used to select items
263
for some lists printed by <TT>WriteListFrom</TT>.
266
<DT><B><TT>worn</TT></B><DD>
268
"Item of clothing being worn.'' Should
269
only be an object being immediately carried by player.
270
Affects inventories; doesn't count towards the limit of
271
<TT>MAX_CARRIED</TT>; won't be automatically put away into the
272
<TT>SACK_OBJECT</TT>; a <TT>Drop</TT> action will cause a <TT>Disrobe</TT> action first;
273
so will <TT>PutOn</TT> or <TT>Insert</TT>.
277
Note that very few attributes sensibly apply to rooms: only really
278
<TT>light</TT>, <TT>scored</TT> and <TT>visited</TT>, together with <TT>general</TT> if you
279
choose to use it. Note also that an object cannot be both a
280
<TT>container</TT> and a <TT>supporter</TT>; and that the old attribute <TT>autosearch</TT>,
281
which was in earlier releases, has been withdrawn as obsolete.
283
<HR><A HREF="contents.html">Contents</A> / <A HREF="sectionA4.html">Back</A> / <A HREF="sectionA6.html">Forward</A> <BR>
284
<A HREF="chapter1.html">Chapter I</A> / <A HREF="chapter2.html">Chapter II</A> / <A HREF="chapter3.html">Chapter III</A> / <A HREF="chapter4.html">Chapter IV</A> / <A HREF="chapter5.html">Chapter V</A> / <A HREF="chapter6.html">Chapter VI</A> / <A HREF="chapterA.html">Appendix</A><HR><SMALL><I>Mechanically translated to HTML from third edition as revised 16 May 1997. Copyright © Graham Nelson 1993, 1994, 1995, 1996, 1997: all rights reserved.</I></SMALL></BODY></HTML>