Drift Data Editor
Full-featured editor for drift gameplay data. Two tabs: **Drift Stunt Zones** (donut, driftThrough, hitPole zone placement with scoring) and **Drift Spots** (freeroam drift spot management with spatia
Full-featured editor for drift gameplay data. Two tabs: Drift Stunt Zones (donut, driftThrough, hitPole zone placement with scoring) and Drift Spots (freeroam drift spot management with spatial info, race paths, bounds, objectives, and big-map teleport).
Public API
| Function | Signature | Description |
|---|---|---|
M.show | () | Clears selection and shows the editor window |
M.onEditorInitialized | () | Registers window (1500×700) and "Drift Data Editor" menu item |
M.onEditorGui | () | Main editor GUI callback - tab bar with stunt zones + drift spots |
M.onSerialize | () → table | Serializes editor state for persistence |
M.onDeserialized | (data) | Restores editor state from serialized data |
M.selectStuntZone | (index) | Selects a stunt zone and creates appropriate transform util |
M.clearStuntZonesEditor | () | Resets stunt zone data and file paths |
M.drawElementDetail | (elem) | Draws ImGui detail panel for a stunt zone element |
M.drawAxisBox | (corner, x, y, z, clr) | Debug draws oriented box with faces |
M.updateMouseInfo | () | Updates mouse raycast info for gizmo interaction |
Stunt Zone Types
| Type | Transform | Geometry | Score |
|---|---|---|---|
donut | translate + 1D scale | Sphere | absolute points (250/500/750) |
driftThrough | translate + rotate + scale | Oriented box | max points (1000/1500/2000) |
hitPole | translate only | Cylinder | max points (500/1000/1500) |
Drift Spot Data
-- Each drift spot contains:
{
racePath = "levels/.../race.race.json",
bounds = "levels/.../bounds.sites.json",
spatialInfo = {
lines = {
lineOne = { pos=vec3, scl=vec3, rot=quat, startDir=vec3, markerObjects={} },
lineTwo = { ... }
},
bigMapTp = { pos=vec3, rot=quat, scl=vec3 }
},
info = {
name = "spotName",
objectives = {
{ id="bronze", score=1200, rewards={money=1000} },
{ id="silver", score=3100, rewards={money=1000} },
{ id="gold", score=7200, rewards={money=1000} }
},
unlock = {}
}
}Usage Example
-- From editor menu: Gameplay → Drift Data Editor
-- Or programmatically:
editor_driftDataEditor.show()
-- Stunt zones are loaded from .driftData.json files
-- Drift spots are loaded per-level from levels/<level>/driftSpots/File I/O
| Path Pattern | Content |
|---|---|
*.driftData.json | Stunt zone definitions |
levels/<level>/driftSpots/<name>/spot.driftSpot.json | Drift spot spatial info |
levels/<level>/driftSpots/<name>/info.json | Name, objectives, rewards |
Dependencies
| Module | Purpose |
|---|---|
gameplay_drift_scoring | Default point values for stunt zones |
gameplay_drift_saveLoad | Load/sanitize drift spots per map |
editor/util/transformUtil | Gizmo transform editing |
editor_raceEditor | Open race editor for drift paths |
editor_sitesEditor | Open sites editor for bounds |
editor_fileDialog | File open/save dialogs |
See Also
- Editor AI Tests - Related reference
- Editor AI Visualization - Related reference
- Editor – Assembly Spline Tool - Related reference
- World Editor Guide - Guide
Drag Race Editor
Main editor extension for drag racing content. Provides a two-column layout with facilities, strips, and drag settings management. Integrates with the modular `gameplay/drag/saveSystem`.
Drive Path Editor
Main editor tool for creating and managing AI drive path splines. Supports **Free Mode** (arbitrary nodes on terrain) and **NavGraph Mode** (waypoint-to-waypoint paths on the navigation graph). Featur