Difference between revisions of "Configuring Metamod:Source"

From AlliedModders Wiki
Jump to: navigation, search
m (Adding Plugins: How did I do this :\)
m
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
__FORCETOC__
 
This article briefly overviews the basics of configuring a [[Metamod:Source]] installation.
 
This article briefly overviews the basics of configuring a [[Metamod:Source]] installation.
 +
 +
For information on unloading, loading, and refreshing plugins, see [[Console Commands (SourceMM)|meta console]] commands instead.
 +
 +
This documentation describes how to add configure Metamod:Source's loading of plugins.  You will need to refer to your plugin's documentation for additional installation or configuration information.
  
 
=Plugins=
 
=Plugins=
==Adding Plugins==
+
As of Metamod:Source 1.4.3, there is a new plugin loading method using <tt>.vdf</tt> files.  These files are placed in the <tt>addons/metamod</tt> folder.  Check your plugin's documentation to see if it comes with one of these files; if it does not, you will need to follow the directions below to load it.
 +
 
 
<ol>
 
<ol>
<li>Open (or create) the "addons/metamod/metaplugins.ini" file in your mod folder (such as "cstrike" or "hl2mp").</li>
+
<li>Open (or create) the "addons/metamod/metaplugins.ini" file in your mod folder (such as "cstrike" or "hl2mp"). You must use a plain text editor.  If you use Notepad, make sure to save as "All Files" or else it may add an erroneous <tt>.txt</tt> extension.</li>
<li>Follow the installation instructions the plugin gives you - usually this means uploading its files.</li>
+
<li>Add a line to <tt>metaplugins.ini</tt> which points to the plugin's path. For example, if the plugin is in <tt>cstrike\addons\sourcemod\bin\sourcemod_mm_i486.so</tt>, you would add:
<li>Add a line to the file which points to the plugin's path. If the plugin is in cstrike\addons\sourcemod\bin\sourcemod_mm.dll, you would add:
 
 
<pre>addons\sourcemod\bin\sourcemod_mm</pre>
 
<pre>addons\sourcemod\bin\sourcemod_mm</pre>
Note that you do not need to worry about the file extension - all you need is the mod folder relative path to the file. If you add an extension, it won't hurt, but it's autodetected anyway. Also, unlike the original Metamod, you do not need to specify whether the plugin is Linux or Windows. You can also specify a full path name, where autodetection will no longer work.</li>
+
Note that you do not need to worry about the file extension or operating system - all you need is the relative path to the file. If you add an extension, it won't hurt, but it's auto-detected regardless.</li>
<li>Save the file and either restart the server, change the map, or type "meta refresh" in the console. Note that some plugins need special hooks that may require a map change.</li>
+
<li>Save the file and either restart the server, change the map, or type "meta refresh" in the console. You can manually use "meta load" but the plugin may require a map change</li>
 
</ol>
 
</ol>
  
==Removing Plugins==
+
To remove a plugin, simply comment it from the list, using a semicolon (;) character, or by removing the line entirely.
<ol>
 
<li>Open the "metaplugins.ini" file in addons\metamod\bin.</li>
 
<li>Comment the line with the plugin by adding a semi-colon:
 
<pre>;addons\sourcemod\bin\sourcemod_mm</pre>
 
</li>
 
<li>Save, restart the server, or use meta console commands to unload the plugin.</li>
 
</ol>
 
  
 
==Aliases==
 
==Aliases==
As of SourceMM 1.2.2, you can "alias" plugins to file names. This lets you specify an alias wherever you would specify a plugin file. In metaplugins.ini it would look like this:
+
As of Metamod:Source 1.2.2, you can "alias" plugins to file names. This lets you specify an alias wherever you would specify a plugin file. In metaplugins.ini it would look like this:
 
<pre>sourcemod addons\sourcemod\bin\sourcemod_mm</pre>
 
<pre>sourcemod addons\sourcemod\bin\sourcemod_mm</pre>
 
Here, "sourcemod" is now defined as an alias for "addons\sourcemod\bin\sourcemod_mm" which is useful if you wish to unload a plugin and then load it again without needing to type a long file path.
 
Here, "sourcemod" is now defined as an alias for "addons\sourcemod\bin\sourcemod_mm" which is useful if you wish to unload a plugin and then load it again without needing to type a long file path.
 
<br /><br />
 
<br /><br />
If the plugin path contains a space and you wish to create an alias, then it must be enclosed in quotation marks like so:
+
If the plugin path contains a space and you wish to create an alias, you do not need quotes.  However, a non-alias path will be misread as an alias. In this case, you must use quotes:
<pre>myplugin "addons\my plugin\bin\myplugin_mm"</pre>
+
<pre>"addons\My Plugin\bin\My Plugin.dll"</pre>
 +
 
 +
 
 +
=Settings=
 +
Metamod:Source has two cvars for configuring where it looks for plugins.  They must be set as both cvars (for example, via <tt>autoexec.cfg</tt>) and as a command line parameter.
 +
 
 +
*<tt>mm_pluginsfile</tt> - Sets which file contains the plugins list.  Defaults to <tt>"addons/metamod/metaplugins.ini"</tt>.
 +
*<tt>mm_basedir</tt> - Sets the root folder for MM:S.  Defaults to <tt>"addons/metamod"</tt>.  This can be used to change where <tt>.vdf</tt> are searched.
  
==Managing Plugins==
+
Example of a server command line:
For information on unloading, loading, and refreshing plugins, see [[Console Commands (SourceMM)|meta console]] commands.
+
<pre>srcds.exe -game cstrike +maxplayers 12 +map de_dust +mm_basedir "server1/metamod"</pre>
  
[[Category:Documentation (SourceMM)]]
+
[[Category:Metamod:Source Documentation]]

Latest revision as of 19:22, 24 January 2008

This article briefly overviews the basics of configuring a Metamod:Source installation.

For information on unloading, loading, and refreshing plugins, see meta console commands instead.

This documentation describes how to add configure Metamod:Source's loading of plugins. You will need to refer to your plugin's documentation for additional installation or configuration information.

Plugins

As of Metamod:Source 1.4.3, there is a new plugin loading method using .vdf files. These files are placed in the addons/metamod folder. Check your plugin's documentation to see if it comes with one of these files; if it does not, you will need to follow the directions below to load it.

  1. Open (or create) the "addons/metamod/metaplugins.ini" file in your mod folder (such as "cstrike" or "hl2mp"). You must use a plain text editor. If you use Notepad, make sure to save as "All Files" or else it may add an erroneous .txt extension.
  2. Add a line to metaplugins.ini which points to the plugin's path. For example, if the plugin is in cstrike\addons\sourcemod\bin\sourcemod_mm_i486.so, you would add:
    addons\sourcemod\bin\sourcemod_mm
    Note that you do not need to worry about the file extension or operating system - all you need is the relative path to the file. If you add an extension, it won't hurt, but it's auto-detected regardless.
  3. Save the file and either restart the server, change the map, or type "meta refresh" in the console. You can manually use "meta load" but the plugin may require a map change

To remove a plugin, simply comment it from the list, using a semicolon (;) character, or by removing the line entirely.

Aliases

As of Metamod:Source 1.2.2, you can "alias" plugins to file names. This lets you specify an alias wherever you would specify a plugin file. In metaplugins.ini it would look like this:

sourcemod addons\sourcemod\bin\sourcemod_mm

Here, "sourcemod" is now defined as an alias for "addons\sourcemod\bin\sourcemod_mm" which is useful if you wish to unload a plugin and then load it again without needing to type a long file path.

If the plugin path contains a space and you wish to create an alias, you do not need quotes. However, a non-alias path will be misread as an alias. In this case, you must use quotes:

"addons\My Plugin\bin\My Plugin.dll"


Settings

Metamod:Source has two cvars for configuring where it looks for plugins. They must be set as both cvars (for example, via autoexec.cfg) and as a command line parameter.

  • mm_pluginsfile - Sets which file contains the plugins list. Defaults to "addons/metamod/metaplugins.ini".
  • mm_basedir - Sets the root folder for MM:S. Defaults to "addons/metamod". This can be used to change where .vdf are searched.

Example of a server command line:

srcds.exe -game cstrike +maxplayers 12 +map de_dust +mm_basedir "server1/metamod"