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

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 Referenceve

Drivetrain Module Reference

Module defined in `lua/vehicle/drivetrain.lua`. Legacy compatibility proxy that mirrors modern powertrain and controller data into the old drivetrain API format. Exists to support older mods and scripts that read drivetrain state directly. New code should use the `powertrain` and `controller` modules instead.

Module defined in lua/vehicle/drivetrain.lua. Legacy compatibility proxy that mirrors modern powertrain and controller data into the old drivetrain API format. Exists to support older mods and scripts that read drivetrain state directly. New code should use the powertrain and controller modules instead.

See Also

  • Powertrain: Modern powertrain system.
  • Backwards Compatibility: For legacy system translation.

State Fields

VariableDescription
avgAV, engineAVAngular velocities (rad/s).
brake, throttle, engineLoadInputs and load coefficients (0.0-1.0).
engineDisabledTrue if stalled or broken.
escTable for ESC placeholders. Modern stability control is handled by the Driving Dynamics Controller.
fuel, fuelCapacity, fuelLeakRate, fuelUsageEnergy storage and consumption metrics (L, L/s). Actual storage is managed by Energy Storage.
gear, rpm, shifterMode, shifterPositionPowertrain logic state. Modern implementations use Powertrain Devices and Shift Logic Controllers.
wheelCountDetected drive wheels.

Public API

FunctionSignatureDescription
init() (**hook**)Link setup.
reset() (**hook**)Variable reset.
setShifterMode(v) (**callable**)Gearbox behavior control.
shiftToGear(gear) (**callable**)Requests gear change.
updateGFX() (**hook**)Modern-to-legacy data sync.

Usage Example

-- Legacy code (avoid in new projects):
local rpm = drivetrain.rpm
local gear = drivetrain.gear

-- Modern equivalent:
local rpm = electrics.values.rpm
local gear = electrics.values.gear

DamageTracker Module Reference

Module defined in `lua/vehicle/damageTracker.lua`. This is the centralized system for reporting component damage and failure states. It handles update throttling to the UI and manages temporary damage

Electrics Module Reference

Module defined in `lua/vehicle/electrics.lua`. This module manages the vehicle's electrical systems, including lights, signals, horn, ignition states, and various sensor-derived values. It acts as the

On this page

See AlsoState FieldsPublic APIUsage Example