{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "$comment": "This JSON Schema validates blueprint files that define the configuration structure for mods using the Mod Configuration Menu (MCM).\nIt ensures the blueprint adheres to the expected format and contains all necessary elements for proper MCM integration.", "properties": { "Optional": { "type": "boolean", "description": "Whether the MCM usage is optional or not. Default is `false` and will warn if the meta.lsx is missing MCM as a dependency.", "default": false }, "SchemaVersion": { "type": "integer", "oneOf": [ { "const": 1, "description": "SchemaVersion 1 is used for all MCM blueprints that are built for MCM 1.0.0 and above (but not for MCM 2.0.0, if it ever exists)." } ], "description": "The version of the MCM schema that this file uses. This is used to ensure that the file is compatible with the version of MCM that is being used.\nDO NOT CHANGE THIS VALUE unless you know what you are doing. Use the version corresponding to the MCM version you are developing for.\nSchema versions will follow MCM's MAJOR versions: SchemaVersion 1 is used for MCM 1.0.0 and above, SchemaVersion 2 will be used for MCM 2.0.0 and above, and so on." }, "ModName": { "type": "string", "minLength": 1, "description": "The name of the mod to use instead of its registered name. This can be useful for mods that have registered names that are not properly formatted or for mods that historically had multiple names due to multiple versions.\nNote that you can always change your mod's name in its meta.lsx file without repercussions.\nIf you want to only provide localization support, you can skip this and only define Handles.", "examples": [ "My Mod Name To Be Displayed On MCM" ] }, "ModDescription": { "type": [ "string", "null" ], "description": "The description of the mod to use instead of its registered description. This can be useful to hide the description or to provide a custom one for MCM.\nNote that you can always change your mod's description in its meta.lsx file without repercussions.\nIf you want to only provide localization support, you can skip this and only define Handles.", "examples": [ "My Mod Description To Be Displayed On MCM" ] }, "Handles": { "$ref": "#/definitions/TopLevelHandles", "description": "Handles to localize the top-level mod's strings." }, "Tabs": { "description": "The tabs that will be displayed in the MCM menu.\nEach tab can contain either sections or settings.\nTabs are displayed in the order that they are defined in this file, in the top section of MCM's ImGui window.", "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/Tab" } }, "Sections": { "description": "The sections that will be displayed in the MCM menu.\nEach section can contain either tabs or settings.\nSections are displayed in the order that they are defined in this file.", "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/Section" } }, "Settings": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/definitions/Setting" }, "description": "The list of sections to be displayed outside of any tabs in the MCM menu.\nIt is advised to use tabs and sections instead of settings at root level, as this can lead to an unorganized MCM menu." } }, "required": [ "SchemaVersion" ], "oneOf": [ { "required": [ "Tabs" ] }, { "required": [ "Sections" ] }, { "required": [ "Settings" ] } ], "definitions": { "Tab": { "type": "object", "additionalProperties": false, "description": "A single tab in the MCM menu.", "properties": { "TabName": { "type": "string", "minLength": 1, "description": "The name of the tab that will be displayed in the MCM menu, on the tab's button.\nWill be localized if a handle is provided." }, "TabId": { "type": "string", "minLength": 1, "description": "The unique identifier for the tab.\nThis value should be unique across all tabs in the blueprint." }, "TabDescription": { "type": "string", "minLength": 1, "description": "The description of the tab.\nWill be localized if a handle is provided.\nCurrently unused.", "$comment": "This might not be used at all, but it's here just in case." }, "VisibleIf": { "$ref": "#/definitions/VisibilityCondition", "description": "Array of Conditions that determine the visibility of this tab.\nA Condition is an object with SettingId, Operator, and ExpectedValue." }, "Tabs": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/Tab" }, "description": "The tabs that will be displayed within the tab. They provide a distinct visual separation in the MCM menu." }, "Sections": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/Section" }, "description": "The sections that will be displayed within the tab. They provide a distinct visual separation in the MCM menu, with headers and optional descriptions." }, "Settings": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/definitions/Setting" }, "description": "The settings that will be displayed within the tab." }, "Handles": { "$ref": "#/definitions/TabHandles", "description": "Handles to localize the tab's strings." } }, "anyOf": [ { "required": [ "Settings" ] }, { "required": [ "Tabs" ] }, { "required": [ "Sections" ] } ], "required": [ "TabId", "TabName" ] }, "Setting": { "type": "object", "required": [ "Id", "Name", "Type" ], "allOf": [ { "if": { "properties": { "Type": { "const": "event_button" } } }, "then": { "properties": { "Default": { "anyOf": [ { "type": "null" }, { "type": "integer" }, { "type": "number" }, { "type": "boolean" }, { "type": "string" }, { "type": "object" }, { "type": "array" } ], "description": "The default value is optional for event_button. It is not used." }, "Options": { "type": "object", "additionalProperties": false, "properties": { "Cooldown": { "type": "number" }, "Icon": { "type": "object", "additionalProperties": false, "properties": { "Name": { "type": "string", "minLength": 1 }, "Size": { "type": "object", "additionalProperties": false, "properties": { "Width": { "type": "number" }, "Height": { "type": "number" } }, "required": [ "Width", "Height" ] } }, "required": [ "Name" ] }, "Label": { "type": "string", "minLength": 1 }, "ConfirmDialog": { "type": "object", "additionalProperties": false, "properties": { "Title": { "type": "string" }, "Message": { "type": "string" }, "ConfirmText": { "type": "string" }, "CancelText": { "type": "string" } }, "required": [ "Title", "Message", "ConfirmText", "CancelText" ] } } } } }, "else": { "required": [ "Default" ], "properties": { "Default": { "anyOf": [ { "type": "integer" }, { "type": "number" }, { "type": "boolean" }, { "type": "string" }, { "type": "object" }, { "type": "null" }, { "type": "array" } ], "description": "The default value of the setting. It will be used for initialization and as a fallback if the current value is not found or invalid." } } } } ], "anyOf": [ { "required": [ "Description" ] }, { "required": [ "Tooltip" ] } ], "additionalProperties": false, "properties": { "Id": { "type": "string", "minLength": 1, "description": "The unique identifier for the setting, used to identify the setting in the code for both MCM and the mod consuming the API.\nThis will be used in your code, so it still should be human-readable and descriptive." }, "OldId": { "type": "string", "minLength": 1, "description": "The former unique identifier for the setting, used in order to keep user value if changing Id for any reason.\nNot needed if you are not changing the Id of a setting." }, "Name": { "type": "string", "minLength": 1, "description": "The name of the setting as it will be displayed in the MCM menu.\nWill be localized if a handle is provided." }, "Type": { "type": "string", "minLength": 1, "oneOf": [ { "const": "int", "description": "An input field for an integer value." }, { "const": "float", "description": "An input field for a floating-point number." }, { "const": "checkbox", "description": "A boolean checkbox." }, { "const": "text", "description": "A single-line string text input." }, { "const": "list_v2", "description": "A versatile list of items accompanied by a text input field for adding new items, global and individual toggles, and search bar. If default values are provided, the list will be initialized with them. Replaces the deprecated 'list' type." }, { "const": "enum", "description": "An enumeration of predefined values, displayed as a dropdown list where only one value can be selected." }, { "const": "slider_int", "description": "A slider for integer values; can be used for a range of values defined between a Min and Max value." }, { "const": "slider_float", "description": "A slider for floating-point values; can be used for a range of values defined between a Min and Max value." }, { "const": "drag_int", "description": "A draggable input for integer values." }, { "const": "drag_float", "description": "A draggable input for floating-point values." }, { "const": "radio", "description": "A set of radio buttons. Options passed in are mutually exclusive." }, { "const": "color_picker", "description": "A square color picker widget that allows the user to select a color with the mouse, while also having color fields for manual input." }, { "const": "color_edit", "description": "A color editor widget. Similar to a color picker, but with only the color fields displayed." }, { "const": "keybinding_v2", "description": "A keybinding/hotkey input, consisting of optional modifiers and a key, and listed in the 'Hotkeys' section of MCM. Replaces the deprecated 'keybinding' type. Remember to inject the hotkey functionality in your mod via the MCM API, otherwise the hotkeys will not do anything." }, { "const": "event_button", "description": "A button that executes a Lua function when clicked. The callback must be defined in the mod's code during runtime." } ], "description": "The type of the setting, which determines which ImGui widget will be displayed in the MCM menu." }, "Default": { "anyOf": [ { "type": "integer" }, { "type": "number" }, { "type": "boolean" }, { "type": "string" }, { "type": "object" }, { "type": "null" }, { "type": "array" } ], "description": "The default value of the setting. It will be used for initialization and as a fallback if the current value is not found or invalid in the settings JSON." }, "Tooltip": { "type": "string", "minLength": 1, "description": "The tooltip that will be displayed when the user hovers over the setting in the MCM menu. Will be localized if a handle is provided." }, "Description": { "type": "string", "minLength": 1, "description": "The description of the setting that will be displayed as text next to the ImGui widget in the MCM menu. Will be localized if a handle is provided." }, "Options": { "type": "object", "properties": { "ConfirmDialog": { "type": "object", "properties": { "Title": { "type": "string", "description": "Title of the confirmation dialog" }, "Message": { "type": "string", "description": "Message to display in the confirmation dialog" }, "ConfirmText": { "type": "string", "description": "Text for the confirm button", "default": "Confirm" }, "CancelText": { "type": "string", "description": "Text for the cancel button", "default": "Cancel" } }, "required": [ "Title", "Message" ], "description": "Configuration for the confirmation dialog that appears when the button is clicked. If not provided, no confirmation will be shown." }, "Cooldown": { "type": [ "number", "null" ], "minimum": -1, "description": "Cooldown duration in seconds before the button can be clicked again. -1 means infinite cooldown. 0 or undefined means no cooldown." }, "Icon": { "type": "object", "properties": { "Name": { "type": "string", "description": "Name of the icon to display on the button. Must be a valid icon name from the game's icon set." }, "Size": { "type": "object", "properties": { "Width": { "type": "number", "description": "Width of the icon in pixels." }, "Height": { "type": "number", "description": "Height of the icon in pixels." } }, "required": [ "Width", "Height" ], "description": "Size of the icon in pixels." } }, "required": [ "Name" ], "description": "Icon configuration for the event_button, including Name and optional Size." }, "Label": { "type": "string", "description": "Label for the button. Will be localized if a handle is provided." } }, "description": "Additional options for the setting, depending on its type (e.g. choices for enum and radio types, min and max for slider type). For event_button type, can include ConfirmDialog, Cooldown, Icon, and Label." }, "Handles": { "$ref": "#/definitions/SettingHandles", "description": "Handles to localize the setting's strings." }, "VisibleIf": { "$ref": "#/definitions/VisibilityCondition", "description": "Array of Conditions that determine the visibility of this setting. A Condition is an object with SettingId, Operator, and ExpectedValue." } }, "if": { "properties": { "Type": { "enum": [ "enum", "radio" ] } } }, "then": { "required": [ "Options" ], "properties": { "Options": { "type": "object", "properties": { "Choices": { "type": "array", "minItems": 1, "items": { "type": "string" }, "description": "The available set of choices for the enum/radio. Will be localized if handles are provided (ChoicesHandles)" } }, "required": [ "Choices" ] } } }, "else": { "if": { "properties": { "Type": { "enum": [ "slider_int", "slider_float", "drag_int", "drag_float" ] } } }, "then": { "required": [ "Options" ], "properties": { "Options": { "type": "object", "properties": { "Min": { "type": "number", "description": "The minimum value for the slider/drag." }, "Max": { "type": "number", "description": "The maximum value for the slider/drag." } }, "required": [ "Min", "Max" ] } } }, "else": { "if": { "properties": { "Type": { "const": "text" } } }, "then": { "properties": { "Options": { "type": "object", "properties": { "Multiline": { "type": "boolean", "description": "Whether the text input should be multiline. Disabled by default." } } } } }, "else": { "if": { "properties": { "Type": { "const": "list_v2" } } }, "then": { "properties": { "Options": { "type": "object", "properties": { "PageSize": { "type": "integer", "minimum": 5, "maximum": 20, "description": "The number of items to display in the list at once. Minimum 5, maximum 20. 5 by default.", "default": 10 }, "ShowSearchBar": { "type": "boolean", "description": "Whether to show a search bar in the list. Will search through all items and filter the list. Enabled by default.", "default": false }, "ReadOnly": { "type": "boolean", "description": "Whether the list is read-only or not. This will disable the ability to add or remove items from the list. Disabled by default.", "default": true }, "AllowReordering": { "type": "boolean", "description": "Whether the list allows reordering items UI. Disabled by default.", "default": true }, "Suggestions": { "type": "array", "items": { "type": "string" }, "description": "A list of suggestions that will be displayed when the user types in the input box." } } } } }, "else": { "if": { "properties": { "Type": { "const": "keybinding_v2" } } }, "then": { "properties": { "Default": { "type": "object", "properties": { "Enabled": { "type": "boolean", "description": "Indicates if the keybinding is enabled." }, "Keyboard": { "type": "object", "properties": { "ModifierKeys": { "type": "array", "items": { "type": "string", "enum": [ "LCtrl", "LShift", "LAlt", "Meta" ] }, "description": "Modifier keys for the keyboard binding.", "minItems": 0 }, "Key": { "type": "string", "enum": [ "", "UNKNOWN", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "NUM_1", "NUM_2", "NUM_3", "NUM_4", "NUM_5", "NUM_6", "NUM_7", "NUM_8", "NUM_9", "NUM_0", "RETURN", "ESCAPE", "BACKSPACE", "TAB", "SPACE", "MINUS", "EQUALS", "LEFTBRACKET", "RIGHTBRACKET", "BACKSLASH", "NONUSHASH", "SEMICOLON", "APOSTROPHE", "GRAVE", "COMMA", "PERIOD", "SLASH", "CAPSLOCK", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "PRINTSCREEN", "SCROLLLOCK", "PAUSE", "INSERT", "HOME", "PAGEUP", "DEL", "END", "PAGEDOWN", "RIGHT", "LEFT", "DOWN", "UP", "NUMLOCKCLEAR", "KP_DIVIDE", "KP_MULTIPLY", "KP_MINUS", "KP_PLUS", "KP_ENTER", "KP_1", "KP_2", "KP_3", "KP_4", "KP_5", "KP_6", "KP_7", "KP_8", "KP_9", "KP_0", "KP_PERIOD", "NONUSBACKSLASH", "APPLICATION", "POWER", "KP_EQUALS", "F13", "F14", "F15", "F16", "F17", "F18", "F19", "F20", "F21", "F22", "F23", "F24", "EXECUTE", "HELP", "MENU", "SELECT", "STOP", "AGAIN", "UNDO", "CUT", "COPY", "PASTE", "FIND", "MUTE", "VOLUMEUP", "VOLUMEDOWN", "KP_COMMA", "KP_EQUALSAS400", "INTERNATIONAL1", "INTERNATIONAL2", "INTERNATIONAL3", "INTERNATIONAL4", "INTERNATIONAL5", "INTERNATIONAL6", "INTERNATIONAL7", "INTERNATIONAL8", "INTERNATIONAL9", "LANG1", "LANG2", "LANG3", "LANG4", "LANG5", "LANG6", "LANG7", "LANG8", "LANG9", "ALTERASE", "SYSREQ", "CANCEL", "CLEAR", "PRIOR", "RETURN2", "SEPARATOR", "KEY_OUT", "OPER", "CLEARAGAIN", "CRSEL", "EXSEL", "KP_00", "KP_000", "THOUSANDSSEPARATOR", "DECIMALSEPARATOR", "CURRENCYUNIT", "CURRENCYSUBUNIT", "KP_LEFTPAREN", "KP_RIGHTPAREN", "KP_LEFTBRACE", "KP_RIGHTBRACE", "KP_TAB", "KP_BACKSPACE", "KP_A", "KP_B", "KP_C", "KP_D", "KP_E", "KP_F", "KP_XOR", "KP_POWER", "KP_PERCENT", "KP_LESS", "KP_GREATER", "KP_AMPERSAND", "KP_DBLAMPERSAND", "KP_VERTICALBAR", "KP_DBLVERTICALBAR", "KP_COLON", "KP_HASH", "KP_SPACE", "KP_AT", "KP_EXCLAM", "KP_MEMSTORE", "KP_MEMRECALL", "KP_MEMCLEAR", "KP_MEMADD", "KP_MEMSUBTRACT", "KP_MEMMULTIPLY", "KP_MEMDIVIDE", "KP_PLUSMINUS", "KP_CLEAR", "KP_CLEARENTRY", "KP_BINARY", "KP_OCTAL", "KP_DECIMAL", "KP_HEXADECIMAL", "LCTRL", "LSHIFT", "LALT", "LGUI", "RCTRL", "RSHIFT", "RALT", "RGUI", "MODE", "AUDIONEXT", "AUDIOPREV", "AUDIOSTOP", "AUDIOPLAY", "AUDIOMUTE", "MEDIASELECT", "WWW", "MAIL", "CALCULATOR", "COMPUTER", "AC_SEARCH", "AC_HOME", "AC_BACK", "AC_FORWARD", "AC_STOP", "AC_REFRESH", "AC_BOOKMARKS", "BRIGHTNESSDOWN", "BRIGHTNESSUP", "DISPLAYSWITCH", "KBDILLUMTOGGLE", "KBDILLUMDOWN", "KBDILLUMUP", "EJECT", "SLEEP", "APP1", "APP2", "AUDIOREWIND", "AUDIOFASTFORWARD", "SOFTLEFT", "SOFTRIGHT", "CALL", "ENDCALL" ], "description": "Primary key for the keyboard binding. Listed in the enum" } }, "anyOf": [ { "required": [ "Key" ] }, { "required": [ "ModifierKeys" ] } ], "additionalProperties": false }, "Mouse": { "type": "object", "properties": { "Button": { "type": "string", "pattern": "^[0-9]+$", "description": "Mouse button number for the mouse binding. NOT IMPLEMENTED." } }, "required": [ "Button" ], "additionalProperties": false } }, "anyOf": [ { "oneOf": [ { "required": [ "Keyboard" ] }, { "required": [ "Mouse" ] } ] } ], "description": "Default keybinding configuration. Keyboard and Mouse are mutually exclusive, and Keyboard takes precedence." }, "Options": { "type": "object", "properties": { "ShouldTriggerOnKeyDown": { "type": "boolean", "description": "Trigger the action when the key is pressed down. Default: true", "default": true }, "ShouldTriggerOnKeyUp": { "type": "boolean", "description": "Trigger the action when the key is released. Default: false", "default": false }, "ShouldTriggerOnRepeat": { "type": "boolean", "description": "Trigger the action repeatedly while the key is held down. Default: false", "default": false }, "IsDeveloperOnly": { "type": "boolean", "description": "Make this keybinding only visible if developer mode is enabled. Default: false", "default": false }, "BlockIfLevelNotStarted": { "type": "boolean", "description": "Prevent the keybinding from triggering when the game level has not started yet. Useful for actions that should only work in-game, not in the main menu. Default: false", "default": false }, "PreventAction": { "type": "boolean", "description": "When true (default), the keybinding will prevent the original game action. When false, allows the original action to occur (i.e. the key event will 'fall through').", "default": true }, "AllowConflict": { "type": "boolean", "description": "Whether this keybinding should conflict with other keybindings. Default: true", "default": true }, "SkipCallback": { "type": "boolean", "description": "Whether to skip checking for an existing callback for this keybinding. Default: false", "default": true } }, "additionalProperties": false, "description": "Optional: Options for how the keybinding should behave." } } }, "else": {} } } } }, "description": "A single setting in the MCM menu, which can be of various types for different input methods.", "examples": [ { "Id": "IntSetting", "Name": "Integer Setting", "Type": "int", "Default": 10, "Tooltip": "This is an integer setting.", "Description": "This setting accepts integer values." }, { "Id": "FloatSetting", "Name": "Float Setting", "Type": "float", "Default": 0.5, "Tooltip": "This is a float setting.", "Description": "This setting accepts floating-point values." }, { "Id": "CheckboxSetting", "Name": "Checkbox Setting", "Type": "checkbox", "Default": true, "Tooltip": "This is a checkbox setting.", "Description": "This setting can be toggled on or off." }, { "Id": "TextSetting", "Name": "Text Setting", "Type": "text", "Default": "default text", "Tooltip": "This is a text setting.", "Description": "This setting accepts string values." }, { "Id": "ListV2Setting", "Name": "List V2 Setting", "Type": "list_v2", "Description": "This is a list v2 setting", "Default": { "Enabled": true, "Elements": [ { "name": "a", "enabled": true }, { "name": "b", "enabled": true }, { "name": "c", "enabled": true }, { "name": "d", "enabled": false }, { "name": "e", "enabled": false }, { "name": "f", "enabled": false } ] }, "Options": { "PageSize": 5, "ShowSearchBar": true, "Suggestions": [ "element 1", "element 2" ] } }, { "Id": "EnumSetting", "Name": "Enum Setting", "Type": "enum", "Default": "Option1", "Options": { "Choices": [ "Option1", "Option2", "Option3" ] }, "Tooltip": "This is an enum setting.", "Description": "This setting allows selecting one option from a predefined list." }, { "Id": "SliderIntSetting", "Name": "Slider Int Setting", "Type": "slider_int", "Default": 5, "Options": { "Min": 0, "Max": 10 }, "Tooltip": "This is an integer slider setting.", "Description": "This setting allows selecting an integer value within a range." }, { "Id": "SliderFloatSetting", "Name": "Slider Float Setting", "Type": "slider_float", "Default": 0.75, "Options": { "Min": 0.0, "Max": 1.0 }, "Tooltip": "This is a float slider setting.", "Description": "This setting allows selecting a floating-point value within a range." }, { "Id": "DragIntSetting", "Name": "Drag Int Setting", "Type": "drag_int", "Default": 3, "Options": { "Min": 0, "Max": 3 }, "Tooltip": "This is an integer drag setting.", "Description": "This setting allows dragging to select an integer value." }, { "Id": "DragFloatSetting", "Name": "Drag Float Setting", "Type": "drag_float", "Default": 0.25, "Options": { "Min": 0.0, "Max": 1.0 }, "Tooltip": "This is a float drag setting.", "Description": "This setting allows dragging to select a floating-point value." }, { "Id": "RadioSetting", "Name": "Radio Setting", "Type": "radio", "Default": "Choice1", "Options": { "Choices": [ "Choice1", "Choice2", "Choice3" ] }, "Tooltip": "This is a radio setting.", "Description": "This setting allows selecting one option from a set of radio buttons." }, { "Id": "ColorPickerSetting", "Name": "Color Picker Setting", "Type": "color_picker", "Default": [ 0.0, 1.0, 0.5, 1.0 ], "Tooltip": "This is a color picker setting.", "Description": "This setting allows selecting a color using a color picker." }, { "Id": "ColorEditSetting", "Name": "Color Edit Setting", "Type": "color_edit", "Default": [ 0.0, 1.0, 0.5, 1.0 ], "Tooltip": "This is a color edit setting.", "Description": "This setting allows editing a color value directly." }, { "Id": "KeybindingV2Setting", "Name": "Keybinding Setting", "Type": "keybinding_v2", "Default": { "Keyboard": { "ModifierKeys": [ "LCtrl", "LShift" ], "Key": "K" } }, "Tooltip": "This is a keybinding setting.", "Description": "This setting allows setting a keybinding with an optional modifier.", "Options": { "ShouldTriggerOnKeyDown": true, "ShouldTriggerOnKeyUp": false, "ShouldTriggerOnRepeat": false } }, { "Id": "EventButtonExample", "Name": "Event Button Example", "Type": "event_button", "Description": "Click this button to trigger an action in the mod.", "Options": { "ConfirmDialog": { "Title": "Confirm Action", "Message": "Are you sure you want to perform this action?", "ConfirmText": "Yes, do it", "CancelText": "No, cancel" }, "Cooldown": 5, "Icon": { "Name": "Action_Jump", "Size": { "Width": 20, "Height": 20 } } } } ] }, "Section": { "type": "object", "additionalProperties": false, "properties": { "SectionId": { "type": "string", "minLength": 1, "description": "The unique identifier for the section. This value should be unique across all sections in the blueprint." }, "SectionName": { "type": "string", "minLength": 1, "description": "The name of the section that will be displayed as a header in the MCM menu. Will be localized if a handle is provided." }, "SectionDescription": { "type": "string", "minLength": 1, "description": "The description of the section that will be displayed as a description in the MCM menu. Will be localized if a handle is provided." }, "Tabs": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/Tab" }, "description": "The tabs that will be displayed within the section. They provide a distinct visual separation in the MCM menu, with headers and optional descriptions." }, "Settings": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/definitions/Setting" }, "description": "The settings that will be displayed within the section." }, "Handles": { "$ref": "#/definitions/SectionHandles", "description": "Handles to localize the section's strings." }, "VisibleIf": { "$ref": "#/definitions/VisibilityCondition", "description": "Array of Conditions that determine the visibility of this section. Condition is an object with SettingId, Operator, and ExpectedValue." }, "Options": { "type": "object", "additionalProperties": false, "properties": { "IsCollapsible": { "type": "boolean", "description": "Whether the section is collapsible or not.", "default": true } } } }, "required": [ "SectionName", "SectionId" ], "anyOf": [ { "required": [ "Settings" ] }, { "required": [ "Tabs" ] } ], "description": "A section within a tab in the MCM menu." }, "TabHandles": { "type": "object", "additionalProperties": false, "properties": { "NameHandle": { "type": "string", "minLength": 1, "description": "The handle to be used to localize the name of the tab." }, "DescriptionHandle": { "type": "string", "minLength": 1, "description": "The handle to be used to localize the description of the tab." } }, "required": [ "NameHandle" ], "description": "Handles that can be used to localize tab strings." }, "TopLevelHandles": { "type": "object", "additionalProperties": false, "properties": { "NameHandle": { "type": "string", "minLength": 1, "description": "The handle to be used to localize the name of the mod." }, "DescriptionHandle": { "type": "string", "minLength": 1, "description": "The handle to be used to localize the description of the mod." } }, "required": [ "NameHandle" ], "description": "Handles that can be used to localize the top-level mod strings." }, "SectionHandles": { "type": "object", "additionalProperties": false, "properties": { "NameHandle": { "type": "string", "minLength": 1, "description": "The handle to be used to localize the name of the section." }, "DescriptionHandle": { "type": "string", "minLength": 1, "description": "The handle to be used to localize the description of the section." } }, "required": [ "NameHandle" ], "description": "A list of handles that can be used to localize a section." }, "SettingHandles": { "type": "object", "additionalProperties": false, "properties": { "NameHandle": { "type": "string", "minLength": 1, "description": "The handle to be used to localize the name of the setting." }, "DescriptionHandle": { "type": "string", "minLength": 1, "description": "The handle to be used to localize the description of the setting." }, "TooltipHandle": { "type": "string", "minLength": 1, "description": "The handle to be used to localize the tooltip of the setting." }, "ChoicesHandles": { "type": "array", "items": { "type": "string", "minLength": 1 }, "description": "Handles to be used to localize choices for enums/radios." }, "EventButtonHandles": { "type": "object", "additionalProperties": false, "properties": { "LabelHandle": { "type": "string", "minLength": 1, "description": "The handle to be used to localize the label of the button." }, "ConfirmDialogHandles": { "type": "object", "additionalProperties": false, "properties": { "TitleHandle": { "type": "string", "minLength": 1, "description": "The handle to be used to localize the title of the confirmation dialog." }, "MessageHandle": { "type": "string", "minLength": 1, "description": "The handle to be used to localize the message of the confirmation dialog." }, "ConfirmTextHandle": { "type": "string", "minLength": 1, "description": "The handle to be used to localize the confirm text of the confirmation dialog." }, "CancelTextHandle": { "type": "string", "minLength": 1, "description": "The handle to be used to localize the cancel text of the confirmation dialog." } }, "required": [ "TitleHandle", "MessageHandle", "ConfirmTextHandle", "CancelTextHandle" ] } } } }, "required": [ "NameHandle" ], "description": "Handles that can be used to localize a setting." }, "VisibilityCondition": { "type": "object", "additionalProperties": false, "minItems": 1, "uniqueItems": true, "properties": { "LogicalOperator": { "type": "string", "enum": [ "and", "or" ], "description": "The logical operator to use between the conditions. Defaults to 'and'." }, "Conditions": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/Condition" } } }, "required": [ "Conditions" ], "description": "A boolean expression that determines the visibility of this element." }, "Condition": { "type": "object", "additionalProperties": false, "properties": { "SettingId": { "type": "string", "description": "The ID of the setting used for the comparison." }, "Operator": { "type": "string", "oneOf": [ { "const": "==", "description": "Check if value of SettingId is equal to ExpectedValue" }, { "const": "!=", "description": "Check if value of SettingId is not equal to ExpectedValue" }, { "const": ">", "description": "Check if value of SettingId is greater than ExpectedValue" }, { "const": "<", "description": "Check if value of SettingId is less than ExpectedValue" }, { "const": ">=", "description": "Check if value of SettingId is greater than or equal to ExpectedValue" }, { "const": "<=", "description": "Check if value of SettingId is less than or equal to ExpectedValue" } ], "description": "The operator to use for the comparison, as in the following order: setting's value ExpectedValue." }, "ExpectedValue": { "anyOf": [ { "type": "string" }, { "type": "boolean" } ], "description": "The expected value of the setting specified by SettingId for this element to be visible." } }, "required": [ "SettingId", "Operator", "ExpectedValue" ] } } }