Difference between revisions of "Configuring Metamod:Source"
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= | ||
− | + | 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>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>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 | ||
<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 | + | 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. | + | <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> | ||
− | + | To remove a plugin, simply comment it from the list, using a semicolon (;) character, or by removing the line entirely. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Aliases== | ==Aliases== | ||
− | As of | + | 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, | + | 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> | + | <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. | ||
− | + | Example of a server command line: | |
− | + | <pre>srcds.exe -game cstrike +maxplayers 12 +map de_dust +mm_basedir "server1/metamod"</pre> | |
− | [[Category:Documentation | + | [[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.
Contents
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.
- 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.
- 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. - 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"