Skip to content

mwseMCMSettingNewVariable⚓︎

This table structure is used in mwseMCMSetting:new().

Properties⚓︎

class⚓︎

The variable type to create. One of the following:

  • "ConfigVariable"
  • "Custom"
  • "Global"
  • "GlobalBoolean"
  • "PlayerData"
  • "TableVariable"
  • "Variable"

Returns:

  • result (string)

converter⚓︎

Optional. This function is called when the value of the variable is changed. The function can modify the new value before it is saved.

Returns:

  • result (nil, fun(newValue): unknown?)

getter⚓︎

Optional. Used only in Custom variable.

Returns:


id⚓︎

Optional. The unique identifier for the variable.

Returns:

  • result (string?)

inGameOnly⚓︎

Optional. Default: false. If true, the setting containing this variable will be disabled if the game is on main menu.

Returns:

  • result (boolean?)

path⚓︎

Optional. Used only for ConfigVariable and PlayerData.

Returns:

  • result (string?)

restartRequired⚓︎

Optional. Default: false. If true, updating the setting containing this variable will notify the player to restart the game.

Returns:

  • result (boolean?)

restartRequiredMessage⚓︎

Optional. The default text is a localized version of: "The game must be restarted before this change will come into effect.".

Returns:

  • result (string?)

setter⚓︎

Optional. Used only in Custom variable.

Returns:


table⚓︎

Optional. The table to save the data to. Used only in TableVariable.

Returns:

  • result (table?)