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

Extensions Module Reference

Infrastructure for managing vehicle extensions, dependency resolution, and event hooking. This module allows for modular scripts to be loaded, unloaded, and updated at runtime, providing a flexible pl

Infrastructure for managing vehicle extensions, dependency resolution, and event hooking. This module allows for modular scripts to be loaded, unloaded, and updated at runtime, providing a flexible plugin architecture.

See Also

  • Extensions Folder: Detailed list of common extensions.
  • InitSequence: For extension loading order.

Public API - Loading & Lifecycle

FunctionSignatureDescription
extensions.load(...)Loads and initializes named extensions. Automatically processes dependencies and triggers onExtensionLoaded.
extensions.unload(name)Disables and unloads an extension and any modules that depend exclusively on it.
extensions.reload(path)Hot-reloads an extension from disk, clearing the Lua cache and re-initializing the module.
extensions.refresh(name)Refreshes the internal registration of a module without reloading the file from disk.
extensions.loadModulesInDirectory(dir, exclude)Automatically scans and loads all .lua files found in the specified directory.

Usage Example

extensions.load("cruiseControl", "telemetryLogger")

Public API - Hooking & Dispatch

FunctionSignatureDescription
extensions.hook(funcName, ...)Dispatches an event to every active extension that implements the specified function. This is the primary way extensions communicate with the core engine.
extensions.hookNotify(funcName, ...)Similar to hook, but also triggers any one-time callbacks registered via setCompletedCallback.
extensions.hookExcept(exceptions, funcName, ...)Dispatches a hook to all extensions except those listed in the exceptions table.

Usage Example

extensions.hook("updateGFX", dt)

Public API - State & Persistence

FunctionSignatureDescription
extensions.deserialize(data, filter) / getSerializationData(reason)Standard interface for saving and restoring the internal state of all extensions (used for CTRL+L reloads).
extensions.disableSerialization(...)Excludes specific modules from the automatic state saving process.

Public API - Utility & Debug

FunctionSignatureDescription
extensions.isExtensionLoaded(name)Returns true if the named extension is currently active.
extensions.getLoadedExtensionsNames(excludeVirtual)Returns a sorted list of all active extension names.
extensions.addModulePath(dir)Adds a directory to the Lua require search path.
extensions.printExtensions() / printHooks(funcName)Debug utilities that log the current extension topology and implemented hooks to the console.

EnergyStorage Module Reference

Module defined in `lua/vehicle/energyStorage.lua`. Central manager for all vehicle energy containers (fuel tanks, batteries, N2O tanks, pressure tanks). Handles discovery from JBeam, links containers to powertrain devices that consume energy, tracks fuel levels and leak states, and manages rupture callbacks when beams break.

Fire Module Reference

Module defined in `lua/vehicle/fire.lua`. Physics-based fire and thermal simulation. Fire can be triggered by high temperatures, collisions, or fuel tank ruptures.

On this page

See AlsoPublic API - Loading & LifecycleUsage ExamplePublic API - Hooking & DispatchUsage ExamplePublic API - State & PersistencePublic API - Utility & Debug