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

ScriptAI Module Reference

Module defined in `lua/vehicle/scriptai.lua`. Handles high-fidelity path recording and playback for cinematic sequences and scripted behavior.

Module defined in lua/vehicle/scriptai.lua. Handles high-fidelity path recording and playback for cinematic sequences and scripted behavior.

See Also

  • AI: For general AI behaviors.
  • Mapmgr: For world navigation data.

State Fields

VariableDescription
debugModeCurrent visualization mode ("off", "path", "target", "all").
updateGFXActive loop: either updateGFXrecord (capturing) or updateGFXfollow (playback PID).

Public API

FunctionSignatureDescription
debugDraw() (**hook**)Renders trajectory and target points in 3D.
getInitialSpawnPositionOrientation(inScript, vehPosType, _timeOffset) (**callable**)Calculates stable world transform to match script start. Returns multiple values.
isDriving() (**callable**)Returns true if playback is active.
scriptState() (**callable**)Returns status table (state, time, script-time, error).
scriptStop(centerWheel, engageParkingbrake) (**callable**)Halts playback and resets inputs.
setLogDataToCSV(val) (**callable**)Enables detailed telemetry logging to CSV.
setSpeedDiffSmootherOutRate(outRate) (**callable**)Tunes the velocity-matching PID loop.
startFollowing(inScript, timeOffset, loopCounter, loopType, externalForce) (**callable**)Starts high-fidelity playback with optional correction forces. Returns M.
startRecording(recordSpeed) (**callable**)Begins per-frame position and time recording.
stopRecording() (**callable**)Finalizes recording and returns path data.
wheelToGroundDist(pos, dir, up) (**callable**)Utility for calculating stable vertical spawn offset. Returns dH.

Recovery Module Reference

Module defined in `lua/vehicle/recovery.lua`. This module handles the vehicle's "Rewind" functionality, "Home" point management, and automatic repair logic. It maintains a historic log of vehicle posi

Sensors Module Reference

Module defined in `lua/vehicle/sensors.lua`. Provides real-time physical sensor data (G-forces, angular velocities, orientation) with optional temporal smoothing. Used by AI for driving decisions, by the UI for G-force meters, and by extensions for impact detection and stability monitoring. Reads directly from the C++ physics engine via FFI for maximum performance.

On this page

See AlsoState FieldsPublic API