1
This is Info file inform.info, produced by Makeinfo-1.64 from the input
4
This is the Inform Designer's Manual, third edition, 4 September 1996,
5
as updated 16 May 1997. It was converted to Info by Christopher J.
6
Madsen <ac608@yfn.ysu.edu>.
8
Copyright 1996,1997 Graham Nelson and Christopher J. Madsen
10
Permission is granted to make and distribute copies of this manual
12
(a) distributed copies are not substantially different from those
13
archived by the author,
14
(b) this and other copyright messages are always retained in full, and
15
(c) no profit is involved.
18
File: inform, Node: Library Messages, Next: Entry Points, Prev: Actions and Fake Actions, Up: Appendix
20
Library message numbers
21
=======================
24
``There is no reply.''
26
``There is no reply.''
28
``Violence isn't the answer to this one.''
30
``You can't usefully blow that/those.''
32
``This dangerous act would achieve little.''
34
``Nothing is on sale.''
36
``I don't think much is to be achieved by that.''
38
1. ``That's/They're not something you can close.''
39
2. ``That's/They're already closed.''
40
3. ``You close <x1>.''
42
``You discover nothing of interest in <x1>.''
44
``Cutting that/those up would achieve little.''
46
``Digging would achieve nothing here.''
48
1. ``You're not wearing that/those.''
49
2. ``You take off <x1>.''
51
``There's nothing suitable to drink here.''
53
1. ``The <x1> is/are already here.''
54
2. ``You haven't got that/those.''
55
3. ``(first taking <x1> off)''
58
1. ``That's/They're plainly inedible.''
59
2. ``You eat <x1>. Not bad.''
61
1. <x1> `` can't contain things.''
62
2. <x1> `` is/are closed.''
63
<x1> `` is/are empty already.''
65
1. ``But you're already on/in <x1>.''
66
2. ``That's/They're not something you can enter.''
67
3. ``You can't get into the closed <x1>.''
68
4. ``You can only get into something freestanding.''
69
5. ``You get onto/into <x1>.''
71
1. ``Darkness, noun. An absence of light to see by.''
72
2. ``You see nothing special about <x1>.''
73
3. ``<x1> is/are currently switched on/off.''
75
1. ``But you aren't in anything at the moment.''
76
2. ``You can't get out of the closed <x1>.''
77
3. ``You get off/out of <x1>.''
79
``But there's no water here to carry.''
81
1. ``The score is/was made up as follows:^''
82
2. ``finding sundry items''
83
3. ``visiting various places''
84
4. ``total (out of MAX_SCORE)''
86
``But you aren't on <x1> at the moment.''
88
1. ``You aren't holding <x1>.''
89
2. ``You juggle <x1> for a while, but don't achieve much.''
90
3. ``<x1> doesn't/don't seem interested.''
92
1. ``You'll have to get off/out of <x1> first.''
93
2. ``You can't go that way.''
94
3. ``You are unable to climb <x1>.''
95
4. ``You are unable to descend <x1>.''
96
5. ``You can't, since <x1> is/are in the way.''
97
6. ``You can't, since <x1> leads nowhere.''
99
1. ``You need to be holding <x1> before you
100
can put it/them into something else.''
101
2. ``That/Those can't contain things.''
102
3. ``<x1> is/are closed.''
103
4. ``You'll need to take it/them off first.''
104
5. ``You can't put something inside itself.''
105
6. ``(first taking it/them off)^''
106
7. ``There is no more room in <x1>.''
108
9. ``You put <x1> into <second>.''
110
1. ``You are carrying nothing.''
111
2. ``You are carrying''
113
``You jump on the spot, fruitlessly.''
115
``You would achieve nothing by this.''
117
``Keep your mind on the game.''
119
``You hear nothing unexpected.''
121
`` is now in its normal ~brief~ printing mode, which gives
122
long descriptions of places never before visited and short
123
descriptions otherwise.''
125
`` is now in its ~verbose~ mode, which always gives long
126
descriptions of locations (even if you've been there before).''
128
`` is now in its ~superbrief~ mode, which always gives short
129
descriptions of locations (even if you haven't been there before).''
131
1. ``That doesn't/They don't seem to be something you can lock.''
132
2. ``That's/They're locked at the moment.''
133
3. ``First you'll have to close <x1>.''
134
4. ``That doesn't/Those don't seem to fit the lock.''
135
5. ``You lock <x1>.''
140
4. ``^On <x1> is/are <list>''
141
5. ``[On/In <x1>] you/You can also see <list> [here].''
142
6. ``[On/In <x1>] you/You can see <list> [here].''
144
1. ``But it's dark.''
145
``You find nothing of interest.''
149
1. `` (providing light)''
150
2. `` (which is/are closed)''
151
3. `` (closed and providing light)''
152
4. `` (which is/are empty)''
153
5. `` (empty and providing light)''
154
6. `` (which is/are closed and empty)''
155
7. `` (closed, empty and providing light)''
156
8. `` (providing light and being worn''
157
9. `` (providing light''
159
11. `` (which is/are ''
161
13. ``open but empty''
163
15. ``closed and locked''
165
17. `` (which is/are empty)''
172
1. ``(considering the first sixteen objects only)^''
173
2. ``Nothing to do!''
174
3. `` You have died ''
175
4. `` You have won ''
176
5. (The RESTART/RESTORE/QUIT and possibly FULL
177
and AMUSING query, printed after the game is over.)
178
6. ``[Your interpreter does not provide undo. Sorry!]''
179
7. ``Undo failed. [Not all interpreters provide it.]''
180
8. ``Please give one of the answers above.''
181
9. ``^It is now pitch dark in here!''
182
10. ``I beg your pardon?''
183
11. ``[You can't ``undo'' what hasn't been done!]''
184
12. ``[Can't ``undo'' twice in succession. Sorry!]''
185
13. ``[Previous turn undone.]''
186
14. ``Sorry, that can't be corrected.''
187
15. ``Think nothing of it.''
188
16. ````Oops'' can only correct a single word.''
189
17. ``It is pitch dark, and you can't see a thing.''
190
18. ``yourself'' (the short name of the selfobj object)
191
19. ``As good-looking as ever.''
192
20. ``To repeat a command like ``frog, jump'', just say
193
``again'', not ``frog, again''.''
194
21. ``You can hardly repeat that.''
195
22. ``You can't begin with a comma.''
196
23. ``You seem to want to talk to someone, but I can't see whom.''
197
24. ``You can't talk to <x1>.''
198
25. ``To talk to someone, try ``someone, hello'' or some such.''
199
26. ``(first taking not_holding)''
200
27. ``I didn't understand that sentence.''
201
28. ``I only understood you as far as wanting to ''
202
29. ``I didn't understand that number.''
203
30. ``You can't see any such thing.''
204
31. ``You seem to have said too little!''
205
32. ``You aren't holding that!''
206
33. ``You can't use multiple objects with that verb.''
207
34. ``You can only use multiple objects once on a line.''
208
35. ``I'm not sure what ``<pronoun>'' refers to.''
209
36. ``You excepted something not included anyway!''
210
37. ``You can only do that to something animate.''
211
38. ``That's not a verb I recognise.''
212
39. ``That's not something you need to refer to in the
213
course of this game.''
214
40. ``You can't see ``<pronoun>'' (<value>) at the moment.''
215
41. ``I didn't understand the way that finished.''
216
42. ``None/only <x1> of those is/are available.''
217
43. ``Nothing to do!''
218
44. ``There are none at all available!''
219
45. ``Who do you mean, ''
220
46. ``Which do you mean, ''
221
47. ``Sorry, you can only have one item here. Which exactly?''
222
48. ``Whom do you want [<actor>] to <command>?''
223
49. ``What do you want [<actor>] to <command>?''
224
50. ``Your score has just gone up/down by <x1> point/points.''
225
51. ``(Since something dramatic has happened, your list of
226
commands has been cut short.)''
227
52. ``Type a number from 1 to <x1>, 0 to redisplay or press ENTER.''
228
53. ``[Please press SPACE.]''
232
``Score notification off.''
234
``Score notification on.''
236
1. ``Objects you have handled:^''
241
6. `` (in <x1>)'' [without article]
242
7. `` (in <x1>)'' [with article]
243
8. `` (inside <x1>)''
247
1. ``That's/They're not something you can open.''
248
2. ``It seems/They seem to be locked.''
249
3. ``That's/They're already open.''
250
4. ``You open <x1>, revealing <children>''
251
5. ``You open <x1>.''
253
``<x1> has/have better things to do.''
255
``You have visited: ''
257
``Nothing practical results from your prayer.''
261
1. ``At the moment, ''
264
4. ``no pronouns are known to the game.''
266
1. ``It is/Those are fixed in place.''
267
2. ``You are unable to.''
268
3. ``Nothing obvious happens.''
269
4. ``That would be less than courteous.''
273
1. ``Is that the best you can think of?''
274
2. ``That's not a direction.''
275
3. ``Not that way you can't.''
277
1. ``You need to be holding <x1> before you
278
can put it/them on top of something else.''
279
2. ``You can't put something on top of itself.''
280
3. ``Putting things on <x1> would achieve nothing.''
281
4. ``You lack the dexterity.''
282
5. ``(first taking it/them off)^''
283
6. ``There is no more room on <x1>.''
285
8. ``You put <x1> on <second>.''
287
1. ``Please answer yes or no.''
288
2. ``Are you sure you want to quit? ''
290
1. ``It is/They are unfortunately closed.''
291
2. ``But it isn't/they aren't there now.''
294
1. ``Are you sure you want to restart? ''
297
1. ``Restore failed.''
300
``You achieve nothing by this.''
305
``You have so far/In that game you scored <score> out of
306
a possible MAX_SCORE, in <turns> turn/turns''
308
1. ``Transcripting is already on.''
309
2. ``Start of a transcript of''
311
1. ``Transcripting is already off.''
312
2. ``^End of transcript.''
314
1. ``But it's dark.''
315
2. ``There is nothing on <x1>.''
316
3. ``On <x1> is/are <list of children>.''
317
4. ``You find nothing of interest.''
318
5. ``You can't see inside, since <x1> is/are closed.''
319
6. ``<x1> is/are empty.''
320
7. ``In <x1> is/are <list of children>.''
322
``No, you can't set that/those.''
324
``No, you can't set that/those to anything.''
326
1. ``You aren't holding <x1>.''
327
2. ``<x1> is/are unimpressed.''
329
``Your singing is abominable.''
331
``You aren't feeling especially drowsy.''
333
``You smell nothing unexpected.''
335
``Oh, don't apologise.''
337
1. ``Keep your hands to yourself.''
338
2. ``You achieve nothing by this.''
340
``Real adventurers do not use such language.''
342
``There's not enough water to swim in.''
344
``There's nothing sensible to swing here.''
346
1. ``That's/They're not something you can switch.''
347
2. ``That's/They're already off.''
348
3. ``You switch <x1> off.''
350
1. ``That's/They're not something you can switch.''
351
2. ``That's/They're already on.''
352
3. ``You switch <x1> on.''
355
2. ``You are always self-possessed.''
356
3. ``I don't suppose <x1> would care for that.''
357
4. ``You'd have to get off/out of <x1> first.''
358
5. ``You already have that/those.''
359
6. ``That seems/Those seem to belong to <x1>.''
360
7. ``That seems/Those seem to be a part of <x1>.''
361
8. ``That isn't/Those aren't available.''
362
9. ``<x1> isn't/aren't open.''
363
10. ``That's/They're hardly portable.''
364
11. ``That's/They're fixed in place.''
365
12. ``You're carrying too many things already.''
366
13. ``(putting <x1> into SACK_OBJECT to make room)''
368
``You taste nothing unexpected.''
370
1. ``You talk to yourself a while.''
371
2. ``This provokes no reaction.''
373
1. ``Keep your hands to yourself!''
374
2. ``You feel nothing unexpected.''
375
3. ``If you think that'll help.''
377
``What a good idea.''
379
``You would achieve nothing by this.''
382
2. ``You lack the nerve when it comes to the crucial moment.''
386
1. ``That doesn't seem to be something you can unlock.''
387
2. ``It's/They're unlocked at the moment.''
388
3. ``That doesn't/Those don't seem to fit the lock.''
389
4. ``You unlock <x1>.''
391
``You'll have to say which compass direction to go in.''
393
1. ``The game file has verified as intact.''
394
2. ``The game file did not verify properly, and may be corrupted
395
(or you may be running it on a very primitive interpreter which
396
is unable properly to perform the test).''
400
``The dreadful truth is, this is not a dream.''
402
``That seems unnecessary.''
404
1. ``But you aren't holding that/those.''
405
2. ``You look ridiculous waving <x1>.''
407
``You wave, feeling foolish.''
409
1. ``You can't wear that/those!''
410
2. ``You're not holding that/those!''
411
3. ``You're already wearing that/those!''
412
4. ``You put on <x1>.''
414
``That was a rhetorical question.''
417
File: inform, Node: Entry Points, Next: Program Order, Prev: Library Messages, Up: Appendix
419
Entry points and meaningful constants
420
=====================================
422
Entry points are routines which you can provide, if you choose to,
423
and which are called by the library routines to give you the option of
424
changing the rules. All games `must' define an Initialise routine,
425
which is obliged to set the location variable to a room; the rest are
429
When the player has died (a condition signalled by the variable
430
deadflag being set to a non-zero value other than 2, which
431
indicates winning), this routine is called: by setting deadflag=0
432
again it can resurrect the player.
435
Called just after the prompt is printed: therefore, called after
436
all the printing for this turn is definitely over. A useful
437
opportunity to use box to display quotations without them
441
Called to provide an `afterword' for players who have won: for
442
instance, it might advertise some features which a successful
443
player might never have noticed. (But only if you have defined
444
the constant AMUSING_PROVIDED in your own code.)
447
Called after the parser has read in some text and set up the
448
buffer and parse tables, but has done nothing else yet (except to
449
set the word marker wn to 1). The routine can do anything it
450
likes to these tables, and can leave the word marker anywhere;
451
there is no meaningful return value.
454
When c is 0, the parser is processing an "all" and has decided to
455
exclude obj from it; when c is 1, it has decided to include it.
456
Returning 1 forces inclusion, returning 2 forces exclusion and
457
returning 0 lets the parser's decision stand. When c is 2, the
458
parser wants help in resolving an ambiguity: using the
459
action_to_be variable the routine must decide how appropriate obj
460
is for the given action and return a score of 0 to 9 accordingly.
461
See *Note Helping the Parser::.
464
Called when a player goes from one dark room into another one; a
465
splendid excuse to kill the player off.
468
Prints up "You have died" style messages, for deadflag values of 3
469
or more. (If you choose ever to set deadflag to such.)
472
A kind of super-after rule, which applies to all actions in the
473
game, whatever they are: use only in the last resort.
476
A kind of super-before rule, which applies to all actions in the
477
game, whatever they are: use only in the last resort.
480
A compulsory routine, which must set location and is convenient for
481
miscellaneous initialising, perhaps for random settings.
484
An opportunity to place extra items in scope during parsing, or to
485
change the scope altogether. If et_flag is 1 when this is called,
486
the scope is being worked out for each_turn reasons; otherwise for
490
Called at the end of every Look description.
493
Called when the room changes, before any description of it is
494
printed. This happens in the course of ordinary movements or use
495
of PlayerTo, but may not happen if the game uses move to shift the
496
player object directly.
499
To do the job of parsing the name property (if parse_name hasn't
500
done it already). This takes one argument, the object in
501
question, and returns a value as if it were a parse_name routine.
504
An opportunity to parse numbers in a different (or additional)
505
way. The text to be parsed is a byte array of length n starting
509
The chance to print different parser error messages (like "I don't
510
understand that sentence"). pe is the parser error number (*note
511
Helping the Parser::.).
514
Completes the printing of the score. You might want to change
515
this, so as to make the ranks something like "junior astronaut" or
516
"master catburglar" or whatever suits your game.
519
A chance to change the verb printed out in a parser question (like
520
"What do you want to (whatever)?") in case an unusual verb via
521
UnknownVerb has been constructed. v is the dictionary address of
522
the verb. Returns true (or 1) if it has printed something.
525
Prints the name of task n (such as "driving the car").
528
Called after every turn (but not, for instance, after a command
529
like "score" or "save"). It's much more elegant to use timers and
530
daemons, or each_turn routines for individual rooms -- using this
534
Called by the parser when it hits an unknown verb, so that you can
535
transform it into a known one.
537
The following constants, if defined in a game, change settings made by
538
the library. Those described as "To indicate that..." have no
539
meaningful value; one simply defines them by, e.g., the directive
543
To indicate that an Amusing routine is provided.
546
To indicate that the special "debugging" verbs are to be included.
549
Style of game and copyright message.
552
Maximum number of (direct) possessions the player can carry.
558
Maximum number of timers or daemons active at any one time
562
To indicate that the "places" and "objects" verbs should not be
566
Number of `tasks' to perform.
569
Score for picking up a scored object for the first time.
572
Score for visiting up a scored room for the first time.
575
Object which acts as a `rucksack', into which the game
576
automatically tidies away things for the player.
579
Story name, conventionally in CAPITAL LETTERS.
582
To indicate that "tasks" are provided.
585
To indicate that the standard compass directions are to be omitted.
588
File: inform, Node: Program Order, Next: Lexicon, Prev: Entry Points, Up: Appendix
590
What order the program should be in
591
===================================
593
This section summarises Inform's "this has to be defined before that
596
1. The three library files, Parser, Verblib and Grammar must be
597
included in that order.
599
a. Before inclusion of Parser: you must define the constants
600
Story and Headline; the constant DEBUG must be defined here,
601
if anywhere; similarly for Replace directives; but you may
602
not yet define global variables, objects or routines. If you
603
are linking in the library (using USE_MODULES) then you may
604
not use the Attribute or Property directive in this part of
607
b. Between Parser and Verblib: if a `sack object' is to be
608
included, it should be defined here, and the constant
609
SACK_OBJECT set to it; the LibraryMessages object should be
610
defined here, if at all; likewise the task_scores array.
612
c. Before inclusion of Verblib: the constants
614
MAX_CARRIED, MAX_SCORE, NUMBER_TASKS, OBJECT_SCORE,
615
ROOM_SCORE, AMUSING_PROVIDED and TASKS_PROVIDED
617
must be defined before this (if ever).
619
d. Before inclusion of Grammar: Verb and Extend directives
622
e. After inclusion of Grammar: It's too late to define any entry
625
2. Any Switches directive must come before the definition of any
628
3. If an object begins inside another, it must be defined after its
631
4. Global variables must be declared earlier in the program than the
632
first reference to them.
634
5. Attributes and classes must be declared earlier than their first
635
usage in an object definition.
637
6. General parsing and scope routines must be defined before being
638
quoted in grammar tokens.
640
7. Nothing can be defined after the End directive.
643
File: inform, Node: Lexicon, Prev: Program Order, Up: Appendix
645
A short Inform lexicon
646
======================
648
This brief dictionary of Inform jargon defines terms used in the
649
manual, generally excepting language features set in computer type.
650
Cross-references are italicised. Everything here is in the body of the
651
text somewhere and can be found via the index.
654
A single attempted action by the /player/, such as taking a lamp,
655
generated either by the /parser/ or in code. It is stored as
656
three numbers, the first being the /action number/, the others
657
being the /noun/ and /second noun/ (if any: otherwise 0).
660
A number identifying which kind of action is under way, e.g., Take,
661
which can be written as a /constant/ by prefacing its name with ##.
664
The /routine/ of code executed when an /action/ has been allowed
665
to take place. What marks it out as the routine in question is
666
that its name is the name of the /action/ with Sub appended, as
667
for instance TakeSub.
670
The /parser/ can interpret what the /player/ types as either a
671
request for the player's own character to do something, in which
672
case the actor is the player's object, or to request somebody else
673
to do something, in which case the actor is the person being
674
spoken to. This affects the parser significantly because the
675
person speaking and the person addressed may be able to see
679
An additive /property/ is one whose value accumulates into a list
680
held in a /word array/, rather than being over-written as a single
681
value, during /inheritance/ from /classes/.
684
The default Inform /format/ of /story file/, also known as Version
685
5. It can be extended (see /version/) if needed. /Standard
686
games/ should no longer be used unless necessary.
689
A single /attribute/ or /common property/ may be used for two
690
different purposes, with different names, provided care is
691
exercised to avoid clashes: the two names are called aliases. The
692
/library/ uses this: for instance, time_out is an alias for daemon.
695
Arises when the /player/ has typed something vague like "fish" in
696
circumstances when many nearby objects might be called that. The
697
/parser/ then resolves this, possibly in conjunction with the
701
A parameter specified in a /routine/ call, such as 7 in the call
705
An indexed collection of global variables. There are four kinds,
706
/byte arrays/ ->, /word arrays/ -->, /strings/ and /tables/.
709
The /Z-machine/ runs a sequence of low-level instructions, or
710
assembly lines (also called opcodes). These can be programmed
711
directly as Inform /statements/ by prefixing them with @, but only
712
a few are documented in this manual, in *Note Assembly Language::,
713
the rest being in the `Z-machine Standards Document'.
716
A very low-level /error/ caused by a malformed line of /assembly
720
A /statement/ which sets the value of a /global/ or /local
721
variable/, or /array/ entry.
724
An /object/ can be created as having certain attributes, which are
725
simple off-or-on states (or flags), which can then be given,
726
tested for or taken away by the program. For example, light
727
represents the state "is giving off light".
733
A rectangle of text, usually displayed in reverse video onto the
734
screen and with text such as a quotation inside (*note Boxes::.).
737
An 8-bit cell of memory, capable of holding numbers between 0 and
741
The whole lower part of the /memory map/ of the /Z-machine/ can be
742
regarded as a /byte array/, and a byte address is an index into
743
this. E.g., byte address 0 refers to the lowest byte in the
744
machine (which always holds the /version/ number). /Dictionary/
745
words are internally stored as byte addresses.
748
An /array/ indexed with the -> /operator/ whose entries are only 1
749
byte each: they can therefore hold numbers between 0 and 255, or
750
ASCII characters, but not strings or object numbers.
753
A single letter `A' or symbol `*', written as a /constant/ using
754
the notation 'A', and internally stored as its ASCII code. Can be
755
printed using print (char).
761
A template for an /object/ definition, giving certain properties
762
and attributes which are /inherited/ by any objects defined as
763
being of this class. Classes also exist as objects in their own
764
right and belong to a /metaclass/ called Class.
767
A collection of /statements/ can be grouped together into a block
768
using braces { and } so that they count as a single unit for if
769
statements, what is to be done inside a for loop, etc.
772
Any /property/ set by the /class/ Object is passed on to every
773
/object/ and is called a "common property": for example,
774
description. All others are /individual properties/. New
775
properties can be declared as common with the Property directive.
776
They behave similarly except that: (a) values of common properties
777
can be read even from an /object/ not providing them, the result
778
being a special default value, which can be altered using
779
ChangeDefault; (b) they are faster and slightly more economical of
780
memory to use; (c) there are a limited number of them.
783
The compass /object/, created by the /library/ but never tangible
784
to the /player/ during the game, is used to hold the currently
785
valid /direction objects/.
788
The Inform program itself, which transmutes Inform programs (or
789
source code) into the /story file/ which is played with the use of
790
an /interpreter/ at /run-time/.
793
A state of affairs which either is, or isn't, true at any given
794
moment, such as x == y, often written in round brackets ( and ).
795
The central operator == is also called the condition. A numerical
796
value given with no operator is considered true if it is non-zero
800
An explicitly written-out number, such as 34 or $$10110111; or the
801
internal name of an object, such as brass_lamp, whose value is its
802
/object number/; or the internal name of an array, whose value is
803
its /byte address/; or a word defined by either the /library/ or
804
Inform code as meaning a particular value; or a /character/,
805
written 'X' and whose value is its ASCII code; or a /dictionary
806
word/, written 'word' and whose value is its /byte address/; or an
807
/action/, written ##Action and whose value is its /action number/;
808
or a /routine/ written #r$Routine whose value is its /packed
809
address/; or the name of a /property/ or /attribute/ or /class/.
815
An invisible notional position at which text is being printed in
816
the upper /window/, when the windows are split; the origin is
817
(1,1) in the top left.
820
A /routine/ attached to an /object/ which, once started, is run
821
once during the end sequence of every /turn/ until explicitly
822
stopped. Used to manage events happening as time passes by, or to
823
notice changes in the state of the game which require some
830
The usually quite long piece of text attached to an /object/; if
831
it's a /room/, then this is the long description printed out when
832
the room is first visited; otherwise it will usually be printed
833
when the object is examined by the /player/.
836
A list kept inside the /Z-machine/ of all the words ordinarily
837
understood by the game, such as "throw" and "mauve", usually
838
between about 300 and 2000 words long. Inform automatically puts
839
this list together from all the name values of objects and all
840
usages of constants like 'word'. Dictionary words are stored to a
841
resolution of 9 characters (6 for /Standard games/), written
842
'thus' (provided they have more than one letter; otherwise #n$x
843
for the word "x"; except as values of the special name property)
844
and are internally referred to by numbers which are their /byte
845
addresses/ inside the list.
851
An object representing both the abstract idea of a direction and
852
the wall which is in that direction: for instance, n_obj
853
represents "northness" and the north wall of the current /room/.
854
Typing "go north" causes the /parser/ to generate the /action/ Go
855
n_obj. The current direction objects are exactly those currently
856
inside the compass object and they can be dynamically changed.
857
The door_dir property of a direction object holds its
858
corresponding direction property.
861
The /library/ creates 12 direction properties: n_to, s_to, etc.,
862
u_to, d_to, in_to and out_to. These are used to give /map/
863
connections from /rooms/ and indicate directions which doors and
864
/direction objects/ correspond to.
867
A line of Inform code which instructs the /compiler/ to do
868
something, such as to define a new /constant/; it takes immediate
869
effect and does not correspond to anything happening at
870
/run-time/. These are not normally written inside /routines/ but
871
can be if prefaced by a # character.
877
A /routine/ defined as the /property/ value of an /object/, which
878
is defined without a name of its own, and which by default returns
879
`false' rather than `true'.
882
When an /object/ declares a /property/ as being private, its value
883
is unavailable anywhere else in the program: it can be read or
884
written to only by that one object itself. This close concealment
885
of data is called encapsulation.
888
A /routine/ in an Inform program which is directly called by the
889
/library/ to intervene in the normal operation of the game (if the
890
routine so wishes). Provision of entry points is optional, except
891
for Initialise, which must always occur in every game.
894
When the /compiler/ finds something in the program which it can't
895
make sense of, it produces an error (which will eventually prevent
896
it from generating a /story file/, so that it cannot generate an
897
illegal /story file/ which would fail at /run-time/). If the
898
error is /fatal/ the compiler stops at once.
904
A general piece of Inform code which determines a numerical value.
905
It may be anything from a single /constant/ to a bracketed
906
calculation of /variable/, /property/ or /array/ values, such as
907
3+(day_list-->(calendar.number)).
910
A form of /action/ which has no corresponding /action routine/ and
911
will have no effect after the before-processing stage of
912
considering an action is over. A fake action is never generated
913
by the /parser/ and can only be triggered by a <...> statement.
914
The /library/ makes use of this but other Inform code is advised
918
A form of /action/ which does have an /action routine/ and is
919
processed exactly as ordinary actions are, but which is never
920
generated by the /parser/, only by the program, which can use it
921
to pass a message to an /object/.
924
An /error/ found by the /compiler/ which causes it to give up
925
immediately; for instance, a disc being full or memory running out
938
A variable which can be used by every routine in the program.
941
A list of /lines/ which is attached to a particular /verb/. The
942
/parser/ decodes what the /player/ has typed by trying to match it
943
against each line in turn of the grammar attached to the /verb/
944
which the first word of the player's input corresponds to.
947
A function which is used just like any other /routine/ but which is
948
not defined anywhere in the /library/ or /program/: the /compiler/
949
provides it automatically, usually converting the apparent call to
950
a routine into a single line of /assembly language/.
953
When compiling a /module/, Inform needs to be told of any global
954
variables it is using which are defined only in the outside program
955
(compiled on a different occasion). Such a variable is said to be
956
"imported" using the Import global directive.
962
Opposite of /common property/.
965
The process in which /property/ values and /attribute/ settings
966
specified in a /class/ definition are passed on to an /object/
967
defined as having that class.
973
A program for some particular model of computer, for example the
974
IBM PC, which reads in the /story file/ of a game and allows
975
someone to play it. A different interpreter is needed for each
976
model of computer (though generic source codes exist which make it
977
relatively easy to produce these).
980
1. Verb, imperative: a demand for a list of the items one is
981
holding; 2. noun: the list itself. (When Crowther and Woods were
982
writing the original `Advent', they were unable to think of a good
983
imperative verb and fell back on the barely sensible "take
984
inventory", which was soon corrupted into the not at all sensible
985
"inventory", thence "inv" and finally "i".)
988
The `operating system' for the /Z-machine/: a large segment of
989
Inform code, written out in three /library files/, which manages
990
the model world, provides the /parser/ and consults the game's
991
program now and then to give it a chance to make interesting
995
The three files parser, verblib and grammar containing the source
996
code of the /library/. These are normally Included in the code for
1000
A /routine/ provided by the /library/ which is `open to the public'
1001
in that the designer's program is allowed to call and make use of
1005
One possible pattern which the /parser/ might match against what
1006
the /player/ has typed beyond the initial /verb/ word. A
1007
/grammar/ line consists of a sequence of /tokens/, each of which
1008
must be matched in sequence, plus an /action/ which will be
1009
generated if the line successfully matches.
1012
The process of assimilating a previously-compiled /module/ into the
1013
game now being compiled, in order to save compilation time.
1016
A variable attached to a particular /routine/ (or, more precisely,
1017
a particular call to a routine: if a routine calls itself, then
1018
the parent and child incarnation have independent copies of the
1019
local variables) whose value is inaccessible to the rest of the
1020
program. Also used to hold the /arguments/ of the call.
1023
A /property/ whose values must always be stored as /words/, or
1024
/word arrays/, rather than /bytes/ or /byte arrays/. A safely
1025
ignorable concept since except for /Standard games/ all properties
1032
A string which can be used as the value of a /variable string/,
1033
printed with the @ escape character. Must be declared with
1037
The geographical design of the game, divided into areas called
1038
/rooms/ with connections between them in different directions.
1039
The /story file/ doesn't contain an explicit map table but stores
1040
the information implicitly in the definition of the room /objects/.
1043
Internally, the /Z-machine/ contains a large /array/ in whose
1044
values the entire story file and all its data structures are
1045
stored. Particular cells low down in this array are indexed by
1046
/byte addresses/, and /routines/ and /strings/ which are lodged
1047
higher up are referred to by /packed addresses/. The organisation
1048
of this array (which ranges of indices correspond to what) is
1049
called the memory map.
1052
A way to communicate with an /object/, specifying the object to
1053
call, the /property/ being addressed (in effect, the "kind of
1054
message being sent") and possibly other parameters. A single
1055
value is returned as a reply.
1058
There are four fundamental /classes/ of /object/, such that every
1059
object belongs to exactly one of the four. These are Object,
1060
Class, Routine and String, and are called metaclasses. (Since
1061
they are examples of classes, they themselves have metaclass
1065
A /verb/ whose actions are always commands from the /player/ to
1066
the game, rather than requests for something to happen in the
1067
model world: for instance, "quit" is meta but "take" is not.
1070
A previously-compiled but incomplete segment of game, which is
1071
kept in order for it to be /linked/ into a later compilation. It
1072
can be linked many times once created, saving much compilation
1073
time. (For example, almost the whole Library can be reduced to
1077
The /parser/ matches a /token/ with a multiple object when the
1078
/player/ has either explicitly referred to more than one /object/
1079
(e.g. "drop lamp and basket") or implicitly done so (e.g. "drop
1080
everything" when this amounts to more than 1 item); though the
1081
match is only made if the token will allow it.
1084
An /object/ has three kinds of name: 1. its internal name, a word
1085
such as brass_lamp, which is a /constant/ referring to it within
1086
the program; 2. its short name, such as "dusty old brass lamp" or
1087
"Twopit Room", which is printed in /inventories/ or before a /room
1088
description/; 3. /dictionary words/ which appear as values of its
1089
name property, such as "dusty", "brass", etc., which the /player/
1090
can type to refer to it.
1093
The first parameter (usually an /object/ but possibly a number)
1094
which the /parser/ has matched in a /line/ of /grammar/ is the
1095
noun for the /action/ which is generated. It is stored in the
1096
noun variable (not to be confused with the noun token).
1099
1. The physical substance of the game's world is divided up into
1100
indivisible objects, such as `a brass lamp' or `a meadow'. These
1101
contain each other in a hierarchy called the /object tree/. An
1102
object may be defined with an initial location (another object)
1103
and must have an /internal name/ and a /short name/; attached to
1104
it throughout the game are variables called /attributes/ and
1105
/properties/ which reflect its current state. The definition of
1106
an object may make it /inherit/ initial settings for this state
1107
from one or more /classes/. 2. More generally, classes themselves
1108
and even /routines/ and /strings/ are abstractly considered
1109
objects. Objects in sense (1) above, "concrete objects", are
1110
members of the /metaclass/ Object, while classes belong to Class,
1111
routines to Routine and strings to String.
1114
/Objects/ are automatically numbered from 1 upwards, in order of
1115
definition, and the /internal name/ of an object is in fact a
1116
/constant/ whose value is this number.
1119
The hierarchy of containment between /objects/ of metaclass Object,
1120
i.e., of concretely existing objects. Each has a `parent', though
1121
this may be `nothing' (to indicate that it is uncontained, as for
1122
instance /rooms/ are) and possibly some `children' (the objects
1123
directly contained within it). The `child' of an object is the
1124
`eldest' of these children, the one most recently moved within it
1125
or, if none have been moved into it since the start of play, the
1126
first one defined as within it. The `sibling' of this child is
1127
then the next eldest, or may be `nothing' if there is no next
1128
eldest. Note that if A is inside B which is itself inside C, then
1129
C `directly contains' B but only `indirectly contains' A: and we
1130
do not call A one of the children of C.
1133
A point in the program using Inform syntax which was correct under
1134
some previous version of the /compiler/ but is no longer correct
1135
(usually because there is a neater way to express the same idea).
1136
Inform often allows these but, if so, issues /warnings/.
1139
See /assembly language/.
1142
A symbol in an /expression/ which acts on one or more
1143
sub-expressions, combining their values to produce a result. This
1144
may be arithmetic, as in + or /, or to do with array or property
1145
value indexing, as in -> or .&. Note that /condition/ operators
1146
such as == are not formally expression operators.
1149
An instruction by the /player/ for somebody else to do something.
1150
For instance, "policeman, give me your hat" is an order. The
1151
order is parsed as if an /action/ but is then processed in the
1152
other person's /object/ definition.
1155
A number encoding the location of a /routine/ or /string/ within
1156
the /memory map/ of the /Z-machine/.
1162
That part of the /library/ which, once per turn, issues the
1163
/prompt/; asks the /player/ to type something; looks at the
1164
initial /verb/ word; tries to match the remaining words against
1165
one of the /lines/ of /grammar/ for this verb and, if successful,
1166
generates the resulting /action/.
1169
1. the person sitting at the keyboard at /run-time/, who is playing
1170
the game; 2. his character inside the model world of the game.
1171
(There is an important difference - one has access to the "undo"
1172
verb. The other actually dies.)
1175
See /encapsulation/.
1178
The text printed to invite the /player/ to type: usually just >.
1181
1. The value of a variable attached to a particular /object/,
1182
accessible throughout the program, which can be a single /word/,
1183
an /embedded routine/ or an /array/ of values; 2. a named class of
1184
such variables, such as description, which may or may not be
1185
/provided/ by any given object. Properties can be /encapsulated/
1186
for privacy. All properties are either /common/ or /individual/
1187
(the latter unless otherwise declared).
1190
If a /property/, such as description, is given in the definition of
1191
an /object/ (or in the definition of a /class/ which the object
1192
belongs to) then the object is said to "provide" that property.
1201
The geography of a game is subdivided into parcels of area called
1202
rooms, within which it is (usually) assumed that the /player/ has
1203
no particular location but can reach all corners of easily and
1204
without giving explicit instruction to do so. For instance, "the
1205
summit of Scafell Pike" might be such an area, while "the summit
1206
of Ben Nevis" (being a large L-shaped ridge) would probably be
1207
divided into three or four. These rooms fit together into the
1208
/map/ and each is implemented as an /object/.
1214
An Inform program is always executed in routines, each of which is
1215
"called" (possibly with /arguments/) and must return a particular
1216
/word/ value, though this is sometimes disguised from the
1217
programmer because (for example) the /statement/ return; actually
1218
returns true (1) and the statement ExplodeBomb(); makes the call
1219
to the routine but throws away the return value subsequently.
1220
Routines are permitted to call themselves (if the programmer wants
1221
to risk it) and have their own /local variables/. Calling a
1222
routine is analogous to sending a /message/ to an /object/, and
1223
indeed routines are abstractly considered objects in their own
1224
right, belonging to /metaclass/ Routine.
1227
/Embedded routines/ given as values of a /property/ like before or
1228
after are sometimes loosely called rules, because they encode
1229
exceptional rules of the game such as "the 10-ton weight cannot be
1230
picked up". However, there is no formal concept of `rule'.
1233
The time when an /interpreter/ is running the /story file/, i.e.,
1234
when someone is actually playing the game, as distinct from
1235
`compile-time' (when the /compiler/ is at work making the story
1236
file). Some errors (such as an attempt to divide a number by
1237
zero) can only be detected at run-time.
1240
To say that an /object/ is in scope to a particular /actor/ is
1241
roughly to say that it is visible, and can sensibly be referred to.
1244
The second parameter (usually an /object/ but possibly a number)
1245
which the /parser/ has matched in a /line/ of /grammar/ is the
1246
second noun for the /action/ generated. It is stored in the
1250
An /object/ is called this if it has transparent, or is an open
1251
container, or is a supporter. Roughly this means `if the object is
1252
visible, then its /children/ are visible'. (This criterion is
1253
often applied in the /scope/ (and `light') rules inside the
1257
When a /message/ is sent from one /object/ to another, the
1258
originator is called the "sender". Whenever a message is being
1259
received, the variable sender holds this object's identity.
1268
A single instruction for the game to carry out at /run-time/; a
1269
/routine/ is a collection of statements. These include
1270
/assignments/ and /assembly language/ but not /directives/.
1273
The region at the top of the screen which, in play, usually shows
1274
the current score and location, and which is usually printed in
1275
reversed colours for contrast.
1278
The output of the /compiler/ is a single file containing
1279
everything about the game produced, in a /format/ which is
1280
standard. To be played, the file must be run with an
1281
/interpreter/. Thus only one file is needed for every Inform game
1282
created, and only one auxiliary program must be written for every
1283
model of computer which is to run such games. In this way story
1284
files are absolutely portable across different computers.
1287
An old /format/ (version 3) of /story file/ which should no longer
1288
be used unless absolutely necessary (to run on very small
1289
computers) since it imposes tiresome restrictions.
1292
1. a literal piece of text such as "Mary had a fox" (which is a
1293
/constant/ internally represented by a number, its /packed
1294
address/, and may be created as a /low string/), abstractly
1295
considered an /object/ of /metaclass/ String; 2. a form of /byte
1296
array/ in which the 0th entry holds the number of entries (so
1297
called because such an array is usually used as a list of
1298
/characters/, i.e. a string variable); 3. see /variable string/.
1301
1. certain /objects/ are `switchable', meaning they can be turned
1302
off or on by the /player/; 2. options set by the programmer when
1303
the /compiler/ starts are called switches; 3. a switch /statement/
1304
is one which switches execution, like a railway turntable, between
1305
different lines according to the current value of an /expression/.
1308
Two or more words which refer to the same /verb/ are called
1309
synonyms (for example, "wear" and "don").
1312
A form of /word array/ in which the 0th entry holds the number of
1316
A /routine/ attached to a particular /object/ which, once set,
1317
will be run after a certain number of /turns/ have passed by.
1318
(Sometimes called a `fuse'.)
1321
A particle in a /line/ of /grammar/, which the /parser/ tries to
1322
match with one or more words from what the /player/ has typed. For
1323
instance, the token held can only be matched by an /object/ the
1330
The period in play between one typed command and another.
1333
A /dictionary word/ which contains at least one space, full stop or
1334
comma and therefore can never be recognised by the /parser/ as one
1335
of the words typed by the /player/.
1338
A named value which can be set or compared so that it varies at
1339
/run-time/. It must be declared before use (the /library/
1340
declares many such). Variables are either /local/ or /global/;
1341
entries in /arrays/ (or the /memory map/) and /properties/ of
1342
/objects/ behave like global variables.
1345
(Not the same as a /string/ (3) variable.) There are 32 of these,
1346
which can only be set (to a /string/ (1) which must have been
1347
defined as a /low string/) or printed out (using the @ escape
1351
An /object/ which the /player/ character can travel around in.
1354
1. a collection of /synonymous/ one-word English verbs for which
1355
the /parser/ has a /grammar/ of possible /lines/ which a command
1356
starting with one of these verbs might take; 2. one of the
1357
one-word English verbs.
1360
The /compiler/ can produce 6 different formats of /story file/,
1361
from Version 3 (or /Standard/) to Version 8. By default it
1362
produces Version 5 (or /Advanced/) which is the most portable.
1365
When the /compiler/ finds something in the program which it
1366
disapproves of (for example, an /obsolete usage/) or thinks might
1367
be a mistake, it issues a warning message. This resembles an
1368
/error/ but does not prevent successful compilation; a working
1369
/story file/ can still be produced.
1372
(Except in /Standard games/) the screen is divided into two
1373
windows, an upper, fixed window usually containing the /status
1374
line/ and the lower, scrolling window usually holding the text of
1375
the game. One can divert printing to the upper window and move a
1376
/cursor/ about in it.
1379
1. an English word in the game's /dictionary/; 2. almost all
1380
numbers are stored in 16-bit words of memory which unlike /bytes/
1381
can hold any /constant/ value, though they take twice as much
1385
An /array/ indexed with the --> /operator/ whose entries are
1386
/words/: they can therefore hold any /constant/ values.
1392
The imaginary computer which the /story file/ is a program for.
1393
One romantically pretends that this is built from circuitboards
1394
and microchips (using terms like `hardware') though in fact it is
1395
merely simulated at /run-time/ by an /interpreter/ running on some
1396
(much more sophisticated) computer. Z is for `Zork'.