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

Guihooks Module Reference

Communication bridge between vehicle Lua and game UI (JavaScript). This module handles event triggers, high-frequency data streams, and UI notifications.

Communication bridge between vehicle Lua and game UI (JavaScript). This module handles event triggers, high-frequency data streams, and UI notifications.

See Also

  • Communication: Inter-VM logic overview.
  • Streams: High-frequency UI data categories.

Common UI Events

  • AIStateChange: Refresh AI app state.
  • VehicleSkeleton: Send physical node/beam layout.
  • HydrosUpdate: Update UI with hydraulic states.
  • appMessage: Send a generic message to UI apps.
  • VehicleChange: Notification when the vehicle object changes.
  • VehicleReset: Notification when the vehicle is reset.

State Fields

VariableDescription
updateStreamsBoolean flag that controls whether queueStream actually caches data. Automatically managed by the engine based on whether UI apps are listening.

Public API - UI Data Streams

FunctionSignatureDescription
guihooks.queueStream(key, value) / send(key, value)Queues data for the next UI sync step. Data is only cached if updateStreams is true.
guihooks.triggerStream(streamName, data)Immediately transmits stream data to the UI, bypassing the sync cache.
guihooks.sendStreams()Transmits all cached stream data to the UI. Automatically called by the engine during onGraphicsStep.

Usage Example

guihooks.queueStream("custom_telemetry", {speed = 100})

Public API - Event Triggering

FunctionSignatureDescription
guihooks.trigger(hookName, ...)Triggers a generic UI event hook.
guihooks.triggerClient(id, hookName, ...)Sends an event to a specific UI instance.
guihooks.triggerRawJS(hookName, rawJs)Sends a raw JS string to the UI context.

Usage Example

guihooks.trigger("MyCustomEvent", "Hello UI", 42)

Public API - UI Notifications

FunctionSignatureDescription
guihooks.message(msg, ttl, category, icon)Displays a notification toast in the UI.

Usage Example

guihooks.message("Engine Overheating!", 5, "engine", "warning")

Public API - Graphing Utilities

FunctionSignatureDescription
guihooks.graph(a, ...)Sends data to the "Simple Graph" UI app.
guihooks.graphWithCSV(filename, ...)Similar to graph, but also logs the data points to an internal CSV buffer.
guihooks.graphWithCSVWrite()Writes the current CSV buffer to a file on disk.

Public API - Lifecycle

FunctionSignatureDescription
guihooks.reset()Clears the stream cache and resets the updateStreams flag.

Vehicle Engine True Globals

Global variables and functions available in the BeamNG vehicle Lua VM (VE context). These globals provide access to vehicle physics, data, UI communication, and inter-VM bridging to the Game Engine (G

GUI Streams Module Reference

Module defined in `lua/vehicle/guistreams.lua`. Manages the registration and dispatch of high-frequency data streams from the vehicle to UI apps. UI apps subscribe to specific stream categories, and this module ensures only requested data is computed and transmitted each frame.

On this page

See AlsoCommon UI EventsState FieldsPublic API - UI Data StreamsUsage ExamplePublic API - Event TriggeringUsage ExamplePublic API - UI NotificationsUsage ExamplePublic API - Graphing UtilitiesPublic API - Lifecycle