Counter-Strike: Source

Counter-Strike: Source

52 valoraciones
Bots of CS:Source | Editing bots in Counter-Strike: Source
Por GOOSLIME
This guide is a tutorial of how to edit bots in CSS

UPDATE - November 14, 2024: Added "Saving" part.
   
Premiar
Favoritos
Favorito
Quitar
Russian Guide | Руководство на русском
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 first lined of the file you can see all the bot configurations:
Default Skill = 0 - 100 Aggression = 0 - 100 ReactionTime = 0 - 1 AttackDelay = 0 - 1 Teamwork = 0 - 100 WeaponPreference = Cost = 0 Difficulty = EASY+NORMAL+HARD+EXPERT VoicePitch = 0 - 100 - 200 Skin = 0 - 3 End

The definition of each configuration

Skill is a configuration that set the accuracy for a bot. If the value is low, the bot in high chances will miss. 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 enemy 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 high, the bot will react slowly. If low, 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 high, the bot after seeing you or other enemy will start to shoot them pretty late. If low, 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:
WeaponPreference = ak47 WeaponPreference = deagle
The bot will buy AK47 and Deagle only if they have enough money.

You can see the list of weapons here:
galil - IDF Defender ak47 - CV-47 scout - Schmidt Scout sg552 - Krieg 552 awp - Magnum Sniper Rifle g3sg1 - D3/AU1 famas - Clarion 5.56 m4a1 - Maverick M4A1 Carbine aug - Bullpup sg550 - Krieg 550 Commando glock - 9x19mm Sidearm usp - KM .45 Tactical p228 - 228 Compact deagle - Night Hawk .50C elite - .40 Dual Elites fiveseven - ES Five-Seven m3 - Leone 12 Gauge Super xm1014 - Leone YG1265 Auto Shotgun mac10 - Ingram MAC-10 tmp - Schmidt Machine Pistol mp5navy - KM Sub-Machine Gun ump45 - KM UMP45 p90 - ES C90 m249 - M249
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 chosen.

In example:
Difficulty = EXPERT
The bot will spawn in Expert only.

Difficulty = EASY+NORMAL
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.
Template Rifle WeaponPreference = m4a1 WeaponPreference = ak47 WeaponPreference = famas WeaponPreference = galil WeaponPreference = mp5 End

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.
Template Easy Skill = 0 Aggression = 20 ReactionTime = 0.5 AttackDelay = 1.5 Cost = 1 Difficulty = EASY VoicePitch = 110 End
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:
Template Noob Skill = 0 Aggression = 0 ReactionTime = 0.7 AttackDelay = 1.5 Cost = 1 Difficulty = EASY End

And this is a template of a very skilled, yet almost deadly bot:
Template Global Skill = 100 Aggression = 100 ReactionTime = 0 AttackDelay = 0 Cost = 2 Difficulty = HARD+EXPERT End

An example of custom weapon preference template:
Template AWPPro WeaponPreference = awp WeaponPreference = scout WeaponPreference = deagle End

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:
VeryHard+Rifle Seth Skin = 2 VoicePitch = 100 End
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 recently made templates.
Noob Bob Skin = 90 End Global FranzJ VoicePitch = 80 End Global+AWPPro "Hi Mom" VoicePitch = 100 End Noob "Pills Here" VoicePitch = 125 End

And in result, it worked. In one of the games i've succesfully spanwned a bot.
5. Saving
After editing the botProfile.db file all you need to do is create an empty folder inside "custom" folder, you can name the folder whatever you want, then insert the modified file inside a new folder.

...Counter-Strike: Source/cstrike/custom/(your_folder_name)

If you play on an old version of the game without "custom" folder inside game files, you have to replace the original botprofile.db with modified one. Make sure to make a backup before doing so.
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.
33 comentarios
Dragon 20 ENE a las 22:03 
If we dont give any tempalte to the bot, does they follow certain pattern or just buy/pick random weapons?
4K_240hz_MLED 5 ENE a las 12:57 
are you sure going higher than 1.0 for reaction time and attack delay won't do anything?
GOOSLIME  [autor] 16 DIC 2024 a las 20:29 
@Shugi

It depends on nodegraph and Teamwork setting in .db file. Try to experiment with it
Stutterteturtle 14 DIC 2024 a las 12:15 
Thanks, I just want to know how can make the bots go separate? source bots loves teamwork so they stick almost everytime. sounds cool but it just makes too much stuck, bunch of bots dies at small area, easily expectable pattern.
CZ's bots go everywhere so less stuck, more engage.
Lag 15 NOV 2024 a las 5:31 
Worked for me, thanks!!
GOOSLIME  [autor] 14 NOV 2024 a las 7:07 
@s3n10r

Updated the guide
Lag 14 NOV 2024 a las 6:53 
Hey there! So I basically did every step right but when it comes the moment to edit the db file using notepad when I open GCFScape, all the changes I do, it disappears it doesnt save any changse I do
GOOSLIME  [autor] 16 JUN 2024 a las 13:52 
@111_ee8

botprofile.db
111 16 JUN 2024 a las 12:26 
i tried both but nothing worked
111 16 JUN 2024 a las 11:45 
@● ︿ ● what should the custom file be called im very confused