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
Vehicle Editor - Toolbar
Adjustable Tech Car TunerAero DebugCrash TesterFlexbody DebugGeneral DataJBeam PickerVehicle Editor - Lights DebugVehicle Editor - Node Triangle Self Collision DetectorVehicle Editor - Powertrain InspectorVehicle Editor - Prop TransformerVehicle Editor - Raw Vehicle DataVehicle Editor - TCS DebugVehicle Editor - Vehicle SpawnerVehicle Editor - Scene View

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 ExtensionseditorvehicleEditorliveEditor

Vehicle Editor - TCS Debug

Real-time Traction Control System (TCS) debugging tool that plots per-wheel brake factors, slip values, throttle factors, and slip thresholds as scrolling multi-line graphs.

Real-time Traction Control System (TCS) debugging tool that plots per-wheel brake factors, slip values, throttle factors, and slip thresholds as scrolling multi-line graphs.


Module Exports

ExportTypeDescription
M.menuEntrystring"TCS" - menu label
M.openfunctionOpens the TCS debug window
M.onUpdatehookQueries TCS data and renders graphs
M.onExtensionLoadedhookInitializes slip threshold buffer
M.onExtensionUnloadedhookCleanup (empty)
M.onSerializehookPersists window state
M.onDeserializedhookRestores window state

Key Internals

VariableTypePurpose
windowOpenBoolPtrWindow visibility
dataPointCountnumber600 data points per graph (scrolling buffer)
brakeFactorstablePer-wheel brake factor history
wheelSlipstablePer-wheel slip history
throttleFactorstablePer-engine throttle factor history
allWheelSlipstablePer-wheel total slip history
slipThresholdstableSlip threshold history

How It Works

  1. Queries vehicle-side ESC controller debug data via queueLuaCommand
  2. On first data reception, initializes per-wheel buffers (600 entries each)
  3. Each frame, shifts oldest value out and appends newest
  4. Renders three stacked PlotMultiLines graphs:
    • Graph 1: Wheel brake factors (range -0.25 to 1)
    • Graph 2: Wheel slips + slip threshold (range 0 to 0.5)
    • Graph 3: Throttle factors + all wheel slips (range 0 to 1)

Each graph auto-sizes to fill 1/3 of available window height.


Lua Code Example

-- Open TCS debug
extensions.editor_vehicleEditor_liveEditor_veTCSDebug.open()

-- Vehicle-side query for ESC controller data:
-- vEditor.vehicle:queueLuaCommand([[
--   local escControllers = controller.getControllersByType("esc")
--   local tcsData = (#escControllers >= 1) and escControllers[1].debugData.tcs or nil
--   obj:queueGameEngineLua("vEditor.tcsData = " .. serialize(tcsData))
-- ]])

-- TCS data structure from vehicle side:
-- vEditor.tcsData = {
--   wheelBrakeFactors = { FL = 0.0, FR = 0.0, ... },
--   wheelSlips = { FL = 0.1, FR = 0.05, ... },
--   throttleFactors = { mainEngine = 0.8, ... },
--   allWheelSlips = { FL = 0.12, FR = 0.06, ... },
--   slipThreshold = 0.15,
-- }

-- Scrolling buffer pattern:
-- table.remove(brakeFactors[k], 1)  -- remove oldest
-- table.insert(brakeFactors[k], v)  -- add newest

-- Multi-line graph rendering uses color-coded per-wheel lines:
-- colors1 = {{52,177,255,255}, {167,255,0,255}, {255,0,120,255}, {255,119,0,255}}
-- im.PlotMultiLines("", #tables, names, colors, tables, 600, "", min, max, size)

-- Graph sizes adapt to window:
-- local height = (windowSize.y - 140) / 3
-- local width = windowSize.x - padding

See Also

  • Adjustable Tech Car Tuner - Related reference
  • Aero Debug - Related reference
  • Crash Tester - Related reference
  • World Editor Guide - Guide

Vehicle Editor - Raw Vehicle Data

Displays the complete raw vehicle data (`vEditor.vehData`) as a recursive tree in the Vehicle Editor.

Vehicle Editor - Vehicle Spawner

Tool for spawning and despawning multiple vehicles at specified positions within the Vehicle Editor, with interactive location picking via raycast.

On this page

Module ExportsKey InternalsHow It WorksLua Code ExampleSee Also