RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

cdefDebugDraw ReferencecdefGpuMesh ReferencecdefImgui ReferencecdefMath Referencecdefs ReferencecontrolSystems Referencecsvlib ReferencedelayLine Referencedequeue ReferencedevUtils ReferenceEvent Referenceextensions Referencefilters Referencegraphpath Referenceguihooks ReferenceinputFilters ReferenceinterpolatedMap Referenceintrospection ReferencejbeamWriter Referencejson-ast Referencejson ReferencejsonDebug ReferencejsonPrettyEncoderCustom Referencekdtreebox2d Referencekdtreebox3d Referencekdtreepoint3d Referencelpack ReferenceluaBinding ReferenceluaCore ReferenceluaProfiler Referencemathlib Referenceparticles Referencequadtree Referencesettings ReferencetcpServer ReferencetimeEvents Referenceutils Reference
extensions/ - BeamNG Extension Modules
ui/imgui_api Referenceui/imgui_custom_luaintf Referenceui/imgui_gen_luaintf Referenceui/imgui Referenceui/imguiUtils Referenceui/imguiWire Referenceui/improfiler Reference

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 Referencecommonextensionsui

ui/imgui_custom_luaintf Reference

Module defined in `lua/common/extensions/ui/imgui_custom_luaintf.lua`. Custom Lua-to-ImGui type bindings and helper constructors. Extends the ImGui API module with type wrappers.

Module defined in lua/common/extensions/ui/imgui_custom_luaintf.lua. Custom Lua-to-ImGui type bindings and helper constructors. Extends the ImGui API module with type wrappers.


Exports

Returns a function function(M) that adds the following to the ImGui API table:

Type Constructors

M.ImVec2(x, y) / M.ImVec2Ptr(x, y)

Create an ImVec2 (2D vector).

  • Returns: ImVec2

M.ImVec4(x, y, z, w) / M.ImVec4Ptr(x, y, z, w)

Create an ImVec4 (4D vector / color).

  • Returns: ImVec4

M.ImVecPtrDeref(x)

Dereference an ImVec pointer (identity in Lua).

  • Returns: ImVec

Value Wrappers

M.Bool(x) / M.BoolPtr(x)

Boolean value / pointer wrapper. BoolPtr returns {[0] = bool}.

M.Int(x) / M.IntPtr(x)

Integer value / pointer wrapper. IntPtr returns {[0] = number}.

M.Float(x) / M.FloatPtr(x)

Float value / pointer wrapper. FloatPtr returns {[0] = number}.

M.Double(x) / M.DoublePtr(x)

Double value / pointer wrapper. DoublePtr returns {[0] = number}.

Variables

M.uiscale

  • Type: table {[0] = number}
  • Description: UI scale factor (default: 1)

M.plotLineColor

  • Type: number
  • Description: Default plot line color (packed ARGB: 4288453788)

M.plotLineBgColor

  • Type: number
  • Description: Default plot line background color (packed ARGB: 2323270185)

Internal Notes

  • ~429 lines of type constructors and custom widget bindings
  • Ptr types use {[0] = value} convention to simulate C pointer semantics in Lua
  • Type conversion includes input validation with fallback defaults
  • Uses string.buffer for some operations
  • Pattern: return function(M) - caller passes in the API table to extend

ui/imgui_api Reference

Module defined in `lua/common/extensions/ui/imgui_api.lua`. Base ImGui API module - provides the global Lua ImGui context variable that other modules populate.

ui/imgui_gen_luaintf Reference

Module defined in `lua/common/extensions/ui/imgui_gen_luaintf.lua`. **Auto-generated** Lua-to-ImGui function bindings. DO NOT EDIT - generated by `tools/imguiUtilities/gen_luaintf.py`.

On this page

ExportsType ConstructorsM.ImVec2(x, y) / M.ImVec2Ptr(x, y)M.ImVec4(x, y, z, w) / M.ImVec4Ptr(x, y, z, w)M.ImVecPtrDeref(x)Value WrappersM.Bool(x) / M.BoolPtr(x)M.Int(x) / M.IntPtr(x)M.Float(x) / M.FloatPtr(x)M.Double(x) / M.DoublePtr(x)VariablesM.uiscaleM.plotLineColorM.plotLineBgColorInternal Notes