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
Drag Race Editor ConstantsDrag Race Editor - Drag SettingsDrag Race Editor - FacilitiesDrag Race Editor - LanesDrag Race Editor - StateDrag Race Editor - StripsDrag Race Editor - UtilsDrag Race Editor - Waypoints

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 ExtensionseditordragRaceEditor

Drag Race Editor - Strips

Manages drag racing strip data: loading, selecting, adding, removing, saving, and editing strips with lanes, waypoints, and boundaries. Provides ImGui UI for strip/lane/waypoint/boundary selection and

Manages drag racing strip data: loading, selecting, adding, removing, saving, and editing strips with lanes, waypoints, and boundaries. Provides ImGui UI for strip/lane/waypoint/boundary selection and editing, plus 3D world-space debug drawing and gizmo manipulation.


Public API

FunctionSignatureDescription
M.loadAllStrips()Loads all strips from dragSaveSystem.getAllStrips()
M.getAllStrips() → tableReturns the loaded strips array
M.getSelectedStripIndex() → numberReturns currently selected strip index
M.setSelectedStripIndex(index)Sets selected strip index
M.getSelectedStrip() → table|nilReturns selected strip data or nil
M.selectStrip(index)Selects strip, clears facility/settings selections, updates drag settings
M.addStrip()Opens file dialog, creates default strip with 2 lanes and saves to JSON
M.removeSelectedStrip()Removes selected strip, adjusts selection
M.saveStrip(strip) → boolSaves strip JSON to level drag path
M.drawStripsList()ImGui list with Add/Remove/Save/Refresh buttons
M.drawStripDetails()ImGui detail panel: ID, Name, Description, lanes, end camera
M.editLane(stripIdx, laneIdx) → table|nilSets selection and returns lane data
M.getSelectedLane() → table|nilReturns currently selected lane
M.drawLaneEditor()ImGui lane editor: ID, name, color, waypoints, boundary
M.drawStripsPreview()Debug draws strip name, waypoints, boundaries in world
M.enableWaypointGizmo(waypoint)Activates axis gizmo for waypoint transform
M.enableBoundaryGizmo(boundary)Activates axis gizmo for boundary transform
M.beginWaypointDrag(waypoint)Stores undo state for waypoint drag
M.draggingWaypoint(waypoint)Updates waypoint transform from gizmo
M.endWaypointDrag(waypoint)Clears waypoint drag state
M.beginBoundaryDrag(boundary)Stores undo state for boundary drag
M.draggingBoundary(boundary)Updates boundary transform from gizmo
M.endBoundaryDrag(boundary)Clears boundary drag state
M.drawWaypointsInWorld()Debug draws waypoint spheres for selected strip
M.drawAxisBox(corner, x, y, z, clr)Helper: draws axis-aligned box with debug triangles
M.drawBoundariesInWorld()Debug draws boundary boxes for all lanes

Strip Data Structure

-- Default strip created by addStrip()
{
  id = "new_strip_1",
  name = "New Strip",
  description = "A new drag racing strip",
  endCamera = nil,
  metadata = { created = os.date(), modified = os.date() },
  lanes = {
    { id = "lane_left", name = "Left Lane", color = "blue", laneOrder = 1,
      waypoints = { { type = "stage", transform = {...} }, { type = "endLine", transform = {...} } },
      boundary = nil }
  }
}

Usage Example

local strips = require('editor/dragRaceEditor/strips')
strips.loadAllStrips()
strips.selectStrip(1)

local strip = strips.getSelectedStrip()
if strip then
  strips.saveStrip(strip)
end

Dependencies

ModulePurpose
editor/dragRaceEditor/constantsColor constants, default transforms
editor/dragRaceEditor/stateShared editor state (search, transforms, mouse)
editor/dragRaceEditor/utilsmarkUnsavedChanges(), setupTransform()
gameplay/drag/saveSystemStrip file I/O
ui_imgui / ffiImGui widgets, string conversion

Module Variables

  • waypointDragStart (table) - Stores initial transform state during waypoint drag for undo.
  • boundaryDragStart (table) - Stores initial transform state during boundary drag for undo.

See Also

  • Drag Race Editor Constants - Related reference
  • Drag Race Editor - Drag Settings - Related reference
  • Drag Race Editor - Facilities - Related reference
  • World Editor Guide - Guide

Drag Race Editor - State

Centralized state management module for the Drag Race Editor. Provides getters/setters for all editor state including selections, undo/redo stacks, file paths, transforms, and error handling.

Drag Race Editor - Utils

Utility functions for the drag race editor: error display, undo/redo stack, data validation, lane creation, mouse info tracking, and transform setup.

On this page

Public APIStrip Data StructureUsage ExampleDependenciesModule VariablesSee Also