RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Gameplay AchievementGameplay CityDiscoverForce FieldGarage ModeMarker InteractionParking SystemGameplay Playmode MarkersGameplay PoliceGameplay RallyGameplay Rally LoopGameplay Raw POIsGameplay Skidpad TestSpeed Trap LeaderboardsSpeed Traps and CamerasGameplay StatisticsTaxi Ride SystemTraffic SystemVehicle PerformanceWalking
Crawl BoundariesCrawl Flowgraph BridgeCrawl DebugCrawl UI DisplayCrawl Flowgraph BridgeCrawl SystemCrawl Save SystemCrawl Engine

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 Extensionsgameplaycrawl

Crawl Debug

Reference for `gameplay_crawl_debug`, which provides an ImGui debug window displaying real-time crawl state information including trail data, vehicle info, penalty system, infraction data, path nodes,

Reference for gameplay_crawl_debug, which provides an ImGui debug window displaying real-time crawl state information including trail data, vehicle info, penalty system, infraction data, path nodes, and event logs.


Overview

This extension renders an ImGui window that shows comprehensive debug information during an active crawl. It automatically finds the active crawler and displays all relevant state data, including node completion, penalty points, boundary status, and event history.


Dependencies

ui_imgui


Exports

FunctionSignatureDescription
setEnableDebugWindow(enabled)Enable or disable the debug window
getEnableDebugWindow()Check if debug window is enabled
clearDebugData()Clear all cached debug data
onCrawlStarted(eventData)Opens the debug window when a crawl starts
onCrawlComplete(eventData)Marks crawl as finished in debug data
onCrawlDisqualified(eventData)Marks crawl as disqualified
onExtensionLoaded()Initialize with closed window
onExtensionUnloaded()Cleanup debug state
onPreRender(dtReal, dtSim, dtRaw)Update data and draw the debug window

Debug Window Sections

The window displays these collapsible sections:

SectionContent
Trail InfoTrail ID, name, duration, mission status
Vehicle InfoPosition, velocity, boundary status
Penalty SystemCurrent points, DNF threshold warning
Infraction DataCooldown timers, recovery status
Recovery CheckpointLast checkpoint position and time
Boundary Exit PointExit point coords, distance from exit
NodesTotal/completed/current node list with colors
Event LogRecent 20 events (penalties, checkpoints)
Trail StatusActive / Completing / Finished / Disqualified

How It Works

  1. onPreRender() runs every frame - finds the active crawler, updates debug data, draws the ImGui window
  2. Node completion is shown with color coding: green (completed), yellow (current), recovery (green tint), bonus (gold)
  3. Events are color-coded: orange for penalties, green for bonuses, cyan for checkpoints
  4. The window auto-opens when onCrawlStarted fires
-- Enable/disable the debug window
gameplay_crawl_debug.setEnableDebugWindow(true)

-- Clear debug data
gameplay_crawl_debug.clearDebugData()

Key Behaviors

  • The window automatically finds the first active crawler in gameplay_crawl_utils.getAllCrawlStates()
  • Time is formatted as MM:SS.mmm
  • Boundary status queries the site object's containsPoint2D method
  • DNF threshold warning appears when penalty points reach 50
  • Debug data is preserved after crawl completion for review

Module Variables

VariableTypeDescription
M.dependenciestable{ 'ui_imgui' }
M.clearDebugData()-
M.getEnableDebugWindow()-
M.onCrawlComplete(eventData)-
M.onCrawlDisqualified(eventData)-
M.onCrawlStarted(eventData)-
M.onExtensionLoaded()-
M.onExtensionUnloaded()-
M.onPreRender(dtReal, dtSim, dtRaw)-
M.setEnableDebugWindow(enabled)-

See Also

  • crawl/boundary - Crawl Boundary System - Related reference
  • crawl/crawlFlowgraphBridge - Crawl Flowgraph Bridge (Legacy) - Related reference
  • crawl/display - Crawl UI Messages - Related reference
  • Gameplay Systems Guide - Guide

Crawl Flowgraph Bridge

Reference for `gameplay_crawl_crawlFlowgraphBridge`, a bridge extension that exposes crawl system functionality to flowgraph nodes. This appears to be a legacy version - see also `gameplay_crawl_flowg

Crawl UI Display

Reference for `gameplay_crawl_display`, which provides UI message functions for the crawl (rock crawling) system. Handles all player-facing notifications during crawl gameplay.

On this page

OverviewDependenciesExportsDebug Window SectionsHow It WorksKey BehaviorsModule VariablesSee Also