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
Road Spline Group ManagerRoad Spline ImportRoad Spline Layer 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 ExtensionseditorroadSpline

Road Spline Layer Manager

Manages the DecalRoad layers within road spline groups - handles layer creation, removal, duplication, chunking for long splines, and all auto-generated detail layer types.

Manages the DecalRoad layers within road spline groups - handles layer creation, removal, duplication, chunking for long splines, and all auto-generated detail layer types.


Public API

FunctionSignatureDescription
M.getSliderDefaults()Returns default slider values (width=10, pos=0, priority=10, texLen=10, fade=1)
M.deepCopyLayer(layer)Deep copies a single layer
M.deepCopyAllLayers(layers)Deep copies an array of layers
M.updateAllLayers(group, groupIdx)Updates all enabled layers in a group
M.updateOnlyDirtyLayers(group, groupIdx)Updates only layers with isDirty flag set
M.removeDecalRoadInLayer(layer)Removes the DecalRoad object(s) for a layer
M.removeLayer(idx, group)Removes a layer at the given index
M.removeAllLayers(group)Removes all layers from a group
M.removeAllHiddenLayers(group)Removes all auto-generated (hidden) layers
M.addNewLayer(group)Adds a new user layer with default properties
M.duplicateLayer(idx, group)Duplicates a layer at the given index
M.switchOffAllAutoLayers(selGroup)Disables all auto-generated layer flags
M.serializeLayer(layer)Serializes a layer to a plain table
M.deserializeLayer(data)Deserializes a layer from a table

Auto-Generated Layer Functions (add/remove pairs)

Add FunctionRemove FunctionMaterial
addLightTreadMarksLayersremoveLightTreadMarksLayersm_tread_marks_clean
addHeavyTreadMarksLayersremoveHeavyTreadMarksLayersroad_rubber_double
addRoadCrackLayersremoveRoadCrackLayersm_asphalt_cracks_02
addRepair1Layers / addRepair2LayersremoveRepair1Layers / removeRepair2Layersrepair1 / repair2
addPatchesLayersremovePatchesLayersroad_patches1
addRoadDamageAsphalt1LayersremoveRoadDamageAsphalt1Layersm_asphalt_damaged_01
addRoadDamageAsphalt2LayersremoveRoadDamageAsphalt2Layersm_asphalt_damaged_02
addRoadCenterLineLayersremoveRoadCenterLineLayersm_line_white_discontinue
addRoadEdgeLinesLayersremoveRoadEdgeLinesLayersm_line_white
addRoadLaneLinesLayersremoveRoadLaneLinesLayersm_line_white_discontinue
addEdgeBlend1LayersremoveEdgeBlend1Layersm_road_asphalt_edge
addEdgeBlend2LayersremoveEdgeBlend2Layersm_road_edge_dirt
addEdgeBlend3LayersremoveEdgeBlend3Layersm_road_asphalt_edge_grass

Layer Data Structure

local layer = {
  name = "New Layer 1",
  id = "uuid",
  isDirty = true,
  isHidden = false,        -- true for auto-generated layers
  decalRoadId = nil,
  decalRoadIds = {},       -- for chunked long splines
  isEnabled = true,
  material = "road_invisible",
  isFlip = false,
  isTrackWidth = true,
  isOverObjects = false,
  width = 10.0,
  position = 0.0,          -- lateral offset: -1=left, 0=center, 1=right
  texLen = 10.0,
  fadeIn = 1.0, fadeOut = 1.0,
  renderPriority = 10,
}

Notes

  • Long splines (>100 divPoints) are automatically chunked into multiple DecalRoad objects
  • Auto-generated layers are per-lane (left/right) based on road width and 5m lane spacing
  • Uses RDP simplification on clipped/flipped polylines before creating DecalRoad nodes

Additional Exports

  • M.addEdgeBlend1Layers
  • M.addEdgeBlend2Layers
  • M.addEdgeBlend3Layers
  • M.addHeavyTreadMarksLayers
  • M.addLightTreadMarksLayers
  • M.addPatchesLayers
  • M.addRepair1Layers
  • M.addRepair2Layers
  • M.addRoadCenterLineLayers
  • M.addRoadCrackLayers
  • M.addRoadDamageAsphalt1Layers
  • M.addRoadDamageAsphalt2Layers
  • M.addRoadEdgeLinesLayers
  • M.addRoadLaneLinesLayers
  • M.removeEdgeBlend1Layers
  • M.removeEdgeBlend2Layers
  • M.removeEdgeBlend3Layers
  • M.removeHeavyTreadMarksLayers
  • M.removeLightTreadMarksLayers
  • M.removePatchesLayers
  • M.removeRepair1Layers
  • M.removeRepair2Layers
  • M.removeRoadCenterLineLayers
  • M.removeRoadCrackLayers
  • M.removeRoadDamageAsphalt1Layers
  • M.removeRoadDamageAsphalt2Layers
  • M.removeRoadEdgeLinesLayers
  • M.removeRoadLaneLinesLayers

See Also

  • Road Spline Group Manager - Related reference
  • Road Spline Import - Related reference
  • World Editor Guide - Guide

Road Spline Import

Handles importing DecalRoad objects into road spline groups - supports both direct selection and polygon-based selection, computing reference splines and relative layer properties.

Sidewalk Spline Kit

Handles loading sidewalk mesh kits from folders - discovers meshes, extracts anchor points, groups base meshes with variations, and builds distribution groups for piece selection.

On this page

Public APIAuto-Generated Layer Functions (add/remove pairs)Layer Data StructureNotesAdditional ExportsSee Also