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

4WD / Transfer Case Controller

Manages selectable four-wheel-drive and transfer case systems. Controls switching between 2WD/4WD modes, high/low range selection, and differential locking. Used on vehicles with configurable drivetrain modes like trucks and off-road vehicles.

Manages selectable four-wheel-drive and transfer case systems. Controls switching between 2WD/4WD modes, high/low range selection, and differential locking. Used on vehicles with configurable drivetrain modes like trucks and off-road vehicles.


Public API

FunctionDescription
module.toggleDiffs()Toggles diffs.
module.toggle4WD()Toggles 4WD.
module.set4WDMode(mode)Sets the 4WD mode.
module.toggleRange()Toggles range.
module.setRangeMode(mode)Sets the range mode.

Hooks

HookDescription
module.init(jbeamData)Initializes the controller from JBeam data.
module.initLastStage(jbeamData)Final-stage initialization after all controllers and powertrains are ready.
module.updateGFX(dt)Per-frame update for visual state and UI synchronization.

Usage Example

-- Toggle between 2WD and 4WD
controller.getController("4wd").toggle4WD()

-- Set specific 4WD mode
controller.getController("4wd").set4WDMode("4H")

-- Switch to low range for off-road
controller.getController("4wd").toggleRange()

See Also

  • Drive Modes — Vehicle-wide driving profiles
  • Vehicle Controller — Main powertrain control logic
  • Active Center Diff — Electronic center differential control

Wheels Module Reference

Module defined in `lua/vehicle/wheels.lua`. This module manages the physical simulation, thermal state, and braking logic for wheels and non-tire rotators. It acts as the final interface between the [

Advanced Coupler Control

Manages automated coupling and decoupling of trailer hitches and tow connections. Handles coupler state machines, latch detection, and electrics integration for advanced towing setups.

On this page

Public APIHooksUsage ExampleSee Also