RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

AI Module ReferenceBackwards Compatibility Module ReferenceBdebug Module ReferenceBdebugImpl Module ReferenceBeamstate Module ReferenceBullettime Module ReferenceController Module ReferenceDamageTracker Module ReferenceDrivetrain Module ReferenceElectrics Module ReferenceElectrics Custom Value ParserEnergyStorage Module ReferenceExtensions Module ReferenceFire Module ReferenceVehicle Engine True GlobalsGuihooks Module ReferenceGUI Streams Module ReferenceHTML Texture Module ReferenceHydros Module ReferenceInput Module ReferenceJBeam-Lua Integration GuideMapmgr Module ReferenceMaterial Module ReferenceBeamNG Math & Unit Conversions Referenceobj (Vehicle C++ Object)PartCondition Module ReferenceParticlefilter Module ReferenceParticles Module ReferencePowertrain Module ReferenceVehicle Property & Module TreeProps Module ReferenceProtocols Module ReferenceRecovery Module ReferenceScriptAI Module ReferenceSensors Module ReferenceSounds Module ReferenceStreams Module ReferenceThrusters Module Reference`v` (Vehicle Data & JBeam)Wheels Module Reference
4WD / Transfer Case ControllerAdvanced Coupler ControlAirplane Control SurfacesAxle Lift ControllerBeacon Spin ControllerBeam NavigatorBypass Dampers ControllerController TemplateControl ModesDrag TimerDrive ModesDummy ControllerElectronic Stability Control (ESC)ETK Gauges ControllerVehicle Controllers OverviewHydraulic Suspension ControllerInput/Output Demo ControllerJATO (Jet Assisted Take-Off)Lightbar ControllerLine LockLogger TemplateNitrous Oxide InjectionPlayer ControllerPneumatics System ControllerPower Steering ControllerPyrotechnic Charge ControllerSBR Gauges ControllerShift Lights ControllerTire Pressure ControlTrailer Landing Feet ControllerTwo-Step Launch ControlVivace Gauges ControllerWendover Gauges Controller

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 Referencevecontroller

Electronic Stability Control (ESC)

Manages Electronic Stability Control (ESC) and Traction Control System (TCS) interventions. Monitors yaw rate, lateral slip, and wheel spin to selectively apply brakes and reduce engine torque, keeping the vehicle stable. Supports multiple ESC modes and automated calibration.

Manages Electronic Stability Control (ESC) and Traction Control System (TCS) interventions. Monitors yaw rate, lateral slip, and wheel spin to selectively apply brakes and reduce engine torque, keeping the vehicle stable. Supports multiple ESC modes and automated calibration.


State Fields

FieldTypeDescription
pauseESCActionbooleanIf true, temporarily disables all ESC/TCS interventions (used by other controllers like calibration).
calibrationMeasurementReady, calibrationSettledbooleanStatus flags for the automated ESC calibration process.
doSettle, doMeasurebooleanControl flags to trigger calibration phases.
stiffnessFront, stiffnessRear, wheelAngleFront, wheelAngleRearnumberCalculated vehicle dynamics parameters used by the ESC logic.
isExistingbooleanTrue if an ESC configuration exists for this vehicle.

Public API

FunctionDescription
new(jbeamData)Creates a new ESC/TCS controller instance.
nextESCMode()Cycles to the next available ESC mode.
startESCCalibration()Puts the controller into calibration mode to measure stiffness.
stopESCCalibration()Ends the calibration process.
module.toggleESCMode()Toggles the ESC mode.
module.setESCMode(key)Sets the ESC mode.
module.getCarData()Returns the car data.
module.getCurrentConfigData()Returns the current config data.

Hooks

HookDescription
updateGFX(dt)Main per-frame logic. Calculates yaw rates, slip, and determines if interventions are required. Manages warning lights.
module.init(jbeamData)Initializes the controller from JBeam data.
module.initSecondStage()Second-stage initialization after all controllers are loaded.

Usage Example

-- Cycle ESC modes (Full, Sport, Off)
controller.getController("esc").toggleESCMode()

-- Set a specific ESC mode
controller.getController("esc").setESCMode("sport")

-- Get vehicle dynamics data
local carData = controller.getController("esc").getCarData()

See Also

  • Traction Control — Advanced traction control supervisor
  • Yaw Control — Advanced yaw control supervisor
  • Drive Modes — ESC behavior may vary per drive mode

Dummy Controller

A minimal "Main" controller implementation that provides the required interface without any powertrain logic. Used for testing, props, or vehicles that don't need engine/transmission simulation (e.g., trailers, static objects). Maps raw inputs directly to electrics values.

ETK Gauges Controller

Backend controller for the ETK-series vehicle instrument cluster. Processes powertrain, speed, and warning data into gauge-ready values for the ETK dashboard display.

On this page

State FieldsPublic APIHooksUsage ExampleSee Also