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

Input Module Reference

Module defined in `lua/vehicle/input.lua`. This module processes raw user inputs from various sources (keyboard, gamepad, steering wheel, AI), applies temporal smoothing and driving assistants, and br

Module defined in lua/vehicle/input.lua. This module processes raw user inputs from various sources (keyboard, gamepad, steering wheel, AI), applies temporal smoothing and driving assistants, and broadcasts the final values to the rest of the vehicle systems.

See Also

  • Electrics: Where final processed input values (e.g., electrics.values.throttle) are stored.
  • Hydros: For force feedback and steering geometry.

Core Module Properties

Direct normalized and smoothed values for primary driving controls.

VariableTypeDescription
steeringnumberFinal steering value (-1.0 to 1.0).
throttlenumberFinal throttle value (0.0 to 1.0).
brakenumberFinal brake value (0.0 to 1.0).
clutchnumberFinal clutch value (0.0 to 1.0).
parkingbrakenumberFinal parking brake value (0.0 or 1.0).

State Fields

VariableDescription
stateContainer for the detailed status of every input axis. Internal Structure (e.g., input.state.throttle): val: The current smoothed value. filter: The filter type used (0: Direct, 1: Keyboard, 2: Pad). minLimit / maxLimit: Clamping bounds. smootherKBD: Temporal smoother object for keyboard/digital input. smootherPAD: Temporal smoother object for gamepad/analog axis input.
allowedInputSourcesTable tracking which sources (local, ai, remote) are permitted to override specific inputs.
lastFilterTypeStores the filter type of the most recently received input.
lastInputsTracks the previous input values for change detection.

Public API - Global

FunctionSignatureDescription
input.event(itype, ivalue, filter, ...)Main entry point for raw input. Maps the value to the internal state and updates smoothers.
input.toggleEvent(itype)Toggles a digital input between 0.0 and 1.0. Typically used for hazards, parking brake, etc.
input.kbdSteer(isRight, val, filter)Specialized handler for keyboard steering that manages left/right accumulation.
input.padAccelerateBrake(val, filter)Handles gamepad triggers where a single axis is mapped to both throttle and brake.
input.setAllowedInputSource(itype, source, enabled)Restricts or allows specific modules (like AI) from taking control of an input axis.
input.init() / initSecondStage() / reset()Initialization and state clearing for smoothers and input logic. initSecondStage pre-calculates rates based on steering geometry.
input.settingsChanged()Refreshes driving assistant configuration (e.g., steering sensitivity) from user settings.
input.updateGFX(dt)Primary update loop. Processes smoothers, applies driving assistants (ABS, TCS, Steering helpers), and updates electrics.values.

Usage Example

input.event("brake", 0.5, 2)

Hydros Module Reference

Module defined in `lua/vehicle/hydros.lua`. This module simulates hydraulic actuators (hydros) and torsion hydros, primarily used for steering and complex animated parts. It also handles Force Feedbac

JBeam-Lua Integration Guide

A deep dive into how JBeam data structures and Lua logic communicate in BeamNG.drive.

On this page

See AlsoCore Module PropertiesState FieldsPublic API - GlobalUsage Example