RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Debug DrawingGPU Mesh StructsImGui FFIMath Structs (FFI)FFI C DefinitionsPID ControllersCSV LibraryDelay LineDequeDevelopment UtilitiesEvent ReferenceExtension SystemSignal FiltersGraph PathfindingUI BridgeInput Filter Constants2D Bilinear InterpolationIntrospectionJBeam Pretty PrinterJSON AST ParserSJSON ParserJSON Debug ParserJSON Pretty PrinterK-D Tree (2D Boxes)K-D Tree (3D)K-D Tree (3D)Lua SerializerC++/Lua BindingLua CoreLua ProfilerMath LibraryParticlesQuadtreeSettingsTCP ServerTimer SchedulerUtility Library

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

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

See Also

  • cdefDebugDraw Reference - Related reference
  • cdefGpuMesh Reference - Related reference
  • cdefImgui Reference - Related reference
  • Common Libraries Overview - Guide

2D Bilinear Interpolation

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.

JBeam Pretty Printer

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 NotesSee Also