RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

server/commands - Camera & Input Commandsge_utils - Game Engine Utility Functionsmain.lua - GE Lua Entry Point & Game Loopmap.lua - Navigation Graph (AI Road Map)screenshot.lua - Screenshot Systemserver/server - Level Loading & Game ServerserverConnection - Client-Server Connection Manager`setSpawnpoint` - Default Spawn Point Persistence`simTimeAuthority` - Simulation Time & Bullet Time Control`spawn` - Vehicle Spawning & Safe Placement`suspensionFrequencyTester` - Suspension Natural Frequency Analysis
Activity ManagerAudio Bank ManagerAudio Ribbon SystemBus Route ManagerCamera SystemCore Chat (IRC)Core CheckpointsCore Command HandlerCoupler Camera ModifierDevices (RGB Peripherals)Dynamic PropsEnvironmentFlowgraph ManagerForestFun StuffGame ContextGame StateGround Marker ArrowsGround MarkersHardware InfoHighscoresHotlappingInventoryJob SystemLap TimesLevelsLoad Map CommandMetricsMod ManagerMultiseatMultiseat CameraMulti SpawnOnlinePaths (Camera Paths)Quick Access (Radial Menu)Recovery PromptRemote ControllerReplayRepositoryRope Visual TestScheme Command ServerCore SnapshotCore SoundsCore TerrainTraffic SignalsTrailer RespawnVehicle Active PoolingVehicle Bridge (GE ↔ VLua Communication)Vehicle MirrorsVehicle PaintsCore VehiclesVehicle TriggersVersion UpdateWeather SystemWindows Console

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 ReferenceGE Extensionscore

Remote Controller

Mobile phone remote controller support. Listens for UDP connections from the BeamNG Remote Control app, creates virtual input devices, and bridges accelerometer/button data to vehicle controls.

Mobile phone remote controller support. Listens for UDP connections from the BeamNG Remote Control app, creates virtual input devices, and bridges accelerometer/button data to vehicle controls.


Public Functions

FunctionSignatureDescription
M.onUpdate()Processes incoming UDP packets and manages device timeouts
M.onExtensionLoaded() → booleanValidates FFI availability (required for binary parsing)
M.onInputBindingsChanged(players)Updates player assignment for virtual devices
M.getQRCode() → number/falseOpens UDP socket and returns the pairing code
M.devicesConnected() → booleanWhether any remote devices are currently connected
M.onFirstUpdate()Hook: first update tick.

Network Protocol

PortDirectionPurpose
4444ListenDiscovery and input data from app
4445SendUI data (outgauge) back to app

Connection Flow

  1. App sends: beamng|<deviceName>|<code>
  2. Server validates code, creates virtual input device
  3. Server responds: beamng|<code>
  4. App sends binary orientation data (16 bytes: {w, x, y, z} as floats)

Input Mapping

App DataVirtual InputMapping
orientation.x > 0.5button 0Binary threshold
orientation.y > 0.5button 1Binary threshold
orientation.zaxis 0Continuous 0.0–1.0 (steering)

Module State

VariableTypeDefault
onFirstUpdatevariesonFirstUpdate

Usage Example

-- Get the pairing code (also starts the UDP listener)
local code = core_remoteController.getQRCode()
if code then
  print("Pairing code: " .. code)
end

-- Check if any devices are connected
if core_remoteController.devicesConnected() then
  print("Remote controller active")
end

Device Lifecycle

  • Discovery: Random 5-digit code generated on extension load
  • Connection: Virtual input device created via core_input_virtualInput
  • Timeout: Devices disconnected after 10 seconds of no packets
  • UI Feedback: Vehicle outgauge data sent back to app for dashboard display

Notes

  • Requires FFI for binary packet parsing (ori_t struct: 4 floats).
  • Virtual devices are named "vinput" .. deviceInstance.
  • Supports multiseat - each remote device can be assigned to a different player.
  • The app port is listenPort + 1 (4445 by default).
  • Network byte order is reversed for the orientation struct.

See Also

  • virtualInput - Virtual input device creation
  • multiseat - Multi-player input assignment

Recovery Prompt

Recovery and towing system for career mode. Provides context-sensitive buttons for flipping, towing, repairing, and teleporting vehicles, with cost calculations, conditions, and fade-screen transition

Replay

Replay recording and playback system. Records vehicle physics state to `.rpl` files, plays back with variable speed, seeking, and frame stepping. Supports mission auto-recording and user-saved replays

On this page

Public FunctionsNetwork ProtocolConnection FlowInput MappingModule StateUsage ExampleDevice LifecycleNotesSee Also