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

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

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 effects.

See Also

  • DamageOverview: Summary of all damage systems.
  • Beamstate: For physical structural damage.

Public API

FunctionSignatureDescription
damageTracker.getDamage(group, name)Returns the stored damage value or boolean state. Returns false or 0 if no damage record exists. Standard (group, name) Pairs: ("engine", ...): headGasketDamaged, pistonRingsDamaged, rodBearingsDamaged, oilpanLeak, radiatorLeak, coolantOverheating, starvedOfOil, engineLockedUp, impactDamage, oilLevelCritical, exhaustBroken. ("wheels", ...): tire[Name], brake[Name], brakeOverHeat[Name] (where [Name] is e.g. FL). ("powertrain", ...): [deviceName] (e.g., mainEngine, rearDiff). ("body", ...): FL, FR, ML, MR, RL, RR.
damageTracker.setDamage(group, name, value, notifyUI)The primary method for reporting damage. Marks the module as dirty, triggering a UI update.
damageTracker.setDamageTemporary(group, name, value, timeoutValue, timeout, notifyUI)Sets a damage state that automatically reverts after a specified duration. Used for temporary malfunctions or warnings.
damageTracker.registerDamageUpdateCallback(callback)Subscribes a function to be called whenever damage data is synced to the UI.
damageTracker.sendNow()Forces an immediate broadcast of current damage data to the UI and all registered callbacks, bypassing throttling.
damageTracker.willSend()Returns true if no damage update is currently pending (timer at initial value) and a player is seated. Useful for knowing if a sendNow() call would actually trigger an immediate send.
damageTracker.init() / reset()Standard lifecycle hooks. Clears all damage records, timeouts, and callbacks.
damageTracker.updateGFX(dt)Dispatched by the engine. Handles update throttling (approx. 3Hz) and manages active temporary damage timeouts.

Usage Example

if damageTracker.getDamage("engine", "radiatorLeak") then ... end

Controller Module Reference

Module defined in `lua/vehicle/controller.lua`. This module manages the vehicle's logical controllers, such as shift logic, electronic stability control (ESC), and specialized auxiliary systems. It ha

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.

On this page

See AlsoPublic APIUsage Example