Difference between revisions of "SourceMod Configuration"
m |
MisakaSora (talk | contribs) |
||
(9 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{Languages|SourceMod Configuration}} | ||
+ | __FORCETOC__ | ||
+ | |||
This document overviews some of the configuration concepts in [[SourceMod]]. | This document overviews some of the configuration concepts in [[SourceMod]]. | ||
Line 12: | Line 15: | ||
The <tt>admin_levels.cfg</tt> should never be edited. | The <tt>admin_levels.cfg</tt> should never be edited. | ||
+ | |||
+ | =Admin Menu= | ||
+ | For editing <tt>adminmenu_cfgs.txt</tt> or <tt>adminmenu_sorting.txt</tt>, see [[Admin_Menu_Configuration_%28SourceMod%29|Admin Menu Configuration]]. | ||
=Core Configuration= | =Core Configuration= | ||
Line 21: | Line 27: | ||
*Menu Sounds | *Menu Sounds | ||
− | = | + | =Cvars and sourcemod.cfg= |
− | For | + | The <tt>cfg/sourcemod/sourcemod.cfg</tt> file contains all cvars that are included by default with SourceMod. Each cvar is accompanied comments containing: |
+ | *A small bit of documentation. | ||
+ | *The default value, in case you forget. | ||
+ | *The plugin which provides the cvar, or none if Core is the provider. | ||
+ | |||
+ | Reference the actual file for further information. | ||
+ | |||
+ | There are many cvars associated with SourceMod that are not in the <tt>sourcemod.cfg</tt> file. For plugins which follow proper guidelines, SourceMod will automatically generate a configuration file in the above format for each plugin. For example, a plugin called <tt>hat.smx</tt> would have a file called <tt>cfg/sourcemod/plugin.hat.cfg</tt>. Its contents might look something like: | ||
+ | |||
+ | <pre> | ||
+ | // This file was auto-generated by SourceMod (v1.0.0.986) | ||
+ | // ConVars for plugin "hat.smx" | ||
+ | |||
+ | |||
+ | // MySQL database | ||
+ | // - | ||
+ | // Default: "" | ||
+ | mysqlk_database "" | ||
+ | </pre> | ||
+ | |||
+ | SourceMod executes <tt>sourcemod.cfg</tt> and each of these plugin files every mapchange, directly after <tt>server.cfg</tt> is ran. | ||
+ | |||
+ | =Databases or SQL= | ||
+ | The <tt>addons/sourcemod/configs/databases.cfg</tt> file allows you to create named SQL database configurations. Plugins use these named configurations to establish database connections. For more information on editing this file, see [[SQL_Admins_%28SourceMod%29#Configuration|Configuring SQL]]. | ||
=Map Lists= | =Map Lists= | ||
Line 31: | Line 60: | ||
More documentation is contained inside the file header. | More documentation is contained inside the file header. | ||
− | = | + | =Plugin Loading= |
− | The <tt>addons/sourcemod/configs/ | + | The <tt>addons/sourcemod/configs/plugin_settings.cfg</tt> has one primary purpose: "permanently" putting specific or any plugins into debug mode for the life time of the server. Generally, the other settings should not be touched. |
+ | |||
+ | You can also block plugins from loading using this file. For example, SourceBans requires the disabling of <tt>basebans.smx</tt>. You can tell Core to block <tt>basebans.smx</tt> from ever loading. | ||
+ | |||
[[Category:SourceMod Documentation]] | [[Category:SourceMod Documentation]] |
Latest revision as of 21:27, 11 September 2019
Language: | English • 中文 |
---|
This document overviews some of the configuration concepts in SourceMod.
Contents
Configuration Types
SourceMod's configuration files fall into two folders:
- cfg/sourcemod - These are .cfg files which contain cvars/commands. They can be run via 'exec' in the server console.
- addons/sourcemod/configs - These are files that contain special or advanced formats. Take care when editing them; they cannot be run via the server console.
Admins
- For admins_simple.ini and admins.cfg, see Adding Admins.
- For admin_groups.cfg, see Adding Groups.
- For admin_overrides.cfg, see Overriding Command Access.
The admin_levels.cfg should never be edited.
Admin Menu
For editing adminmenu_cfgs.txt or adminmenu_sorting.txt, see Admin Menu Configuration.
Core Configuration
The addons/sourcemod/configs/core.cfg file contains settings that will rarely need to be changed. Here you can change settings related to:
- Logging
- Server Language
- Chat Trigger Behavior
- Admin Password Variable
- Menu Sounds
Cvars and sourcemod.cfg
The cfg/sourcemod/sourcemod.cfg file contains all cvars that are included by default with SourceMod. Each cvar is accompanied comments containing:
- A small bit of documentation.
- The default value, in case you forget.
- The plugin which provides the cvar, or none if Core is the provider.
Reference the actual file for further information.
There are many cvars associated with SourceMod that are not in the sourcemod.cfg file. For plugins which follow proper guidelines, SourceMod will automatically generate a configuration file in the above format for each plugin. For example, a plugin called hat.smx would have a file called cfg/sourcemod/plugin.hat.cfg. Its contents might look something like:
// This file was auto-generated by SourceMod (v1.0.0.986) // ConVars for plugin "hat.smx" // MySQL database // - // Default: "" mysqlk_database ""
SourceMod executes sourcemod.cfg and each of these plugin files every mapchange, directly after server.cfg is ran.
Databases or SQL
The addons/sourcemod/configs/databases.cfg file allows you to create named SQL database configurations. Plugins use these named configurations to establish database connections. For more information on editing this file, see Configuring SQL.
Map Lists
The addons/sourcemod/configs/maplists.cfg file is used to configure how SourceMod builds lists of maps. Each section is a named list that can be used by plugins. If a plugin requests a list that does not exist, it will fall back to a default section, then to the file referenced via the mapcyclefile cvar, and finally to the list of maps in the maps folder.
By tweaking this file, you can consolidate all map lists into one file, or use separate map lists for individual needs.
More documentation is contained inside the file header.
Plugin Loading
The addons/sourcemod/configs/plugin_settings.cfg has one primary purpose: "permanently" putting specific or any plugins into debug mode for the life time of the server. Generally, the other settings should not be touched.
You can also block plugins from loading using this file. For example, SourceBans requires the disabling of basebans.smx. You can tell Core to block basebans.smx from ever loading.