Difference between revisions of "Installing Metamod:Source"

From AlliedModders Wiki
Jump to: navigation, search
m
Line 59: Line 59:
 
   SearchPaths^M
 
   SearchPaths^M
 
   {^M
 
   {^M
+ GameBin |gameinfo_path|/addons/metamod/bin^M
+
+ GameBin |gameinfo_path|addons/metamod/bin^M
 
EOPATCH
 
EOPATCH
  

Revision as of 03:21, 18 April 2006

This article will guide you through a SourceMM installation.

If you don't already have Metamod:Source bundled with a plugin, you can install it manually with the directions below.

  1. Download the appropriate package for your server: there is a Linux tarball and Windows zip file. You can get this from the SourceMM Website.
  2. Open the package, you will either have "server_i486.so" or "server.dll".
  3. Find your "mod folder" on your server. This will be something like "cstrike" or "hl2mp".
  4. Make a folder in your mod folder called "addons", if it doesn't already exist. Make a folder inside addons called "metamod", and a folder inside "metamod" called "bin".
  5. Create a new, blank, text file called "metaplugins.ini".
  6. Upload the files to your server:
    • Upload the server.dll or server_i486.so file to your addons/metamod/bin Folder.
    • Upload the metaplugins.ini file to your addons/metamod folder.
    • WARNING! - Do not replace the mod's server.dll/server_i486.so (usually in "<mod>\bin"). This will cause your mod to stop working.
  7. Open the file in the mod folder called "gameinfo.txt". You will see a few lines at the bottom like this:
    SearchPaths
    {
    	Game				|gameinfo_path|. 
    	Game				cstrike
    	Game				hl2
    }
    
  8. Add a line before all of the "Game" entries that looks like this:
    GameBin				|gameinfo_path|addons/metamod/bin
    
  9. You're done! To test whether it worked, restart your game server and type "meta" in the server console. You should get a menu.
  10. For more information, documentation, and troubleshooting, see Category:Documentation (SourceMM)
  11. Optional Cvars: mm_pluginsfile - Sets the path and name of the plugins file, defaulting to "addons/metamod/metaplugins.ini". It is relative to the mod directory.

If your gameinfo.txt gets rewritten, and your line gets removed, metamod won't run. There are a couple ways to fix this:

  1. Quick-fix Redo steps 7 and 8.
  2. Windows-only batch fix Create a text file in "counter-strike source" called sourcemm.bat and then right-click edit. put this in.
    cd "cstrike"
    copy GameInfo.txt.mms GameInfo.txt
    cd ..
    hl2.exe -insecure -console -game cstrike
    
    Then in "cstrike" (under folder you were just in) copy "gameinfo.txt" and rename it "gameinfo.txt.mss" ( I got this off http://www.tcwonline.org/~dvander/cssdm/ )
  3. Linux-only fix Open a console or xterm or whatever your prefer and cd to the directory where you installed steam (a program called steam will be there). Open up a new file called gameinfopatcher (in vim or whatever editor you like) and type the following in:
    #/bin/bash
    if [ "`grep /addons/metamod/bin < gameinfo.txt`" = "" ]
    then
    # I love here document patches.
      echo gameinfo.txt needs patching for metamod.
      patch -Np0 <<EOPATCH
    *** gameinfo.txt.bak	Sun Apr 16 19:04:34 2006
    --- gameinfo.txt	Mon Apr 17 11:01:49 2006
    ***************
    *** 41,44 ****
    --- 41,45 ----
      		SearchPaths^M
      		{^M
    + 			GameBin				|gameinfo_path|addons/metamod/bin^M
    EOPATCH
    
      test $? || echo patch failed 
      rm gameinfo.txt.orig || echo temp file deletion failed
    
    else
      echo Already patched.
    fi
    

    Those ^M's are control characters. To type them in vim, press Ctrl-v Ctrl-m. For other editors, you're on your own. Also, be mindful of tabs and backticks. If you can't figure out how to do all that or just don't want to mess with it, you can download a tarred bzip2 from http://www.tlcomputing.com/gameinfo.txt.updater.tar.bz2 . To be able to run this script you must make it executable by running:

    chmod +x gameinfopatcher

    Now cd into the directory of the mod whose gameinfo.txt you need to fix. For example,

    cd cstrike

    Now you just need to run the updater like this:

    ../gameinfopatcher
    You can safely run this script any time, even if Valve changes the contents of gameinfo.txt. I recommend running it after every update.