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
ExpressionParser ReferenceGroups ReferenceInteraction ReferenceIO ReferenceLinks ReferenceLoader ReferenceMaterials ReferenceOptimization ReferenceScaling ReferenceSectionMerger ReferenceSlotSystem ReferenceTableSchema ReferenceUtils ReferenceVariables 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 Referencecommonjbeam

TableSchema Reference

Module defined in `lua/common/jbeam/tableSchema.lua`. Converts JBeam table-format data (header row + data rows) into keyed object dictionaries, applying options and special value replacements.

Module defined in lua/common/jbeam/tableSchema.lua. Converts JBeam table-format data (header row + data rows) into keyed object dictionaries, applying options and special value replacements.


Exports

Functions

M.process(vehicle, processSlotsTable, omitWarnings)

Processes the entire vehicle data: moves non-table entries to vehicle.options, validates section names, then converts all list-type sections (with headers) into dict-type sections using processTableWithSchemaDestructive.

  • Parameters:
    • vehicle - table - Raw vehicle data with mixed table/value entries
    • processSlotsTable - boolean|nil - If true, processes slots sections too (normally pre-processed by io module)
    • omitWarnings - boolean|nil - Suppress warning logs
  • Returns: boolean - true on success, false on invalid attribute names

M.processTableWithSchemaDestructive(jbeamTable, newList, inputOptions, omitWarnings)

Converts a single JBeam table (array with header row + data rows) into a keyed dictionary. The first row is the header (column names). Subsequent rows become objects with header keys. Dict rows are treated as inline options that apply to following rows.

  • Parameters:
    • jbeamTable - table - Array-format JBeam section [header, row1, row2, ...]
    • newList - table - Output table to populate
    • inputOptions - table|nil - Default options to apply to all rows
    • omitWarnings - boolean|nil - Suppress warnings
  • Returns: number - Count of entries added, or -1 on error

Internal Notes

  • Special value replacements (replaceSpecialValues):
    • FLT_MAX → math.huge, MINUS_FLT_MAX → -math.huge
    • Pipe-separated type flags: "|HYDRO|NM_steel" → bitwise OR of type IDs + material ID
    • Type IDs: NORMAL=0, HYDRO=6, ANISOTROPIC=1, TIRESIDE=1 (alias for ANISOTROPIC), BOUNDED=2, PRESSURED=3, SUPPORT=7, LBEAM=4, FIXED=1, NONCOLLIDABLE=2, plus light flags (SIGNAL_LEFT=1, SIGNAL_RIGHT=2, HEADLIGHT=4, BRAKELIGHT=8, RUNNINGLIGHT=16, REVERSELIGHT=32)
  • Rows with disable = true (or variables.disable = true) are skipped.
  • If a row has an id field, it becomes the key in the output dict; otherwise sequential counter is used.
  • Inline options (dict rows interspersed with data) accumulate and apply to all subsequent rows.
  • Supports CSV include: {"include": "path.csv", "delimiter": ","} loads and injects rows.
  • Attribute names must match ^[a-zA-Z_]+[a-zA-Z0-9_]*$.
  • Sections in jbeamUtils.ignoreSections are skipped.

SlotSystem Reference

Module defined in `lua/common/jbeam/slotSystem.lua`. Resolves the vehicle part tree from configuration, handling slot matching, part selection, and part unification (merging).

Utils Reference

Module defined in `lua/common/jbeam/utils.lua`. Provides low-level construction utilities for adding nodes, beams, and rotators to vehicle data, plus node transform operations (rotate/offset/move).

On this page

ExportsFunctionsM.process(vehicle, processSlotsTable, omitWarnings)M.processTableWithSchemaDestructive(jbeamTable, newList, inputOptions, omitWarnings)Internal Notes