How to install a metamod bot (or any metamod plugin)

From Bots-United Wiki

Jump to: navigation, search

IMPORTANT: if the bot (or the metamod plugin) you want to install comes with an installer, it is highly recommended to use the installer instead of trying to install things manually. Only come back to this page if the installer does not work or you want to know how to do it yourself!


Contents

Extract files at the right location

The first thing to do is to put the files at the right location. If the plugin you downloaded comes in the form of a ZIP archive, follow the readme to know where to extract it. You'll certainly need to ensure that your archive extracts with the subdirectories enabled (i.e, that it doesn't extract all your files at "flat" in the current directory).

Simple plugins may not need a particular directory structure, or may not even indicate where to extract the files. In this case, the only file you need to worry about is the .dll file (for Windows), or the .so file (for Linux). Unless the readme says otherwise, take this file and put it in your game's addons\metamod\dlls directory. For example, put it in

C:\Program Files\Steam\SteamApps\your_email@server.com\<engine directory>\<game directory>\addons\metamod\dlls

or wherever Steam is installed on your machine.

Replace the '<engine directory>\<game directory>' part with correct directories for different games. For example,

counter-strike/cstrike    (Counter-Strike)
half-life/valve           (Half-Life)
team fortress classic/tfc (Team Fortress Classic)
half-life/ns              (Natural-Selection)
half-life/svencoop        (SvenCoop)

Note that all third party games are installed under 'Half-Life' engine directory.

More elaborated plugins, such as scripting engines like AMX or bots like RealBot WIP will need a particular directory structure. These plugins will usually create this directory structure when you extract them from the archive. But like with any plugin, you'll need to identify the main .dll (or .so) file for the plugin, because you'll have to tell metamod to load that file.

Open or create metamod's plugins.ini

Now that the plugin files are in place, you need to tell metamod which DLL (or which .so file for Linux) to load when the server starts. The list of files metamod will try to load is stored in a .ini file, that you can edit with your favourite text editor. Open a text editor (such as Windows' Notepad) and load metamod's plugins.ini file. It is located in the addons\metamod directory of your game. For example, metamod's plugins.ini file might be located at

C:\Program Files\Steam\SteamApps\your_email@server.com\<engine directory>\<game directory>\addons\metamod\plugins.ini

or wherever Steam is installed on your machine.

If that file does not exist, that's certainly because you have just installed metamod and this is the first plugin you are trying to install. In that case, create a new plugins.ini file at the right location. Make sure that Windows does not try to append a .txt extension to the file when you create it! To avoid this problem, either turn off the "hide known extensions" setting in Windows' Explorer, or name the file using quotes, i.e. "plugins.ini" (with the quotes) and not just plugins.ini.

Add a line for your plugin's DLL

In the plugins.ini file is a list of the DLL (or .so) files metamod is to try to load when the server starts. The format of a plugins.ini line is as follows:

<system> <relative path to the plugin's DLL or .so file>

"system" can be either win32 or linux. The relative path is the path to the plugin file starting from the game directory, which is the directory containing the liblist.gam file for the game you are playing. Here is an example of a plugins.ini file for a Windows server.

win32 ../../metamod/pmtools_plugin/release/pmtools_mm.dll
win32 addons/metamod/dlls/nextmap_mm.dll
win32 addons/metamod/dlls/endround_mm.dll
win32 addons/metamod/dlls/bleeding_mm.dll
win32 ../../racc/racc.dll

This one loads 5 plugins. Always remember that metamod starts looking from the game directory.

You have to add a line for your plugin. For example:

win32 addons/podbot/podbot_mm.dll

or for linux:

linux addons/podbot/podbot_mm_i386.so

After that, save your changes and close the text editor.

Test your setup

Once you've done all this, your plugin should be ready. To check if metamod loads it correctly, fire up a new server, and in the console type:

meta list

You should see something like this

[ 1] STATSME RUN - sm_cstrike_mm.dl v2.8.0.1 ini Chlvl Chlvl
[ 2] AMX RUN - amx_mm.dll v0.9.3 ini Start Start
[ 3] FUN RUN - fun_ms.dll v0.9.2 ini Start Start
[ 4] POD-Bot 2.6mm RUN - podbot_mm.dll vR2b44 ini Chlvl ANY 

each line corresponding to a plugin you have. If the line says "RUN" then that plugin has been successfully loaded by metamod and is currently running.

Once you know your plugin is running, you can either tweak its configuration (with the help of the plugin's readme file) or start playing.

Troubleshooting

I can't find any "addons" directory!

This means that metamod is not installed. You must install metamod first before installing metamod plugins.

I can't find the plugins.ini file!

This is probably because metamod has just been installed and no plugins are defined yet. Just create an empty file with that name at the right location.

"meta list" gives me a "meta: unknown command"!

This means that metamod is not correctly installed. Check out that the "gamedll" line in your liblist.gam file does load the metamod DLL. Refer to How to install metamod for more information.

"meta list" tells me "badf load" instead of "RUN"!

if you see a "badf load" next to your plugin's name it means that metamod could not find the plugin's DLL file at the path you specified in the plugins.ini file. This is most likely because the path you entered is not correct. Remember you must enter a relative path starting from the game directory. This is the directory containing the liblist.gam file of the game you are playing.

"meta list" says my plugin is running, but nothing happens!

Your plugin may need to be given extra commands or may require extra configuration files to run properly. Refer to the plugin's documentation to find out how to get it running past this point.