Skip to content

nut.config

Library for creating and setting config options within the framework.

Configs allow various framework settings and variables to be editted live within the game, without the need to update server files and cause an update/restart.

Functions

nut.config.add (key, value, desc, callback, data, noNetworking, schemaOnly)
nut.config.add

Add a new config.

Parameters:

string key Unique ID of the config

vararg value default value of the config

string desc Description of the config

function callback Function to call when the config changes

table data Additional settings for the config

boolean noNetworking Whether changes to the config should be networked to clients

boolean schemaOnly Whether the config should affect only the schema or NutScript globally (ie, if the server loads another schema, whether the config should apply to the other schema as well)

Usage:

    1
    2
    3
    4
     nut.config.add("oocDelay", 10, "The delay before a player can use OOC chat again in seconds.", nil, {
        data = {min = 0, max = 10000},
        category = "chat"
    })
    

Fields

nut.config.language
nut.config.language

Default framework language. Natively supported languages can be found here.