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

Links Reference

Module defined in `lua/common/jbeam/links.lua`. Resolves cross-references between JBeam sections (e.g. node name strings → CID integers), handling the `key:section` link syntax.

Module defined in lua/common/jbeam/links.lua. Resolves cross-references between JBeam sections (e.g. node name strings → CID integers), handling the key:section link syntax.


Exports

Functions

M.prepareLinksDestructive(vehicle, sectionRenames)

Walks all vehicle sections looking for link patterns (key:section syntax). For each link, looks up the target in the referenced section and records the resolution in a flat array. Destructively modifies the vehicle data: renames linked keys (e.g. "torqueArm:" → "torqueArm_nodes"), removes unresolvable entries (unless optional flag set).

  • Parameters:
    • vehicle - table - Assembled vehicle data
    • sectionRenames - table - Map of renamed sections (e.g. {triggers2 = "triggers"})
  • Returns: table - Flat array of link triples [targetTable, key, resolvedNode, ...] for later CID resolution

M.resolveLinks(vehicle, links)

After CIDs are assigned, resolves all prepared links by setting the target key to the node's CID. Also re-keys all valid table sections from string keys to CID-based integer keys.

  • Parameters:
    • vehicle - table - Assembled vehicle data (with CIDs assigned)
    • links - table - Link triples from prepareLinksDestructive
  • Returns: boolean - true on success

M.resolveGroupLinks(vehicle)

Resolves [groupName]:section syntax links. Finds all nodes/entries matching group membership and collects their CIDs into an array, stored as _groupName_section on the referencing row.

  • Parameters:
    • vehicle - table - Assembled vehicle data (with CIDs assigned)
  • Returns: boolean - true on success

Internal Notes

  • Optional links (torqueArm:, torqueArm2:, torqueCoupling:, etc.) are silently discarded when targets are missing.
  • Link syntax: "nodeRef:" defaults to nodes section; "nodeRef:beams" targets the beams section.
  • The three-phase link process: (1) prepareLinksDestructive finds and records links, (2) assignCIDs numbers everything, (3) resolveLinks applies CIDs.
  • Group links use [groupName]:section syntax in cell keys, matching entries whose groupName field contains any of the specified values.

IO Reference

Module defined in `lua/common/jbeam/io.lua`. Handles reading, parsing, and caching of `.jbeam` files. Provides part lookup by name and slot type.

Loader Reference

Module defined in `lua/common/jbeam/loader.lua`. Main orchestrator for the JBeam vehicle loading pipeline. Coordinates all processing stages from file loading to 3D mesh attachment.

On this page

ExportsFunctionsM.prepareLinksDestructive(vehicle, sectionRenames)M.resolveLinks(vehicle, links)M.resolveGroupLinks(vehicle)Internal Notes