Skip to main content
config.lua holds the defaults new players start from. Players change the layout, styles, colors and units in game. A key you remove uses its default. Unknown keys and bad values stop ug-hud with every error listed.
config.lua
Changes to preset, speedUnit and minimap reach players who never saved a layout. Players who saved keep their choice.

Look

theme overrides ug-lib’s theme for ug-hud only. It takes the same fields as the ug-lib theme: mode, colors (HSL strings such as '262 83% 58%', keyed by ug-lib token), radius, font and scale. Left out, ug-lib’s theme applies. defaults is the look new players start with, and the one “Reset” goes back to:

Widgets

widgets holds one entry per widget: status, money, identity, voice, speedometer, compass, clock and weapon.
config.lua
  • enabled = false removes the widget for everyone. The other fields are where new players start.
  • x and y are the edge the widget hangs from, as a share of the screen. On the left half it hangs from its left edge, on the right half from its right edge, and at 0.5 it is centered.
  • scale goes from 0.5 to 2, opacity from 0.2 to 1.
  • style is '' for the preset’s, or a style the widget offers: status rings, bars, pills, minimal. Money, identity and clock card, plain. Voice pill, dots. Speedometer arc, digital, bar. Compass tape, heading.
cinematicWidgets lists the widgets that stay on screen in cinematic mode. Default { 'status', 'speedometer' }. statusColors sets the bar colors (hex) before players pick their own: health, armor, stamina, oxygen, hunger, thirst, stress. Statuses from other resources MAY be added by name.

Alerts

Editor

editor sets what players MAY change. The limits apply to saved layouts and imported codes too: a field players cannot change falls back to the default.

Fuel

Seatbelt and cruise

  • The seatbelt works in cars only, not on bikes, boats or aircraft. Buckled players cannot leave the vehicle.
  • An unbuckled player flies through the windscreen when the speed drops by more than ejectDrop km/h at once from above ejectSpeed km/h.
  • Cruise control holds the speed the driver had when they pressed the key. Braking, leaving the seat or changing vehicle turns it off.
PVP servers often set seatbelt = { enabled = false, key = 'B', ejectSpeed = 60, ejectDrop = 25 }.

Locales

Labels come from locales/<code>.json, picked by ug-lib’s locale. English and Portuguese ship. Copy en.json to add a language: every file MUST have the same keys.