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
Auto AnnotationBoosterCalibrate ESCCompile ImpostersCompile MeshesConfig List GeneratorDecal Roads EditorDependency TreeDoc CreatorExport (glTF)Follow The White RabbitForest GeneratorGround Model DebugInput System UtilsInstanced Line Render DemoJBeam StatsLog StreamsMap TilesNode Beam ExportNode StreamPhotomodePrecompile ShadersPrecompile VehiclesProcedural Track (Gymkhana Generator)Rectangle GeneratorRender Components APIResave MaterialsRich PresenceSave Dynamic DataScreenshot Creator (Vehicle Thumbnails)ShowroomSort LinesStep HandlerTerrain GeneratorTest Extension ProxiesTest JSON Files Syntaxutil/vehicleRopeDebug - Rope Physics Debug UIutil/worker - Batch Job Workerutil/wsTest - WebSocket Test Server

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 Extensionsutil

Doc Creator

Generates JSON data files and resources for the BeamNG documentation / Hugo system. Exports levels, vehicles, materials, JBeam defaults, controller info, and more across all available languages.

Generates JSON data files and resources for the BeamNG documentation / Hugo system. Exports levels, vehicles, materials, JBeam defaults, controller info, and more across all available languages.


Overview

util_docCreator exports game data into structured JSON files suitable for the documentation website. It iterates over all available languages, exporting localized level and vehicle data with resource files (images copied and hashed). Also exports common data like physics materials, JBeam defaults, JBeam stats, and tested controllers.

Extension path: lua/ge/extensions/util/docCreator.lua


Exports (M)

FunctionSignatureDescription
run()Starts async export of all doc data (alias: runAsync).
runAndQuit()Starts async export and shuts down on completion.

Internals

Output Directories

  • doc-out/data/ - JSON data files
  • doc-out/resources/ - Copied/hashed resource files (images)

Language-Specific Export

For each language in /locales/*.json:

  1. Switches language via Lua.userLanguage.
  2. Exports levels_{lang}.json - level list with localized text and beamng:v1/openMap links.
  3. Exports vehicles_{lang}.json - model and config lists.
  4. Resource files (images) are SHA1-hashed and copied to the resources folder.

Common Data Export

Output FileContents
game_version.jsonBuild version info (version, arch, build number).
physics_materials.jsonList of physics material names.
physics_jbeam_defaults.jsonDefault beam/node values from the JBeam loader.
jbeam_stats.jsonStatistics from util_jbeamStats.getStats().
tested_controllers.jsonController compatibility table from inputmap files.

Tested Controllers

Scans /settings/inputmaps/*.json files and:

  • Extracts VID/PID from filenames or file content.
  • Looks up vendor names from vendorNames.json.
  • Detects force-feedback and TrueForce support.
  • Outputs an HTML-formatted table with controller info.

Resource Handling

cleanupTable() recursively walks data tables:

  • Translates localization strings.
  • Detects file paths and copies referenced files to resources with SHA1-based filenames.
  • Replaces paths with /game/resources/{hash}.{ext}.

How It Works

  1. Call run() or runAndQuit() (the latter shuts down after).
  2. A job system coroutine processes all languages.
  3. For each language, levels and vehicles are exported as JSON.
  4. Common (non-localized) data is exported once.
  5. All output goes to doc-out/.

Lua Examples

-- Export documentation data (async)
extensions.util_docCreator.run()

-- Export and quit when done
extensions.util_docCreator.runAndQuit()

Additional Exports

  • M.run - (undocumented)
  • M.runAndQuit - (undocumented)

Dependency Tree

Analyzes level asset dependencies by walking scene objects and building a dependency graph of files, textures, materials, shapes, and SimObjects.

Export (glTF)

Exports the current player vehicle as a glTF/GLB 3D file, including meshes, materials, textures, part hierarchy, and optionally node/beam data.

On this page

OverviewExports (M)InternalsOutput DirectoriesLanguage-Specific ExportCommon Data ExportTested ControllersResource HandlingHow It WorksLua ExamplesAdditional Exports