How to install metamod
From Bots-United Wiki
IMPORTANT: if you are installing metamod as part of a bigger package and this package 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 |
Get the latest metamod files
While the project is for a long time stable enough to be used on public servers, metamod is still being actively developed at SourceForge. The files you want are the metamod binaries. Get the latest version for your operating system (Windows or Linux) from a SourceForge mirror near you.
Extract the file at the right location
The only file in the archive is the metamod library (called metamod.dll for Windows or metamod_i486.so for Linux). Extract 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.
If you are installing metamod for the first time, you will probably find no "addons" directory anywhere. In that case, just create it in the game directory (the game directory is the directory that contains the liblist.gam file of your game/MOD), and create the "metamod" and "dlls" subdirectories inside this one. Once all the directories are created, browse to the "addons\metamod\dlls" directory and put the metamod.dll (or metamod_i486.so) file in it.
Edit the liblist.gam file
Now that the metamod DLL file is in place, you need to tell the Half-Life engine to load metamod instead of loading the game DLL (or game .so file for Linux). Such information about the game/MOD (such as which file to load) is stored for the engine inside a liblist.gam file in the game directory, that you can edit with your favourite text editor. Open a text editor (such as Windows' Notepad) and load the game/MOD's liblist.gam file. The liblist.gam file is located at
C:\Program Files\Steam\SteamApps\your_email@server.com\<engine directory>\<game directory>
or wherever Steam is installed on your machine.
For example, for Counter-Strike, a typical liblist.gam looks like this:
game "Counter-Strike" url_info "www.counter-strike.net" url_dl "" version "1.6" size "184000000" svonly "0" secure "1" type "multiplayer_only" cldll "1" hlversion "1111" nomodels "1" nohimodel "1" mpentity "info_player_start" gamedll "dlls\mp.dll" gamedll_linux "dlls/cs_i386.so" trainmap "tr_1"
For other games liblist.gam will look similiar to this and has the "gamedll" key.
As you can see, this file is arranged in the form of lines of key/value pairs. Important: there may or may not be all these keys in your own liblist.gam file.
Find the line corresponding to the "gamedll" key. This is the line that tells the Half-Life engine which DLL is the game DLL file to load (Note: if this is a Linux server, you must take the line with the "gamedll_linux" key instead). Change the value for that key from "dlls\mp.dll" (or whatever is written there) to "addons\metamod\dlls\metamod.dll" (or "addons/metamod/dlls/metamod_i486.so" for Linux). If you notice, this is the relative path to the metamod DLL you just extracted.
The gamedll line will now look like this (for Windows):
gamedll "addons\metamod\dlls\metamod.dll"
or, for a Linux server:
gamedll_linux "addons/metamod/dlls/metamod_i486.so"
Save your changes and close the text editor.
Test your setup
Once you've done all this, metamod should be ready to run. To check if metamod loads correctly, fire up a new server, and watch the output. You should see the metamod welcome message, which looks like this:
metamod version 1.17.3 Copyright (c) 2001-2004 Will Day metamod comes with ABSOLUTELY NO WARRANTY; for details type `meta gpl'. This is free software, and you are welcome to redistribute it under certain conditions; type `meta gpl' for details.
If you cannot see it, maybe it scrolled too fast. Let the server start, then enter in the console:
meta version
The server should print informations about the metamod version you're using, which attests that metamod is correctly installed.
Once you know metamod runs correctly, you can start installing your plugins.
Troubleshooting
I can't find any "addons" directory!
- This means that metamod has never been installed before. Just create this directory and its subdirectories as needed.
I can't start a game, the server crashes!
- This is because the Half-Life engine could not find the DLL to load as the game DLL. Either you made a mistake while editing the liblist.gam file, or you didn't put the metamod DLL at the right location. Redo steps 2 and 3.
I am pretty certain that metamod is correctly set up, however it still crashes!
- This is probably because you were overwriting an existing metamod installation (probably in order to upgrade metamod). In this case, it is safer to test metamod without loading any plugin. Find your plugins.ini file and rename it temporarily to plugins.ini.old (or comment out every line in it). Try adding back your plugins one after the other, maybe you've got an outdated plugin that will refuse to work with the latest metamod.