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 = falseremoves the widget for everyone. The other fields are where new players start.xandyare 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 at0.5it is centered.scalegoes from 0.5 to 2,opacityfrom 0.2 to 1.styleis''for the preset’s, or a style the widget offers: statusrings,bars,pills,minimal. Money, identity and clockcard,plain. Voicepill,dots. Speedometerarc,digital,bar. Compasstape,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
ejectDropkm/h at once from aboveejectSpeedkm/h. - Cruise control holds the speed the driver had when they pressed the key. Braking, leaving the seat or changing vehicle turns it off.
seatbelt = { enabled = false, key = 'B', ejectSpeed = 60, ejectDrop = 25 }.
Locales
Labels come fromlocales/<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.