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

PartCondition Module Reference

Module defined in `lua/vehicle/partCondition.lua`. Tracks the long-term health, mileage (odometer), and visual wear of every installed vehicle part. Used by the career/campaign systems to persist vehicle condition across sessions — parts degrade over time and use, affecting both gameplay (repair costs, performance) and visuals (paint wear, rust). Supports condition snapshots for save/restore.

Module defined in lua/vehicle/partCondition.lua. Tracks the long-term health, mileage (odometer), and visual wear of every installed vehicle part. Used by the career/campaign systems to persist vehicle condition across sessions — parts degrade over time and use, affecting both gameplay (repair costs, performance) and visuals (paint wear, rust). Supports condition snapshots for save/restore.

See Also

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

Public API

FunctionSignatureDescription
applyConditionSnapshot(snapshotKey) , createConditionSnapshot(snapshotKey), deleteConditionSnapshots() (**callable**)Snapshot logic for saving/restoring entire vehicle state.
ensureConditionsInit(...) (**callable**)Fallback initialization.
getConditions() (**callable**)Aggregates health/mileage for all parts. Returns result.
getRootPartOdometerValue() , getRootPartTripValue() (**callable**)Odometer access. Returns odometer.
initConditions(partsCondition, fallbackOdometer, fallbackIntegrityValue, fallbackVisualValue, defaultPaints) (**hook**)Primary health restoration point.
reset() (**hook**)Reverts to spawn snapshot.
setAllPartPaints(paints, paintOdometer) (**callable**)Universal visual aging update.
setPartMeshPaints(partId, paints) , setPartPaints(partId, paints, paintOdometer) (**callable**)Direct material aging control.
setResetSnapshotKey(snapshotKey) (**callable**)Sets the target for the reset hook.

Usage Example

-- Get the condition of all installed parts
local conditions = partCondition.getConditions()
for partName, data in pairs(conditions) do
  print(partName .. ": integrity=" .. data.integrityValue .. " visual=" .. data.visualValue)
end

-- Check odometer reading
local km = partCondition.getRootPartOdometerValue() / 1000
print("Vehicle odometer: " .. km .. " km")

-- Save and restore condition snapshots
partCondition.createConditionSnapshot("beforeRace")
-- ... race happens, damage occurs ...
partCondition.applyConditionSnapshot("beforeRace")  -- Restore pre-race state

obj (Vehicle C++ Object)

The `obj` global is a C++ binding to the `Vehicle` object in the engine. It provides direct access to the vehicle's physical state and low-level physics modifications. This is the primary interface fo

Particlefilter Module Reference

Module defined in `lua/vehicle/particlefilter.lua`. Filters collision events to determine which impacts should trigger particle effects (sparks, dust, debris). Evaluates perpendicular velocity and penetration depth thresholds to avoid spawning particles for minor or irrelevant contacts.

On this page

See AlsoPublic APIUsage Example