forked from Jason2Brownlee/QuakeBotArchive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathctfbot12.txt
1268 lines (1065 loc) · 58.7 KB
/
ctfbot12.txt
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
Title : CTF Bot
Filename : ctfbot12.zip
Version : 1.2
Date : 3 Feb 97
Author : Drew 'BZ' Davidson
Email : [email protected] (Please see Bug Reporting section
below before emailing me.)
Homepage : http://www.interpath.com/~davidson/ctfbot.htm
Type of Mod
===========
Quake C : yes
Sound : no
MDL : yes (extra skins)
Format of QuakeC
================
unified diff : no
context diff : no
.qc files : yes
progs.dat : yes (in pak1.pak file)
pak0.pak file : no
pak1.pak file : yes (progs.dat, progs/player.mdl)
Description of the Modification
===============================
This is CTF Bot (aka Capture the Flag Bot), a bot that plays ThreeWave
Capture the Flag 3.5. The unmodified ThreeWave CTF is available from:
http://www.planetquake.com/quakex/threewave/
Before You Install the Modification
===================================
You should have a basic knowledge of Quake things like how to edit and
use config files, how to use the Quake console, how to load a specific
map file, what autoexec.cfg files do, etc, before you try to install
and use CTF Bot. It would also be very good if you had experience
with installing and using Quake C patches. If you don't know this
stuff, please go to the CTF Bot web page and check the "Links" section
for web pages with general Quake info.
If you've never played CTF before then you definitely should go to
ThreeWave at http://www.planetquake.com/quakex/threewave/ and read about
it because I assume you know what you are doing with regard to CTF, i.e.
you know how to pick up the flag, what you have to do to capture the flag,
how to use the hook, how to drop backpacks with ammo, what the runes are,
etc.
*IMPORTANT NOTE*: If you don't have the ThreeWave CTF client mod, you
won't be able to play Capture the Flag with the bots, so go download that
now before you install the bots. You can download ThreeWave CTF stuff
from http://www.planetquake.com/quakex/threewave/
It would also be a good idea to download the ThreeWave server mod. The
server mod contains documenation about the different teamplay options that
are also available in CTF Bot. However, the server mod is not required
for play.
[SIDE NOTE: Technically, you don't *absolutely* need the ThreeWave CTF
client or server mod to use CTF Bot. But you won't have any CTF maps to
play on. You could use the non-custom CTF models (i.e. the flags look like
keys) and then create your own CTF map with the dynamic map creation
features of CTF Bot, but that would be very silly and you would miss out
on the fantastic maps, models and graphics that greatly enhance the CTF
experience. Also the bots will be much dumber because they only have
waypoints for maps in the ThreeWave client mod. But just for the record
you can set the teamplay variable in server.cfg so that CTF Bot does not
require the ThreeWave CTF client side mod.]
Quake may crash if it is given the default 8 Megs of memory. You should
probably use the "-winmem 16" parameter to give Quake 16 megs of memory
when using this bot. Also, this bot may play too slow on slower machines.
If it plays too slowly, reduce the number of bots. I would like to hear
if you have a slow machine and can get acceptable game play.
How to Install the Modification
===============================
First please read the "Before You Install the Modification" section
above! The following installation procedure assumes you will be playing
on a single machine that is not networked (i.e that you will be playing
by yourself on the server). If you are playing with a network, you will
have to follow the installation for *all* machines, not just the server.
The pak1.pak file is required (and the ctfbot.cfg file is useful) for all
clients also. See "CTF Bot on Network Servers" below for more
information.
1) Unzip the CTF Bot zip into a *NEW* directory called "ctfbot"
inside your Quake directory. This will install the following:
- ctfbot [DIR /quake/ctfbot/ that you created ]
ctfbot12.txt [ this file ]
whatsnew.txt [ file describing new features in this version ]
impulses.txt [ numerical list of impulse commands ]
ctfbot.cfg [ CTF Bot default key config ]
server.cfg [ CTF Bot server config ]
autoexec.cfg [ execs ctfbot.cfg and server.cfg ]
makebots.cfg [ exec this to make some bots ]
pak1.pak [ brains of the bot & red/blue skins ]
file_id.diz [ archive description ]
src/ [DIR source code ]
ents/ [DIR entities for converting maps to CTF ]
2) Copy the pak0.pak from the ThreeWave CTF client mod into the
ctfbot directory. You can get the ThreeWave CTF client mod from
http://www.planetquake.com/quakex/threewave/
DO *NOT* OVERWRITE YOUR EXISTING pak0.pak OR pak1.pak FILES IN
THE id1 DIRECTORY!
3) OPTIONAL: Install More CTF Maps
If you want to play on more maps that CTF Bot has waypoints for,
create a directory in the ctfbot directory called "maps". Copy the
bsp's (e.g. idctf1.bsp) into your new /ctfbot/maps/ directory.
If you want to play CTF Bot on the id maps that have been converted to
CTF, follow the instructions in "Converting Maps to CTF" below to
convert your id bsp's into CTF bsp's. You will also need to edit the
server.cfg file to change the percentage of custom CTF/id maps when
playing if you want the id maps to show up when the level changes.
See the ThreeWave server mod docs for more info on converting bsp's.
Check the CTF Bot web page for the latest on maps CTF Bot has
waypoints for.
4) Your final CTF Bot directory structure should look like this
(excluding the files/directories not used for play):
- quake [DIR /quake/ ]
quake.exe [ Quake application ]
q95.bat [ Q95 batch file ]
- ctfbot [DIR /quake/ctfbot/ ]
ctfbot.cfg [ CTF Bot default key config ]
server.cfg [ CTF Bot server config ]
autoexec.cfg [ execs ctfbot.cfg and server.cfg ]
makebots.cfg [ F7 execs this file to make some bots ]
pak0.pak [ copied from ThreeWave CTF client mod ]
pak1.pak [ from CTF Bot zip file ]
- maps [DIR /quake/ctfbot/maps/ ]
idctf1.bsp [ if you got idctf1 CTF map ]
koc1.bsp [ if you got koc1 CTF map ]
e?m?.bsp [ if you converted id bsp's to CTF ]
5) Run Quake (or Q95.BAT if you want to play networked games) with
the following command line parameters:
-game ctfbot ==> to use CTF Bot resources (i.e. pak0.pak, pak1.pak)
-listen ==> start a listen (i.e. deathmatch) server
-winmem 16 ==> give Quake 16 megs of ram
-zone 512 ==> give Quake more ram for config files (optional)
6) If you have trouble, consult the "Troubleshooting" section below.
Converting Maps to CTF
======================
This procedure will allow you to convert your id bsp's into CTF
bsp's so you can play CTF on id maps. If you already have converted
your id bsp's to CTF with this procedure, you can just copy those over,
you don't have to convert them again.
1) Unpack the pak0.pak and pak1.pak files from the quake/id1
directory to get the separate bsp's (e1m1.bsp, etc). You can
get a unpaking utility at: http://www.cdrom.com/pub/quake/
2) Copy the *.bsp files you extracted in step (1) to your /ctfbot/ents/
directory. You only need to copy the .bsp files that have
corresponding .ent files.
3) Get a copy of QBSP, make sure that it is in your execution path, then
run dobsp.bat. This will insert the *.ent files into the *.bsp files
(that is, it will insert the CTF entities into the bsp files so that
the flags appear in the maps). It shouldn't take more than a minute
or two to convert all the bsp's.
4) Move the converted bsp's to your /ctfbot/maps/ directory.
5) For more detailed instructions on converting maps to CTF, read
the ThreeWave server mod documentation. The ThreeWave server
mod is available at:
http://www.planetquake.com/quakex/threewave/files.html
Troubleshooting
===============
If the flags are not visible, one of the following two things has
happened: either (1) you are in single player mode, or (2) the file
server.cfg is not being exec'ed when you start Quake. You can solve (1)
by adding the "-listen" param to the Quake command line. You can solve
(2) by making sure that server.cfg is being exec'ed when you start Quake
(e.g. make sure that autoexec.cfg in the ctfbot directory has the line
"exec server.cfg"). The server.cfg file sets various server variables
that are *REQUIRED* to run CTF correctly. Also make sure that you
didn't exec another file that overrode the settings.
If the bots are all one color (i.e. you can't tell the difference between
the teams), somehow the progs/player.mdl in the CTF Bot pak1.pak is not
being used by Quake. If you are running a server on a different machine,
see "CTF Bot on Network Servers" below for how to fix this.
If the bots are *still* all one color, you probably unpaked your pak
files. Quake is probably using the player.mdl from the pak0.pak instead
of the one from the pak1.pak. If you want to unpak any pak files (e.g.
to use a custom progs.dat) then you should unpak the pak0.pak also, so
that there are *no* pak files in the ctfbot directory. Sometimes it's
tricky to know what files Quake is going to use. Having no pak files
makes it much easier to control what Quake does. You should use
everything from the pak0.pak, *EXCEPT* the player.mdl, which should come
from the pak1.pak file (the player.mdl from the pak1.pak has extra skins
required to see the bots as different colors). This is probably the
case for clients also; don't unpak any of the pak files unless you unpak
all of them. (Of course, on the client side there's no reason to unpak
the files because clients don't use progs.dat files at all.) After
you unpack everything, move the pak files to another directory so Quake
won't see them.
If you are playing on a map that you thought CTF Bot had waypoints for,
but the bots are really dumb and you can't see the waypoints when
you turn on bot debug, perhaps you renamed the bsp. CTF Bot knows
what map it is playing on by the name of the bsp file, and if you
rename the bsp file, the waypoints will not work.
If you are playing by modem and are having trouble changing levels,
try using the "changelevel" command instead of the "map" command to
start a new level. It works just like the map command (i.e. in the
console type "changelevel ctf1"). Also remember that both sides need
the pak0.pak and pak1.pak.
If you are getting a message that says something like "progs/star.mdl
not found" then you either forgot to copy the ThreeWave pak0.pak file
into the ctfbot directory, or you copied the wrong pak0.pak file (e.g.
the one from the id1 directory) into the ctfbot directory, or you didn't
include the "-game ctfbot" Quake command line parameter when you ran
Quake. Please follow the installation instructions above.
If you find that IPX or TCP/IP is disabled in the Multiplayer menu,
try using Q95.BAT instead of Quake.exe.
If you are trying to use CTF Bot with QuakeWorld, give up. CTF Bot
currently doesn't work with QuakeWorld. (See "CTF Bot with QuakeWorld"
for more info.)
Customizing Controls and Settings
=================================
The file autoexec.cfg execs ctfbot.cfg and server.cfg. If you have a cfg
file containing your Quake key bindings, you may want to exec it from
the autoexec.cfg file in the ctfbot directory. That is, add the line
"exec blah.cfg" as the first line, where blah.cfg is the name of the
config file containing your custom key bindings. Or, if you want to
override the default ctfbot key bindings, exec your config as the
last line. However, be careful if your config file changes various
teamplay options, or CTF may not work correctly.
The file ctfbot.cfg sets up some key bindings for you, so you can spawn
bots quickly (hit F7). Tweak this file to change the settings, or just
use the impules listed below to spawn bots and start killing.
The file server.cfg sets up the various CTF server variables. You can
tweak this to your liking, for example if you want to start in a
different map by default, or if you want to disable observer mode or
change the teamplay options. See the ThreeWave CTF server docs for more
info on what teamplay options are available. Also see "Server
Administration & Settings" below for useful bot-related server settings.
CTF Bot on Network Servers
==========================
If you are running a CTF Bot server on a different machine than you
are playing on (i.e. if you're not playing on the server), you need to
have the CTF Bot pak1.pak on all of the *CLIENT* machines also. The CTF
Bot pak1.pak contains extra skins for the bots, and if it is not on a
client's machine, that client will see all of the bots as the same color.
(Also make sure all of the clients are using the "-game ctfbot" parameter
so that Quake will actually see the pak1.pak.) Of course, the clients
also need the ThreeWave client side mod (unless you have tweaked
the server variables to not require the custom client-side models).
HOWEVER, you can try a fix that may work. If you set teamplay bit
32768, CTF Bot will attempt to use the color maps of clients instead
of using skins. Due to an inherent Quake limitation, client-side
skins are required to have the bots show up as the correct colors
in all situations, but this may work most of the time.
Also keep in mind that you need to run Q95.BAT instead of Quake.exe
to do most network stuff. Consult the Quake documentation for more
info on running networked servers.
If you are playing over a network, you may want to check out the
"Server Administration & Settings" section below, because by default
any player can execute any impulse (i.e. anybody can create a bot).
CTF Bot has been primarily designed for play on a single machine
or on a LAN. It has not been extensively tested on public Internet
servers, and it probably has many shortcomings in that area.
Note that if you want to have your server automatically select only
certain maps (for example only the maps with waypoints) you will need to
edit the source code (the RandomLevel routine) to select only the maps
you want. If you don't do this you will probably select levels
manually with the changelevel command or the admin change-level menu.
Impulse Commands
================
See the file "impulses.txt" for a complete list of impulses
in numerical order.
More default keys set in ctfbot.cfg: F1-F4 sets skill 0-3
Help Impulses
=============
Impulse ## Key Description
----------- --- -----------
impulse 199 = F1 = help
Impulse 199 for help. This lists all impulses & default keys,
including the impulses that are default ThreeWave impulses.
Creating and Removing Bots
==========================
Impulse ## Key Description
----------- --- -----------
impulse 100 = F5 = creates a bot on your team
impulse 101 = F6 = creates a bot on the enemy team
impulse 102 = F7 = exec makebots.cfg (makes several bots)
impulse 105 = = creates a red bot (regardless of your team)
impulse 106 = = creates a blue bot (regardless of your team)
impulse 107 = = remove red bot (regardless of your team) [NEW!]
impulse 108 = = remove blue bot (regardless of your team) [NEW!]
Bot Debug
=========
impulse 103 = F8 = bot debug mode (see what bot is thinking)
impulse 104 = = turn bot debug off
Maps [NEW!]
===========
On some maps, bots use a waypoint scheme to navigate. The bots are much
smarter (and thus much more fun) on waypoint maps than others. The
waypoints are compiled into the bot code. You don't need special
versions of the maps (bsp's) to use with CTF Bot (however, you *DO*
need special versions of some of the bsp's to play CTF of course,
for example the id maps).
Currently the maps with at least some waypoints include:
ctf1 - ctf8
idctf1
koc1
e1m1
e1m2
e1m3
e1m4
e1m5
e2m1
dm1 (new CTF version)
dm3
dm6
maniac1
maniac2
satyr1ac (CTF version of satyr1a)
mexx6c (CTF version of mexx6)
martim5c (CTF version of martim5)
See the section "Acknowledgements & Credits" below for complete
information on who designed the above maps, and/or who converted
them to CTF or added waypoints.
See "Waypoints" section below for technical info on adding waypoints
to a map.
Playing Notes
=============
Even on waypoint maps, the bots have certain limitations. They don't
know they entire layout of maps. So, the moral is: help your bots. If
you see a bot on your team with just a shotgun, then either lead it to a
good weapon, or toss it your weapon. Otherwise, don't be surprised with
your bot gets slaugtered. Use the "report in" order to find out what
weapon your bots are using, and help them out if they can't seem to find
anything good. Luckily on most of the default ctf good weapons are easily
found. On some of the id levels the good weapons are not on the main
path between bases and so the bots are unlikely to find them.
Note that it is very helpful to have bots with you. If you can't get
past a high-skill enemy bot, bring along some buddies. Let them grab
the good weapons or toss them a rocket launcher and ammo and watch them
kick ass while you get all the glory. :-)
Check the CTF Bot web page for links to more maps, including more maps
with complete waypoint support.
On maps that do not contain waypoints, a lot of the time it is easy to
capture their flag. If you go in their base, kill all the bots, and snag
their flag, it may be easy to grab their flag again after that if they
have all respawned away from their base, because they won't be able to
find their way back. As a result, some non-waypoint maps work better than
others with these bots. It can still be fun to play on non-waypoint maps,
because the bots do use teamplay tactics.
Skill Levels
============
The console variable "skill" is used as the skill of the next bot
created. Type "skill #" in the console to change the skill, where # is a
number from 0 to 3. Skill levels don't have to be an integer (i.e. 1.5
or 2.7 are legal). Skill has various effects on play. Lower skill
levels misjudge target's velocity and position when firing, have smaller
field of view, are less likely to make evasive maneuvers, are less
likely to jump effectively, are less likely to see enemies far away, are
less likely to see enemies with Ring of Shadows, plus tons of other
things.
Bots with a skill of 2 or higher use the "visor dude" CTF skin.
Quick Spawning of Bots
======================
Included is a file that spawns a series of bots to demonstrate how you
can make a config file spawn various differently-skilled bots easily.
By default you can hit F7 to spawn 4 differently-skilled enemy bots and
2 bots on your team. Edit makebots.cfg to suit your skill level and
desired number of bots.
For some reason exec'ing this file from the console does not work. You
have to bind it to a key in the console like this: bind F7 "exec
makebots.cfg" and then hit that key.
If you get telefragged when you spawn the bots in this manner, it
is likely that all the bots did not get created, because as soon
as you get telefragged, you are dead and so impulse commands no
longer work. Start a new map and try again.
Bot Orders [NEW!]
=================
Impulse ## Key Description
----------- --- -----------
impulse 80 = f = report status & weapon
impulse 81 = a = order more bots on your team to attack
impulse 82 = d = order more bots on your team to defend
impulse 83 = e = order closest bot to escort you
impulse 84 = c = order closest bot to camp at your location
impulse 85 = x = order closest bot to drop items for you
impulse 86 = z = team status
impulse 87 = s = order more bots on your team to roam
When you give an order, the status of your team is printed so you
can see how many bots are doing what.
Bots will generally follow your orders, but will sometimes go
AWOL and decide what to do on their own.
When you give an order to attack, defend, or roam, you have no
control over what bot will actually start attacking/defending/roaming.
The bot will be taken out of the appropriate "pool" of other bots,
for example, when you order more bots to attack, first they are taken
out of the roaming pool, then if there are no roamers, they are taken
out of the defender pool, then the camping pool, then the escort pool.
If you keep pressing "more bots attack" eventually they will *all*
attack. However, you will be overriding orders given to bots to
camp and escort (orders which were possibly given to the bots by
other humans on your team). So use teamwork with other humans on
your team when giving bots orders.
"Attack" means go toward the enemy base.
"Defend" means go toward your base.
"Escort" means follow you around. Bots will say things like "let's
attack" while they are following you, so you know that you have their
attention. They will sometimes get distracted by items though.
Sometimes the bot wants something but can't get it, but if you grab it
the bot will of course not want it anymore. If you are far above or
below them, but they are still following you, they will try to jump
down or hook their way up, so you can get them to follow you most
places. Sometimes you have to just be patient while the dumb bot
figures out how to get where you are, and sometimes you are just out of
luck. Sometimes it helps to try to get your buddy to try a different
route; e.g. get it to hook its way up somewhere easier and then lead it
to where you want it to be once it gets up there.
Note that you do *NOT* need to request escort when you have the
enemy flag. When you have the enemy flag, bots will *always* try to
escort you.
"Camp" means stay at the location you specify. Bots will not
just stand still, but will jump and hook around, and still pick up
nearby stuff. Bots may get stuck behind something and not be
able to get back to the camping location you specified. If they
get lost for more than 30 seconds, they stop camping and say so.
Camping and escorting work for 2 minutes and then the bots go
about their normal business.
"Roam" means just wander around and pick up stuff and kill. Bots
currently don't explore as well as they attack and defend. They
don't know where to go exactly and can tend to stay in one area,
but may be drawn out of that area when they try to find good
stuff or see an enemy, so there's no guarantee that bots will
stay still.
Bots with the flag are not affected by orders to attack, defend, or
roam. They will camp and escort however.
The bots are not smart enough to know whether or not the flag is in the
base, and will happily defend (or attack) an empty base if you order
them to. This can be helpful if you've got the enemy flag and the
enemy has your flag... order your bots to attack and hope they can
get your flag back.
The bots have higher priorities than your orders, like fighting with
enemies. You may issue your orders and find that the bots are too
busy trying to kill to follow your orders. However, the bots
remembered that you ordered them and will start attacking or defending
when they have finished killing the enemy, or finished getting
the items they are interested in.
"Attack" and "Defend" work only on maps with waypoints.
The other orders (including "Camp") work on all maps.
When you order a bot to drop stuff, a bot nearby you may drop something
for you. At most one thing will be dropped when you make this request,
regardless of how many bots are nearby and regardless of how much good
stuff they may have. Bots will *NOT* drop anything that you already
have. This means that if you have a rune, bots won't drop a rune for
you. If you have a rocket launcher, they won't drop a rocket launcher.
So if a bot has a rune that you want, you'll have to drop your rune first
before asking the bot for its rune. When you ask bots to drop stuff, they
will try to give you a rune first. Note that when bots drop runes, they
pop out of the bot just like when you kill a someone with a rune. This
means that the rune may fall into lava or you might not be able to find
it. Those are the breaks. If no nearby bot has a rune, they will try to
drop a backpack containing a good weapon and some ammo for that weapon.
Weapon priorities are: lightning gun, then rocket launcher, then grenade
launcher, then super nailgun. When a bot drops a rune or backpack with a
weapon, all bots on your team will ignore the item for 10 seconds, and
then if its not picked up bots will try to get it. However, other bots
may pick up the item accidentally, so this may be tricky in a crowd of
bots.
Currently bots won't drop just ammo, they will only drop runes and
weapon/ammo backpacks. Also, if the teamplay flags are set so that
rune and/or backpack dropping is not allowed, then this of course
will work differently.
Detailed Scores
===============
Impulse ## Key Description
----------- --- -----------
Impulse 120 = i = prints detailed scores for you.
Impulse 121 = u = prints detailed scores for everyone.
Impulse 122 = TAB = print frag list
Detailed scores includes number of frags (i.e. actual score), and
also number of kills, deaths, suicides, captures, pickups, assists,
recoveries, and bonuses. Bonuses are things like fragging the
enemy flag carrier, or fragging the person hurting your flag carrier.
Recoveries are returning your flag to base. Pickups are grabbing
the enemy flag. Assists are things like returning your flag to
base right before your team captures. For more info on CTF
scoring, see the ThreeWave documentation.
Increase/Decrease Bot Awareness/CPU Usage [NEW!]
================================================
impulse 75 = = decrease bot cpu usage/bot awareness
impulse 76 = = increase bot cpu usage/bot awareness
Impulse 75/76 decreases/increases bot cpu usage. On my machine this
doesn't have much noticable effect, but I left it in there in case it may
help someone. Decreasing/increasing CPU usage makes the bot awareness
distances smaller/larger. So when you reduce the CPU usage, you are
making the bots nearsighted. They don't look as far for items and
enemies. Conversely, when you increase CPU usage you are making the bots
see farther. Since the bots have been "tuned" for the default
parameters, reducing or increasing bot awareness may have undesirable
effects, like making the bots no longer use waypoints or the grappling
hook as effectively. If this feature lets you run more bots on your
machine, I'd like to hear about it.
Increase/Decrease Bot Ping [NEW!]
=================================
impulse 77 = < = decrease bot ping
impulse 78 = > = increase bot ping
Impulse 77/78 decreases/increases the crudely simulated bot ping. If you
find that the bots on a network server are slaugtering all of the human
players, you may want to increase the bot ping. Increasing bot ping
increases their reaction time when they see enemies. That is, they will
not start firing at an enemy for at least N/1000 seconds after it sees
the enemy, where N is the bot ping. Bot ping has no other effect than
reaction time. Note that bot skill also affects reaction time, so low
skill bots will be even slower at reacting to enemies.
The default bot ping is 0.
Other Impulses [NEW!]
=====================
Impulse ## Key Description
----------- --- -----------
impulse 40 = p = drop current rune
impulse 41 = = rune status
impulse 70 = = toggle normal/bot names
impulse 71 = = toggle bot use of waypoints [NEW!]
impulse 90 = F11 = toss out your weapon in backpack with ammo [NEW!]
impulse 97 = = toggle no damage mode [NEW!]
impulse 98 = = enter observer mode [NEW!]
impulse 130 = o = toggle no target mode
impulse 131 = = toggle always escort mode
Impulse 40 (default key p) drops the rune you are carrying so you
can pick up another. Note that it pops out of you just like when
you kill a player with a rune, so be careful if you are dropping
it for a teammate -- it may pop out and fall into lava.
Impulse 41 prints what rune you have.
Impulse 70 toggles between "normal" names (e.g. "Outlaw") and bot
names (e.g. "RedBot1"). There are 100 different normal names that
the bots use. Yes, some of the bots are girls. Deal with it. :-)
Impulse 71 toggles bot use of waypoints. If waypoints are disabled,
then bots will be much dumber. This can be useful however if you
want all bots to be "roaming killers" to liven up the mix, instead
of bots trying to capture and defend the flag. Also, if you want
to move the flags on the maps that CTF Bot has waypoints for, you
will need to turn off bot use of waypoints on those maps otherwise
the bots will get very confused (e.g. defending the area where the
flag used to be).
Impulse 90 tosses out a backpack with your weapon with some
ammo for it. This is useful for tossing stuff to bots.
Impulse 130 toggles no target mode. When no target mode is on,
enemy bots won't try to target human players, but otherwise everything is
the same. You can still pick up stuff, and you can still be harmed by
bot crossfire, you can still capture the flag, you can still kill bots,
etc. This is very useful for debugging the bots.
Impulse 131 toggles always escort mode. When always escort is on,
bots will *always* try to escort you. You don't have to explicitly
give them orders to request escort. This is like version 1.1 of CTF
Bot, where bots always follow you around.
Impulse 97 puts you toggles no damage mode. You take no damage. This is
for debugging aspects of the bots where it would be hard to debug if the
bots are killing you.
Impulse 98 puts you in observer mode. Observer mode is like when you
join the server, press 1 or 2 for red/blue team. When observer mode is
on, you can fly and do not interact with the world at all. You can't
execute impulses as an observer... you must press 1 or 2 to join a team
or press jump to join a computer-selected team before you can execute
impulses. In observer mode you can fly, the same as when you use the
fly mode cheat in single player.Impulse 107/108 removes the red/blue bot
with the fewest frags.
Dynamic Map Creation/Modification
=================================
Impulse ## Key Description
----------- --- -----------
impulse 115 = r = move/create red flag
impulse 116 = b = move/create blue flag
impulse 117 = a = create base stockpile
impulse 118 = e = print entity list
NOTE: By default the above keys are commented out in ctfbot.cfg...
uncomment them to use the above key bindings.
Impulse 115/116 creates a red/blue flag where you are standing.
You can only create one red or blue flag. If you create another,
the first one is removed. You can use this to move the maps in the
existing CTF levels (e.g. ctf1-ctf8) if you feel like a change.
(Of course if you are playing the bots then the waypoints will
no longer work on those levels.)
In addition to the flag, 9 team spawn points are created when you
create or move a flag. This is done so that if you want to spawn
some bots, they will appear near their flag. All other team spawn
points in the level for that team are removed. If a spawn point
is created in a wall, it is removed.
Impulse 117 creates a respawning stockpile of 1 yellow armor,
1 super nailgun, 1 double shotgun, 2 large boxes of nails, 2
large boxes of shells, and 2 25-health boxes.
The above items may behave strangely or will fall out of the level if
they are spawned in a wall or on top of an object or player. Please step
out of the way after creating the items. You will be warned and be
given 2 seconds before the items are enabled.
Your changes are *NOT* saved with the map. You have to recreate the
flags and bases every time you quit and restart Quake. So don't
worry about screwing up your maps; you can't permanently change the
map.
*HOWEVER*, if you want to permanently change a map, you can use impulse
118. Impulse 118 prints out all entities that you dynamically created.
It prints them to the console in the format used by QBSP for inserting
entities into a bsp file. If you want to use this feature to
permanently modify a bsp file, start Quake with the -condebug command
line option to save all console text to the file qconsole.log in the
ctfbot directory. Then add flags or items to the map with impulses
115-117. Finally, use impulse 118 to list the entities that you
created. Impulse 118 doesn't print out all the entities in the map,
only entities that you created, so you will have to strip out the
existing entities from the bsp file, paste them together with the
entities printed out in qconsole.log, then use QBSP with the -onlyents
parameter (i.e. as done by the dobsp.bat file in the ThreeWave server
mod) to replace the entities in the bsp file. If you merely moved a
flag instead of creating a new one, the old team spawn points will still
be in the bsp file, so remember to delete them. Also, this will print
out the waypoints in the map, so either delete them or use them
depending on what you want to do.
Obviously, don't try modifying your bsp files like this unless you
know what you are doing!
Server Administration & Settings [NEW!]
=======================================
Total Freedom Mode (teamplay flag 2048)
---------------------------------------
By default, a CTF Bot server is in "total freedom" mode. This means that
anyone can create a bot, remove a bot, move the flag, etc. This is great
if you are playing by yourself, but most of the time over a network you
don't want to have this total freedom for everyone, just the admin.
You can change the teamplay flags so that only a player who enters the
admin password (which is a specific series of impulses) can do things
like create bots, move flags and such.
Toggle teamplay bit 2048 to turn total admin on or off. If the bit is
set, all bot impulses are allowed for all players. If it is not set, all
"naughty" bot impulses are disabled except for the admin, who can do
anything. Some impulses still work for all players, like detailed scores,
bot frags, rune status, rune dropping, etc.
See the admin.qc source file for more information about admin mode,
and how to set an admin password. There is a default password set
in admin.qc, but you should change it because everyone who has
downloaded CTF Bot knows what it is (duh). You will need to recompile
the bot to use your new password.
The default password is in server.cfg. By default you can type
"admin" at the console to enter admin mode.
Total Freedom Mode is on by default (i.e. the bit is set, and any player
can do any impulse).
Auto-Even-Teams (teamplay flag 4096)
------------------------------------
You can change the teamplay flags so that the red and blue teams
are always even. Bots are used to pad out teams that are different
in size.
Toggle teamplay bit 4096 to turn even teams on or off. If the bit is
set, when the teams are uneven bots will be added or removed so that the
teams are even again. Every 2 seconds, the server checks the team sizes
and adds or remove bots. When removing bots, the bot with the fewest
frags is removed.
The team size and default bot skill is determined by the console
variable "sv_aim". When you want even teams, multiply the size of the
team desired (1-8) by 4. Then add the skill of the bots that will
be added in order to keep teams even. Note that skill does not have
to be an integer. Examples:
sv_aim 9 // team size 2, skill 1 = (2*4)+1
sv_aim 18 // team size 4, skill 2 = (4*4)+2
sv_aim 34.5 // team size 8, skill 2.5 = (8*4)+2.5
An additional tweak: if you then add 64 to the total, the bot skill
you set will actually be the average skill, and bot skills will vary
plus or minus 0.5. Thus, a skill of 2.5 will actually add bots that
range (linearly) in skill from 2.0 to 3.0. The maximum skill is 3.0.
sv_aim 98.5 // team size 8, skill 2.5, vary skill = 64+(8*4)+2.5
Note that when sv_aim is greater than or equal to 1 (which of course
it will be if you use it in the above manner), all auto-aiming by
Quake is disabled. If for some insane reason you *want* auto-aiming on
your server (a horrible idea IMO), you'll have to reprogram the bot
to use a different server variable than sv_aim, or not use the
auto-even-teams capability.
When auto-even-teams is on, you can't add or remove bots manually
(i.e. with impulse 100 etc), even if you are the admin.
Auto-Even-Teams is off by default (i.e. the bit is not set, and teams
can be uneven).
No Player Rune Dropping (teamplay flag 8192)
--------------------------------------------
You can change the teamplay flags so that players and bots are not
allowed to drop runes.
Toggle teamplay bit 8192 to turn rune dropping off or on. If the bit is
set, rune dropping is disabled. If the bit is not set, players and
bots can drop runes. Note that bots will drop runes only if a player
asks them to.
Rune dropping is on by default (i.e. the bit is not set, and players
can drop runes).
No Bot Flag Pickups (teamplay flag 16384)
-----------------------------------------
You can change the teamplay flags so that bots are cannot pick up
the enemy flag. They can still return their own flag to base. This
can be useful if humans are letting the bots too much work, or you feel
that the bots are too dumb for the responsibility of carrying the flag.
Toggle teamplay bit 8192 to bot flag pickups off or on. If the bit is
set, bots can't pick up the enemy flag. If the bit is not set, bots
can pick up the enemy flag.
No Bot Flag Pickups is off by default (i.e. the bit is not set, and bots
can pick up the enemy flag).
Waypoints [NEW!]
================
Bots use waypoints to navigate on certain maps. Waypoints are basically
"threads" that lead the bot into or out of a base. Waypoints are
necessary because otherwise bots would have NO knowledge of a level
when they are spawned. They would wander around randomly and probably
not find their way to the enemy base. Without waypoints, enemy bots
generally take your flag only if they happen to spawn in your base.
With waypoints, however, bots know exactly how to get into your base
and actually try to go there on purpose. This makes CTF much more
interesting and challenging, as bots can actually use some CTF strategy
(if "try to take the other team's flag" can be termed a strategy).
How to Create Waypoints
-----------------------
Most people will not want to try this because it is too technical. It's
certainly not required to play the bots. Several maps already have
waypoints defined, and even on maps without waypoints the bots can be
fun.
The waypoints for the maps the bots know about are compiled into the bot
code and dynamically created when the map starts. They are not stored as
entities in the bsp so there is no need to use QBSP to modify the bsp
file. The bots know what map they are playing on and use the waypoints if
they have them. If there are no waypoints for the map, the bots probably
won't capture your flag, but they will try their best anyway.
If you want to add waypoints to a map you will need to modify the code
and recompile the bot. However, there are several impulse commands to
help you add waypoints without having to think about programming at all.
The tricky thing is then testing your waypoints and figuring out how to
pick better points.
A sequence of waypoints is called a path. Paths always start near a
flag, with waypoint number 0. Waypoint 1 is then nearby, followed with
increasing waypoint numbers as the path goes away from the flag.
Generally paths lead to a central area. Any number of paths can exist in
a map, but you need at least 2: one from the red flag to a central area
and one from the blue flag to a central area. From each waypoint on a
path you should be able to see the next waypoint. So generally you put
waypoints in hallway corners. You should end a path when you can see
the end of the other team's path. For doors and teleporters, you should
put the waypoint close enough to the door/teleporter so that the bot will
open the door or go through the teleporter. Remember to put waypoints on
*both* sides of a door/teleporter, because paths are two-way! That is,
the bots will follow the paths to get INTO and OUT OF a base.
Red waypoint 0 should be near the red flag, blue waypoint 0 should
be near the blue flag. Waypoint 0 is where the bots will tend
to hang out when they are defending, so the closer to the flag the
better.
It is *NOT* necessary to make a path go all the way from one flag to the
other flag. You need to make each team's path go only halfway across the
map. The bots use the red path to get to the red flag and the blue path
to get to the blue flag.... but if they can't find the red path, they go
the opposite way on the blue path to try to get back to the central area
where they can see the red path. However, having paths go all the way to
the enemy flag will probably still work properly, and may even work
better. But the bots weren't designed to work with paths that go all
the way across the map, and future versions of the bots that use
different ai techniques may not work as well with those maps. It's
probably better to stick to the current waypoint conventions. Also,
it's easier to do it the "right" way because there are half as many
waypoint that you need to create. Also, the fewer the waypoints, the
better the bots run on that map, because looking through waypoints
takes time and having extraneous waypoints wastes CPU time.
When making multiple paths, there is no reason to have a group of
waypoint all in the same area. If there is already a waypoint #1
where you want it, then don't put another one there. The bots will
use the waypoint that is already there. However, sometimes a couple
of waypoints with the same number placed nearby can be helpful.
Also, there is no reason to put waypoints every couple of feet.
Place waypoints only where necessary. Bots will ignore the
intermediary waypoints when following the path and go directly
toward the "best" waypoint.
Waypoints do *NOT* have to be numerically continuous... a path can
go 0, 1, 2, 4, 16 and be perfectly valid. Sometimes it is necessary
to make discontinuous paths in order to let the bots take an alternate
path to the base. Bots will always go for the best waypoint, so bots
will always go for the shorter path, unless you use discontinuous
paths to fake the bot out.
Examples:
---------
Map with 1 Path from Base to Base (Just Enough Waypoints):
----------------------------------------------------------
red flag ->R0->R1->R2-> [central area] <-B2<-B1<-B0<- blue flag
Map with 2 Paths from Base to Base:
-----------------------------------
red flag-->R0->R1->R2-> [central area] <-B2<-B1<-+
+->R1->R2-> [central area] <-B2<-B1<-B0<- blue flag
Map with More Waypoints Than Necessary:
---------------------------------------
red flag ->R0->R1->R2->R3->R4->R5->R6->
<-B6<-B5<-B4<-B3<-B2<-B1<-B0<- blue flag
Turn on bot debug (default key F8) to see the waypoints on the maps that
have them. They are represented by bubble sprites. You should be able
to see what is going on fairly well. Also when bot debug is on, when
you walk over a waypoint it tells you the team and number of that
waypoint.
To create a path, start up Quake with the -condebug parameter so that
all console text is logged to the file qconsole.log in the ctfbot
directory. Then use the following impulses to create a path. You must
be of the same color as the path (i.e. when you are red you make a red
path).
Impulse ## Key Description
----------- --- -----------
impulse 185 = n = start a new path of your team
impulse 186 = w = create the next waypoint in current path
impulse 187 = q = print waypoints to console (stop creating waypoints)
impulse 188 = m = start a new general path
impulse 189 = = remove closest waypoint
NOTE: By default the above keys are commented out in ctfbot.cfg...
uncomment them to use the above key bindings.
Plus, when you are creating waypoints:
impulse 1-20 = lay down specific waypoint number of your team
Use impulse 187 to stop spawning waypoints and print waypoints to the
console. When you print waypoints with impulse 187, they are printed in
a format that you can pretty much copy and paste into the bot code (but
you may have to clean up the vectors so that they compile). The routine
to add the code snippet is SpawnWaypointsForMap in the file botway.qc.
Note that *all* waypoints in the map are printed out, not just the ones
you added, so if there are already waypoints in the map they will be
printed too. Don't worry about the order in which the waypoints are
printed/created, it doesn't matter.
Use impulse 189 to remove the closest waypoint to you. This is
useful if you make a mistake when laying down waypoints, or want to
move a waypoint.
When you are finished making waypoints, it would be good to test them.
A good way to test them is to start the map, turn on "no target" mode so
your presence won't affect the bots, add one red bot, and make sure the
bot can capture the enemy flag. Then do the same with a blue bot.
If you create a good group of waypoints for a map, please send them to me
so that I can choose to incorporate them into the master CTF Bot code,
so everyone can play with them. I will of course give you credit for
creating the waypoints.
Of course, don't try this unless you know what you are doing! You will
have to recompile the bot, for this you will require a Quake C compiler,
which you can get at http://www.cdrom.com/pub/quake/quakec/utils/
I recommend ADVQCC. Also see the "Source Code" section below for
more info on recompiling the bot.
General Waypoints [NEW!]
------------------------
When bots can't find red or blue waypoints, they look for a path made up
of general waypoints. They always try to follow general waypoints in
decreasing numbers looking for general waypoint zero. From general
waypoint zero you should be able to see either a red or a blue waypoint.
It is useful to have a general waypoint path visible from every respawn
location in the map, so that no matter where bots respawn they can find
their way back to the bases. Also, if the bots tend to get stuck
somewhere because they fall in and can't see any red or blue waypoints
from there, use a general waypoint path to lead them out. Sometimes just
one strategically placed general waypoints will help bots know that they
should grapple out of whatever hole they've fallen into. You can have
any number of general paths in a map.
Use impulse 188 to start a new general path. Just as when creating
red/blue paths, you can use impulse 186 to lay down the next waypoint,
or impulse 1-20 to lay down a specific number.
Waypoints in .BSP files [NEW!]
------------------------------
If you want to make waypoints that are entities in the bsp file, instead
of created by the bot code, that is also possible. This would make it
possible to use custom maps with waypoints without having to recompile
the bot. Note that the clients would *NOT* have to download the bsps that
are modified in this manner. Only the server needs to have the bsp with
waypoints, because the server controls the spawning of all entities.
Most of the time it'd probably be better to put the entities into the