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

Bus Route Manager

Manages bus route definitions and bus stop trigger events. Loads route data from JSON files, validates stop triggers against the scene, and dispatches events to bus vehicle controllers.

Manages bus route definitions and bus stop trigger events. Loads route data from JSON files, validates stop triggers against the scene, and dispatches events to bus vehicle controllers.


Public API

FunctionSignatureReturnsDescription
M.setLine(vehId, routeID, variance)table/nilAssigns a bus route to a vehicle; returns route data
M.onAtStop(data)nilHandles bus arriving at a stop trigger
M.onBusUpdate(state)nilForwards bus state updates to scenario_busdriver
M.onBeamNGTrigger(data)nilRoutes busstop trigger events (enter/exit/tick)

Hooks

HookPurpose
M.onClientStartMissionInitializes routes from level bus line files
M.onExtensionLoadedSame initialization on extension load

Route File Format

Located at [levelDir]/buslines/*.buslines.json:

{
  "version": 1,
  "routes": [
    {
      "routeID": 42,
      "variance": "a",
      "tasklist": ["busstop_01", "busstop_02", ...]
    }
  ]
}

Trigger Requirements

Bus stop triggers must:

  • Be in a SimGroup named "busstops" in the scene
  • Have class BeamNGTrigger with type = "busstop"
  • Names must match route tasklist entries

Usage Examples

-- Assign route 42 variant "a" to a bus vehicle
local routeData = core_busRouteManager.setLine(vehId, 42, "a")

-- Route data is sent to vehicle via:
-- controller.onGameplayEvent('bus_setLineInfo', routeData)

Vehicle Commands

The manager sends these gameplay events to bus vehicles:

  • bus_setLineInfo - full route assignment
  • bus_onAtStop - arrived at stop
  • bus_onDepartedStop - left a stop
  • bus_onTriggerTick - periodic tick while at stop

Audio Ribbon System

Dynamic spatial audio system for rivers, waterfalls, and ambient sound ribbons. Computes closest-point-on-ribbon geometry per frame, managing near/far lists and 5-axis SFX emitter positioning relative

Camera System

Central camera management system. Handles camera mode switching, per-vehicle camera configuration, global cameras, input routing, collision detection, shadow quality, serialization, and all camera-rel

On this page

Public APIHooksRoute File FormatTrigger RequirementsUsage ExamplesVehicle Commands