Editor – Assembly Spline Tool
Full-featured editor tool for placing assemblies of props (meshes) along splines with configurable spacing, offsets, distribution patterns, and terraform integration.
Full-featured editor tool for placing assemblies of props (meshes) along splines with configurable spacing, offsets, distribution patterns, and terraform integration.
Module Info
| Key | Value |
|---|---|
| File | lua/ge/extensions/editor/assemblySpline.lua |
| Type | Extension (editor_assemblySpline) |
| Window | assemblySpline (300×700) |
| Dependencies | splineMgr, molecule, populate, import, splineInput, render, skeleton, rdp, polygon, maskExport, util, geom, style, terraform |
User Constants
| Constant | Default | Description |
|---|---|---|
kitSearchPath | assets/meshes/props/assembly_kit/ | Assembly kit mesh search path |
simplifyRdpTol | 9.0 | RDP simplification tolerance |
defaultSplineWidth | 10.0 | Default spline width (meters) |
elevScale | 100.0 | Elevation drop color scale |
minSpacing / maxSpacing | 0 / 100 | Spacing range for distribution |
minVerticalOffset / maxVerticalOffset | -100 / 100 | Vertical offset range |
minSag / maxSag | 0 / 100 | Sag range |
Public API (Exports)
| Function | Signature | Description |
|---|---|---|
M.setSelectedSplineIdx | (idx) | Cross-tool spline selection |
M.setSelectedNodeIdx | (idx) | Cross-tool node selection |
M.onSerialize | () | Serializes all assembly splines for save |
M.onDeserialized | (data) | Restores assembly splines from saved data |
M.onEditorGui | () | Main per-frame editor UI and rendering callback |
M.onEditorInitialized | () | Registers edit mode, window, and scene tree menu |
M.onClientEndMission | () | Removes all assembly splines on level unload |
Note:
onActivate()andonDeactivate()are local functions registered as edit mode callbacks, not exported on M.
Tool State
| Property | Type | Description |
|---|---|---|
selectedSplineIdx | number | Currently selected spline index |
selectedNodeIdx | number | Currently selected node index |
isGizmoActive | bool | Whether gizmo is being used |
isLockShape | bool | Lock spline shape from editing |
isDrawPolygon | bool | Draw polygon visualisation |
Terraform Parameters
| Parameter | Default | Description |
|---|---|---|
terraDOI | 50.0 | Terraform distance of influence |
terraMargin | 5.0 | Terraform margin |
terraFalloff | 2.0 | Terraform falloff |
terraRoughness | 0.0 | Terraform roughness |
terraScale | 0.0 | Terraform scale |
Architecture
The assembly spline system is split into several sub-modules:
assemblySpline.lua -- Main tool (UI, activation, serialization)
├── splineMgr -- Spline data management
├── molecule -- Component/mesh configuration per spline
├── populate -- Placement along splines
├── distribution -- Random/round-robin mesh selection
├── import -- Import from existing scene objects
├── splineInput -- Shared spline input handling
├── render -- Rendering utilities
├── skeleton -- Spline skeleton visualisation
├── rdp -- Ramer-Douglas-Peucker simplification
├── polygon -- Polygon utilities
├── maskExport -- Spline mask export
├── geom -- Geometry helpers
├── style -- ImGui style presets
└── terraform -- Terrain modificationUsage Example
-- Activate the assembly spline tool
extensions.editor_assemblySpline.onActivate()
-- The tool provides ImGui UI for:
-- 1. Creating/editing splines with nodes
-- 2. Assigning assembly kits (prop meshes) to splines
-- 3. Configuring spacing, offsets, sag, random seeds
-- 4. Distributing props along splines (random or round-robin)
-- 5. Terraform integration for terrain matching
-- 6. Importing existing scene objects as spline assembliesSee Also
- Assembly Spline Distribution - Component distribution algorithms
- Assembly Spline Import - Scene object import
Editor AI Visualization
Renders the AI navigation graph (navgraph) in the editor viewport with multiple color-coded draw modes for debugging road properties.
Asset Browser
Comprehensive asset browser window for the BeamNG editor. Provides tree-view directory navigation, asset filtering/sorting/grouping, mesh 3D previews, image inspection, drag-and-drop placement, materi