Repository navigation
Expand file tree
/
Copy pathrogomatic.6.in
More file actions
2319 lines (2319 loc) · 44.2 KB
/
Copy pathrogomatic.6.in
File metadata and controls
2319 lines (2319 loc) · 44.2 KB
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
.TH ROGOMATIC 6 "2026 Aug 10"
.UC 4
.SH NAME
rogomatic, run_rogo, rerun_rogo, mrerun_rogo, mstop_rogo, end_player, unstuck_player \- Automatically Exploring The Dungeons of Doom
.SH SYNOPSIS
.I rogomatic
.in +0.5i
[
.B \-h
]
[
.B \-V
]
.br
[
.BI \-a\ secs
]
[
.B \-c
]
[
.B \-d
]
[
.BI \-D\ rgmdir
]
[
.B \-e
]
[
.B \-E
]
[
.BI \-f\ rogue
]
[
.BI \-G\ goodlvl
]
.br
[
.B \-H
]
[
.B \-p
]
[
.BI \-P\ player
]
[
.B \-q
]
[
.B \-r
]
[
.BI \-S\ ROGOSEED
]
[
.B \-t
]
[
.B \-u
]
[
.BI \-U\ usec
]
[
.B \-w
]
.br
[
.B \-s
[
.I rogue_ver
]
|
.I r_file
]
.in -0.5i
.PP
.I run_rogo
.in +0.5i
[
.B \-h
]
[
.B \-V
]
[
.BI \-v\ level
]
[
.B \-n
]
[
.B \-N
]
.br
[
.BI \-a\ secs
]
[
.BI \-C\ coredir
]
[
.B \-d
]
[
.BI \-D\ rgmdir
]
[
.B \-e
]
[
.BI \-f\ rogue
]
[
.BI \-G\ goodlvl
]
[
.B \-H
]
.br
[
.BI \-P\ player
]
[
.BI \-r\ rogomatic
]
[
.BI \-S\ ROGOSEED
]
[
.BI \-U\ usec
]
[
.B \-Z
]
.in -0.5i
.PP
.I rerun_rogo
.in +0.5i
[
.B \-h
]
[
.B \-V
]
[
.BI \-v\ level
]
[
.B \-n
]
[
.B \-N
]
.br
[
.BI \-i\ idlesec
]
[
.BI \-R\ run_rogo
]
[
.BI \-s\ stopfile
]
.br
[
.BI \-a\ secs
]
[
.BI \-C\ coredir
]
[
.B \-d
]
[
.BI \-D\ rgmdir
]
[
.B \-e
]
[
.BI \-f\ rogue
]
[
.BI \-G\ goodlvl
]
[
.B \-H
]
.br
[
.BI \-P\ player
]
[
.BI \-r\ rogomatic
]
[
.BI \-S\ ROGOSEED
]
[
.BI \-U\ usec
]
[
.B \-Z
]
.in -0.5i
.PP
.I end_player
.in +0.5i
[
.B \-h
]
[
.B \-V
]
[
.BI \-v\ level
]
[
.B \-n
]
[
.B \-N
]
.br
[
.BI \-u\ user
]
.PP
.I mrerun_rogo
.in +0.5i
[
.B \-h
]
[
.B \-V
]
[
.BI \-v\ level
]
[
.B \-n
]
[
.B \-N
]
.br
[
.BI \-i\ idlesec
]
[
.BI \-o\ unstuck_player
]
[
.BI \-O\ rerun_rogo
]
[
.BI \-R\ run_rogo
]
[
.BI \-s\ stopfile
]
.br
[
.BI \-a\ secs
]
[
.BI \-C\ coredir
]
[
.B \-d
]
[
.BI \-D\ base_rgmdir
]
[
.B \-e
]
[
.BI \-f\ rogue
]
[
.BI \-G\ goodlvl
]
[
.B \-H
]
.br
[
.BI \-P\ player
]
[
.BI \-r\ rogomatic
]
[
.BI \-S\ ROGOSEED
]
[
.BI \-U\ usec
]
[
.B \-Z
]
.I ID
.PP
.I mstop_rogo
.in +0.5i
[
.B \-h
]
[
.B \-V
]
[
.BI \-v\ level
]
[
.B \-n
]
[
.B \-N
]
.br
[
.BI \-D\ base_rgmdir
]
[ \fIID ..\fP ]
.in -0.5i
.PP
.I end_player
.in +0.5i
[
.B \-h
]
[
.B \-V
]
[
.BI \-v\ level
]
[
.B \-n
]
[
.B \-N
]
.br
[
.BI \-u\ user
]
.PP
.I unstuck_player
.in +0.5i
[
.B \-h
]
[
.B \-V
]
[
.BI \-v\ level
]
[
.B \-n
]
[
.B \-N
]
.br
[
.BI \-D\ rgmdir
]
[
.BI \-m\ missing_sec
]
[
.BI \-r\ recheck_sec
]
.br
[
.BI \-R\ restart_sec
]
[
.BI \-u\ user
]
[
.BI \-z\ loop_sec
]
[
.I unstuck.log
]
.in -0.5i
.SH DESCRIPTION
.PP
.I Rog-O-Matic
(hereafter referred to as
.BR rogomatic )
is a computer fantasy game with a newer twist.
It is CRT (Cathode Rat Tube) oriented and the
object of the game is to automatically survive the attacks of various
monsters and get a lot of gold, rather than having to actually type the
required commands yourself.
.PP
The
.B rogomatic
plays the game of
.BR rogue (6)
on your behalf while you watch.
.PP
Once you have entered the world of
.B rogomatic
you will stay there, passively watching the game unfold before you much
like a catatonic teenager watching television.
Should you wish to intervene, type the
.B t
command and
.B rogomatic
will enter transparent mode.
See the
.B COMMANDS
section below for details on commands, and on transparent mode.
.PP
When
.B rogomatic
launches
.BR rogue (6)
via the
.B player
program, it sets the
.B ROGUEOPTS
environment variable to a value such that the
rogue name used will start with
.BR rogo\- .
The rogue score path to
.BR @RGMDIR@/rogue.scr ,
which is
.B NOT
the default rogue score file.
Thus by default,
.B rogomatic
game stats will not compete with the humans who are playing
.BR rogue (6)
in the default way.
.SH OPTIONS
.TP
.B \-h
Print the usage message,
and exit with a status of
.BR 2 .
.TP
.B \-V
Print the
.B rogomatic
version string
and exit with a status of
.BR 2 .
.TP
.BI \-a \ secs
Set the timeout timer to
.B secs
seconds,
and set the
.I ROGOTIMER
environment variable to
.BR secs .
.sp
The
.B secs
must be a value >= 0,
and it may an integer, or
a real value (i.e., 4.5).
By default,
.B secs
is set to
.BR 0.0 ,
which has the effect of not setting a timeout timer.
.sp
For example, using
.BI \-a \ 4.5
on the command line will cause the program attempt to resume normal
operation after a hang while reading a message from
.BR rogue (6).
.sp
Before
.BR rogomatic (6)
attempts to read from
.BR rogue (6),
a timeout alarm will be set.
If the read hangs for more than \fIsecs\fP seconds, a
.B SIGARLM
signal will be delivered to the player program.
The
.B SIGARLM
is then caught and a
.BR siglongjmp (3)
performed a non-local jump to a control point where player program
is much more likely to resume normal operation.
Nevertheless, there are circumstances where non-local jump still hangs.
.sp
See the section on \fBBUGS\fP below for more information on hanging.
.TP
.B \-c
Turn on "\fIcreative mode\fP".
.sp
In "\fIcreative mode\fP", a number of strategies are employed,
many of which are used by wide variety of human players,
such as using trap arrows.
.sp
Unfortunately a number of these "\fIcreative mode\fP strategies mostly
work on very old version of
.BR rogue (6)
that are no longer supported.
.sp
Historically, this mode was called "cheat mode" even though
the same strategies were used by wide variety of human players.
.sp
When using with
.BR rogue (6)
with \fBrogue version 5.4.5\fP or later,
the "\fIcreative mode\fP" is enabled by default.
.sp
See also the
.B c
command in the in transparent mode in the
.B COMMANDS
section below.
.TP
.B \-d
Use a UTC date and time sub-directory under rogomatic directory path
to store files.
.sp
By default,
.B rogomatic
creates the rogomatic directory:
.sp
.in +0.5i
.IR @RGMDIR@
.in -0.5i
.sp
With the
.B \-d
option,
.B rogomatic
creates a new rogomatic sub-directory, using a UTC date and time, of the form:
.sp
.in +0.5i
.BI @RGMDIR@ /YYYYMMDD_HHMMSS
.in -0.5i
.sp
where
.I YYYYMMDD_HHMMSS
is the year, month, day, hour, minute and second, in the UTC timezone,
of when player program started.
.sp
Because
.B \-d
creates a new rogomatic sub-directory, the environment starts out in an initial state.
This will make is easier to use a debugger such as
.BR lldb (1),
especially when combined with
.BI \-S\ ROGOSEED
making the action much more deterministic from a debugging standpoint.
See the
.B DEBUGGING
section near the bottom of this man page for more details.
.TP
.BI \-D \ rgmdir
Change the rogomatic directory path to
.IR rgmdir .
.sp
The use of
.B \-d
command line option combined with
.BI \-D \ rgmdir
will case
.B rogomatic
to create and use files under:
.sp
.in +0.5i
.IR rgmdir /YYYYMMDD_HHMMSS
.in -0.5i
.TP
.B \-e
Turn
.B OFF
rogomatic game logging.
.sp
By default, rogomatic game logging is enabled, and the
.I gamelog
file is written to:
.sp
.in +0.5i
.BI @RGMDIR@ /gamelog
.in -0.5i
.sp
.BR NOTE :
Prior to version 14.2.6, this command line option turned on rogomatic game logging.
Now that rogomatic game logging is enabled by default, and the
.B \-e
disables rogomatic game logging.
.sp
See also the
.B e
command in transparent mode.
.TP
.B \-E
Start up in emacs mode.
.TP
.BI \-f \ rogue
Set the path of
.BR rogue ,
overriding the default.
.sp
By default,
.B rogomatic
first looks for:
.sp
.in +0.5i
.B ./rogue
.in -0.5i
.sp
in the current directory, then it looks for:
.sp
.in +0.5i
.B ../rogue5.4/rogue
.in -0.5i
.sp
before looking for
.B rogue (6)
in the default installation location of:
.BR @BINDIR@/rogue .
.sp
.BR IMPORTANT\ NOTE :
The \fB$PATH\fP
environment variable is
.B NOT
used to find
.B rogue (6).
Therefore, the
.I rogue
argument needs to be a path.
.sp
The
.BR rogomatic (6)
command might be able to play with versions 3.6, 5.2, 5.3, 5.4, 5.4.4, and 5.4.5.
.sp
You can run
.B rogomatic
on modified rogues using this option,
but be warned that the interface must be completely compatible with
one of the standard versions of
.B rogue
listed, and the version number
printed must be either "3.6," "5.2," "5.3", "5.4", or "5.4.5".
.sp
.BR IMPORTANT\ NOTE :
Only \fBrogue version 5.4.5\fP
as found in the GitHub repo:
.sp
.in +0.5i
.I https://github.com/lcn2/rogue5.4
.in -0.5i
.sp
has been tested with this version of
.BR rogomatic (6).
While other versions of rogue may work, only \fBrogue version 5.4.5\fP
with a minimum date of
.B 2026-08-03
is supported.
.TP
.BI \-G\ goodlvl
Set the "\fBgood game\fP" level to
.IR goodlvl .
.sp
A "\fBgood game\fP" is when the rogue reaches a dungeon level of at least
.IR goodlvl .
When a rogue has the \fIAmulet of Yendor\fP
at the end of the game, then the game is also considered a "\fBgood game\fP".
.sp
By default,
.I goodlvl
level is
.BR @GOODGAME@ .
.sp
When a "\fBgood game\fP" exits, the rogomatic game log file:
.sp
.in +0.5i
.BI @RGMDIR@ /gamelog
.in -0.5i
.sp
is preserved by renaming it to a file of the form:
.sp
.in +0.5i
.BI @RGMDIR@ /goodgame.YYYYMMDD.HHMMSS.max_level.score.mnst
.in -0.5i
.sp
See the
.B FILES
section below for details on the goodname file form.
.TP
.B \-H
Disable the so-called rogomatic "\fIhalftime show\fP".
.sp
When
.B rogomatic
detects that
.B rogue
has reached level 2, it plays a short character based "movie" on the screen.
.sp
The use of
.B \-t
or
.B \-E
implies
.BR \-H .
.sp
Historically, this option was
.BR \-h ,
however recently that option became the "help option",
and so it was named as
.BR \-H .
.TP
.B \-p
Replay the rogomatic game log file.
.sp
The default rogomatic game log file is:
.sp
.in +0.5i
.BI @RGMDIR@ /gamelog
.in -0.5i
.sp
When combined with a final
.I r_file
command line argument,
the replay file will be
.IR r_file .
.TP
.BI \-P\ player
Set the path to the player program.
.TP
.B \-q
Set \fBquiet mode\fP, and disable
.BR ncurses (3X)
output.
.sp
By default, output from
.RB rogue (6),
along with additional messages from the
.B player
process are written to standard output so
that a human may watch the game as it is played.
The use of
.B \-q
will silence nearly all output, allowing in theory,
the game to be played faster.
.sp
When quite mode, all file logging continues as normal.
One may wish to tail a log file such as
.BR total.lvllog ,
or even the more verbose
.BR gamelog
to track progress.
Such files are under the rogomatic directory.
When using the
.BR tail (1)
utility, one would use both the \fB\-f\fP, and the \fB\-F\fP command line options:
.sp
.in +0.5i
\fBtail \-f \-F \fP\fIRGMDIR\fP\fB/total.lvllog\fP
.in -0.5i
.sp
where \fIRGMDIR\fP is the rogomatic directory
(such as \fB@RGMDIR@\fP or \fB/var/tmp/rogo\fP or \fB/var/tmp/mrogo/rogo.\fP\fInumber\fP).
.sp
The use of
.B \-q
overrides and disables any use of user mode (disables \fB\-u\fP),
and use of watched mode (disables \fB\-w\fP).
.sp
See the
.B FILES
section for more details on log files.
.TP
.B \-r
Restore a saved rogue game.
.sp
Without a final
.I r_file
command line option, run
.B rogue
with the
.BR \-r \ @RGMDIR@/rogue.sav
command line option and restore
the rogue game stored in that file.
.sp
If a final
.I r_file
command line argument is given, run
.BR rogue (6)
will be run with
.BI \-r \ r_file
so that rogue game will be restored from
.IR r_file .
.TP
.BI \-S\ ROGOSEED
Seed the pseudo-random number generator to \fIROGOSEED\fP
for both
.BR rogue (6)
and rogomatic.
.sp
When combined with
.B \-d
this creates much more deterministic run from a debugging standpoint.
.TP
.B \-t
Terse mode.
In terse mode,
.B rogomatic
will only print a summary after each level explored.
.TP
.B \-u
Start up in user mode.
This tells
.B rogomatic
to start up in transparent mode, so the user can type commands before
.B rogomatic
starts exploring level 1.
.sp
The use of \fB\-q\fP disables user mode, and overrides this flag.
.TP
.BI \-U\ usec
Set the sleep time between actions to
.I usec
microseconds.
.sp
Between writes to
.BR rogue (6)
the player program will sleep
.I usec
microseconds.
This has the effect of slowing down the actions on the screen to be somewhat viewable by humans.
.sp
To have no such delays, use \fB\-H \-U 0\fP on the command line.
.sp
By default,
.I usec
is set to
.B @USLEEP@
microseconds.
.TP
.B \-w
Start up in watched mode.
.sp
The use of \fB\-q\fP disables watch mode, and overrides this flag.
.TP
.B \-s\ [\ \fIrogue_ver\fP\ ]
Print the \fBrogomatic scoreboard\fP, reverse sorted by the ending gold amount,
of the rogomatic game results.
.sp
The \fBrogomatic scoreboard\fP is printed with the following fields:
.sp
.RS
.RS
.nr step 0 1
.nr PI 3n
.IP \n+[step].\ Year 0.5i
End of game 4-digit year (YYYY), in the local timezone
.IP \n+[step].\ Month 0.5i
End of game 3-letter month (Mon), in the local timezone
.IP \n+[step].\ Day 0.5i
End of game 2-digit day (01-31), in the local timezone
.IP \n+[step].\ Time 0.5i
End of game time of day (24-hour HH:MM:SS format, in the local timezone
.IP \n+[step].\ User 0.5i
rogue username that will start with \fRrogo-\fP.
.IP \n+[step].\ Gold 0.5i
End of game gold that will include the 10% penalty when killed,
or payment for inventory items if a total winner
.IP \n+[step].\ Killed\ by 0.5i
Cause of death, or "\fRtotal winner\fP
.IP \n+[step].\ Level 0.5i
The deepest dungeon level reached
.IP \n+[step].\ Hp 0.5i
End of game points
.IP \n+[step].\ Str 0.5i
End of game strength
.IP \n+[step].\ Ac 0.5i
End of game armor class that was being worn
.IP \n+[step].\ Level/Exp 0.5i
End of game experience level followed by / experience points
.IP \n+[step].\ Game\ number 0.5i
The logged game number, starting with 0
.IP \n+[step].\ Dungeon 0.5i
The rogue dungeon number
.RE
.RE
.sp
.RS
The default
.B rogue_ver
is
.BR 5.4.5 .
.sp
The default rogomatic scoreboard is:
.sp
.in +0.5i
.BI @RGMDIR@/rgmscore 5.4.5
.in -0.5i
.sp
If
.BI \-s\ rogue_ver
is given, then the rogomatic scoreboard printed will be from:
.sp
.in +0.5i
.BI @RGMDIR@/rgmscore rogue_ver
.in -0.5i
.sp
where
.B rogue_ver
is the
.B rogue
version number, such as
.IR 5.4.5 .
.sp
If a rogomatic delta file is found:
.sp
.in +0.5i
.BI @RGMDIR@/rgmdelta rogue_ver
.in -0.5i
.sp
The rogomatic delta is merged into the rogomatic scoreboard,
and then the rogomatic delta file is removed.
.sp
If just the
.BR \-s\ command
line option is used, then the
.BR \-s\ command
line option
.BR MUST\ BE\ THE\ LAST\ OPTION\ ON\ THE\ COMMAND\ LINE ,
and cannot be used in conjunction with a final
.IR r_file .
.RE
.TP
[ \fIr_file\fP ]
When used with
.BR \-p ,
.I r_file
specifies the rogomatic game to replay from.
.sp
When used with
.BR \-r ,
.I r_file
specifies the rogue game to restore from.
.sp
Use of
.I r_file
is \fBNOT\fP compatible with using
.B \-s
by itself.
.SH USEFUL UTILITIES
Several useful utilities are installed under the
.B @BINDIR@
directory,
or may be run from top of the source code directory.
.TP
.B run_rogo
The
.B run_rogo
command is a very useful way to run
.BR rogomatic (6)
and set the rogomatic directory to:
.sp
.in +0.5i
.BI /var/tmp/rogo
.in -0.5i
.sp
instead of the usual default rogomatic directory.
By changing the rogomatic directory to a non-default value,
manual runs of
.BR rogomatic (6)
will not interfere (such a lock file contention).
.sp
In addition, the
.B run_rogo
command will first look in the local directory for commands, and use them if found,
otherwise it search and use commands along the \fB$PATH\fP environment variable path.
.sp
See \fBrun_rogo -h\fP for usage details.
.TP
.B rerun_rogo
The
.B rerun_rogo
command is a very useful to run
.BR rogomatic (6)
multiple times in a row.
Currently, when the rogue dies in the dungeon,
.BR rogomatic (6)