Skip to content

Modifier Config Settings

For: modifier authors exposing tunables, plus admins tuning mods without touching command lines.

config.settings exposes a modifier's tunables as native GUI controls and chat-editable values. It replaces the old pattern of <lflag:name,default> definition lines at the top of command lists: define the tunable once under config, then read it in any behavior with <setting:id> (or the <s:id> alias). Reads render the live value and return null when the path is missing or names a folder.

Shape

Each entry holds a live value plus a definition block. Folders hold a folder listing instead of a value; every folder needs a meta.icon for its menu button. Keep folders at the root level unless the mod truly needs nesting (bingo nests card pools).

config:
  settings:
    base-y:
      value: 69
      def:
        meta:
          name: Starting Level
          desc: Water Y level at match start.
          icon: BEDROCK
        value:
          type: INTEGER
          default: 50
          allowed:
            min: -64
            max: 320
    announce:
      def:
        meta:
          name: Announcements
        folder:
          - info-message:
              value: true
              def:
                value:
                  type: BOOLEAN
                  default: true
                icon: BELL

meta.name falls back to the key when blank, and icon falls back to paper. Dotted paths reach folder children: <setting:announce.info-message>.

Value Types and Constraints

Types are case-insensitive and normalize to upper case on reload. allowed is optional; empty or null means no restrictions.

Type Value shape allowed shape
BOOLEAN true or false none
INTEGER whole number {min, max} map, open-ended by default
DOUBLE number {min, max} map, open-ended by default
STRING text, at most 256 chars {maxLength, pattern} map
ENUM one choice as text list of choices, first is the fallback
MATERIAL upper-case item id none, unknown items refuse
COLOR hex like ff00aa (#ff00aa, 0x, and 3-digit forms accepted) none
LIST list of texts, nested rows kept as-is list of permitted entries (flat strings only)
EFFECTS list of [id, amplifier, seconds] triples none
ITEMS list of [item, min, max] triples, items validated none
WEIGHTED_ITEM list of [weight, item] pairs, any item strings none
MESSAGE [enabled, text] pair, read as one gate none
SOUND [enabled, id, pitch, volume] quadruple none

List values store as one literal flow line, for both value and default:

item_list:
  value: [[rotten_flesh, 3, 7], [bone, 2, 4]]

The GUI writes this form and the loader reads both flow and block forms, so hand-written block nests keep working. Only identifier-like scalars collapse; entries with spaces or special characters stay block-style. LIST entries may nest one level (for example sound [enabled, id, pitch, volume] rows): the loader keeps nested rows as-is and the GUI prompt round-trips them.

Out-of-range defaults clamp to the nearest boundary with a console warning naming the modifier and path. Invalid stored values reset to the default the same way. Unknown types warn and keep the raw value.

Editing

In the GUI, Configuration opens the settings panel directly: click edits the value, right-click resets it to the default. Shift-click Configuration for dev mode, a twin with Settings plus Advanced. Dev-mode settings add a trailing stick and a shift-click definition editor with a Meta panel (name, description, icon) and a Value panel (type (cycled), value, default, allowed), each row showing its yml path. Boolean defaults flip with the native toggle, enums cycle, and ranged numbers open a default-plus-range twin; other defaults edit through the native branch. Changing the default also updates the value, and editing the value in dev mode updates the default. The stick adds entries through a Paper dialog with name, description, icon material, and an Is Folder checkbox. The checkbox is runtime only (folders persist as a folder block, settings as BOOLEAN blocks defaulting to false); unknown icons fall back to stone. Taken names and paths blocked by the other kind refuse with a chat error. Deleting a modifier or preset asks for confirm; cancelling returns to the Operations panel.

Every row follows the native settings format: a description, the live value, the real path in the modifier file (config.settings.<path>, meta.visibility.*, config.advanced.*), the type, the allowed range, and the default. Rows glow while the value differs from the default, and right-click reset asks for confirm first. The visibility and advanced rows work the same way: the broadcast toggle is the standard boolean item, and each commit sends one chat line with one sound.

Value panels keep each type native. BOOLEAN rows flip in place with no dialog. Bounded INTEGER and DOUBLE rows open a slider dialog clamped to the allowed range; open-ended numbers use the text prompt. ITEMS and EFFECTS rows open a triple list: one pretty row per entry ("Rotten Flesh, 3 to 7"), a trailing stick to append, and right-click to delete. Clicking a row opens its three-item editor: the head (material-validated item, or effect id for EFFECTS), the pair, and delete. The pair edits as min,max text ("3,7" or "3-7" both work): item minimums cannot be negative, effect amplifiers run 0 to 255, and effect seconds accept -1 for forever. Unknown heads, malformed pairs, and out-of-range numbers refuse with a chat error and keep the stored value. Rows that fail to parse show as Invalid entry: delete one and add a fresh entry rather than editing raw triples. Every panel commit navigates to a fresh rebuild, so growing past six full rows switches to the scrolling list on its own, and shrinking back returns to the fitted rows. WEIGHTED_ITEM rows open a twin list instead: one pretty row per entry ("10.0 x Dirt"), with the same stick, delete, and rebuild behavior. Clicking a row opens the twin editor: the weight on the left (any finite number; draws ignore zero and negative weights) and a free-text item string on the right, plus delete. Items are never material-checked, so nested payloads like [diamond, 3, 5] ride through for the draw tags. Weighted lists feed <weighted-pick> and <weighted-picks> directly.

From chat, under the same modifiers permission:

/manhunt modifiers config flood setting base-y 69
/manhunt modifiers config flood reset base-y
/manhunt modifiers config flood define palette.accent COLOR

setting reads with no value and writes with one; reset restores the default; define creates a typed leaf defaulting to that type's zero value (folders come from YAML or the GUI).

Reload and Limits

Reload revalidates every block: unknown setting types warn, folders without an icon warn, ambiguous value-plus-folder nodes keep the value, and duplicate sibling names drop the whole config.settings block with one warning. Settings do not participate in the lobby overrides engine. Command lines stay the source of truth for behavior: a setting only takes effect where a behavior reads it.