This is the final version of FrikBot. I mean it this time. Really. Stop looking at me like that. This is it. For those that know what this bot is all about, skip the next paragraph and save yourself some time. If not, read on:
FrikBot is a unique bot for Quake. Maybe you're familiar with Reaper Bots, or the fabulous Frogbot and Omicron bots. These are wonderful opponents to deathmatch against, but for mod authors (the people that make those nice mods you and I play, such as Capture the Flag, etc) they're not so great. Why? I hear you ask - well the bot code heavily intrudes into the rest of the QuakeC (the language you use to make mods for Quake). Because of this, you either need to build the mod onto the bot's source base, or spend a few good months finding each part that links into the mod and carefully replicate it on the new mod. In addition Reaper is not legal to modify and Omicron's source is heavily obfuscated. FrikBot has introduced about 2 years ago as an alternative. It's the first Quake bot (aside from TutorBot) to be heavily geared to mod authors and customization. With the advent of this version, it's also a hoot to play too.
This release (nicknamed FrikBotX or simply FBX) represents several months of slow off and on work and is the 10th (or 12th - I'm not sure) and final release of the bot. FrikBot X, much like the infamous Frogbot relies heavily on hand-built waypoints for excellence in combat. It can however run without them, and it will attempt to create its own waypoints as it plays. This is not recommended however.
To get started playing FrikBot, read the installation instructions which can be found by clicking the "Installation" button at left (on DHTML capable browsers), or scrolling down (on "normal" browsers).
Please note FrikBot requires the registered version of Quake.
These installation instructions assume you're using some version of Windows. If you're lucky enough to be using a better operating system (read: *nux, BeOS, whatever) you likely don't need me to tell you how to install a Quake mod. You probably also enjoy doing binary-long division during long car rides. If you're using a Macintosh, simply unpack this archive, move it to your Quake folder and click-drag it onto your MacQuake executable. (A Mac user once told me these instructions. If this isn't accurate let me know.)
Unzip this file with your favorite zip utility. This is usually Winzip on most systems. After it's unzipped, create a new folder in Quake with the name "FrikBot". Move all files and folders from the archive to this new folder. In the folder you'll see two .bat batch files. These have been set up to run FBX with the standard command line. Run.bat will execute Quake.exe and GLRun.bat will run GLQuake.exe. The latter is a special 3D-Accelerated version of Quake. If you have 3D hardware, I recommend you download this and read the provided instructions.
FrikBot requires Quake version 1.08 or higher. This is available as a free update from id software. If you use GLQuake or WinQuake or any recent custom engine to run FrikBot, don't worry, you're safe. If however you're still using the Quake.exe that came off your old Quake CD, you can download the update by clicking here.
To begin playing a match against the bot, double click the batch file of your choice. Choose the Multiplayer option from the main menu. Choose "New Game" from the Multiplayer menu. Select either IPX or TCP/IP from the next menu. Select a map, fraglimit (if desired), timelimit (if desired) and choose "Begin Game". To start fighting some FrikBots, continue reading in the "Playing" section of this readme.
Playing FrikBot X
Okay, you know how to install and begin a multiplayer game of FBX (and if you don't, please read the last section). It is recommended you play one of the 6 id deathmatch maps.. These are dm1, dm2, dm3, dm4, dm5 and dm6. If you did not start the game with one of these maps, bring down the console with the ~ key, and type "map dm6" and press enter (minus the quotes).
To add a bot, bring down the console (again with the ~ key) and type "impulse 100" (without the quotes) and press enter. A new bot combatant will enter the game. The bot you have added will probably be a skill 1 (Normal skill) bot. If the bot is too difficult for you, type "impulse 102" in the console and press enter. This will disconnect the bot from the game. Then type "skill 0" to set the game on Easy skill in the console, then "impulse 100" to add an easy level bot. When you're ready for a greater challenge try skill 2 (Hard) and skill 3 (Nightmare) bots.
FrikBot can also be used in a team match game. The bots can be teammates or your opposition. To get started here, change the map then type "teamplay 1" in the console. Set your desired skill level then use "impulse 100" to add a bot that will be one of your team members. Use "impulse 101" in the console to add enemy team members.
You can also have FBX as a 'friend' as you battle through Quake's single player game. To do this, bring down the console, type "deathmatch 0" and press enter. Type "coop 1" then press enter. Next, use the map command to go to the episode selection - in the console type "map start". Add your bot companions as above (with "impulse 100"), then head off starting the game as you normally would. It is recommended you download waypoints for the id single player maps before playing coop.
FrikBotX can also be played with the popular internet version of Quake called "QuakeWorld". To do this you need to run the QuakeWorld sever executable "QWSV.exe". If you don't have this, it can be downloaded from QuakeWorld's official website. After starting it, type in "gamedir frikbot" then press enter. Then change the map by using the map command, eg. "map dm6". To adjust the skill level of bots, you must use the QW console and type "localinfo skill x" where x is the desired skill level. Connect with QWCL to your server and add bots with "impulse 100" and remove them with "impulse 102".
Due to lazy coding the QW version of frikbot does not support teamplay at this time. In addition, the bots will appear to move very choppily, this is due to QW's restricting all non client entities to a very low frames per second. This cannot be avoided without engine modifications.
When playing QWSV and QWCL on the same machine under Windows 9x it's important to point out that QWSV will not receive enough priority, which will cause unneeded lag. There's an excellent tool to solve this called priority.exe. You can find it at the ever helpful Quake Info Pool.
FrikBotX has two options to make your lives a bit easier. In normal quake you can set them by using the saved1 cvar. The first option is to make the bots return between map changes in DM as they do in Coop. To activate the option type "saved1 1" in the console. After the next map load, bots will return between matches. The next option allows you to disable the bot chatter (it gets on some people's nerves). To do this type "saved 2" in the console. If you wish to both options enabled, add them together and type "saved 3". In QuakeWorld, use localinfo b_options on the server instead of saved1. Good luck.
Included in the FrikBotX progs.dat is an Omicron-style map cycler. To use it, you must create a maps.cfg file, an example one has been included with this archive. Unlike Omicron, FrikBot's map cycler can deal with an unlimited number of maps. The cfg file must should contain lines in the following format:
alias map1 "changelevel mapname"
Samelevel controls how the map cycler behaves. If it is 0, quake will behave as normal. Samelevel 1 will force FBX to stay on the samelevel, just as normal Quake. However, any setting above this will cause FBX to randomly select a map from the specified number of maps. The number you set it to should be the number of aliases you provided in your maps.cfg. If you'd rather not let it select maps randomly (which can result in repeated maps), setting samelevel to a the negative of the number of maps you have will make an infinite looping rotation. If you have six map aliases, setting samelevel -6 will cycle through them successively.
Using "impulse 103" in the console will allow you to cycle to the view of every bot and player on the server. This view is very interesting, and if you have the time and patience you can record demos from the bot's perspective. Unlike 0.09, FrikBot X will seem much choppier from the bot's perspective. Sorry.
Using Add-on waypoints
The benefits of using add on .way files cannot be stressed enough. Waypoint give the ability to navigate levels perfectly, they make the bot a fierce deathmatch and coop opponent and they actually decrease the load FBX has on the game by a significant amount.
FrikBot Waypoints can be made using the in game editor or may be supplied to you by friends or in future add-on packs. The best source for additional waypoints is the FrikBot Waypoint Depot, an excellent website created by Akuma and maintained by Quest.
Waypoints usually come as a single .way file, however some maps are very large or intricate and require multiple files. The additional files share the same name, but have the extensions wa1, wa2, wa3, etc.
To use these waypoints you place the .way (and all additional files, if they exist) in your quake\frikbot\maps folder. If installed correctly, when you go to play that map in Quake you will see in the console "Execing maps/mapnam.way". Please note: FBX already contains waypoints for DM1, DM2, DM3, DM4, DM5 and DM6. These internal waypoints are improved versions of those found on FrikBot Waypoint Depot. Do not install the waypoints for the id deathmatch maps unless they have been updated over the internal points.
Occasionally you may run across FrikBot waypoints in two other formats. One is map_mapname.qc. Please note that although Frogbot uses a similar convention, Frogbot waypoints are not compatible.
To install these you will need the source code to the mod and a QuakeC compiler (May I recommend my own compiler, FrikQCC). To do this, open up the progs.src file from the mod with a text editor. Just after the defs.qc line, add the name of the .qc file you've received. Next, open bot.qc or bot_qw.qc (depending if this is intended for QuakeWorld or Normal Quake) and scroll down past the large installation comment until you find the function bot_map_load. Add a line that reads something like this:
if (mapname == "mymap")
Where the keyword mymap is a placeholder for the name of the map the waypoints are intended for. Under extremely rare circumstances, you'll encounter a third type of waypoints. These come as an .ent file patch. Please note that although Omicron uses a similar convention, Omicron bot waypoints are NOT compatible. To install these you will need the map's BSP file and the compile tool QBSP. QBSP can be found on id software's FTP in the file q1tools_gpl.zip. You will need to run QBSP with the command line
qbsp -onlyents mymap
Where mymap is the name of the BSP file you wish to apply waypoints to. Please note: The raw dump of the BSP ents option in the in-game editor is not a complete .ent file. It must be appended to the existing ents first. Read the waypoint editing portion of this readme for complete instructions.
If you were confused by the above, don't worry. Stick with .way files and you'll be alright. BSP and QC waypoints are intended to get around QuakeWorld's many, many limitations, if you don't use the QuakeWorld FrikBot then you should never need to use those features.
Information for Mod Authors
FrikBot is designed for you. With great certainty I can tell you that after plugging FrikBot into your mod the bot will use all the rules you have changed, will fire your custom weapons and will behave like a client in every way discernable. However, he will probably behave like an incredibly stupid client, but that isn't the point.
If you already have FrikBot installed in your mod skip down to the next section, otherwise, keep reading. All the code to install FrikBot has been included with this archive. The files you need are bot.qc, bot_way.qc, bot_ai.qc, bot_fight.qc, bot_ed.qc, bot_misc.qc, bot_phys.qc and bot_move.qc. If you intend to use the QuakeWorld version of FrikBot, substitute everything I say about bot.qc with "bot_qw.qc", okay? To begin installing FrikBot into your mod, copy these files into your mod's source folder. To be neat I recommend creating a subdirectory called "frikbot" within your source folder and placing the files in there. This is not required though.
Next thing you should do is open up bot.qc, scroll down past the license and read the instructions carefully. There's a few functions to comment out in defs.qc, you accomplish these by placing two forward slashes in front of the line - "//". Once you've followed the installation instructions, you can compile and play the mod now with FrikBots. Most likely you'll need to modify code in bot_ai.qc to make the bot behave intelligently. The main function in this file is BotAI located at the bottom. From there you can follow up all the calls it makes and understand how the bot thinks. Priority_for_thing is the place to add code if you want the bots to hunt a new item, or add conditions to hunting existing items. I leave the rest to you. Note that you will probably never need to edit bot(_qw).qc (except for when installing qc waypoints), bot_move.qc, bot_way.qc or bot_phys.qc. The last one being highly unlikely as it is more or less a direct port of the engine's physics code, and only needs to be changed when the corresponding code in the engine is changed.
Please also note that the waypoint editor mode can be used to cheat in your mod (Even in multiplayer). If you don't want to allow this, safeguard the entrance by adding a cvar("developer") check to its impulse in BotImpulses in bot.qc.
When making mods I strongly suggest you do a few things. Open up bot_misc.qc and give the bots new names and colors. Please. I'm tired of seeing a ton of mods with my default names and chat messages. Use a little creativity, and use some extended chars to give the bots "fun names".
Next, I'd ask you avoid using the name "Frik" in your mod's title. Even if all you did was combine FrikBot with another mod, don't call it FrikSomemod. A more appropriate title may be Somemod + FrikBot, or something along those lines. This is not a commandment from Heaven, it's just that I like to use Frik for my own work, and it tends to confuse people seeing my name part of some mod that I had very little to do with. Thanks.
In the past it has been common to include my entire FrikBot readme with the mod. Please do not include this massive .html file, that's the last thing we need. Instead, excerpt here and there and patch together some instructions for the bot. You have permission to use everything in the archive any way you want, this includes this readme. Put a little effort into it, for your user's sake.
If you make your mod for QuakeWorld I really recommend you make the mod open source. Not only will it be much more convenient for server operators, but QC is one of the best ways to get waypoints into the QW version of FrikBot. Again, open source is the way to go.
If you're really feeling nice, you can place a small thank-you to me in your mods credits. Thanks for listening, now get out there and get coding!
Common ProblemsThis portion of the readme will help you if you encounter an error when using FrikBot. This is by far not a comprehensive guide, but it will help you with a number of problems. If you need further help, please see the "Author" section of this readme. Thanks.
"Unable to connect a bot, server is full"
FrikBot requires client slots like real players. If you're playing a single player game (by choosing Single Player from the main menu, or using the 'map' command), you cannot connect bots because the game can't accept connections. It is recommended you use -listen 16 in the command line.
If you're getting this message after installing FrikBot X on a mod even though you have multiplayer set up properly, this probably the result of improper installation. Make sure you read the installation instructions correctly (especially the part about BotInit in worldspawn(), world.qc).
"CL_ParseServerMessage: svc_updatecolors > MAX_SCOREBOARD"
This (and other errors like it) are typically the result of placing BotInit(); below InitBodyQue(); or some other call in worldspawn. When I say at the top of the function, I mean it!
This problem can occur when you look directly at a waypoint in editor mode when it is linked to another waypoint at point blank. To fix this, you will need run the command line parameter "-surfcachesize 1500" when you run quake. If you still get the message, increase the value until the error disappears.
"Ed_Alloc: No Free Edicts"
This problem can occur with large maps that require a lot of waypoints. Also note that this can also be caused by an entity leak in your mod. id's code has an entity leak with the bubble spawner code in player.qc. The only way to fix this is to recompile the Quake source code after setting MAX_EDICTS in quakedef.h to 1024 (or higher).
If you receive this message it means you probably didn't split up the .way file properly. Look for the comments made by the editor instructing you to separate the file into multiple parts.
"SZ_GetSpace: Overflow without allowoverflow set"
This is the result of the client network buffer filling up with too much data. If you receive this message it usually means a bot was receiving messages he shouldn't have, and all this data is building up in his outgoing buffer (since the client isn't real, he never collects the data and the game crashes). To fix this find places where you stuffcmd'd or otherwise sent messages to the bot that wouldn't be picked up my function redeclarations.
Waypoints are missing and links are screwed up in DarkPlaces
Darkplaces caps server activity in listen servers with the sys_ticrate cvar. This can foul the .way file loading, to get around this set "sys_ticrate 0" in the console before changing map.
I, Ryan Smith, am deranged psychopath that lives in Massachusetts, USA. I started coding for the TRS-80 Model 3 about 18 years ago (damn I'm old), graduated to Commodore 64s, and eventually found my way to Doom and Quake. Quake eventually caught a hold of me. Deathmatch became a sort of digital crack and making mods was absolutely the best thing I had done with my computer. At one point in my early naivety I had stumbled across the Reaper Bot. Little did I know this choppy, poorly playing (and mostly cheating) bot was considered the best bot of the time. I had long assumed that a proper bot couldn't be too difficult.
Anyway, you can reach me at the following address should you have any questions or comments about the bot (feedback much appreciated!) firstname.lastname@example.org. I'd also like to hear about any improvements you've found, bugs you've encountered or mods you've made of using the bot. Keep in mind this is often a slow address and it may take a few days for me to receive your mail. Also notice I will not reply to any mail asking questions which are answered in this readme or in any material found on my site or at FWD. If your message doesn't contain a technical question, you may not expect a reply. My time is very limited, and though I will read your mail and often times act upon it, I may not reply.
All these rules may sound self centered or something, but I have encountered people that think of e-mail as an instant message service and my mailbox has been filled with mail such as "Why haven't you replied? It's been 5 hours!" etc.
FrikBot on the web
There are a number of websites you may want to visit for latest news. If you have an active internet connection, just click.
Waypoints are incredibly useful and powerful tools for FrikBot X. To edit the bot's waypoints, you should use FrikBot X's built-in waypoint editor. If you're already familiar with FrikBot Waypoint Studio this should be a fairly easy guide to follow, as the editor in FBX lends much of its features and design from FBWS.
To begin using the editor, you must first ensure that the file beam.mdl included with this archive is in the mod's progs/ directory. This model file is used to display the links of a waypoint; we'll get to that in a bit. To demonstrate more clearly how waypointing works, load up FBX as you would to fight the bots. Go to the map dm6 (waypoints are included for this map in the progs.dat). Use impulse 104 in the console to start the editor. If everything goes well, you'll now see many tiny white dots ("bubbles") floating mid air. These sprites represent each waypoint on the map. As you near a waypoint, it will change to a very large gold "light ball". This is referred to as the selected waypoint. As each waypoint is selected, it will cast off little red beams that connect to nearby waypoints. These are called 'links'. Each link represents that a bot can travel one way from the selected waypoint to the linked waypoint. Also, when near a teleporter you may see a link that looks like quake lightning and passes straight through walls. This is called a "telelink" and is really a special flagged link telling the bot to travel through a teleporter in between the two waypoints.
Each waypoint can have a maximum of 4 out bound links. Although this may seem like a severe limitation at first, consider you can place as many waypoints as you need in one spot, and link them all together to get more outbound links. There is no limit to the number of inbound links to a single waypoint.
What follows is a basic break down of the editor's commands. This is not meant as a comprehensive getting started in waypointing tutorial. The subject is actually quite simple, and with a little experimenting you should be waypointing like a pro in no time. Be sure to bind the 0 (zero) key to "impulse 10" in order to properly use the editor menus.
The main menu contains a few basic commands and the ability to switch to any of the other menus in the editor. This is your starting point in the editor.
Waypoint management is probably the most useful menu in the editor. It contains basic waypoint creation and deletion but also more advanced functions such as make way and link functions.
Link Management is the place to deal with individual links. It's commands somewhat echo Waypoint Management's, but on a link scale.
AI Flag Management
Every command on the AI Flag management menus is a toggle that will effect the currently selected waypoint. FrikBot 0.09 supported the door flag AI flag and no more (loading FBX waypoints in 0.09 is perfectly acceptable by the way, new flags will merely be ignored). The new flags have many varied and useful effects on the bots way of thinking and action he takes as he uses the waypoint. The best way to understand how to use a few of these is to study how the bot reacts to them, I will however attempt to explain here as much as I can.
AI Flag Management Page 2
These are the less used AI Flags, though they are useful in some ways.
Bot Management Menu
This menu allows you to control the FrikBots in unique ways to allow you to accurately test how the bot will behave as they pass waypoints.
This menu provides commands for dealing with all waypoints on the level.
Using Waypoint Dumps
In order to use the waypoint editor effectively, you must save your waypoints. The way you do this is to make sure you ran quake with the command line option -condebug. Once done tweaking or creating the waypoints, use the Waylist's Dump command to print out all the data on the console. Quit the game. In your frikbot directory you'll find the file qconsole.log. Scroll through it until you find the comments flagging the top and bottom of the dump, take all the data and do the appropriate action:
If you have any further questions on this topic, email me. See the Author section for details.
Shortcuts are a rapid but advanced way to use the editor. To use them, you need to know the formula: It's menu # times 16 plus the menu option. The menus were covered in this file in numerical order. The main menu is the first menu, 1 * 16, toggle noclip mode is menu option 6, so 16 + 6 is 22. Now that you have the code number for the command, you use it as such:
bind n "saved2 22; impulse 104"
This will allow you to toggle noclip mode in the editor from any menu by merely pressing the N key. This is merely a time saving tool, if you don't understand how to use it, don't worry.