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

Backwards Compatibility Module Reference

Module defined in `lua/vehicle/backwardsCompatibility.lua`. This system acts as a translation layer for older vehicle JBeam configurations, converting legacy definitions (pre-powertrain/controller era

Module defined in lua/vehicle/backwardsCompatibility.lua. This system acts as a translation layer for older vehicle JBeam configurations, converting legacy definitions (pre-powertrain/controller era) into modern modular components at runtime.

See Also

  • Powertrain: The modern drive simulation system.
  • Controller: Modern modular logic hub.
  • Drivetrain: The legacy physical drivetrain system.

Public API

FunctionSignatureDescription
backwardsCompatibility.init()The main entry point called during vehicle initialization. It runs a series of heuristic checks to upgrade legacy JBeam data structures. Sub-processes: 1. checkOldESC(): If escConfig is found in JBeam, it automatically injects an esc controller and maps the old configuration to it. 2. checkOldDrivetrain(): If powertrain is missing but legacy engine or differentials are present, it triggers the full compatibility conversion. 3. checkTrailerIgnitionStates(): Analyzes the vehicle for torque sources. If none are found (like a trailer), it restricts the vehicle to ignition level 0 (Off) to prevent ghost engine effects.

Compatibility Systems

Legacy Drivetrain Migration

When a vehicle uses the old drivetrain system, this module dynamically generates a modern powertrain tree:

1. Engine Conversion (createCompatibilityEngine)

  • Legacy Source: engine and enginetorque JBeam sections.
  • Result: Creates a combustionEngine device named "mainEngine" and a matching gearbox device.
  • Properties Migrated: RPM limits, inertia, friction, thermals (radiator, oil, etc.), and torque curves.
  • Clutch Handling: Automatically adds a frictionClutch for manuals or a viscousClutch for older automatics.

2. Differential Conversion (createCompatibilityDifferentials)

  • Legacy Source: differentials JBeam section.
  • Result: Generates a tree of differential and shaft devices.
  • Logic:
    • Handles single-diff (FWD/RWD) and dual-diff (AWD) setups.
    • Automatically adds necessary driveshaft and axle components to complete the graph.
    • Converts legacy lsd, open, and locked states to modern differential modes.

3. Controller Injection (createCompatibilityController)

  • Result: Injects a vehicleController if an engine is present.
  • Logic: Automatically calculates shift points and clutch launch parameters based on the legacy engine's idle and max RPM.

AI Module Reference

Module defined in `lua/vehicle/ai.lua`. This module handles high-level artificial intelligence behaviors, including pathfinding, traffic simulation, and reactive driving modes (chase, flee, follow).

Bdebug Module Reference

Module defined in `lua/vehicle/bdebug.lua`. Lightweight proxy that delegates all debug visualization calls to the heavyweight `bdebugImpl` module. Use this module to toggle node/beam visualization, skeleton overlays, center-of-gravity markers, and collision triangle rendering without loading the full debugger until needed.

On this page

See AlsoPublic APICompatibility SystemsLegacy Drivetrain Migration1. Engine Conversion (createCompatibilityEngine)2. Differential Conversion (createCompatibilityDifferentials)3. Controller Injection (createCompatibilityController)