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

Mod Manager

Core mod management system. Discovers, validates, mounts, activates/deactivates, packs/unpacks mod ZIP files and unpacked mod directories. Persists mod state in `mods/db.json`.

Core mod management system. Discovers, validates, mounts, activates/deactivates, packs/unpacks mod ZIP files and unpacked mod directories. Persists mod state in mods/db.json.


Public Functions

FunctionSignatureDescription
M.isReady() → booleanReturns whether the mod manager has finished initialization
M.initDB()Background job: scans /mods/, mounts active mods, runs modScripts
M.onUiReady()Triggered when UI is ready - loads DB and starts initDB
M.onFileChanged(filename, type)Reacts to ZIP file changes in /mods/
M.requestState()Sends mod list and vehicle list to UI
M.activateMod(modname)Mounts and activates a mod
M.activateModId(modID)Activates by mod repository ID
M.activateAllMods()Activates all known mods
M.deactivateMod(modname, preventStateChange)Unmounts and deactivates a mod
M.deactivateModId(modID)Deactivates by mod repository ID
M.deactivateAllMods()Deactivates all mods
M.deleteMod(modname) → booleanUnmounts and deletes a mod's files
M.deleteAllMods()Deletes all repo mods and unsubscribes
M.unpackMod(modname)Extracts a ZIP mod to /mods/unpacked/
M.packMod(dirPath)Re-packs an unpacked mod back to ZIP
M.checkMod(modname) → booleanValidates mod file hashes and checks conflicts
M.checkUpdate()Background job: checks for mod updates via online API
M.getModDB(modname) → tableReturns the full database entry for a mod
M.getConflict(modname) → tableReturns file conflicts for a mod
M.modIsUnpacked(modname) → booleanWhether the mod is in unpacked form
M.getModFromPath(vfsPath) → tableLooks up which mod owns a VFS path (slow!)
M.getModNameFromID(modID) → stringConverts a repository ID to a mod name
M.getModForFilename(filename) → modname, modFinds the mod that owns a virtual file
M.getMods() → tableReturns the full mods table
M.getStats() → {zip, unpacked, disabled}Returns mod counts by category
M.updateZipMod(oldFile, newFile)Replaces a mod ZIP (delete old, rename new)
M.enableModsAfterUpdate()Clears the update-disable flag and re-initializes
M.enableAutoMount()Re-enables auto-mounting and re-scans
M.disableAutoMount()Temporarily disables auto-mounting
M.getPossiblyBrokenMods() → tableLists mods that override vanilla files
M.openEntryInExplorer(filename)Opens mod folder in system file explorer
M.openModFolderInExplorer()Opens /mods/ in system file explorer
M.workOffChangedMod(filename, type)Processes a newly added/modified mod file
M.check4Update()Flags for update check on next startup
M.dependenciesTable. Required extensions: {'core_versionUpdate'}
M.getModFromPathSUPERSLOW(vfsPath)Backward compat alias for getModFromPath. Very slow - avoids unless necessary.

Mod Database Entry

FieldTypeDescription
modnamestringLowercase name derived from filename
fullpathstringFull VFS path to the mod file/folder
activebooleanWhether the mod is currently mounted
modTypestring"vehicle", "terrain", "app", "scenario", "sound", "unknown"
modIDstringRepository tag ID
modDatatableParsed info.json from the mod
mountPointstringOverride mount path for old-format mods
unpackedPathstringPath if unpacked

Dependencies

  • core_versionUpdate - Detects game version changes to disable mods after update

Module State

VariableTypeDefault
dependenciestable{ "core_versionUpdate" }
getModFromPathSUPERSLOWvariesgetModFromPath

Notes

  • Mods are persisted in mods/db.json with a version 1.1 header.
  • Safe mode disables mod loading entirely.
  • modScript.lua files inside mods are auto-executed on activation.
  • Duplicate mods are detected by both filename and repository ID.
  • getModFromPath is explicitly slow - use sparingly.

See Also

  • repository - Online mod repository and downloads
  • online - Network API calls
  • jobsystem - Background task execution

Metrics

ImGui-based performance metrics overlay. Displays FPS, frame times, GPU wait times, and detailed rendering statistics with three display modes.

Multiseat

Local multiplayer input assignment. Maps input devices (keyboards, gamepads) to player slots and seats players into vehicles. Supports up to 64 simultaneous players.

On this page

Public FunctionsMod Database EntryDependenciesModule StateNotesSee Also