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
| Function | Signature | Description |
|---|---|---|
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:
| Section | Content |
|---|---|
| Trail Info | Trail ID, name, duration, mission status |
| Vehicle Info | Position, velocity, boundary status |
| Penalty System | Current points, DNF threshold warning |
| Infraction Data | Cooldown timers, recovery status |
| Recovery Checkpoint | Last checkpoint position and time |
| Boundary Exit Point | Exit point coords, distance from exit |
| Nodes | Total/completed/current node list with colors |
| Event Log | Recent 20 events (penalties, checkpoints) |
| Trail Status | Active / Completing / Finished / Disqualified |
How It Works
onPreRender()runs every frame - finds the active crawler, updates debug data, draws the ImGui window- Node completion is shown with color coding: green (completed), yellow (current), recovery (green tint), bonus (gold)
- Events are color-coded: orange for penalties, green for bonuses, cyan for checkpoints
- The window auto-opens when
onCrawlStartedfires
-- 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
containsPoint2Dmethod - DNF threshold warning appears when penalty points reach 50
- Debug data is preserved after crawl completion for review
Module Variables
| Variable | Type | Description |
|---|---|---|
M.dependencies | table | { '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.