1. Some theory
Bots are AI-controlled player characters standing in the place of real players. In Counter-Strike: Source, bots will now alert team members of any sniper that is within their sight. These quotes were reused from cut quotes in the older games. Sniper bots are now more aware of their surroundings and will usually occupy long pathways/open areas in a defence stance. Due to this, bots’ awareness of snipers have also increased and they will often strafe and work together with allied players to eliminate enemies. Bots that see an enemy sniper will also look for cover first by positioning themselves next to a wall, rather than standing still and fight in older games. In some cases, bots may rush at close ranges while strafing or take a detour to flank the sniper. However, even if the player is not a sniper, they may still attempt this with any weapon except sniper weaponry.
Enemy bots will react to your firing, and will often form a small to large group in attempt to kill the player, unlike in previous games, which player will normally face one by one. This is probably a way to force the player to work closely with friendly bots. Working alone is more difficult even on the lowest skill set. Also, when a player kills a bot, they are reprogrammed to focus on human players first before targeting other bots, unless they are in close proximity.
2. Analyzing botprofile.db | Configuration
The info about bots can be found on botprofile.db which can be found in cstrike_pak_dir.vpk (You can open this file using GCFScape).
You can open this file as a text file, I recommend to use Notepad++ or Visual Studio Code
In the beginning of the file you can see all the bot configurations:
The meaning of each configuration
Skill is a configuration that set the accuracy for a bot. If the value is low, the bot will miss the shot. If high, they will instantly aim. You can set the value from 0 to 100.
Agression is a configuration that set the bravery for a bot. If the value is low, the bot will step away if they will see you or other bots. If high, they will try to rush. You can set the value from 0 to 100
ReactionTime is a configuration that set the reaction for a bot. It’s self explainatory though, If the value is low, the bot will react slowly. If high, they will instantly react. You can set the value from 0.0 to 1.0
AttackDelay is a configuration that set the attack for a bot. If the value is low, the bot after seeing you or other enemy will start to shoot them pretty late. If high, they will shoot instantly. You can set the value from 0.0 to 1.0
Teamwork is a configuration that set the teamworking for a bot. If the value is low, the bot will go solo and decline your commands more often. If the value is high, they will try to stick with team. You can set the value from 0 to 100
WeaponPreference is a configuration that set a preferenced weapon for a bot. If the Template will have preferred weapons, the bot will buy these weapons only if they have enough money.
In example:
The bot will buy AK47 and Deagle only if they have enough money.
You can see the list of weapons here:
It’s not necessary to set Kevlars, Grenades and Defuse Kits for CT in the confiuguration because the bots will buy them anyway.
Cost is a configuration that set a difficulty cost for a bot. There is 4 difficulties in game:
№ | Difficulty |
0 | Easy |
1 | Norma |
2 | Hard |
3 | Expert |
Difficulty, as the same as Cost, will set the bot spawn in specific difficulties if they chosen.
In example:
The bot will spawn in Expert only.
The bot will spawn in Easy and Normal only.
VoicePitch is a configuration that set the voice pitch for a bot. The default value is 100. If it’s highter, the bot will have high pitched voice. If low, then otherwise.
Skin is a configuration that set the skin for a bot. There’s 4 skins in each team.
3. Analyzing botprofile.db | Templates
The original file contatins the templates of weapon preference, difficulty and the bot’s behavior.
In example, this is one of default weapon templates for a bot where contains all assault rifles and one semi-automatic gun.
Another example. This is a bot behavior template where contains configurations of bot’s behavior and the difficulty they will spawn. In this case, this is a template of an easy bot.
4. Creating new template and adding/editing bot profiles.
After we started to know what the configuration do, let’s make our own template for a bot.
In example, here’s the template of a very easy bot:
And this is a template of a very skilled, yet almost deadly bot:
An example of custom weapon preference template:
Actually, you can make a template regardless of weapon preference or bot behaviour. You can mix it up and get this:
This is a template of a very skilled bot that will only buy assault rifles and a pistol and will spawn in all difficulties.
Adding new bots
To add a new bot, you need to type a template name and then a name for a bot. If the name has spaces or other symbols then type it in brackets (‘”)
Here’s the example of default bot profile:
Please notice if you want a bot that has several templates then type them all with ‘+’ instead of spaces. Also make sure that every bot profile you made has End, otherwise the bot won’t spawn.
Using our recently created custom templates we can make more bots or edit the default ones. I have made 4 bots using the template “Average”.
And in result, it worked. In one of the games i’ve succesfully spanwned a bot.
The End
I hope that this guide have helped you on how to make and edit bots in Counter-Strike: Source. If i made a mistake somewhere, please mention it. Thanks for reading.
Hope you enjoy the post for Counter-Strike: Source Bots of CS:Source – Editing bots, If you think we should update the post or something is wrong please let us know via comment and we will fix it how fast as possible! Thank you and have a great day!
- Check All Counter-Strike: Source Posts List
Leave a Reply