Half-Life bot development
- HPB bot
- Bot # 10
- Bot # 9
- Bot # 8
- Bot # 007
- Bot # 6
- Cinco Bot
- Bot # 4
- PG Bot
- Gump Bot
- Fodder Bot
|Bot Number 6:
Bot Number 6 will ONLY work with Half-Life version 188.8.131.52 - 184.108.40.206. If you are using Half-Life version 220.127.116.11 or higher you won't be able to use this bot.
Bot Number 6 has had the following additions from The Cinco Bot:
The roaming (navigation) code was changed so that bots no longer scrape against the walls. When the bot approaches a wall the bot will turn parallel to the wall or will turn out slightly away from the wall and run forward from there.
I've fixed the problem with the bots running faster than they should. The problem was that I was calling the Bot's Think function (BotThink) much faster than I should have been. I assumed that StartFrame (in client.cpp) was only called every 1/10 of a second so I wasn't setting nextthink inside my BotThink function. Now, I have created a Bot::Think() function that calls Bot::BotThink() only when it's time to and added the nextthink timeout to BotThink(). The bots now actually seem to run TOO slowly, but at least the speed is constant (before they would sometimes run very quickly and sometimes just slightly faster than the player).
BigGuy has been helping me add secondary fire on many of the weapons and has sent me code to get the bots to use Snarks and Hand Grenades. The bots now use secondary fire on the glock, MP5 grenades, the gauss gun, the shotgun, and the hornet gun. They sometimes tend to blow themselves up with the MP5 grenades when shooting at something directly above them.
There was a bug previously where if a bot was above another bot on a ledge, both bots thought that they could use the crowbar to whack the other bot (even when they were out of reach of each other). This was because the distance I was passing into the BotFireWeapon() function was ignoring the Z (up and down) component of the locations. This bug has been fixed.
The bots can now be spawned automatically using a "bot.cfg" text file. This file contains the same commands that you would normally enter in console mode to create bots. I have included a sample bot.cfg file that creates 6 bots. Details on the bot.cfg file are contained within the bot.cfg file itself. The bot.cfg file can be edited with any text editor (i.e Notepad or Wordpad).
I fixed a bug that appeared in the Cinco bot where the wrong skill level was being reported when the bot was spawned. The BotCreate() function was using the default bot skill level when it should have been using the skill level provided on the command line when the bot was added.
I fixed a couple of bugs in BotFindItem() where the bots would not always head for the nearest item that they saw. They would tend to see a button and then "forget" that they saw it when exiting the loop in BotFindItem.
The bots now try harder not to drown when they are in water. If the bot detects that it is in water, it will swim to the surface and try to jump out of the water when it "sees" an area where it can do so.
BigGuy sent me some code to enable TeamPlay. You can now select "TeamPlay" in "Advanced options" and the bots won't shoot their teammates. You still can't set a "Frag Limit" or a "Time Limit" to end a round, since the bots don't respawn when the new map is loaded. I'll have to fix this in another version of the bot.
The "observer" mode console command exists in Bot Number 6. For details on how to use the observer command, read the discussion of The Gump Bot
The "botdontshoot" console command exists in Bot Number 6. For a description of this command see the notes on The Cinco Bot.
The bots still don't navigate very well in water.
When the bots get killed, their body will drop to the floor, but sometimes the body will "lurch" across the floor a bit when the bot respawns. (DOES ANYBODY KNOW WHY THIS HAPPENS???)
The bots don't know how to use Satchel Charges or Tripmines (yet).
Downloading Bot Number 6:
Below are compiled DLLs and source code files for Bot Number 6. When unzipping these files PLEASE be sure that the directory structure is preserved ("Use folder names" in Extract window of WinZip) and BE SURE you extract these files into the Half-Life folder (NOT the Half-Life\valve folder). You should have the following directory structure when you are done...
C:\Sierra\Half-Life\ (or some similar path) \Half-Life\Bot\ \Half-Life\Bot\dlls\ \Half-Life\Bot\maps\ (...other directories left out here...) \Half-Life\valve\ \Half-Life\valve\cl-dlls\ \Half-Life\valve\dlls\ \Half-Life\valve\gfx\ \Half-Life\valve\maps\ \Half-Life\valve\media\ \Half-Life\valve\models\ \Half-Life\valve\models\player\ \Half-Life\valve\Save\ \Half-Life\valve\sprites\You will need to copy .bsp map files from the Half-Life\valve\maps folder to the Half-Life\Bot\maps folder. You will also need to copy the config.cfg file from Half-Life\valve folder to the Half-Life\Bot folder. (See Detailed steps for running the bot for more information).