Skip to content

3. Module Configuration Guide

Corey D edited this page Oct 18, 2022 · 1 revision

Configuring Modules

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.

Quick Example

"UltraVIP - Module Configuration"
{
    "VIP"
    {
        "SomeModule's Settings"
        {
            "setting_1" "123"
            "setting_2" "123"
        }

        "setting_3" "123"
    }

    "Super-VIP"
    {
        // ...
    }

    // ...
}

Step-by-step Example

Start with opening addons/sourcemod/configs/ultra_vip_modules.cfg, which (when empty) looks something like this:

"UltraVIP - Module Configuration"
{
}

Add a section for each service in ultra_vip_main.cfg.

"UltraVIP - Module Configuration"
{
    "Service Name" // This name must match exactly (and is case-insensitive)!
    {
    }
}

Add/Configure each module setting for each service as needed.

"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).

(Optional) Create your own sections to organize settings for yourself.

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"
    }
}

Clone this wiki locally