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

Load Map Command

Handles deep-link/startup commands to load a specific map with optional camera position. Parses level paths and camera transforms from structured command data.

Handles deep-link/startup commands to load a specific map with optional camera position. Parses level paths and camera transforms from structured command data.


Public Functions

FunctionSignatureDescription
M.set(data, startCmd)Sets map load parameters; triggers load when mod manager is ready
M.onModManagerReady()Attempts to load the pending map after mods are initialized
M.onWorldReadyState(state)Applies camera position/rotation after world loads (state == 2)
M.onExtensionLoaded()No-op lifecycle hook
M.onExtensionUnloaded()No-op lifecycle hook
M.onClientPostStartMission()No-op lifecycle hook
M.onSerialize() → tableReturns {ignoreStartupCmd = true} to prevent re-execution
M.onDeserialized(d)Restores ignoreStartupCmd flag

Command Data Format

-- URL format: beamng:v1/openMap/{...}
local data = {
  level = "levels/gridmap/info.json",    -- Level path (required)
  camPos = {58.78, -181.10, 604.18},     -- Camera position (optional)
  camRot = {0.50, -0.49, 0.49, 0.50},   -- Camera quaternion (optional)
  track = "trackName"                     -- Track to load (optional)
}
core_loadMapCmd.set(data)

Flow

  1. set() parses the level path and stores arguments
  2. If mod manager is ready, immediately calls changeMap()
  3. Otherwise, onModManagerReady triggers changeMap() later
  4. After world loads (state 2), camera is positioned and optional track loaded
  5. A toast notification confirms the jump

Notes

  • The ignoreStartupCmd flag prevents GE reloads from re-executing the command.
  • If the map is already loaded in freeroam, skips to camera positioning directly.
  • Uses freeroam_freeroam.startFreeroam() to load the level.
  • Supports the util/trackBuilder/splineTrack extension for loading tracks.

See Also

  • levels - Level discovery and loading API
  • globals - FS, getMissionFilename

Levels

Level discovery, metadata, and loading system. Scans `/levels/` for available maps, enriches data with previews/spawn points/mod info, and provides the API for starting levels.

Metrics

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

On this page

Public FunctionsCommand Data FormatFlowNotesSee Also