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

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

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 to the listener.


Public API

FunctionSignatureReturnsDescription
M.createEmitterHost(eventName)tableCreates an SFX emitter host data structure
M.updateRibbonData(ribbon)nilRecomputes segment count and pair widths after node changes
M.removeRibbon(idx)nilRemoves ribbon at index, clears all SFX emitters
M.recomputeMap()nilRebuilds ribbon name lookup table
M.clearAllSFXEmitters()nilDestroys all dynamic SFX emitter objects
M.clearNearFarLists()nilClears near/far proximity lists
M.clearRibbonNames()nilClears the ribbon name map
M.getRibbons()tableReturns all ribbons
M.setRibbons(val)nilReplaces all ribbons
M.getRibbonNames()tableReturns ribbon name lookup
M.getNearList()tableReturns near-field ribbon list
M.getFarList()tableReturns far-field ribbon list
M.getSfxEmitters()tableReturns all 5-axis SFX emitters

Hooks

HookPurpose
M.onUpdatePer-frame emitter position/volume updates
M.onSerializeSerializes ribbons for Lua reload
M.onDeserializedRestores ribbons after reload
M.onEditorBeforeSaveLevelWrites ribbons to disk
M.onClientCustomObjectSpawningLoads ribbons from level file on level load

Architecture

Each ribbon has 5 emitter hosts (axes):

  1. Center/Ambient - directly at closest point
  2. Forward - offset along listener forward
  3. Back - offset behind listener
  4. Right - offset along listener right
  5. Left - offset along listener left

Near/Far Lists

  • Near list: All ribbons within 500m - fully updated every frame
  • Far list: Ribbons beyond 500m - one ribbon updated per frame (round-robin)

Volume Calculation

Volume is computed from width × depth × speed with distance falloff, using the formula:

volumeC = volCoeff * (speed * width * depth) / (speed * width * depth + expOffset)

Usage Examples

-- Get all ribbons for editor inspection
local ribbons = core_audioRibbon.getRibbons()

-- Remove a specific ribbon
core_audioRibbon.removeRibbon(3)

-- Clear everything on level unload
core_audioRibbon.clearAllSFXEmitters()
core_audioRibbon.clearNearFarLists()

File Format

Ribbons are stored as JSONL (one JSON object per line) at: levels/[levelName]/dynamicAudioEmitters/ribbonData.audioSFX.json

Audio Bank Manager

Manages FMOD sound bank loading, caching, hotloading, and level-specific audio. Handles string banks, preload banks, asset banks, meta banks, and ambient banks in the correct loading order.

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.

On this page

Public APIHooksArchitectureNear/Far ListsVolume CalculationUsage ExamplesFile Format