Skip to main content

Script settings

Settings belong in bundle.json, not executable Lua. Hexis validates the schema, renders the settings panel, persists valid values, and gives each run one immutable snapshot.

{
"configSchemaVersion": 1,
"configSchema": {
"type": "object",
"additionalProperties": false,
"required": ["route", "minimum_patch", "enabled"],
"properties": {
"route": {
"type": "string",
"title": "Wheat route",
"default": "user:Hub_Wheat",
"format": "hexis-route",
"maxLength": 160
},
"minimum_patch": {
"type": "integer",
"title": "Minimum patch",
"default": 5,
"minimum": 2,
"maximum": 64,
"step": 1
},
"enabled": {
"type": "boolean",
"title": "Enabled",
"default": true
}
}
}
}

Read values once:

local CONFIG = hexis.config.snapshot()

Changing a setting does not mutate an active run. The next run receives the new validated snapshot.

Supported fields are flat booleans, bounded integers and numbers, and bounded strings. Strings can use an enum or the hexis-route format. Nested settings, arrays, nulls, and arbitrary JSON Schema keywords are not part of API 4.