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
cosimulationNames Referencetech/ - Co-simulation & Technical Interface ModulespcdLib ReferencetechCommunication ReferencetechUtils 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 Referencecommontech

techUtils Reference

Module defined in `lua/common/tech/techUtils.lua`. Utility functions for the tech/co-simulation layer - surface height queries and table-to-vector conversions.

Module defined in lua/common/tech/techUtils.lua. Utility functions for the tech/co-simulation layer - surface height queries and table-to-vector conversions.


Exports

Functions

M.getSurfaceHeight(pos)

Query the terrain surface height at a given position.

  • Parameters:
    • pos - vec3/table - World position to query
  • Returns: number - Surface height at position

M.tableToVec3Recursive(tbl)

Recursively convert tables with x/y/z keys to vec3 objects (and 4-element tables to quats).

  • Parameters:
    • tbl - table - Table tree to convert
  • Returns: table - Same table with vec3/quat conversions applied in-place

M.migrateOldKeysRecursive(tbl)

Recursively migrate deprecated key names in data tables to current naming conventions.

  • Parameters:
    • tbl - table - Table tree to migrate

Internal Notes

  • tableToVec3OrQuat (internal) detects {x, y, z} or {x, y, z, w} numeric tables
  • Migration handles backward compatibility for tech layer data formats

techCommunication Reference

Module defined in `lua/common/tech/techCommunication.lua`. TCP socket communication layer for BeamNG's tech/co-simulation interface. Handles client connections, MessagePack-encoded message exchange, a

testFramework/ - Unit Testing Framework

Simple unit test framework for BeamNG Lua code with JUnit XML output.

On this page

ExportsFunctionsM.getSurfaceHeight(pos)M.tableToVec3Recursive(tbl)M.migrateOldKeysRecursive(tbl)Internal Notes