Difference between revisions of "Multiple or Forked Servers (SourceMod)"

From AlliedModders Wiki
Jump to: navigation, search
m
Line 9: Line 9:
 
You can have multiple copies of SourceMod in your "addons" folder, however.  For example, you can have <tt>addons/sourcemod1</tt> and <tt>addons/sourcemod2</tt>.  There are two ways to make this work.
 
You can have multiple copies of SourceMod in your "addons" folder, however.  For example, you can have <tt>addons/sourcemod1</tt> and <tt>addons/sourcemod2</tt>.  There are two ways to make this work.
  
'''SourceMod 1.2 (Release) or higher:'''
 
 
Specify <tt>+sm_basepath</tt> on the server command line.  For example:
 
Specify <tt>+sm_basepath</tt> on the server command line.  For example:
 
<pre>srcds -game tf +maxplayers 12 +sm_basepath addons/sourcemod2</pre>
 
<pre>srcds -game tf +maxplayers 12 +sm_basepath addons/sourcemod2</pre>
 
'''SourceMod 1.2 Beta or earlier:'''
 
<ul>
 
<li>Specify <tt>+sm_corecfgfile</tt> on the server command line.  For example:
 
<pre>srcds -game tf +maxplayers 12 +sm_corecfgfile addons/sourcemod2/configs/core.cfg</pre></li>
 
<li>Edit "BasePath" in the same <tt>core.cfg</tt> file to correlate to the new location.</li>
 
</ul>
 
''Note: This method works in 1.2 releases or higher, but is deprecated.''
 
  
 
If you are looking to save space or unify certain files that you know will not change, use symlinks.  On Linux/FreeBSD this is the <tt>ln -s</tt> command (<tt>man ln</tt>).  On Windows Vista or 2008 Server, this is <tt>mklink</tt> from the command prompt.
 
If you are looking to save space or unify certain files that you know will not change, use symlinks.  On Linux/FreeBSD this is the <tt>ln -s</tt> command (<tt>man ln</tt>).  On Windows Vista or 2008 Server, this is <tt>mklink</tt> from the command prompt.
  
 
[[Category:SourceMod Documentation]]
 
[[Category:SourceMod Documentation]]

Revision as of 09:47, 2 January 2013

SourceMod does not support running more than one server from the same SourceMod installation. This means you cannot:

  • Point multiple forked servers (a feature in Left 4 Dead's srcds) at one SourceMod install.
  • Start multiple copies of the same srcds to the same SourceMod install.

The reason for this is that SourceMod needs to "own" certain folders.

  • SourceMod's auto-updating feature overwrites gamedata files, and could one day overwrite other files as well.
  • The "data" folder is considered writeable for any purpose, and can be used to store locks that live beyond process IDs.

You can have multiple copies of SourceMod in your "addons" folder, however. For example, you can have addons/sourcemod1 and addons/sourcemod2. There are two ways to make this work.

Specify +sm_basepath on the server command line. For example:

srcds -game tf +maxplayers 12 +sm_basepath addons/sourcemod2

If you are looking to save space or unify certain files that you know will not change, use symlinks. On Linux/FreeBSD this is the ln -s command (man ln). On Windows Vista or 2008 Server, this is mklink from the command prompt.