Birds Bot Manager (BBM) Compiling & Installing from source ---------------------------------- ** This is only for people who are happy with compiling C/C++ code, and preferably ** have some experience with the GNU compiler toolchain (gcc / g++) **************************************************************************************** ** I will use UNIX style paths throughout this document - i.e. I will use "/" as the ** directory pathname separator instead of the MS-DOS "\" character. Anyone who writes ** code under Win32 knows that "under the hood" win32 understands the UNIX style paths, ** and using the "\" causes problems in C/C++. **************************************************************************************** You will need working version of Perl, and a win32 version of the gcc c/c++ compiler. Perl can be found from many places - head over to www.perl.com if you aren't sure where to go next, and look for a win32 binary distribution. You need the MingW32 C++ compiler. If you don't already have it installed then go grab it now. Use your favourite search engine, or head over to www.mingw.org, or grab a copy from the "resources" section on my page. I usually grab the "crtdll" version, as it works fine. ** NOTE ** If you get the gcc version "2.95.2" - the current version as at the time of writing - then you will also have to grab and apply the "quote-fix" patch (available from the same page) , or you will get a compilation error in util.cpp. Download the BBM source and unpack it into its own directory. DO NOT unpack it directly into the Half-Life directory. Choose somewhere else (e.g. C:/sourcecode/bbm) Make sure you use something like WinZip or tar/gunzip to unpack it that understands long filenames. You will want to edit the Makefile in the C:/sourcecode/bbm/src directory to set the location of your half-life installation. Create a directory called "bbm" within your Half-Life directory. This is where the BBM runtime library and all of its bots and data will be located. Issue a "make" in the bbm/src directory. If all goes well you will end up with a file called BBM.DLL in your Half-Life/bbm directory and also a file called BBM.LIB in the C:/sourcecode/bbm/lib library directory. To test that it works, edit the "liblist.gam" file int either the HalfLife/valve directory or the directory of your MOD (e.g. HalfLife/cstrike) and change the "gamedll" entry to load "../BBM/BBM.DLL", then try starting and running the game. At this stage there are no bots installed, but the botmanager should load and run in a transparent manner, allowing you to play a normal multiplayer game. If the game seems to start ok (i.e. no errors) then you have passed the first hurdle. Compiling and Installing a Bot ------------------------------ Now that the BotManager is installed, lets compile and install a Bot for it to use. Change directory to the "sample_bot" directory that came with the source. Edit the Makefile in this directory to correctly set the location of your HalfLife directory. Do a "make". This should complete without errors and place a file called "sample.dll" into the half-life/bbm/sample directory. You should also create a BBM config file "bbm.cfg" in the HalfLife/bbm directory. There is an example bbm.cfg file in the bbm/src/util directory supplied with the source code. Start a game, and issue the console command "loadbot sample" to load the bot class. If you see encouraging messages then you can try the console command "addbot" to create a bot of this class. You should see a bot be created, with various debugging messages printed to your HUD. This particular bot is pretty stupid, so don't expect very much. It currently serves as a testbed for the various bbm features, and also as something for programmers to look at when getting started. If this all works, then take some time to look at & play with the "sample_bot" source. It is quite short and shows some of the features of BBM. General Information on Installing Bots -------------------------------------- To create a new botclass (e.g. called "slaybot") you must complete these steps: * Compile your bot source code & link against the BBM.LIB library to produce a loadable module called "slaybot.dll". * put this DLL into a subdirectory called "slaybot" inside the BBM runtime directory. (i.e. your DLL ends up as "HalfLife/bbm/slaybot/slaybot.DLL") Now you should be able to start HalfLife and load your botclass with the console command "loadbot slaybot". You can add bots of this class into the game one at a time with the console command "addbot slaybot" once the library is loaded. * Optionally, to have BBM automatically load your bot class on startup, you can edit the config file Half-Life/bbm/bbm.cfg and put "slaybot" into the "[bots]" section.