This guide is intended for Linux, as Windows is hard to compile binaries on.
This is a tutorial on how to enable Half-Life: Deathmatch bots (specifically Bot No. 10 by botman) without any external plugin software (i.e. Metamod).
Tested on AlmaLinux 9.6 on a Raspberry Pi 5 16GB model.
The first step is compiling the specific hlsdk-portable
branch bot10
.
You can download this branch of the repository to your system with these commands:
git clone --recursive https://github.com/FWGS/hlsdk-portable
cd hlsdk-portable
git checkout bot10
Then build the binaries (remember to append -D64BIT=ON
to CMake config flags for 64-bit) with:
cmake -DCMAKE_BUILD_TYPE=Release
-B build -S .
cmake --build build
Binaries built this way may not be compatible with the Steam version of Half-Life.
If this happens, try linking libstdc++
and libgcc
statically and disabling 64-bit
with the below codeblock as a substitute for the previous command.
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -static-libstdc++ -static-libgcc" -B build -S .
cmake --build
Now copy the build/dlls/bot[_arch].so
file to your Xash3D/XashDS install.
$ cp build/dlls/bot[_arch].so /path/to/xash/valve/dlls
The next part of setting it up is configuring Xash/GoldSrc to use the new SDK library, and configuring the Bot10 bots.
Edit liblist.gam
, and add your newly compiled Bot10 DLL by editing the line beginning with
gamedll_linux
, and removing the default path (likely dlls/hl.so
) and appending
your new one (most likely dlls/hl.so
).
Example liblist.gam
:
// Valve Game Info file
// These are key/value pairs. Certain mods will use different settings.
//
game "Half-Life"
startmap "c0a0"
trainmap "t0a0"
mpentity "info_player_deathmatch"
gamedll "dlls\hl.dll"
gamedll_linux "dlls/bot.so"
gamedll_osx "hl.dylib"
secure "1"
type "singleplayer_only"
animated_title "1"
hd_background "1"
Only the value ofgamedll_linux
if modified as we are using
Linux as a dedicated server, otherwise gamedll_osx
for macOS.
No Windows because since it not only uses Visual Studio but different commands so
I'd have to refactor the entire compiling step.
Too much of a hassle.
After that's done you are going to have to configure the bots.
Create a empty/plaintext file named "bot.cfg" in the valve
directory,
and open it with a text editor of your choice.
I'd personally recommend KWrite as it's fast and gets the job done.
Make this the contents of the file:
botskill [1-5, 1=good, 5=bad]
max_bots [number of bots you need, up to 32]
# below this line is optional stuff
min_bots [number of bots before you start kicking them off]
addbot [skin] [name] [skill]
botdontshoot [1 or 0, pretty clear as to what this is]
These can also be executed in the client BY ANYBODY if you aren't running
a dedicated server, but can also be accessed in the server console using the syntax bot "[bot.cfg command]"
After these quick and simple changes, you should be ready to launch a botted server, whether to play with your friends, or to host publicly.
If I missed anything, edit this page in a fork on GitHub and submit a pull request once you're finished.