# How to Use Bots with Admin Mod

NOTICE TO USERS OF VERSIONS 2.50d AND EARLIER: This section covers using bots with Admin Mod version 2.50e and later only. All Admin Mod versions prior to 2.50e use a different mechanism for supporting and running bots. If you are using a version of Admin Mod prior to 2.50e, you must consult the documentation for the earlier version.

Beginning with Admin Mod version 2.50e, the procedure for running bots with Admin Mod has been changed. Bot support is now started from the command line or Windows shortcut, rather than from an .ini file. The new procedure is described here. If you have bots already running, you are not required to change your implementation, but realize that future support will be given using this new style of implementation.

What are bots and how do I use them?

Bots are computer-generated players that can be used on a Half-Life server. The are essentially a Half-Life mod, or add-on, which is downloaded and installed just like any other Half-Life mod. Please note that because different bots interact in different ways with the server, your mileage may vary when you try to use bots with Admin Mod. Setting up the bots and Admin Mod to co-exist can be tricky, but in most all cases it can be done.

Metamod, the application that Admin Mod runs with to operate with the Half-Life server, is designed to give you the capability to install plugin applications that interact with your server. Admin Mod and Bots are examples of these types of plugin applications. An application has to be specifically written as a Metamod plugin in order to be used directly with MetaMod.

As Metamod was released in conjunction with Admin Mod 2.50, there are no bot plugins for native Metamod use available at the time of this writing. However, you can use bots with Metamod. If you used bots with an earlier version of Admin Mod the procedure and concepts may be slightly familiar to you.

Installing Bots and Admin Mod:

To use a bot (or other server mod) with Metamod that is not designed as a Metamod plugin, you should first install the bot program. The bot's installation will change the liblist.gam file in your mod's directory. That is why you should install the bots before you install Metamod/Admin Mod, as the bot installation would overwrite the changes made by the Admin Mod installation otherwise.

Next, install Admin Mod. The Admin Mod installation will alter your liblist.gam file by exchanging the bot's "gamedll" line with a new one that points to the Metamod DLL.It will also create a backup of your original liblist.gam file for your reference and in case you want to return the file to its prior version. Now your server will run with Admin Mod when you start it. But since the bots' DLL file is no longer specified to run (because it is no longer listed in the liblist.gam file), your bots don't load. Never fear - there's one more thing you need to do.

To get the bots working, you will need to alter the command line used to start your server. If you are running a Windows server or listen-server, this means you make a change to the Windows shortcut used to start your dedicated server or game. For Linux servers, you will add additional arguments to the command line:

For Linux-based servers, add the section in bold to your server startup command line, modified to point to your bot's .so file:

./hlds_run -game cstrike +localinfo mm_gamedll dlls/pod_bot.so

For Windows-based dedicated servers, add the following section shown in bold to your server's startup shortcut, modified to point to your bot's .dll file:

C:\SIERRA\Half-Life\hlds.exe -game cstrike +localinfo mm_gamedll dlls/pod_bot.dll

For Windows-based listen-servers, add the following section shown in bold to your game's startup shortcut, modified to point to your bot's .dll file:

C:\SIERRA\Half-Life\hl.exe -game cstrike +localinfo mm_gamedll dlls/pod_bot.dll

- Note that you must use forward slashes in this command line section -- Back-slashes will not work in the +localinfo arguments!

- Your shortcut or command line may contain additional or different content than shown here. Our point is that the sections shown in bold need to be added to your existing startup shortcut or command line.

- The name and location of your bot's .dll file can often be determined from looking at the file called Admin Mod backup of liblist.gam in your game mod directory, assuming you installed Admin Mod after installing your server's bots. If you did not follow those instructions, consult the documentation provided with your Bot software for more information.

Protecting bots (and your server) from crashing:

When you are using bots and you use admin_ commands on them like admin_execclient, you server is likely to crash. If this is the case you can set the admin_bot_protection cvar in the server.cfg file to 1. This should prevent you from executing client commands on bots (which can be quite hard on your server).

If you start your server you should now have Admin Mod running together with the bots. If you have problems after having followed all these instructions, head on over to the forums and let us know.