RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Editor AI TestsEditor AI VisualizationEditor – Assembly Spline ToolAsset BrowserAsset DeduplicatorAsset Management ToolSFX Previewer (Audio Events List)Audio Ribbon EditorAutoSaveBarriers EditorBiome ToolBuilding EditorBulk RenameCamera BookmarksCamera TransformCamera Path EditorCEF HelperCo-Simulation Signal EditorCrawl Data EditorCreate Object ToolDataBlock EditorDecal EditorDecal Spline EditorDocumentation HelperDrag Race EditorDrift Data EditorDrive Path EditorDynamic Decals Tool (Vehicle Livery Creator)Engine Audio DebugExtensions DebugExtensions EditorFFI Pointer Leak TestFile DialogFlowgraph EditorForest EditorForest ViewEditor Gizmo HelperEditor Ground Model Debug HelperEditor Headless Editor TestEditor Icon OverviewEditor ImGui C DemoEditor InspectorEditor Layout ManagerEditor Level SettingsEditor Level ValidatorEditor LoggerEditor Log HelperEditor MainEditor Main MenuEditor Main ToolbarEditor Main UpdateMap Sensor EditorMaster Spline EditorMaterial EditorMeasures Inspector HeaderMesh Editor (Base)Mesh Road EditorMesh Spline EditorMission EditorMission PlaybookMission Start Position EditorMulti Spawn Manager (Vehicle Groups)Navigation Mesh EditorEditor News MessageObject Tool (Object Select Edit Mode)Object To Spline EditorParticle EditorPerformance Profiler / Camera RecorderPhysics ReloaderPrefab Instance EditorEditor PreferencesRace / Path EditorRally EditorRaycast Test Editor ToolRenderer Components Editor ToolRender Test Editor ToolResource Checker Editor ToolRiver EditorRoad Architect EditorRoad DecorationsRoad Editor (Decal Road)Road Network ExporterRoad River Cache HandlerRoad River GUIRoad Spline EditorRoad Template EditorRoad UtilitiesScene TreeScene ViewScreenshot Creator BootstrapScript AI EditorScript AI ManagerSensor Configuration EditorSensor DebuggerShape EditorShortcut LegendSidewalk Spline EditorSites EditorSlot Traffic EditorSuspension Audio DebugTech Server ManagerTerraform ToolTerrain And Road ImporterTerrain EditorTerrain Materials EditorText EditorTool ManagerTool ShortcutsTraffic DebugTraffic ManagerTraffic Signals EditorUndo History ViewerVehicle Bridge TestVehicle Detail ViewerVehicle Editor MainEditor - VisualizationEditor Viz HelperEditor Water Object HelperEditor Windows Manager
Assembly Spline – DistributionAssembly Spline – ImportAssembly Spline MoleculeAssembly Spline PopulateAssembly Spline Manager

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

Assembly Spline Molecule

Handles mesh assembly kit parsing, attachment point extraction, and molecule building for the assembly spline tool. A "molecule" is a group of rigid meshes joined via attachment anchor points, with op

Handles mesh assembly kit parsing, attachment point extraction, and molecule building for the assembly spline tool. A "molecule" is a group of rigid meshes joined via attachment anchor points, with optional bridge meshes spanning between consecutive molecules.


Public Functions

FunctionDescription
M.getRigidEnabled(spline, meshId)Check if a rigid mesh is enabled for the given spline
M.setRigidEnabled(spline, meshId, enabled)Set enabled state for a rigid mesh
M.getBridgeEnabled(spline, meshId)Check if a bridge mesh is enabled for the given spline
M.setBridgeEnabled(spline, meshId, enabled)Set enabled state for a bridge mesh
M.getRigidRandom(spline, meshId)Get random distribution flag for a rigid mesh
M.setRigidRandom(spline, meshId, isRandom)Set random distribution flag for a rigid mesh
M.getRigidRandomWeight(spline, meshId)Get random weight for a rigid mesh (default 1.0)
M.setRigidRandomWeight(spline, meshId, weight)Set random weight for a rigid mesh
M.getBridgeRandom(spline, meshId)Get random distribution flag for a bridge mesh
M.setBridgeRandom(spline, meshId, isRandom)Set random distribution flag for a bridge mesh
M.getBridgeRandomWeight(spline, meshId)Get random weight for a bridge mesh (default 1.0)
M.setBridgeRandomWeight(spline, meshId, weight)Set random weight for a bridge mesh
M.getAssemblyKit(kitFolderPath)Scan folder for .dae files and return an assembly kit table
M.buildMolecule(assemblyKit, spline)Build a molecule structure from an assembly kit
M.applyEnabledStatesToMolecule(spline, molecule)Apply enabled states after deserialization

Key Concepts

Anchor Point Naming Convention

Anchor points in meshes follow the format: nail.<joinName>.<pointType>[.<aliasName>]

  • point - Required base position for all join types
  • head - Defines forward direction (used in nail and fixed joins)
  • aux - Defines orientation lock (used in fixed joins)

Join Types

TypeDOFPoints RequiredDescription
ball3point onlyFree rotation on all axes
nail1point + headRotation around nail axis only
fixed0point + head + auxNo rotation allowed

Molecule Structure

local molecule = {
  rigids = {},                    -- Rigid mesh entries with attachments
  placingOrder = {},              -- Ordered indices for building from root
  rigidAttachmentSequence = {},   -- Placement instructions for non-root meshes
  bridges = {},                   -- Bridge meshes spanning molecule pairs
  bridgeAttachments = {},         -- Bridge-to-rigid attachment mapping
  isSagEnabled = false,           -- Whether any bridge supports sag
}

Usage Example

local mol = require('editor/assemblySpline/molecule')

-- Load an assembly kit from a folder of .dae meshes
local kit = mol.getAssemblyKit('/art/meshes/fence_kit/')

-- Build the molecule (determines attachment order, bridges, etc.)
local molecule = mol.buildMolecule(kit, spline)

-- Toggle a rigid mesh off
mol.setRigidEnabled(spline, kit[2].id, false)

-- Rebuild with updated state
molecule = mol.buildMolecule(kit, spline)

Filename Conventions

StringPurpose
rootIdentifies the root rigid mesh
bridgeIdentifies bridge meshes
sagMarks a bridge as supporting sag deformation
varMarks a file as a variation of its base mesh

See Also

  • assemblySpline/populate - Places molecules along the spline
  • assemblySpline/splineMgr - Manages assembly spline state and UI

Assembly Spline – Import

Imports existing scene objects (TSStatic groups) into assembly splines by analyzing positions, fitting curves, and reconstructing spline data with undo support.

Assembly Spline Populate

Handles the placement of molecule instances (rigid + bridge meshes) along an assembly spline. Manages mesh pooling, spline sampling, rigid placement via attachment sequences, and bridge scaling/alignm

On this page

Public FunctionsKey ConceptsAnchor Point Naming ConventionJoin TypesMolecule StructureUsage ExampleFilename ConventionsSee Also