RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
`adasUltrasonic.lua``cameraPreview.lua``capturePlayer.lua``license.lua``lidarTest.lua``multiscreen.lua``openDriveExporter.lua``openStreetMapExporter.lua``partAnnotations.lua``platoonFunctions.lua``pythonExport.lua``rawLidar.lua``rawLidarEmpty.lua``sensors.lua``sumoExporter.lua``techCore.lua``terrainImporter.lua``ultrasonicTest.lua``utils.lua`

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 Extensionstech

`utils.lua`

> This Source Code Form is subject to the terms of the bCDDL, v. 1.1.

This Source Code Form is subject to the terms of the bCDDL, v. 1.1. If a copy of the bCDDL was not distributed with this file, You can obtain one at http://beamng.com/bCDDL-1.1.txt

Module variable: M

Hooks

  • onUpdate
  • onVehicleSpawned
  • onVehicleDestroyed
  • onVehicleReplaced
  • onExtensionLoaded
  • onClientPreStartMission
  • onClientPostStartMission
  • onClientStartMission
  • onClientEndMission

Exported Functions

M.onUpdate(dtReal, dtSim, dtRaw)

Line 26

M.onVehicleSpawned(vid, veh)

Line 193

M.onVehicleDestroyed(vid)

Line 205

M.onVehicleReplaced(vid, veh)

Line 211

M.onExtensionLoaded()

Line 223

M.onClientPreStartMission(levelPath)

Line 178

M.onClientPostStartMission(levelPath)

Line 178

M.onClientStartMission(levelPath)

Line 178

M.onClientEndMission()

Line 188

M.toggleLidar()

Line 61

M.toggleAnnotations()

Line 100

M.toggleUltrasonic()

Line 119

M.toggleSecondView()

Line 228

M.toggleVehicleSystemsCoupling()

Line 256

Returns: M

Exported Variables

M.dependencies

{ "core_camera", "tech_license", "tech_sensors" }

M.secondViewOutput

Current second view output index (default 0).

M.onDeserialize

true - enables deserialization support.

Internal Functions

Show internal functions
  • isLevelValid() (line 12)
  • updateUI(message, permanent) (line 21)
  • onUpdate(dtReal, dtSim, dtRaw) (line 26)
  • toggleLidar() (line 61)
  • toggleAnnotations() (line 100)
  • toggleUltrasonic() (line 119)
  • disableAll() (line 172)
  • onLevel(levelPath) (line 178)
  • onClientEndMission() (line 188)
  • onVehicleSpawned(vid, veh) (line 193)
  • onVehicleDestroyed(vid) (line 205)
  • onVehicleReplaced(vid, veh) (line 211)
  • onExtensionLoaded() (line 223)
  • toggleSecondView() (line 228)
  • toggleVehicleSystemsCoupling() (line 256)

See Also

  • adasUltrasonic.lua - Related reference
  • cameraPreview.lua - Related reference
  • capturePlayer.lua - Related reference
  • Game Engine Overview - Guide

`ultrasonicTest.lua`

> This Source Code Form is subject to the terms of the bCDDL, v. 1.1.

`crashOutput.lua`

> This Source Code Form is subject to the terms of the bCDDL, v. 1.1.

On this page

HooksExported FunctionsM.onUpdate(dtReal, dtSim, dtRaw)M.onVehicleSpawned(vid, veh)M.onVehicleDestroyed(vid)M.onVehicleReplaced(vid, veh)M.onExtensionLoaded()M.onClientPreStartMission(levelPath)M.onClientPostStartMission(levelPath)M.onClientStartMission(levelPath)M.onClientEndMission()M.toggleLidar()M.toggleAnnotations()M.toggleUltrasonic()M.toggleSecondView()M.toggleVehicleSystemsCoupling()Exported VariablesM.dependenciesM.secondViewOutputM.onDeserializeInternal FunctionsSee Also