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

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 Referencecommon

introspection Reference

Module defined in `lua/common/introspection.lua`. Gathers method information from all globally registered classes and built-in modules for runtime reflection.

Module defined in lua/common/introspection.lua. Gathers method information from all globally registered classes and built-in modules for runtime reflection.


Exports

Functions

M.gather_methods()

Scans all global variables for C++/Lua bound classes (identified by ___type field) and collects their method signatures. Also gathers methods from built-in modules (table, math, string, etc.).

  • Returns: table - Array of method descriptors

Return structure:

{
  {
    class_name = "ClassName",    -- string
    method_name = "methodName",  -- string
    signature = "methodName (Lua)", -- string with debug info
    is_static = false            -- boolean
  },
  ...
}

Internal Notes

  • Classes are identified by having a ___type field matching class<X> or static_class<X>
  • Skips keys starting with __ (metamethods)
  • Also checks metatables for methods
  • The extensions global is explicitly excluded from scanning
  • Built-in modules scanned: table, math, string, coroutine, os, io, debug, package

interpolatedMap Reference

Module defined in `lua/common/interpolatedMap.lua`. Provides 2D bilinear interpolation on structured data maps. Useful for looking up values in 2D tables like torque curves, gear ratio maps, etc.

jbeamWriter Reference

Module defined in `lua/common/jbeamWriter.lua`. A specialized JSON pretty-printer for jbeam files that formats objects with indentation up to a configurable depth, then falls back to compact encoding

On this page

ExportsFunctionsM.gather_methods()Internal Notes