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

Decal Roads Editor

Debug visualization for AIPath objects in the world editor. Renders lane markings, widths, and directions using dynamic decals and debug drawing.

Debug visualization for AIPath objects in the world editor. Renders lane markings, widths, and directions using dynamic decals and debug drawing.


Overview

util_decalRoadsEditor is a world-editor support module that visualizes AIPath objects with their lanes, directions, and widths. Uses debugDrawer and DynamicDecalMgr to render sphere nodes, prism segments, and directional arrow decals per lane.

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


Exports (M)

FunctionSignatureDescription
onExtensionLoaded()Logs module loaded.
onExtensionUnloaded()Logs module unloaded.
onPreRender(dt)Renders AIPath debug visualizations every frame.

Internals

AIPath Visualization

For each AIPath in the scene tree with drivability > 0:

  1. Node spheres: Drawn at each path node position with the node's radius.
  2. Segment prisms: Square prisms connecting consecutive nodes, sized by node widths.
  3. Lane arrows: Dynamic decal arrows per lane showing direction.

Lane Rendering

Each segment is split into lanes based on lanesLeft and lanesRight:

  • Left lanes: Drawn in cyan (or red if flipped), direction matches path.
  • Right lanes: Drawn in red (or cyan if flipped), direction is reversed.
  • Arrows use art/arrow_waypoint_1.dds decal texture.
  • Arrow spacing matches lane width for consistent visual density.

Distance Fade

Visualization fades based on camera distance:

  • Fade start: 400 units (2x internal fadeStart of 200)
  • Fade end: 500 units (2x internal fadeEnd of 250)
  • Below 0.01 visibility, segments are skipped entirely.

Path Properties Used

PropertyPurpose
drivabilityMust be > 0 to render.
oneWayWhether the path is one-directional.
flipDirectionReverses lane direction assignment.
lanesLeft / lanesRightNumber of lanes per side.
Node widthConverted to radius (width * 0.5).

How It Works

  1. Module is loaded dynamically by the world editor C++ side.
  2. Each frame, onPreRender iterates all AIPath scene objects.
  3. For each path with valid drivability, nodes and segments are rendered.
  4. Lanes are drawn with directional arrows using dynamic decals.

Lua Examples

-- This module is typically loaded automatically by the world editor
-- Manual load for debugging:
extensions.load('util_decalRoadsEditor')

-- No public API - visualization is automatic via onPreRender

Additional Exports

  • M.onExtensionLoaded - (undocumented)
  • M.onExtensionUnloaded - (undocumented)
  • M.onPreRender - (undocumented)

Config List Generator

Vehicle config list filtering and random selection system. Used for generating lists of vehicles that match specific criteria (e.g., for dealerships, traffic, career mode).

Dependency Tree

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

On this page

OverviewExports (M)InternalsAIPath VisualizationLane RenderingDistance FadePath Properties UsedHow It WorksLua ExamplesAdditional Exports