Skip to content

Modifier Config Settings

Quick Start: Spice it up with twists.

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, falling back to the default when nothing is stored, and return null when the path is missing or names a folder.

Shape

Each setting holds a definition block. Runtime configurations land in lobby-config.yml (see Operator values below). Folders hold a folder listing instead of a value.

config:
  settings:
    beef-amount:  # setting
      def:
        meta:
          name: Beef Amount
          desc: The amount of beef given per player.
          icon: COOKED_BEEF
        value:
          type: INTEGER
          default: 8
          allowed:
            min: 1
            max: 64
    announce:  # folder
      def:
        meta:
          name: Feedback
          desc: Announcements to players.
          icon: BELL
        folder:
          - sound-feedback:  # setting
              meta:
                name: Sound Feedback
                desc: Sound to play on food given.
                icon: AMETHYST_SHARD
              def:
                value:
                  type: SOUND
                  default: [true, block.amethyst_block.step, 0.8, 1.0]  # enabled, id, pitch, vol

Access nested settings in-code: <setting:announce.sound-feedback>.

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
BLOCK upper-case placeable block id, even non-collidable ones like torches and signs none, non-blocks refuse
SOLID_BLOCK upper-case collidable block id (packed ice, stairs, flower pots) none, non-solid blocks 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 default (and for value when a file overrides it):

item_list:
  default: [[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 the active layer (see Operator values). Settings without a default show no Default bullet and offer no reset: right-click repeats the click action there.
  • 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.
  • 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 default-only 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.
  • 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 drops any stored value back to un-overridden, and editing the value in dev mode sets the default.

Every row follows the native settings format:

  • A description, the live value (the default when nothing is stored), 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. Settings without a default hide the Default line and the reset hint.
  • 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.
  • ENUM rows with a choice list cycle through the choices on click, marking the live value; enums without choices edit as text.
  • SOUND rows open a four-field quad: an enabled toggle plus id, pitch, and volume prompts. The id must resolve to a known sound, and nothing saves until it does.

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 clears the GLOBAL value, restoring the default beneath; define creates a typed leaf defaulting to that type's zero value with no stored value (folders come from YAML or the GUI).

Operator Values

Live values live in layers, read top to bottom: the lobby override, then GLOBAL, then the mod file. Operator edits land in settings/world-engine/lobby-config.yml, never in the mod file, so shipped files stay default-only and updates never clobber tuning.

  • /manhunt modifiers config <id> setting <path> [value] reads and writes GLOBAL; reset clears the GLOBAL value.
  • /manhunt override <lobby> values <get|set|clear> <mod> [path] [value] reads and writes one lobby's layer. get marks each row with its winning layer: (override), (global), or (default).
  • In the GUI, rows show the effective value with a lobby or global mark and glow while any layer above the file is set. An override session (see Lobby Overrides) points every edit at that lobby; right-click reset clears the lobby layer there, GLOBAL otherwise.

Clearing a layer reveals the one beneath it; clearing GLOBAL reveals the file value. Dev mode bypasses every layer and edits file defaults directly.

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 participate in the lobby overrides engine through the operator values layers above. Command lines stay the source of truth for behavior: a setting only takes effect where a behavior reads it.