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/improfiler Reference

Module defined in `lua/common/extensions/ui/improfiler.lua`. ImGui-based LuaJIT profiler visualization - renders profiling data as an in-game overlay using ImGui.

Module defined in lua/common/extensions/ui/improfiler.lua. ImGui-based LuaJIT profiler visualization - renders profiling data as an in-game overlay using ImGui.


Exports

Functions

M.onUpdate(dtReal, dtSim, dtRaw)

Hook: Called each frame. Collects profiler samples and renders the profiler UI.

  • Parameters:
    • dtReal - number - Real delta time
    • dtSim - number - Simulation delta time
    • dtRaw - number - Raw delta time

Hooks

  • onUpdate

Internal Notes

  • Built on jit.profile for low-overhead sampling
  • prof_cb - profiler callback, accumulates per-function sample counts
  • prof_top - sorts and displays top-N hottest functions
  • prof_annotate - overlays sample counts on source code
  • prof_start(mode) - starts profiling with given mode flags
  • prof_finish() - stops profiling and prepares results for display
  • Uses jit.vmdef (from libs/LuaJIT/vmdef) for VM state names
  • Similar to jit.p but renders results in ImGui instead of text output

ui/imguiWire Reference

Module defined in `lua/common/extensions/ui/imguiWire.lua`. ImGui wire protocol - serializes ImGui draw commands into a buffer for remote/deferred execution. Enables ImGui rendering across process bou

ui/flowgraph/editor_api_luaintf Reference

Module defined in `lua/common/extensions/ui/flowgraph/editor_api_luaintf.lua`. Lua bindings for the flowgraph node editor C++ API (`Engine.fge`). Provides ID types, enum constants, and editor control

On this page

ExportsFunctionsM.onUpdate(dtReal, dtSim, dtRaw)HooksInternal Notes