RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Bus DriverDamage GoalDemolition DerbyDistance GoalDrift GoalFinish Race GoalNo-Move GoalPosition GoalQuick RaceQuick Race LoaderRace MarkersRace DebugRace Goals ManagerRace UIScenario HelperScenario EngineScenarios LoaderSpeed GoalTime Limit GoalWaypoint ActionScenario Waypoints

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 Extensionsscenario

Quick Race Loader

Discovers available quick race tracks across all levels, loads track configurations, supports track editor tracks, and assembles complete scenario data for the quick race system.

Discovers available quick race tracks across all levels, loads track configurations, supports track editor tracks, and assembles complete scenario data for the quick race system.


Internal State

FieldTypeDescription

Public API

FunctionSignatureDescription
M.getQuickraceList() → tableReturns all levels with their available quick race tracks
M.getLevel(levelName) → tableGets a specific level's quick race data
M.getLevelTrack(levelName, trackName) → tableGets a specific track from a level
M.getTracks(quickraceFiles, levelName, lvlName) → tableParses track JSON files for a level
M.getTrackEditorTracks() → tableLoads all user-created track editor tracks
M.loadTrackBuilderJSON(originalFilename) → tableReads a track editor JSON file
M.getLevelList() → tableLists all level folder names
M.loadQuickrace(scenarioKey, scenarioFile, trackFile, vehicleFile, raceType) → tableAssembles complete scenario data
M.startQuickrace(scenarioFile, trackFile, vehicleFile, type)Starts a quick race scenario
M.customPreviewLoader(levelInfo, levelName) → tableLoads preview images for a level
M.uiEventStartHotlapping()Starts hotlapping mode from freeroam
M.uiHotlappingAppDestroyed()Unloads hotlapping when app closes

Track Discovery Flow

getLevelList() → for each level:
  ├─ Find /levels/<name>/quickrace/*.json
  ├─ getTracks() → parse each track file
  ├─ getTrackEditorTracks() → user tracks from /trackEditor/
  └─ Merge into level.tracks[]

Track File Structure

Each track JSON file produces:

FieldDescription
nameDisplay name
trackNameInternal identifier
lapCountNumber of laps (1 for open, configurable for closed)
closedWhether the track is a loop
reversibleWhether reverse mode is available
allowRollingStartRolling start option
spawnSpheresSpawn point names for each start mode
todTime of day preset (0–9)
prefabs / reversePrefabs / forwardPrefabsTrack decoration prefabs
raceFileOptional .race.json path file
luaFileOptional custom Lua logic

Scenario Assembly (loadQuickrace)

  1. Merges track and vehicle data into scenario file
  2. Auto-discovers prefabs (<trackName>.prefab, <trackName>_reverse.prefab)
  3. Reverses lap config if track.reverse is true
  4. Sets start timer checkpoint for rolling starts
  5. Configures time-of-day from track preset
  6. Marks as isQuickRace = true
  7. Processes through scenario_scenariosLoader.processScenarioData

Track Editor Integration

  • Reads trackEditor/*.json files
  • Supports versioned format only (rejects old formats)
  • Auto-generates spawn sphere names, preview images, and prefab lists
  • Groups tracks by level (defaults to smallgrid)

Key Notes

  • Required modules stored in M.quickRaceModules (scenarios, statistics, waypoints, quickRace, hotlapping)
  • Supports delayed start when a mission is already loaded (unloads first)
  • Procedural tracks handled separately (filtered by file.procedural flag)
  • Preview images searched as <trackName>.jpg and <trackName>_reverse.jpg
  • Official content detected via isOfficialContentVPath

Additional Exports

  • M.triggerDelayedStart - (undocumented)

See Also

  • Scenario Bus Driver - Bus Route Scenario Logic - Related reference
  • Scenario Damage Goal - Damage-Based Win/Fail Condition - Related reference
  • Scenario Demolition Derby - Last Vehicle Moving Wins - Related reference
  • Scenario System Guide - Guide

Quick Race

Handles the runtime logic for quick race scenarios: vehicle spawning, prefab loading, waypoint generation from race paths, lap timing, highscore recording, and time-of-day setup.

Race Markers

Central manager for all race checkpoint markers. Creates, pools, positions, and updates marker objects. Supports swappable marker types and delegates rendering to individual marker instances.

On this page

Internal StatePublic APITrack Discovery FlowTrack File StructureScenario Assembly (loadQuickrace)Track Editor IntegrationKey NotesAdditional ExportsSee Also