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

Protocols Module Reference

Module defined in `lua/vehicle/protocols.lua`. Manages external telemetry export over UDP for motion simulator platforms, external dashboards, and hardware gauges. Smooths and packages vehicle state data (position, velocity, acceleration, orientation) into standardized binary packets at configurable update rates. Supports OutGauge (dashboard telemetry) and MotionSim (motion platform) standards.

Module defined in lua/vehicle/protocols.lua. Manages external telemetry export over UDP for motion simulator platforms, external dashboards, and hardware gauges. Smooths and packages vehicle state data (position, velocity, acceleration, orientation) into standardized binary packets at configurable update rates. Supports OutGauge (dashboard telemetry) and MotionSim (motion platform) standards.

See Also

  • Protocols Folder: Specific standards (MotionSim, OutGauge).
  • Communication: General Inter-VM logic.

State Fields

VariableDescription
accXSmoothed, accYSmoothed, accZSmoothedSmoothed acceleration components (m/s²).
posX, posY, posZCurrent world position (meters).
rollAccSmoothed, pitchAccSmoothed, yawAccSmoothedSmoothed angular accelerations (rad/s²).
rollPosSmoothed, pitchPosSmoothed, yawPosSmoothedSmoothed orientation angles (rad).
rollVelSmoothed, pitchVelSmoothed, yawVelSmoothedSmoothed angular velocities (rad/s).
upX, upY, upZWorld-space "Up" direction vector.
velXSmoothed, velYSmoothed, velZSmoothedSmoothed world velocity (m/s).

Public API

FunctionSignatureDescription
destroy() (**callable**)Shuts down sockets and clears protocol tracking.
init() (**hook**)Loads sub-modules and configures UDP sockets.
isPhysicsStepUsed() (**callable**)True if any active protocol requires physics-frame updates. Returns physicsStepUsed.
onPlayersChanged(anyPlayerSeated) (**hook**)Resets telemetry smoothers when occupancy changes. Returns M.
reset() (**hook**)Resets all smoothers and sub-module states.
settingsChanged() (**hook**)Re-initializes module on configuration updates.
module.updateGFX(dtSim)Graphics-step update callback. Evaluates all active sub-protocols and transmits UDP packets.

Usage Example

-- Protocols are configured via game settings (Options > Gameplay > Telemetry).
-- Enable OutGauge for SimHub or external dashboard apps:
-- Settings: outgaugeEnabled = true, outgaugeAddress = "127.0.0.1", outgaugePort = 4444

-- From Lua, protocols are managed automatically. Check if active:
if protocols.isPhysicsStepUsed() then
  print("A telemetry protocol is using the physics step")
end

Props Module Reference

Module defined in `lua/vehicle/props.lua`. Manages animated vehicle "props" (steering wheels, needles, shifters, etc.).

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

On this page

See AlsoState FieldsPublic APIUsage Example