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

Logger Template

A template controller for data logging and telemetry recording. Demonstrates how to capture vehicle state data at regular intervals and output it for analysis. Copy this as a starting point for custom data loggers.

A template controller for data logging and telemetry recording. Demonstrates how to capture vehicle state data at regular intervals and output it for analysis. Copy this as a starting point for custom data loggers.


State Fields

FieldTypeDescription
typestringKeep as "auxiliary", there is also "main", but for logging purposes that would be the wrong choice
defaultOrdernumberThis determines when the controller update methods are executed relative to other controllers. If you have no specific requirements to that order, it's not relevant

Public API

FunctionDescription
saveLogToCSV()If you want to expose your own methods to the outside (for example for calling upon a key press) you need to list them here in the following format. There's an external and an internal name, the external is what the outside world sees, the internal is what your method in this file needs to be called like. (Both names can be the same) If this controller code is active (ie. specified in jbeam) you can call this method like this: controller.getController("loggerTemplate").saveLogToCSV() External name Internal name

Hooks

HookDescription
init()This is called once when a vehicle is created
reset()This is being called once after the vehicle is created and then once everytime when the vehicle is reset
updateGFX(dt)This runs at a variable update rate matching the current FPS Example: The game runs at 60fps: Emthod is being called 60 times per second (and the dt variable is ~1/60 = 0.166667s) If you overload this method performance wise, fps will drop gracefully, so disk IO and other heavily unpredictable things are done/triggered from here (or user input)
updateFixedStep(dt)This runs at a fixed 100hz. (derived from 2000hz physics step, see note about performance on update())
update(dt)This runs at a fixed 2000hz. Note: Fixed 2000hz means that there is ever only 0.0005s or 0.5ms of computing time available for all work. That includes all the raw physics, large parts of the powertrain, some parts of the safety and driving electronics, etc As soon as your computer takes more than the 0.5ms to process all these things, the game will not be able to compute things in time anymore and it will enter an automatic slow motion mode In practice this means that you should be very well aware of how performance sensitive your code is and avoid uunpredictable things like disk IO in anything that is/derives from the 2000hz update

See Also

  • Controller Template — General controller boilerplate
  • Tech - Recorders — Built-in data recording system

Line Lock

Controls brake line locking valves that hold front brakes while releasing rears (or vice versa). Primarily used for drag racing burnouts — lock the front brakes to hold the car stationary while spinning the rear tires to heat them up.

Nitrous Oxide Injection

Controls nitrous oxide (NOS/N2O) injection systems that provide temporary power boosts by enriching the combustion mixture with additional oxygen. Manages bottle pressure, solenoid activation, fuel enrichment, and injection timing.

On this page

State FieldsPublic APIHooksSee Also