Slot Traffic Editor
Editor extension for editing navgraph-based traffic slot configurations - provides a visual node/link editor for road networks with traffic lane assignment, road properties, and navgraph manipulation.
Editor extension for editing navgraph-based traffic slot configurations - provides a visual node/link editor for road networks with traffic lane assignment, road properties, and navgraph manipulation.
Public Functions
| Function | Description |
|---|---|
M.onEditorGui() | Main GUI - navgraph node/link editor with traffic slot configuration |
M.onEditorInitialized() | Registers the editor window, edit mode, action map, and preferences |
M.onEditorObjectSelectionChanged() | Handles editor object selection changes |
M.onEditorRegisterPreferences(prefsRegistry) | Registers slot traffic editor preferences |
M.onEditorPreferenceValueChanged(path, value) | Handles preference value changes |
M.onEditorAfterSaveLevel() | Post-save level callback |
M.onNavgraphReloaded() | Handles navgraph reload events |
M.selectAllNodes() | Selects all navgraph nodes |
Example: Traffic Slot Configuration
-- The Slot Traffic Editor provides a UI for traffic slot management.
-- It works with the gameplay_traffic extension for applying configs.
-- Each slot has:
-- model: vehicle model name (e.g., "pickup", "etk800")
-- paint: paint preset index (0 = random)
-- amount: number of vehicles for this slot
-- UI workflow:
-- 1. Click "Get Slot Data" to load current traffic configuration
-- 2. Edit model, paint, and amount columns in the table
-- 3. Use +/- buttons to add/remove slots
-- 4. Click "Set Traffic" to apply, or "Delete Traffic" to clear
-- The editor integrates with:
-- gameplay_traffic.setupTraffic(slotData) -- apply slots
-- gameplay_traffic.deleteVehicles() -- remove all traffic
-- gameplay_traffic.getTrafficData() -- read current config
-- core_vehicles.getModelList() -- available vehicle models
-- Slot data structure:
-- {
-- { model = "pickup", paint = 0, amount = 3 },
-- { model = "etk800", paint = 2, amount = 1 },
-- }Functions
onEditorObjectSelectionChanged()
Callback for editor object selection changed event.
onEditorRegisterPreferences(prefsRegistry)
Callback for editor register preferences event.
prefsRegistry(any)
onEditorPreferenceValueChanged(path, value)
Callback for editor preference value changed event.
path(string)value(any)
onEditorAfterSaveLevel()
Callback for editor after save level event.
onNavgraphReloaded()
Callback for navgraph reloaded event.
selectAllNodes()
Selects all nodes.
See Also
- Editor AI Tests - Related reference
- Editor AI Visualization - Related reference
- Editor – Assembly Spline Tool - Related reference
- World Editor Guide - Guide
Sites Editor
Main editor extension for creating/editing gameplay sites (locations, zones, parking spots). Provides an ImGui-based editor window with tabs, file I/O, sorting tools, and sites manager integration.
Suspension Audio Debug
Editor extension for visualizing and debugging vehicle suspension audio parameters. Renders real-time graphs of shock compression, surface data, and audio-related wheel metrics. Also displays IMU and