/
story.ni
12635 lines (8230 loc) · 842 KB
/
story.ni
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
"Jack Toresal and The Secret Letter" by "Textfyre, Inc"
[ Change Log
When Who What
18-Mar-2010 R. Newcomb Email, me to Dave, just after 8pm
13-Mar-2010 D. Cornelson Changes to princess dialogue and some of the fight scene. Needs work.
14-Feb-2010 R. Newcomb DD2.0 - various synonyms, fixed regionless new rooms, other misc.
19-Nov-2009 G. Jefferis Eric's Transcript
17-Nov-2009 G. Jefferis Eric's Transcript
29-Oct-2009 G. Jefferis DD2.0 - War Room
22-Oct-2009 G. Jefferis DD2.0 - War Room
19-Oct-2009 G. Jefferis DD2.0 - Red Gate Estate
16-Oct-2009 G. Jefferis DD2.0 - Red Gate Estate
14-Oct-2009 G. Jefferis DD2.0 - Black Gate Estate
9-Oct-2009 G. Jefferis DD2.0 - Jail scene
08-Jul-2009 G. Jefferis Automatic exit checks
07-Jul-2009 G. Jefferis De Smet bug fixes
06-Jul-2009 D. Cornelson Fixed Chapter 10 title change.
02-Jul-2009 D. Cornelson Added 'gap' and lowered 1 in 5 to 1 in 3 for Pieter's Mutterings.
02-Jul-2009 G. Jefferis Distant descriptions fix.
01-Jul-2009 G. Jefferis Pieter's mutterings, Amhyron fix.
29-Jun-2009 D. Cornelson Jesse fixed FyreVM Support.
27-Jun-2009 D. Cornelson Image changes.
26-Jun-2009 D. Cornelson Final edit before release.
25-Jun-2009 G. Jefferis Various location and scenario images
22-Jun-2009 G. Jefferis UNDO hack moved to Restore After Undo extension
19-Jun-2009 G. Jefferis Sleep in Maiden House
19-Jun-2009 D. Cornelson Small fixes here and there.
18-Jun-2009 G. Jefferis UNDO hack
18-Jun-2009 D. Cornelson Fixed fountain open bug.
07-Jun-2009 D. Cornelson Fixed hint ordering, caused crash in Silverlight.
22-May-2009 G. Jefferis Hints
21-May-2009 G. Jefferis Hints
13-May-2009 G. Jefferis complete changes from BermanTranscriptResponse
11-May-2009 G. Jefferis changes from BermanTranscriptResponse
8-May-2009 G. Jefferis changes from BermanTranscriptResponse
7-May-2009 G. Jefferis further bug fixes
6-May-2009 G. Jefferis changes from JLottTranscriptResponse
4-May-2009 G. Jefferis changes from JLottTranscriptResponse
23-Apr-2009 G. Jefferis Updated for 5Z71
18-Mar-2009 D. Cornelson Fixed hints bug.
02-Mar-2009 G. Jefferis Assorted bug finding and fixes
26-Feb-2009 G. Jefferis Implemented changes from Paul_6_response
25-Feb-2009 G. Jefferis Implemented changes from Paul_5_response
24-Feb-2009 G. Jefferis Implemented changes from Paul_5_response
23-Feb-2009 G. Jefferis Implemented changes from Paul_5_response
22-Feb-2009 G. Jefferis Implemented changes from Paul_4_response
20-Feb-2009 G. Jefferis Implemented changes from Paul_1-2-3_response
19-Feb-2009 G. Jefferis Implemented changes from Paul_1-2-3_response
18-Feb-2009 G. Jefferis Implemented changes from mcp01_response
16-Feb-2009 G. Jefferis Implemented changes from mcp01_response
12-Feb-2009 G. Jefferis Implemented changes from EE02_response
09-Feb-2009 G. Jefferis Implemented changes from EE02_response
04-Feb-2009 G. Jefferis Implemented changes from EE01_response
03-Feb-2009 D. Cornelson Implementing changes from EE_notes_01.
03-Feb-2009 G. Jefferis Implemented changes from EE01_response
02-Feb-2009 G. Jefferis Implemented changes from EE01_response
29-Jan-2009 G. Jefferis Implemented changes from EE01_response
21-Jan-2009 G. Jefferis Implemented changes from JA_notes_02_response
20-Jan-2009 G. Jefferis Implemented changes from JA_notes_02_response
19-Jan-2009 G. Jefferis Implemented changes from JA_notes_01_response
16-Jan-2009 G. Jefferis Fixing bugs from Transcript EE01
15-Jan-2009 G. Jefferis Fixing bugs from Transcript EE01
14-Jan-2009 G. Jefferis Fixing bugs from Transcript EE01
06-Dec-2008 G. Jefferis Fixing bugs from Transcript Dec 3 08 (J.A.L.)
05-Dec-2008 G. Jefferis Fixing bugs from Transcript Dec 3 08 (J.A.L.)
03-Dec-2008 D. Cornelson Fixed hints XML.
29-Nov-2008 D. Cornelson Added hints for grubbers.
20-Nov-2008 D. Cornelson Added death channel.
06-Nov-2008 D. Cornelson Fixed channel stuff and added chapter channel.
31-Oct-2008 M. Gentry Fixed bugs from Jacqueline's R54 transcript.
28-Oct-2008 D. Cornelson Updated channels to include prologue, title, and credits.
27 Sep 2008 G. Jefferis Fixes for the walkthrough
15 Sep 2008 G. Jefferis Changes to compile under 5U92
23-Aug-2008 D Cornelson Fixed 5T bugs and added FyreVM Support.
03 Aug 2008 M. Gentry Implements Test Session - R50 - Grubbers - Ashwell (2h)
27 Jul 2008 M. Gentry Jacqueline's notes from Test Session - 2008-06-10 implemented (8h)
08 Jul 2008 G. Jefferis DD #21 complete
07 Jul 2008 G. Jefferis Adjacent rooms code fixing
06 Jul 2008 G. Jefferis DD #21: Descriptions from afar / inspecting activity
Moved pronouns to a module
29 Jun 2008 G. Jefferis DD #21: Grammar for actions on adjacent rooms
28 Jun 2008 G. Jefferis DD #21: Grammar for actions on current rooms
19 Jun 2008 G. Jefferis DD #21: Begin adjacent rooms implementation
17 Jun 2008 J. Ashwell Began adding change requests as comments in Book JAL - Search for JACQNOTE to find. Tested Commerce Street and its three shops.
10 Jun 2008 J. Ashwell Reduced test code to address current state of Grubbers
10 Jun 2008 G. Jefferis Scenery implementation from DD #21
22 May 2008 G. Jefferis DD #20 complete - Synonyms etc.
20 May 2008 G. Jefferis DD #20 - Various backdrops
16 May 2008 G. Jefferis DD #20 - Changes from Chapter 0
04 May 2008 J. Ashwell Added tests for nouns, scenery taking, and smelling/listening. Replaced names to credits which were lost during last change.
04 May 2008 G. Jefferis Revert updates to compile under 5J39
03 May 2008 G. Jefferis Changes to Grubber's Market from DD #19
G. Jefferis Updates to compile under 5T18
11 Apr 2008 G. Jefferis Last bits from DD #18.
09 Apr 2008 G. Jefferis Progress on DD#18. Tidying up along the way.
06 Apr 2008 G. Jefferis Prince Gravesal and War Room from DD#17
04 Apr 2008 G. Jefferis DD#17 conversations: Inhyron, Amhyron, Bresa.
Rewrite of Quips extension
03 Apr 2008 G. Jefferis Started DD#17: Ball Room, Jacobs, and Princess.
XML output toggling
02 Apr 2008 G. Jefferis Finished DD#16: Clothier, Chorus Brothers,
Journey with Pieter.
31 Mar 2008 G. Jefferis Continue implementation of DD #16.
30 Mar 2008 G. Jefferis Continue implementation of DD #16.
Lost a lot of time fixing dynamic memory limit.
28 Mar 2008 G. Jefferis Begin implementation of DD #16.
Various bug fixes, some major.
27 Mar 2008 G. Jefferis DD #15: Complete.
24 Mar 2008 G. Jefferis Character lists extension.
22 Mar 2008 G. Jefferis XML tag wrestling; topic lists.
21 Mar 2008 G. Jefferis DD #15: Implementation to Maiden House
18 Mar 2008 G. Jefferis Bug fixes.
17 Mar 2008 G. Jefferis DD #14: Conversation and implementation
10 Mar 2008 G. Jefferis Bug fixes and general tidying
03 Mar 2008 G. Jefferis DD #13: Sewer puzzle rewrite
28 Feb 2008 G. Jefferis DD #13: Jailhouse escape, fixed Bobby
27 Feb 2008 G. Jefferis DD #13: Jailhouse; Bobby and Jacobs
25 Feb 2008 G. Jefferis DD #12: Widow Shannon
23 Feb 2008 G. Jefferis Bug fixing
15 Feb 2008 G. Jefferis Conversation from 12B.
13 Feb 2008 G. Jefferis Conversation document 12A complete.
12 Feb 2008 G. Jefferis Conversation document 12A up to Olgan Minor.
07 Feb 2008 G. Jefferis Fixed up Teisha's Tent and completed final chase.
Removed old conversations throughout.
04 Feb 2008 G. Jefferis Continued final chase scene
02 Feb 2008 G. Jefferis Continued final chase scene
More replacement stalls
31 Jan 2008 G. Jefferis Amendments to stalls, stallkeepers
Fixed map connections
Beginning of final chase scene
30 Jan 2008 G. Jefferis Amendments to stalls and merchandise
29 Jan 2008 G. Jefferis New conversation system added
26 Jan 2008 G. Jefferis Updates from DD#11:
Trade component mostly removed
Introduction amended
Mercenary behavior updated
Market Map updated
30 Dec 2007 G. Jefferis Bug finding following test transcripts
21 Dec 2007 G. Jefferis Updates from DD #10.
Check correct compilation under 5J39
17 Nov 2007 G. Jefferis Changes to run correctly under 5G67
15 Nov 2007 G. Jefferis Changes to compile under 5G67
06 Nov 2007 G. Jefferis Final changes from DD #9, and bug fixing.
05 Nov 2007 G. Jefferis Changes from DD #9
04 Nov 2007 G. Jefferis Further changes from DD#9
30 Oct 2007 G. Jefferis Additional conversation
29 Oct 2007 G. Jefferis Changes from DD#9, installment 1.
24 Oct 2007 G. Jefferis General tidying up, of crufty trade code especially
Converted random choices to use 4X60 syntax
([one of]...[at random]) throughout.
20 Sep 2007 G. Jefferis Updates from DD #8: secret doors at fountain.
19 Sep 2007 G. Jefferis Updates from design documents #5, #6, & #7
18 Sep 2007 G. Jefferis Updates from design document #5
31 Aug 2007 G. Jefferis Updates from design document #5
Simplified mercenaries:
* proper oblivious / approaching / grabbing status
* proper countdown before they grab us
Assorted bug fixes in Grubber's
17 Aug 2007 G. Jefferis Updates from revised design documents
16 Aug 2007 G. Jefferis Oversights and corrections (don't bill)
(e.g. couldn't cut the ropes to free Pieter.)
14 Aug 2007 G. Jefferis Complete to alpha
11 Aug 2007 G. Jefferis Pieter, and journey to the ball
Sanity checks: day / night time simplified
Sanity checks: HTMLese [i] [b] and [r] tags
Commerce Street revisited (after Red Gate)
I7 scenes bug to work around
(can't reliably test "if <scene> is not happening")
9 Aug 2007 G. Jefferis Red Gate Estate
8 Aug 2007 G. Jefferis Raid on Maiden House
Bobby's Execution scene
Black Gate Estate
6 Aug 2007 G. Jefferis Sewer to "pre-Alpha"
Jail scenes to "pre-Alpha"
Better definitions for vendors
5 Aug 2007 G. Jefferis Preliminary Jail scenes
Capture by Fossville's men
Return journey with Bobby
4 Aug 2007 G. Jefferis Journey to Lord's Keep
Path to fountain, given scenery
Bobby following the player
3 Aug 2007 G. Jefferis Path to the fountain
Night-time descriptions
Remaining rooms of Maiden House
Remaining rooms of Commerce Street
Grubber's Market to "pre-Alpha."
2 Aug 2007 G. Jefferis About a third of Commerce Street
Beginning of Maiden House
2 Aug 2007 G. Jefferis Most of Grubber's Market
]
Include FyreVM Support by Textfyre.
Include Basic Screen Effects by Emily Short.
Include Punctuation Removal by Emily Short.
Include Textfyre Standard Rules by Textfyre.
Include Test Suite by Textfyre.
Include Pronouns by Textfyre.
Include Adjacent Rooms by Textfyre.
Include Quips by Textfyre.
Include Counters by Textfyre.
Include Scripted Events by Textfyre.
Include Character Listing by Textfyre.
Include Dramatic Priority by Textfyre.
[ Include Conversation Topics by Textfyre. ]
Include Restoring After Undo by Textfyre.
Include Image Output by Textfyre.
Include Secret Letter Hints by Textfyre.
Include Xml Output Toggling by Textfyre.
Include Basic Help by David Cornelson.
Use no scoring, American dialect and full-length room descriptions.
Use authorial modesty.
The story creation year is 2009.
Rule for printing the banner text:
select the title channel;
say "[b][story title] - v2.0.20100313[r][line break]";
select the credits channel;
say "[story title] by [story author][line break]";
say "Copyright @ [story creation year] by [story author][line break]";
say "Story by David Cornelson[line break]";
say "Written by Michael Gentry[line break]";
say "Game Engine (FyreVM) by Jesse McGrew[line break]";
say "Programming by Graeme Jefferis and Ron Newcomb[line break]";
say "Testing by Jacqueline Ashwell, Peter Berman,[line break]Eric Eve, Jim Aikin, and Paul O'Brian[line break]";
say "Deluxe Edition UI by Thomas Lynge[line break]";
say "Sketches by Erika Swanson (www.simplyerika.com).[line break]";
say "Special thanks to Graham Nelson and Emily Short[line break]";
say "for Inform 7 (www.inform7.com)[line break]";
say "All rights reserved[line break]";
select the main channel;
Section - Randomizer - Not For Release
When play begins, seed the random-number generator with 1234.
After reading a command:
let T be indexed text;
let T be the player's command;
if T matches the regular expression "^\*|\[bracket]":
say "[bracket][one of]Your comment has been noted[or]Noted[stopping].[close bracket][paragraph break]";
reject the player's command;
otherwise:
continue the action.
Book 0 - Worldly affairs
Part 1 - Beating memory constraints
Use dynamic memory allocation of at least 65536.
Use MAX_DICT_ENTRIES of 3000.
Use MAX_STATIC_DATA of 900000.
Use MAX_PROP_TABLE_SIZE of 500000.
Use MAX_OBJECTS of 1280.
Use MAX_EXPRESSION_NODES of 300.
Use MAX_SYMBOLS of 30000.
When play begins:
change the time of day to 1:00 AM;
change menu option number display to true;
Part 2 - Index Map Tweaking
[This is a lot of code for "tweaking", but I find having an accurate index map so valuable that it's really worth it.]
Index map with Grubbers Market Herb Stall mapped west of Grubbers Market Rope Dealer.
Index map with Grubbers Market Northwest Junction mapped north of Grubbers Market Herb Stall.
Index map with Grubbers Market Eastern Junction mapped east of Grubbers Market Pottery Stall.
Index map with Bakers Shop mapped east of Grubbers Market Fruit Stall.
Index map with Grubbers Market Exotic Gems Stall mapped south of Grubbers Market Herb Stall.
Index map with Grubbers Market Hat Stall mapped south of Grubbers Market Eastern Junction.
Index map with Alley mapped northwest of Grubbers Market Northwest Junction.
Index map with Outer Market Roof mapped north of Alley.
Index map with Grubbers Market Teishas Tent mapped north of Grubbers Market Outside Silk Stall.
Index map with Grubbers Market Center Post mapped east of Grubbers Market Grocery Stall.
Index map with Grubbers Market Top of Center Post mapped north of Grubbers Market Center Post.
Index map with Jail-Cell-2 mapped south of Grubbers Market Weapons Stall.
Index map with Jailhouse mapped south of Jail-Cell-2.
Index map with Drain Room mapped southwest of Jailhouse.
Index map with Way-Out mapped east of Jailhouse.
Index map with Sewer mapped south of Drain Room.
Index map with Access Tunnel mapped east of Sewer.
Index map with Butchers Shop mapped east of Bakers Shop.
Index map with Armory Shop mapped east of Butchers Shop.
Index map with Commerce Street mapped south of Butchers Shop.
Index map with Thin Alley mapped north of Butchers Shop.
Index map with Main Rooftop mapped north of Thin Alley.
Index map with Rooftop Edge mapped east of Main Rooftop.
Index map with Roof of Black Gate Estate mapped east of Rooftop Edge.
Index map with Rooftop Garden mapped northeast of Roof of Black Gate Estate.
Index map with Patio mapped southeast of Roof of Black Gate Estate.
Index map with Third Floor Landing mapped east of Rooftop Garden.
Index map with Music Room mapped south of Third Floor Landing.
Index map with Audience Area mapped south of Music Room.
[Index map with Third Floor Balcony mapped south of Audience Area.]
Index map with Second Floor Landing mapped east of Third Floor Landing.
Index map with Living Room mapped south of Second Floor Landing.
Index map with Master Bedroom mapped south of Living Room.
Index map with Library mapped south of Master Bedroom.
Index map with East Commerce Street mapped southeast of Library.
Index map with Foyer mapped north of East Commerce Street.
Index map with Great Hall mapped north of Foyer.
Index map with Office mapped east of Great Hall.
Index map with Red Gate Cellar mapped south of Office.
Index map with Red Gate Estate Second Floor Landing mapped north of Office.
Index map with Bathroom mapped east of Office.
Index map with Red Gate Master Bedroom mapped north of Bathroom.
Index map with Red Gate Estate Third Floor Landing mapped north of Red Gate Master Bedroom.
Index map with Lords Market mapped east of East Commerce Street.
Index map with Jewelers Shop mapped east of Lords Market.
Index map with Clothiers Shop mapped northeast of Lords Market.
Index map with Clothiers Shop mapped north of Jewelers Shop.
Index map with Moneylenders Shop mapped southeast of Lords Market.
Index map with Market Square mapped north of Grubbers Market Northwest Junction.
Index map with Lords Road mapped northeast of Outer Market Roof.
Index map with Southern Gate mapped north of Lords Road.
Index map with Clearing mapped west of Woods.
Index map with Underneath the Fountain mapped north of Clearing.
Index map with Secret Passage mapped north of Underneath the Fountain.
Index map with Chapel mapped north of Secret Passage.
Index map with Lower Bailey mapped west of Secret Passage.
Index map with Entrance Hall mapped north of Lower Bailey.
Index map with Ballroom mapped north of Entrance Hall.
Index map with War Room mapped west of Entrance hall.
Index map with Upper Bailey mapped north of Chapel.
Index map with Guardhouse mapped north of Upper Bailey.
Index map with Back Alley mapped south of Lords Market.
Index map with Entrance to Maiden House mapped southwest of Back Alley.
Index map with Dormitory mapped west of Entrance to Maiden House.
Index map with Kitchen mapped northeast of Hallway.
Index map with Hallway mapped south of Entrance to Maiden House.
Index map with Laundry mapped southeast of Hallway.
Index map with Secret Closet mapped east of Hallway.
Index map with Secret Closet mapped north of Laundry.
Index map with Privy mapped southwest of Hallway.
Index map with Behind Maiden House mapped west of Privy.
Index map with Behind Maiden House mapped southwest of Entrance To Maiden House.
[Can't seem to get the map to draw Maiden House correctly, no matter how I arrange it. Oh well.]
Part 4 - Properties of Objects
Chapter 1 - Proximity
Definition: a thing is nearby:
if it is in the location then decide yes;
decide no.
Chapter 2 - Landings
A Landing is a kind of room.
Understand "main", "hall", "hallway" as a Landing.
Understand "main", "hall", "hallway", "stairs", "steps", "step", "stairway", "staircase" as a Landing when the location is not the item described.
Part 5 - Loitering and waiting around
[ This tracks the number of turns a player has remained in the same location ]
The last room is a room which varies.
The waiting count is a number variable.
The waiting around rule is listed first in the every turn rules.
Every turn (this is the waiting around rule):
if the location is the same location as last time begin;
stay put;
otherwise;
change the waiting count to zero;
end if;
The last every turn rule:
change the last room to the location;
Definition: a room is the same location as last time if it is the last room.
Definition: a person is on the move if the location is not the same location as last time.
To stay put:
increment the waiting count by 1;
Part 6 - Conversation
Chapter 1 - Communicating and other-than-communicating
Telling someone about something is communicating. Asking someone about something is communicating. Asking someone for something is communicating. Answering someone that something is communicating. Talking to someone is communicating.
[ The following big definition exists only because we can't do "Instead of doing something other than communicating," and it really seems to be the easiest way to achieve the same effect: see Example 174, "Under Contract", in section 12.11 of the manual.]
Taking is other-than-communicating. Removing something from is other-than-communicating. Dropping is other-than-communicating. Putting something on is other-than-communicating. Inserting something into is other-than-communicating. Eating is other-than-communicating. Going is other-than-communicating. Entering is other-than-communicating. Exiting is other-than-communicating. Getting off is other-than-communicating. Looking under is other-than-communicating. Searching is other-than-communicating. Locking something with is other-than-communicating. Unlocking something with is other-than-communicating. Switching on is other-than-communicating. Switching off is other-than-communicating. Opening is other-than-communicating. Closing is other-than-communicating. Wearing is other-than-communicating. Taking off is other-than-communicating. Touching is other-than-communicating. Waving is other-than-communicating. Pulling is other-than-communicating. Pushing is other-than-communicating. Turning is other-than-communicating. Pushing something to is other-than-communicating. Burning is other-than-communicating. Tasting is other-than-communicating. Cutting is other-than-communicating. Jumping is other-than-communicating. Tying something to is other-than-communicating. Swinging is other-than-communicating. Rubbing is other-than-communicating. Buying is other-than-communicating. Climbing is other-than-communicating.
Chapter 2 - Listening while having a conversation
[This allows you to e.g. "LISTEN TO BOBBY" as a way to reiterate the conversation menu.]
Instead of listening to a person while the noun is the current conversationalist:
display the menu;
Chapter 3 - Error Message for Ask/Tell
[Since all dialogue is handled by TALK TO PERSON and then choosing menu options, we need to head off attempts to ASK/TELL PERSON ABOUT and other standard communication actions, so that the player doesn't get lame error messages.]
Understand the command "answer", "say", "shout", "speak" as something new. Understand the command "tell" as something new. Understand the command "ask" as something new.
Understand "answer [text]" as a mistake ("[just talk].").
Understand "answer [text] to/at [someone]" as a mistake ("[just talk]."). Understand the commands "say", "shout", "speak" as something new.
Understand "ask [someone] about/for [text]" as a mistake ("[just talk].").
Understand "tell [someone] about [text]" as a mistake ("[just talk].").
First before asking someone to try doing something:
instead say "[just talk].";
First before answering someone that:
instead say "[just talk].";
To say just talk:
say "To talk to a person, simply type TALK TO (whomever)".
Chapter 4 - No unnecessary interruptions
[Although other things might well be going on in the Market whilst we're talking to people, it's likely that they unnecessarily distract one from the content of the conversation. However, Jack would still have an eye out to catch important events: such as the arrival of mercenaries.]
Before choosing a dramatic possibility when the current conversationalist is not the player:
ratchet the current tension to interesting;
Before choosing a dramatic possibility when we are talking to someone:
ratchet the current tension to important;
Before choosing a dramatic possibility when we are selecting menu option:
ratchet the current tension to important;
[Although it may seems that only the first of these is necessary - and in fact it is by far the most important - still the second and third rules serve an important purpose as well. They each cover cases in which conversation can be ongoing during the player's turn, but be finished by the end of it. In neither of these cases is unnecessary interruption desirable.]
Part 9 - Spooling through dialogue
[ A generalisation of scripted dialogue. ]
To spool through dialogue in (t - a table-name):
repeat through t begin;
say "[text entry][no line break]";
blank out the whole row;
rule succeeds;
end repeat.
Part 10 - Looking through
[Look through usually generates the "search" action, as in "look through pile of books." But mostly in this game we want to "look through the arrow slit" or "look through the viewing window"... ]
Looking through is an action applying to one visible thing.
Understand "look through [door]" as looking through.
Understand "look through [container]" as looking through.
[ ...And anything else is "search" as normal. ]
Carry out looking through:
try examining the noun instead.
Part 12 - One shot texts
[Adapted from the manual. Say [first time]some text[subsequently]some other, optional text[only]. ]
To say first time -- beginning say_first_time:
(- {-allocate-storage:say_first_time}if (I7_ST_say_first_time-->{-counter:say_first_time} == false) {-open-brace} I7_ST_say_first_time-->{-advance-counter:say_first_time} = true; -).
To say subsequently -- continuing say_first_time:
(- {-close-brace} else {-open-brace} -).
To say only -- ending say_first_time:
(- {-close-brace} -).
Part 13 - HTMLesque Informese
[105 "[italic type]...[roman type]"s later, I finally cracked.
Even these are not perfectly straightforward to use. If printing a dot immediately before a text substitution, Inform sees fit to add a line break. So there are quite a few "...[no line break][i]some text[r]" constructions. ]
To say i:
say italic type;
To say r:
say roman type;
To say b:
say bold type;
Part 14 - The time of day
[It's becoming apparent that scenes are awkward to work with beyond the most simple applications. Keeping track of whether it's day or night according to which scenes are currently running is doomed to fail. Switching a flag when certain scenes start and end, on the other hand, is dead simple... ]
Hour is a kind of value. The hours are daylight and nighttime.
The circadia is an hour that varies. The circadia is daylight.
To decide if it is day:
if the circadia is daylight, yes;
otherwise no.
To decide if it is night:
if it is day, no;
otherwise yes.
Part 15 - Better senses of hearing and smell
['Better' only in the sense that they succeed by default: something I've always felt should be the case.]
Chapter 1 - Smell
The block smelling rule is not listed in any rulebook.
Report smelling: say "You smell nothing unexpected.";
Chapter 2 - Hearing
The block listening rule is not listed in any rulebook.
Report listening to the location:
say "You keep your ears pricked." instead;
Report listening [to something]: say "You hear nothing unexpected.";
Part 16 - Attacking
Understand "attack" as attacking.
Definition: a thing is hostile mercenaries:
if it is the chasing mercenaries, yes;
if it is the group of mercenaries, yes;
if it is the several mercenaries, yes;
if it is the mercenary captain, yes;
if it is the mercenary mob, yes;
if it is the wandering mercenaries, yes;
if it is the Lords Guards checking invites, yes;
if it is the patrolling Lords Guards, yes;
no;
Rule for supplying a missing noun when attacking or kicking:
if the player can see Baron Fossville:
change the noun to Baron Fossville;
otherwise if the player can see a hostile mercenaries:
change the noun to a random nearby hostile mercenaries person;
otherwise if the player can see another person:
change the noun to a random nearby other person;
Chapter 1 - Kicking
Kicking is an action applying to one thing.
Understand "kick [something]" as kicking.
Understand "kick" as kicking.
Check kicking the actor when the actor is the player (this is the kicking yourself rule):
say "Not so hard really, was it?" instead;
Carry out kicking something:
try attacking the noun;
Chapter 2 - Biting
Understand the command "bite" as something new.
Understand "bite [person]" as attacking.
Understand "bite [something preferably held]" as eating.
Chapter 3 - Attacking it with
Attacking it with is an action applying to two things.
Understand "attack [something] with [something preferably held]" as attacking it with.
Understand "stab [something] with [something preferably held]" as attacking it with.
Understand "knife [something] with [something preferably held]" as attacking it with.
Understand "stab [something]" as attacking it with when the player has a sensible weapon.
Understand "knife [something]" as attacking it with when the player has a sensible weapon.
Rule for supplying a missing second noun when attacking someone with:
if the player has a sensible weapon:
change the second noun to a random sensible weapon had by the player;
Check attacking something with something (called the proposed weapon):
unless the proposed weapon is a sensible weapon:
say "[The proposed weapon] [is or are for the proposed weapon] not a suitable weapon!" instead;
Check attacking something with:
try attacking the noun instead;
Definition: a thing is a sensible weapon:
if it is the plain dagger, yes;
if it is the knife, yes;
no;
Part 19 - Raising and lowering
[These are mainly here to deal with technicalities involving hoods, as on cloaks.]
Raising is an action applying to one thing.
Lowering is an action applying to one thing.
Understand "raise up [something]" as raising.
Understand "raise [something]" as raising.
Understand "raise [something] up" as raising.
Understand "put up [something]" as raising.
Understand "put [something] up" as raising.
Understand the command "lift" as "raise".
Understand "lower [something]" as lowering.
Check raising:
say "That would not accomplish very much." instead;
Check lowering:
say "That would not accomplish very much." instead;
Part 20 - Picking locks
Lockpicking is an action applying to one thing.
Understand "pick [something]" as lockpicking.
Understand "pick [something] with [something]" as unlocking it with.
Check lockpicking (this is the block lockpicking without the lockpick rule):
if the player does not hold the piece of wire:
if the piece of wire is visible:
say "(first taking the lockpick)";
try silently taking the piece of wire;
if the player does not hold the piece of wire, stop;
[ if the player is caught, stop; ]
otherwise:
say "You would need a lockpick for that." instead;
Check lockpicking up:
try taking nothing instead;
Carry out lockpicking:
try unlocking the noun with the piece of wire instead;
Part 21 - Sewer puzzle symbols
[ Get these defined early so as to avoid namespace clashes - with the Market *Square*, for example. ]
Sewer-symbol is a kind of value. The sewer-symbols are square, diamond, circle, triangle, crescent, star, cross, and arrow.
Symbol color is a kind of value. The symbol colors are red, blue, green, and yellow.
Part 23 - Boilerplate 'repeat' phrase
To say repeat phrase:
say "'[one of]I already told you[or]I told you already[or]Like I said[or]As I said[or]I told you[at random],' says [the current conversationalist],"
To say rp:
say repeat phrase;
Part 24 - Quip clustering
Clustering relates quips to each other in groups. The verb to be clustered with implies the clustering relation.
Part 25 - Holding out, teasing and taunting
Understand the command "hold" as something new.
Understand "hold [things]" as taking.
Understand "hold out [something preferably held]" as waving.
Understand "hold out [something preferably held] to/for [someone]" as giving it to.
Understand "tease [animal] with [something]" as showing it to (with nouns reversed).
Understand "taunt [animal] with [something]" as showing it to (with nouns reversed).
Part 26 - Extinguishing
Extinguishing is an action applying to one thing.
Understand "extinguish [something]" as extinguishing.
Understand "put out [something]" as extinguishing.
Check extinguishing something:
say "[The noun] is not alight.";
Part 27 - Buying
The block buying rule is not listed in any rulebook.
Report buying:
say "Nothing is on sale.";
Does the player mean buying something when the player has the noun:
it is very unlikely;
[Part 28 - Fancy examining
[ Examining as an activity. Ganked verbatim from Example 296, "Crusoe." ]
The examining activity rule is listed instead of the standard examining rule in the carry out examining rules.
Printing the description of something is an activity.
This is the examining activity rule:
carry out the printing the description activity with the noun;
The examine undescribed containers rule is not listed in any rulebook.
The examine undescribed devices rule is not listed in any rulebook.
The examine undescribed things rule is not listed in any rulebook.
Rule for printing the description of something (called item):
unless the item goes undescribed by source text:
say "[description of item] [run paragraph on]";
otherwise:
abide by the examine undescribed containers rule;
abide by the examine undescribed devices rule;
abide by the examine undescribed things rule;
Last after printing the description of something (called the item):
unless the item goes undescribed by source text:
say paragraph break; ]
Part 29 - Cutting things with tools
A thing can be sharp or blunt. A thing is usually blunt.
Cutting it with is an action with past participle cut, applying to one visible thing and one carried thing.
Understand "cut [something] with [something]" as cutting it with.
Understand "cut through [something]" as cutting.
Understand "cut through [something] with [something]" as cutting it with.
Understand the command "saw" as "cut".
Understand "sever [something]" as cutting.
Understand "sever [something] with [something]" as cutting it with.
Check cutting it with:
if the second noun is blunt,
say "[That or those for the second noun] won't cut through [noun]." instead;
Check cutting it with:
say "Cutting [the noun] up would achieve little." instead;
Part 30 - Running
Understand the command "run" as something new.
Fleeing vaguely is an action applying to nothing.
Understand "run" as fleeing vaguely.
Understand "run away" as fleeing vaguely.
Understand "run [planar direction]" as going.
Understand "flee" as fleeing vaguely.
The fleeing vaguely action has a direction called the chosen-direction.
Rule for setting action variables for fleeing vaguely:
now the chosen-direction is nothing;
let the possibilities be {north, northeast, east, southeast, south, southwest, west, northwest};
sort the possibilities in random order;
add {outside, inside} to the possibilities; [to be considered once all else fails]
repeat with yonder running through the possibilities:
let the proposed destination be the room-or-door yonder from the location;
if the proposed destination is a room or the proposed destination is an open door:
say "(to the [yonder])[command clarification break]";
now the chosen-direction is yonder;
continue the action;
[at this point making no decision, and the action will be terminated.]
Check fleeing vaguely:
if the chosen-direction is nothing,
say "There is nowhere to run from here!" instead;
Carry out fleeing vaguely:
try going the chosen-direction;
Part 31 - Hiding
Hiding is an action applying to nothing.
Hiding behind is an action applying to one thing.
Understand "hide" as hiding.
Understand "hide in/inside/on [something]" as entering.
Understand "hide [other things] in/inside/down/under/into/behind [something]" as inserting it into.
Understand "hide behind/under/beneath/underneath [something]" as hiding behind.
Understand "go behind [something]" as hiding behind.
Understand "get behind/under/beneath/underneath [something]" as hiding behind.
Understand "move behind [something]" as hiding behind.
Report hiding:
say "There's nowhere for you to hide here.";
Report hiding behind something:
say "There's not enough room for you to hide there.";
Part 32 - Catch / trap
Understand "catch [something]" as taking.
Understand "trap [something]" as taking.
Part 33 - Trade
Trading it with is an action applying to one carried thing and one thing.
Trading it for is an action applying to one carried thing and one visible thing.
Understand "trade [something]" as trading it with.
Understand "trade [something] with [someone]" as trading it with.
Understand "trade [something] to [someone]" as trading it with.
[ Understand "trade with [someone]" as trading it with (with nouns reversed). ]
Report trading it with:
say "This isn't the time for haggling." instead;
Understand "trade [something] for [something]" as trading it for.
Understand "buy [something] with [something]" as trading it for (with nouns reversed).
Report trading it for:
say "This isn't the time for haggling." instead;
Part 34 - Limited powers of "Get All"
Rule for deciding whether all includes backdrops: it does not.
Rule for deciding whether all includes scenery: it does not.
Rule for deciding whether all includes people: it does not.
Rule for deciding whether all includes something enclosed by the player when we are taking or we are pseudotaking: it does not.
Rule for deciding whether all includes something enclosed by the satchel when we are taking or we are pseudotaking: it does not.
Rule for deciding whether all includes something that is part of something: it does not.
Part 35 - Limbo for Incorporation Relation
[ As of 5T18, we can't say "now the secret door is part of nothing". So instead we use "now the secret door is part of Limbo", etc. ]
[ The right way to do this is to simply remove the secret door (or whatever) from play. ]
Limbo is a thing.
Part 36 - No Dropping
Chapter 1 - No Dropping
The can't drop clothes being worn rule is not listed in any rulebook.
Last check dropping rule (this is the block dropping rule):
say "You'd better hold onto [that or those for the noun]; you never know when you might need [it or them for the noun]." instead;
Chapter 2 - No Inserting
Last check inserting it into (this is the block inserting it into rule):
if the second noun is not held by the player,
say "You'd better hold onto [that or those for the noun]; you never know when you might need [it or them for the noun]." instead;
Chapter 3 - No Putting On Top Of
Last check putting it on (this is the block putting it on rule):
say "You'd better hold onto [that or those for the noun]; you never know when you might need [it or them for the noun]." instead;
Chapter 4 - No Giving Away
This is the new block giving rule:
say "You'd better hold onto [that or those for the noun]; you never know when you might need [it or them for the noun]." instead;
The new block giving rule is listed instead of the block giving rule in the check giving it to rulebook.
Part 37 - Squeezing and crawling
Understand the command "squeeze" as something new.
Understand the command "crawl" as "go".
Understand "squeeze [direction]" as going.
Understand "squeeze [something]" as squeezing.
Understand "squeeze through [something]" as going.
Part 38 - Examining Everything
Understand "examine everything/all" as a mistake ("You will need to be more specific about what you want to look at.").
Part 39 - Cleaning Up Punctuation
[ Cleaning up apostrophes and hyphens saves lots of work when declaring synonyms. It treats "Grubber's" the same as "Grubbers", for example, which makes the parser more forgiving of typos. It also means if you have a "reddish-green" apple, you can declare the synonyms "red", "reddish", and "green", and "reddish-green" will be automatically taken care of.
However, it does mean that possessive words must always be written WITHOUT an apostrophe when used as an object name in code (such as Grubber's), so that the name can be recognized by the parser. Even though it's always WITH an apostrophe in printed text. This is a small pain but, I think, a reasonable payoff.
GJ: Annoyingly, pieces of text separated by apostrophes aren't glued back together after being removed: so "examine grubber's market" translates to "examine grubber s market", which is bound to fail. The Punctuation Removal extension does this work by rewriting bytes in the input buffer, which is obviously fast, but we can't do it the same way if we want to take out the apostrophe altogether. Hence, a regular expression to do this job.
]
After reading a command:
remove stray punctuation;
[ remove apostrophes; ]
let T be indexed text;
let T be the player's command;
replace the regular expression "\[']" in T with "";
[ this next bit cleans up hyphens, which isn't covered by Emily's extension, although it should be ]
replace the regular expression "\-" in T with " ";
change the text of the player's command to T;
Part 40 - Fixing Response For Examining Objects in Adjacent Rooms
[ Objects in adjacent rooms should not be in scope except in very specific circumstances. However, somewhere along the way we created a bug where objects in other rooms are in scope when the player EXAMINES. However, examining something in another room generates an error message -- "You cannot reach into [that room]," which is just plain awful.
I've not been able to figure out exactly what causes this behavior yet, so until I do, here is a patch.
First we disable the basic accessibility rule, because that triggers the error message before any action-specific hooks are available. That leaves examining something in another room totally "blank," with no response at all, allowing us to fill in our own with an instead rule.]
A procedural rule:
if we are inspecting something then ignore the basic accessibility rule.
Instead of inspecting something when the noun is not a room and the noun is not in the location:
say "You can't see any such thing."
Part 41 - Multiple Removing (clothes)
[This doesn't really add multiple object grammar to the taking off action. When the player types something like REMOVE HAT AND CLOAK, the game will ask "what do you want to remove those things from?" Of course the obvious answer is MYSELF. This rule ensures that the game will interpret this as taking off the clothes. Tricky, if I may say so.]
Instead of removing something from yourself, try taking off the noun.
Part 42 - Get Down
Understand "get [down]" as going.
Part 43 - Can't Insert Something When It's Already In There Rule
[A check rule for inserting to generate more intuitive responses.]
Check an actor inserting something into (this is the can't insert something when it's already in there rule):
if the noun is inside the second noun:
say "[The noun] is already inside [the second noun]!" instead;
The can't insert something when it's already in there rule is listed before the can't insert what's not held rule in the check inserting it into rulebook.
Part 44 - Following
[This is implemented so the player can follow Bobby around during Bobby's adventure.]
Following is an action applying to one visible thing.
Understand "follow" as following. [Otherwise we get nonsensical defaults, usually "the group of mercenaries" or somesuch]
Understand "follow [any leading person]" as following.
Rule for supplying a missing noun while following:
say "No-one is leading the way.";
Rule for supplying a missing noun while following during Bobby's Adventure:
change the noun to Bobby;
Check following (this is the can't follow someone who's not here rule):
if the noun is not in the location, say "You don't see [the noun] here." instead.
Check following (this is the can't follow someone who's not going anywhere rule):
say "[The noun] isn't going anywhere." instead.
Definition: a person is leading:
if it is a leader, yes;
no;
To decide whether (p - a person) is a leader:
consider the leading rules for p;
if the rule succeeded, yes;
no;
The leading rules are an object-based rulebook.
A leading rule for someone (called x):
if the player can see x,
rule succeeds; [But 'x' isn't going anywhere.]
Part 45 - Praying
Praying is an action applying to one topic.
Understand "pray [text]" as praying.
Understand "pray" as praying.
Carry out praying:
say "You mutter a quick prayer under your breath. As usual, there is no reply."
Part 47 - Drinking, Tasting
The new block tasting rule is listed instead of the block tasting rule in the Check Tasting rulebook.
This is the new block tasting rule:
say "You shouldn't go around putting your tongue on strange objects." instead;
The new block drinking rule is listed instead of the block drinking rule in the Check Drinking rulebook.
This is the new block drinking rule:
say "You can't drink that!" instead;
Part 48 - Shaking
Shaking is an action with past participle shaken, applying to one thing.
Understand "shake [something]" as shaking.
Check shaking a person:
say "That would be less than courteous." instead;
Check shaking something fixed in place: