RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

server/commands - Camera & Input Commandsge_utils - Game Engine Utility Functionsmain.lua - GE Lua Entry Point & Game Loopmap.lua - Navigation Graph (AI Road Map)screenshot.lua - Screenshot Systemserver/server - Level Loading & Game ServerserverConnection - Client-Server Connection Manager`setSpawnpoint` - Default Spawn Point Persistence`simTimeAuthority` - Simulation Time & Bullet Time Control`spawn` - Vehicle Spawning & Safe Placement`suspensionFrequencyTester` - Suspension Natural Frequency Analysis
ui/ambientSound - Ambient Sound Stream PlayerUI Apps ManagerUI AudioBindings LegendCamera Distance AppConsole (consoleNG)Credits MusicExternal App (WebSocket UI Server)Fade ScreenGame BlurGameplay App ContainersGrid SelectorLivery EditorMessages DebuggerMessages/Tasks App ContainersMission InfoPolice InfoTop BarUI ModsUI Navigation / MapVehicle Paint EditorVehicle Vicinity AppUI Visibility

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API ReferenceGE Extensionsui

UI Audio

Plays UI sound effects from a JSON-defined sound class registry.

Plays UI sound effects from a JSON-defined sound class registry.


Overview

ui_audio loads sound class definitions from ui/soundClasses.json on first update, then provides a simple function to play named UI sounds.

Extension path: lua/ge/extensions/ui/audio.lua


Exports (M)

FunctionSignatureDescription
playEventSound(className, eventName)Plays a one-shot UI sound effect by class and event name.
onFirstUpdate()Loads ui/soundClasses.json into the internal sound classes table.

Internals

Sound Classes JSON

The JSON file maps class names to event names to SFX paths:

{
  "button": {
    "click": { "sfx": "event:>UI>Button>Click" },
    "hover": { "sfx": "event:>UI>Button>Hover" }
  },
  "notification": {
    "popup": { "sfx": "event:>UI>Notification>Popup" }
  }
}

Playing Sounds

local function playEventSound(className, eventName)
  local sound_class = M.ui_sound_classes[className] or {}
  local event = sound_class[eventName]
  if event then
    Engine.Audio.playOnce('AudioGui', event.sfx)
  end
end

Sounds play on the 'AudioGui' audio source group.


How It Works

  1. On first update, ui/soundClasses.json is loaded into memory
  2. UI code calls ui_audio.playEventSound("button", "click") to play sounds
  3. The SFX path is looked up and played as a one-shot via Engine.Audio.playOnce
  4. Invalid class/event combinations silently do nothing

Additional Exports

The following exports are available but not yet documented in detail:

  • M.onFirstUpdate
  • M.playEventSound

UI Apps Manager

Core manager for UI app discovery, layout loading/saving, and layout versioning.

Bindings Legend

HUD overlay showing contextual input bindings with modifier support, vehicle-specific actions, and auto-fade.

On this page

OverviewExports (M)InternalsSound Classes JSONPlaying SoundsHow It WorksAdditional Exports