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

Credits Music

Plays credits background music via FMOD while the credits screen is active.

Plays credits background music via FMOD while the credits screen is active.


Overview

ui_credits is a minimal extension that creates an FMOD audio source for the credits music event, plays it on load, and cleans up on unload.

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


Exports (M)

FunctionSignatureDescription
onExtensionLoaded()Creates the credits music source and starts playback.
onExtensionUnloaded()Stops and deletes the music source.

Internals

Audio Setup

local function onExtensionLoaded()
  soundParams = SFXParameterGroup("CreditsSoundParams")
  creditsSoundId = Engine.Audio.createSource('AudioGui', 'event:>Music>credits')
  local snd = scenetree.findObjectById(creditsSoundId)
  if snd then
    snd:play(-1)  -- loop indefinitely
    soundParams:addSource(snd.obj)
  end
end
  • Audio group: AudioGui
  • FMOD event: event:>Music>credits
  • Parameter group: CreditsSoundParams - allows external parameter control

Cleanup

local function onExtensionUnloaded()
  if creditsSoundId then
    Engine.Audio.deleteSource(creditsSoundId)
    creditsSoundId = nil
  end
end

How It Works

  1. Credits screen loads the extension via extensions.load('ui_credits')
  2. onExtensionLoaded creates and plays the credits music in a loop
  3. When the credits screen closes, extensions.unload('ui_credits') stops the music
  4. The FMOD audio source is properly cleaned up to avoid leaks

Additional Exports

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

  • M.onExtensionLoaded
  • M.onExtensionUnloaded

Console (consoleNG)

In-game developer console with log filtering, command execution, and virtual scrolling.

External App (WebSocket UI Server)

Serves the BeamNG UI over a local WebSocket server for external device access.

On this page

OverviewExports (M)InternalsAudio SetupCleanupHow It WorksAdditional Exports