-
Notifications
You must be signed in to change notification settings - Fork 1
3. Module Configuration Guide
This assumes you understand what a service is from the configuration guide.
Modules made for Ultra-VIP can create/register settings that can be configured for each service separately.
So that for example, "VIP" could have some setting set to 100 but "Super-VIP" could have it set to 200.
This can be completely configured by the server owner.
"UltraVIP - Module Configuration"
{
"VIP"
{
"SomeModule's Settings"
{
"setting_1" "123"
"setting_2" "123"
}
"setting_3" "123"
}
"Super-VIP"
{
// ...
}
// ...
}Start with opening addons/sourcemod/configs/ultra_vip_modules.cfg, which (when empty) looks something like this:
"UltraVIP - Module Configuration"
{
}"UltraVIP - Module Configuration"
{
"Service Name" // This name must match exactly (and is case-insensitive)!
{
}
}"UltraVIP - Module Configuration"
{
"Service Name"
{
"module_setting" "123" // A configured module setting.
}
}Settings can be ignored if the module says they are optional, in which case a default value set by the module plugin will be used.
If a required setting is forgotten for any service, you will get an error in the SourceMod error logs.
Make sure you use the correct data type for the setting.
If a module says a setting is an integer, you wont be able to use text or decimal numbers like 3.14.
Using the wrong data type for a setting's value will cause an error (which will helpfully tell you exactly what is wrong).
You can add as many sections as you want for each service--they will not affect the settings in any way.
It's just for organising things.
"UltraVIP - Module Configuration"
{
"Service Name"
{
"Section 1"
{
"setting_1" "123"
}
"Section 2"
{
"setting_2" "123"
"A sub-section"
{
"setting_3" "123"
}
}
}
}This is the same as:
"UltraVIP - Module Configuration"
{
"Service Name"
{
// Section 1
"setting_1" "123"
"setting_2" "123"
// Section 2
"setting_3" "123"
}
}