Skip to content

Configuration

shmitzas edited this page Nov 10, 2026 · 5 revisions

Configuration

config.jsonc (in addons/swiftlys2/configs/plugins/CustomHUD/) holds every CustomHUD setting, under a "CustomHUD" section. It is created on first start.

File Holds
config.jsonc The settings on this page
SwiftlyS2's configs/menus/menus.jsonc The renderer, players' starting mode, page size and keys — Navigation
resources/translations/<language>.jsonc, in the plugin folder Every line players read — Translations
  • Changes apply on save, and the console logs [CustomHUD] Config reloaded. An open menu picks them up when it next redraws.
  • Restart needed for RendererId, and to turn NativeText.Enabled on.
  • Each start adds missing keys with their defaults. It never changes a value already in the file, and never adds entries inside Hints, Overrides, MouseLayouts, PageViews or Panels.

Default file

{
  "CustomHUD": {
    "RendererId": "customhud.panorama",
    "DetailedLogging": false,
    "DefaultNavMode": "buttons",
    "Hints": {},
    "LayoutRoot": "panorama/layout/custom_game/customhud/",
    "Default": null,
    "Wasd": null,
    "Buttons": null,
    "Numbers": null,
    "Mouse": null,
    "Overrides": {},
    "MouseLayouts": {},
    "PageViews": {},
    "NativeText": {
      "Enabled": false,
      "Default": {
        "Capture": false,
        "File": "hud_text.vxml_c",
        "ShellPanel": "shell",
        "HiddenClass": "hidden",
        "TextPanel": "text",
        "TextVariable": "text",
        "KindClass": "kind-{0}",
        "DurationSeconds": 5,
        "Suppress": true
      },
      "Center": null,
      "Alert": null,
      "Notify": null,
      "Chat": null,
      "ChatEndOfRound": null,
      "Console": null
    },
    "Panels": {
      "versus": {
        "File": "panel_versus.vxml_c",
        "ShellPanel": "shell",
        "HiddenClass": "hidden",
        "VariablePanel": "shell",
        "DurationSeconds": 0,
        "BlankVariables": [
          "team1",
          "team2",
          "score1",
          "score2",
          "status",
          "detail"
        ]
      },
      "ready": {
        "File": "panel_ready.vxml_c",
        "ShellPanel": "shell",
        "HiddenClass": "hidden",
        "VariablePanel": "shell",
        "DurationSeconds": 0,
        "BlankVariables": [
          "title",
          "count",
          "state",
          "hint"
        ]
      },
      "timeout": {
        "File": "panel_timeout.vxml_c",
        "ShellPanel": "shell",
        "HiddenClass": "hidden",
        "VariablePanel": "shell",
        "DurationSeconds": 0,
        "BlankVariables": [
          "title",
          "team",
          "timer",
          "detail"
        ]
      }
    }
  }
}

CustomHUD

Setting Default Description
RendererId "customhud.panorama" The renderer id menus.jsonc selects. Restart to apply
DetailedLogging false Log every frame drawn, with its menu id and layout, and every captured message
DefaultNavMode "buttons" Starting mode while menus.jsonc sets no Menus.InputMethod: wasd, buttons, numbers or mouse. Anything else is buttons — Navigation
Hints {} Footer line per mode — Hints
LayoutRoot "panorama/layout/custom_game/customhud/" Folder a layout File without a / is read from
Default null Layout for the keyboard modes. null = the list, {} = the classic list — Layouts
Wasd, Buttons, Numbers null Layout for one keyboard mode. Wins over Default
Mouse null Layout for mouse menus that no rule matches. null = the mouse list
Overrides {} Menu id → layout — Layouts
MouseLayouts {} Menu id or prefix.* → layout, mouse mode only — Layouts
PageViews {} Menu id or prefix.* → view — Supported Plugins
NativeText Capture off The game's own HUD text in CustomHUD's layouts — NativeText
Panels 3 panels Panels other plugins show — Panels

Hints

The footer line for each mode, in every language. Without an entry a hint comes from the player's translation file, customhud.hint.<key>. "" hides it.

Key Shown on
wasd, buttons, numbers, mouse Menus in that mode
chat Menus whose input method is chat, for buttons players
<key>.view The same, on a menu with nothing to select, such as a vote tally kept open after voting
  • {up}, {down}, {select} and {close} become the menu's keys. In mouse mode {close} is the close button: ×, or < on a layout without one.
  • An entry for a keyboard mode replaces the list's key legend with your line.
  • An overridden mode keeps your line on view-only menus until you override its .view too.
  • An entry identical to the English default counts as unset.

Example: Navigation.


NativeText

Setting Default Description
Enabled false Master switch. Restart after turning it on
Default Capture off Profile for every kind without its own. "Capture": true here takes over every kind, chat and console included
Center, Alert, Notify null Profile for that kind — Native Text Capture
Chat, ChatEndOfRound, Console null Profile for that kind. Capturing these is rarely wanted

NativeText.Default

Every kind's profile has these fields. A kind's own profile does not inherit from Default: a field it leaves out takes the default below, Capture included.

Field Default Description
Capture false Take over this kind. false leaves it to the game
File "hud_text.vxml_c" Layout. hud_alert.vxml_c also ships
ShellPanel "shell" The layout's root panel
HiddenClass "hidden" Class that hides it
TextPanel "text" Panel holding the text
TextVariable "text" Variable holding the text
KindClass "kind-{0}" Class naming the kind. {0} = center, alert, notify, chat, chatendofround or console
DurationSeconds 5 Seconds on screen. 0 or less = until the next message replaces it
Suppress true Hide the game's own message. false shows both

Panels

Panels other plugins show through the Panels API, by name. Entries merge over the three shipped panels, so list only the ones you change.

Panel File
versus "panel_versus.vxml_c"
ready "panel_ready.vxml_c"
timeout "panel_timeout.vxml_c"
Field Default Description
File "" Layout. A panel without one cannot be shown
ShellPanel "shell" The layout's root panel. Classes go on it
HiddenClass "hidden" Class that hides it
VariablePanel "shell" Panel the variables are set on
DurationSeconds 0 Seconds on screen when the caller gives none. 0 or less = until hidden
BlankVariables [] Variables cleared when the panel first appears. The shipped panels list their own

Clone this wiki locally