Charlie advances

A development shot showing areas for suppression fire

Marines in close combat while assaulting a rooftop


Hosted by:
Bot Epidemic
and
TeleFragged

Visitor #: 05018

Latest news on CGFThe CGF conceptTechnical CGF information [AI and design]Got a CGF question? Read this firstHow to script CGF missions yourselfGet your CGF files and missions hereLinks to related sites [such as AQ2 or AI sites]

General questions


CGF Launcher related questions


Additional/optional weapons related questions

Route file related questions

Action game variants and enhancements questions

1. 'Subscript out of range. - Error 9' error?
Ross 'JoeSatch' Norton, author of the CGF Launcher says:
The real problem behind this cryptic message is that the Launcher is unable to find missions. In other words, the launcher hasn't been set up with the correct path to the CGF missions.
You correct this problem as follows:
  1. Run "Uninstall.exe" in the Launcher directory (this does not remove the Launcher, only the setup information)
  2. Run CGF Launcher again and re-enter the setup information, making sure everything is 100% correct and then proceed to load CGF Launcher.
Note that the CGF missions typically are located in the 'action\missions' subdir of your Quake2 directory. You need to fill out the complete path.
We don't mind assisting you getting CGF to work provided you've made a decent effort to download and read the accompanying documentation.

2. Why do I have to use a mission script, can't I just spawn bots?
The scripts define bot and team configurations, just like config files for other Q2 bots.

In addition, the scripts give hints about the map (key areas and locations) and define how bot teams are to behave (unlike other Q2 bots).
I've worked hard to get the teams and bots smart enough to understand those terrain hints and team instructions without using too much CPU. As a result, these bots can be instructed to defend a building, patrol a map, or move and attack within a restricted area only.
The consequence of this implementation, though, is that the bots are no longer capable of acting without knowing their team, and instructions (as defined by the script).

However, most of the traditional team-based bot fights can be set up using only a very small script.

3. Why don't you just release some DM bots?
CGF was designed from the start with team-oriented bots in mind. Concepts such as teams, formations, team procedures, point man, suppression fire, team cohesion and team tactics have been taken into account from the first line of code.

These concepts don't come for free. Compared to 'ordinary' DM bots, the AI has more work to do. To be able to run CGF on 'slower' PC's, I have put a lot of effort into optimizing the team AI. As a consequence, significant parts of the AI have moved from the bot AI to the fire team AI.
For example: when a fire team detects an enemy, it is not the case that each member individually tries to determine the best tactics for the team to perform.
Instead, solely the fire team AI determines, using information collected by all bots, what to do, and then issues strict orders to all fire team members.
This approach not only correctly models well trained fire teams (that 'automatically' select the appropriate tactics), but also saves some CPU.
The disadvantage of the approach is that the individual bot without his/her team not that smart: instead, the bot just executes the team's orders, fights, and forwards observations to the team.

As you will understand by now, creating good solo DM bots out of CGF is not simple at all. Neither is creating good TP bots out of a solo DM bot. Trying to create good solo DM bots would delay CGF considerably.

I've chosen to develop team based AI back in '96, as I've found that lacking from most games. Developing team based AI still is a bigger creative challenge to me than creating yet another DM bot (no matter how much fun they might provide).

Commercial break: since early September 99, there's a AQ2 DM (and some TP) bot available: LTK by RiEvEr. Get it via the links page.

4. Will CGF be made available for Linux?
At some time after releasing CGF for Wintel platforms, I will make available Linux versions as well. It won't be soon after the first release, as I have grown accustomed to developing and debugging in the VisualC++ / VisualSourceSafe / VisualBasic environment.

CGF has been written without resorting to platform specific hacks - porting to Linux basically will be dealing with differences between the MSVC++ STL and g++ STL (the ISO standard C++ template library). "Normally", a few undiscovered bugs will rise their ugly head during that port as well.

As soon as I'll be ready to look at the Linux port, I'll issue a call for assistance; I probably need some advice in locating and installing all drivers and libraries required to run Q2 on Linux. Until that call, please don't send me info over Linux.

5. Will you port CGF to Action Half-Life?
Nope.

AHL isn't the realistic mod for Half-Life as AQ2 was for Quake2. It doesn't have the popularity (and thus the mapper's support) that AQ2 has.
Besides, AHL already has some kind of bots.

Finally, (and the reason that HL never had many bots developed for it), Valve's support for bot developers is not as good as they say it is ('community support' has top priority on in PR talks but it took them over seven months to release a few (minor) fixes that prevented any bot running in the HL engine).

6. Will you port CGF to Counter-Strike / FireArms ... ?
I plan to develop a complete implementation of CGF for Action Quake2. There's still a lot of work to do, and, typical for AI, AI is never finished.

After that, I'll have a look at which game is interesting to develop team oriented bots for, and if I have sufficient time available to do a decent job at developing these bots.

Besides these mods, there are some other games on the horizon. The most challenging one (from a tactical bot perspective) definitely is (of course) Team Fortress 2.

7. CGF seems to hang when launching it for a new route file!
To run CGF on a specific map, CGF requires three kinds of terrain files (in directory action\terrain):
  • {mapname}.srp, [essential!] containing the waypoints and connections between the waypoints
  • {mapname}.dst, (large!) containing the path lookup table for each pair of waypoints
  • {mapname}.tac, containing all kinds of tactical lookup tables
The path lookup table and tactical lookup tables are generated by CGF using as input the Quake map, and the .srp file contents: waypoints and connections.

Because generating these tables takes about 5 minutes, and because most gamers don't like to wait that long before playing a mission, CGF computes these tables once, and stores them in (large) files. CGF then reads these files (thus: tables) at the start of a mission, and launches the mission in about 10 seconds instead of 5 minutes. The sole disadvantage is that it takes a few MB's of your harddisk.

When you (or I) want to distribute the route (terrain) files for a specific map, the size of the .dst and .tac file becomes much more important. Modem users don't jump for joy when they need to download some MB's of data which they could compute themselves.

For that reason, CGF route files are distributed using solely the essential .srp file.

As a result, the first time CGF tries to open the map for which you just installed the route file, CGF first has to compute the path lookup tables and tactical lookup tables. This takes about 5 minutes, in which CGF seems to hang (but instead works very hard). During that time, you'd better leave your PC (or at least CGF) alone.

After computing the tables, CGF tries to start the mission. Quake2, however, may have decided that you, as a gamer, have a bad connection, and show the 'disconnect' phone jack symbol. If that is the case, just quit Quake2 and launch the mission again. The mission will start instantly.

8. Can I create route files for all kinds of maps??
With CGF 0.80, you're able to create route files yourself (see here for more info on creating route files).

However, due to limitations of CGF and the complexity of a few AQ2 maps, it doesn't yet make sense to create route files for maps that feature:

  • large amounts of natural, sloping terrain (such as cliff, cliff2, jungle1, teamjungle, but not armyterr); until the bot movement has been improved, the bots have troubles dealing with this terrain.
  • button operated elevators/doors that are essential to gameplay, (as in blockwar, office3, chriscity); bots cannot yet handle button operated doors.
  • serious swimming efforts (as in lighttower); bots cannot handle serious swimming yet.
  • special 'effects' such as land mines (beachassault), artillery (desert), laser lines (theist), and trains (subway, riot2)
It is my goal to have the bots handle natural terrain and button operated doors.
7. Why can't the bots learn maps themselves?
One of the features that set CGF bots apart from most other bots is their tactical understanding of a map. The bots are able to pick reasonably good sniper locations, move up under cover or patrol stealthily. They also are able to predict threat positions if they lose contact with threats.

This tactical understanding is essential to the Action Q2 game (due the single shot kill potential, emphasis on cover and stealth, and dark areas).

The implementation of this tactical understanding requires:

  • complete knowledge of the terrain;
  • so much CPU power that part of the computations need to be performed before starting the game (the results of these computations are stored in the route files and take up to 6 minutes of CPU time on a Celeron300A) - as a result, the CPU load in-game is acceptable.
Basically, this means that without a complete route files, the bots are not capable of Action quality combat. Due to the CPU demands, it is simply not feasible to construct the required information bit by bit while discovering the map.

IMO, bots that can explore and learn to navigate a map themselves (such as Eraser) are 'smart', but so are the CGF bots that understand the tactical significance of the terrain. At this time (of CPU power), we cannot have them both (ignoring the added complexity of deterimining tactical value of positions using incomplete information).

9. Will you add civilians / hostage / bystander bots??
The addition of civilians, hostages or bystanders bots has been suggested frequently. I also have spent considerable time thinking about how to add them. Technically, adding the AI for the civilians / hostages themselves isn't that difficult (it fits in the current design).

The real issue is how to incorporate civilians, or bystanders in the game. Only when killing bystanders, and/or not killing any bystanders means something to the game, I'm willing to add them. Basically, that means I need to figure out a way to relate the health of bystanders to the mission objectives.

Hostages are still more demanding: missions would include hostages to allow players (or bots) to free them. In that case, new interactions would be required to enable the player to guide the hostages out.

However, the problem often overlooked is the consequences for the current bot AI: instead of just following orders, and engaging (with appropriate tactics) any player/bot from opposing forces, the AI would be required explicitly not damage bystanders.
This is more complex than it sounds: every line-of-fire is to be checked for a possible nearby bystander, grenades (not supported now) cannot be lobbed into any position anymore. Terrorist AI should understand the 'value' of bystanders, and may explicitly use them for cover.
In the case of hostages, escorting and protecting the hostages requires special AI as well...

Concluding this issue, I find the concept interesting (Rainbow Six and the HL mod Counter-Strike implement it, and it makes for a good game). However, it requires a good deal of work.
If and when I find the time to add it, I'll let you know.

(Unrelated question: does the realistic RB6 allow you to bandage any wounded hostages, before escorting them out, if need be?).

10. Will you add commands to call your team for assistance?
Some limited means to interact with friendly teams will be added, such as go-codes and calls for assistance.

Go-codes enable the player (or bots) to signal a friendly team to use a pre-defined (in the mission script) set of actions. Missions that provide go-codes to players should inform the player about the go-codes in the mission description. I prefer to standardize on go-codes "Red", "Yellow", and "Green" so players can use standard key binds.

A call for assistance will inform friendly teams about your problems; however, the bots are not guaranteed to help you - they might be facing hostiles themselves.

More detailed interaction won't be provided; the Quake2 environment just does not offer means to quickly state requests such as "take out the left pair of tango's on the sniper tower left of us". (Unreal Tournament is providing mouse menu's for that purpose, according to previews).

11. Will CGF support Action mods such as Capture-the-briefcase or Gangsters?
Probably not. To support these mod mods, CGF would have to be ported to another code base. More importantly, the AI has not been designed to understand concepts such as flags (briefcases), flag capturing, flag carriers and flag defense. For AI, these concepts are non-trivial to deal with well in combination with the already complex Action rules.

Concepts as protect / assassinate the leader (as in Gangsters) are probably easier to support. In that case, I might add similar missions and team instructions to CGF.

12. How do I use the additional weapons for CGF in my missions
CGF includes support for additional weapons such as the Barrett sniper rifle, Ithaca shot gun and AK-47. The weapons themselves require additional downloads.

These weapons are explicitly used in a few CGF missions included in the CGF 0.82 download (notably for the RiotX map).

I would have preferred you using the CGF Launcher or CGF Mission Editor to easily add the weapons to your or the bots' load out for other missions as well. Alas, development of the CGF Launcher and CGF Mission Editor halted before the additional weapons were made available, and neither of these tools supports the new weapons.

This leaves you two more cumbersome ways to add the weapons to your missions:

  • manually modify mission scripts and add weapons to the load-out of the player (and bots)
  • run CGF with '+set cheats 1' and give yourself the weapons from the console (using some alias)

Modifying the mission scripts is done as follows (assuming you want to add the "Barrett M82 Sniper Rifle" to your load out):

  1. open the appropriate mission file
  2. locate the line defining the player load out, which looks something like:

    player "dah player" "male/reservoir"

    you'll find the list of weapons and ammo issued to the player in the lines immediately below this line; this might look like:

    {
      ammo "Machinegun Magazine" = 2;
      weapon "MP5/10 Submachinegun";
     
      item "Silencer";
      item "Stealth Slippers";
    };

  3. between the curly brackets ('{' and '}') add a line for the Barrett rifle:

      weapon "Barrett M82 Sniper Rifle";

  4. if ammo for this type of gun (sniper ammo) isn't listed yet, also add a line for this ammo between the curly brackets.

      ammo "AP Sniper Ammo" = 10;

    Together this results in the following player load out:

    player "dah player" "male/reservoir"
    {
      ammo "Machinegun Magazine" = 2;
      weapon "MP5/10 Submachinegun";
      ammo "AP Sniper Ammo" = 10;
      weapon "Barrett M82 Sniper Rifle";
     
      item "Silencer";
      item "Stealth Slippers";
    };

  5. repeat this for all mission files listed in the objectives section of the mission script...
Note that you can issue the optional weapons in a similar way to bots defined in the mission script (except for step 2. listed above; you should look for 'npc' instead of 'player').


An alternative approach is to launch Action Quake 2 with cheats enabled (add the following to the command line):
  +set cheats 1

Then, as soon as the mission starts, enter the following commands (using a configuration script, if you want to):
  give "Barrett M82 Sniper Rifle"   give "AP Sniper Ammo"
et voila, you just received a sniper rifle and more ammo.

You can use the following weapon names for the optional weapons:
  // optional pistol
  weapon ""Beretta 92F Pistol";
  // optional submachineguns
  weapon "AK97 Submachinegun";
  weapon "MAC-10 Submachinegun";
  weapon "UMP45 Submachinegun";
  weapon "UZI Submachinegun";
  // optional assault rifles
  weapon "AK47 Assault Rifle";
  weapon "Tommygun";
  // optional assault shotgun
  weapon "Ithaca Model37 Assault Shotgun";
  // optional cannon
  weapon "Old-style Cannon";
  // optional sniper rifles
  weapon "Barrett M82 Sniper Rifle";
  weapon "Dragunov Sniper Rifle";




Questions? Comments? Suggestions? Send them here
CGF is written by William van der Sterren. All content is © William van der Sterren unless otherwise stated.
Action Quake2 is written by, and ©, the A-Team
CGF website designed by Cube, © 1999. Best viewed @ 800x600 HiColor in a version 4 browser.
And yes, a large number of bots were hurt during the photo sessions (but they fell in the line of duty).

This site uses the PNG (Portable Network Graphics) image format.
If your browser cannot display this image format please go to this site to download a plug-in.