RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Auto AnnotationBoosterCalibrate ESCCompile ImpostersCompile MeshesConfig List GeneratorDecal Roads EditorDependency TreeDoc CreatorVehicle ExporterFollow The White RabbitForest GeneratorGround Model DebugInput System UtilsInstanced Line Render DemoJBeam StatsLog StreamsMap TilesNode Beam ExportNode StreamPhotomodePrecompile ShadersPrecompile VehiclesProcedural Track GeneratorRectangle GeneratorRender Components APIResave MaterialsRich PresenceSave Dynamic DataScreenshot CreatorShowroomSort LinesStep HandlerTerrain GeneratorTest Extension ProxiesTest JSON Files SyntaxVehicle Rope DebugBatch WorkerWebSocket Test

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)

See Also

  • Auto Annotation - Related reference
  • Booster - Related reference
  • Calibrate ESC - Related reference
  • Game Engine Overview - Guide

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 ExportsSee Also