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

SectionMerger Reference

Module defined in `lua/common/jbeam/sectionMerger.lua`. Merges duplicate/aliased JBeam sections together for backward compatibility (e.g. `triggers2` → `triggers`).

Module defined in lua/common/jbeam/sectionMerger.lua. Merges duplicate/aliased JBeam sections together for backward compatibility (e.g. triggers2 → triggers).


Exports

Functions

M.process(vehicle, sectionRenames)

Merges predefined section pairs. Currently merges triggers2 into triggers and rails2 into rails. Records renames in sectionRenames so the link system can resolve references to renamed sections.

  • Parameters:
    • vehicle - table - Assembled vehicle data
    • sectionRenames - table - Output map populated with {oldName → newName} entries
  • Returns: boolean - true on success

Internal Notes

  • Two merge strategies:
    • mergeNamedSections: dict-keyed sections - copies key-value pairs from source to target, marks target as valid table if isTableCid is true. Warns on key collisions. Sets originSection on moved entries.
    • mergeNumberedSections: 0-indexed array sections - appends source rows to end of target.
  • Source sections are nil'd out after merging to prevent duplicate processing.
  • triggers/triggers2 merge uses named (CID-tracked) strategy.
  • rails/rails2 merge uses named (non-CID) strategy.

See Also

  • ExpressionParser Reference - Related reference
  • Groups Reference - Related reference
  • Interaction Reference - Related reference
  • Common Libraries Overview - Guide

Scaling Reference

Module defined in `lua/common/jbeam/scaling.lua`. Applies `scale*` prefixed properties to their corresponding base values by multiplication.

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).

On this page

ExportsFunctionsM.process(vehicle, sectionRenames)Internal NotesSee Also