API ReferenceGE ExtensionseditorcrawlEditor
Crawl Editor Mission Port Tool
Converts old crawl mission data (bounds.sites.json + race.race.json) into the new modular crawl system (boundary, path, starting position, trail files).
Converts old crawl mission data (bounds.sites.json + race.race.json) into the new modular crawl system (boundary, path, starting position, trail files).
Public API
| Function | Signature | Description |
|---|---|---|
M.portMission | (missionDir, targetLevel) → bool | Converts a single mission directory to new crawl format |
M.showPortingDialog | () | Renders the ImGui porting dialog window |
M.openPortingDialog | () | Scans missions and opens the porting dialog |
Conversion Pipeline
- Reads
bounds.sites.json→ creates boundary zone with vertices, top/bottom planes - Reads
race.race.json→ creates path with pathnodes, recovery checkpoints, flags - Extracts
startPositions→ creates starting position with auto-calculated rotation toward first checkpoint - Creates trail JSON linking boundary, path, and starting position
Output Files
| File | Location | Description |
|---|---|---|
*.boundary.json | /levels/<level>/crawls/ | Zone boundary vertices |
*.path.json | /levels/<level>/crawls/ | Ordered path nodes with flags |
*.startingPosition.json | /levels/<level>/crawls/ | Spawn transform and icon |
*.trail.json | Mission directory | Trail linking all components |
Usage Example
local portTool = require('editor/crawlEditor/missionPortTool')
-- Port a single mission
local success = portTool.portMission('/gameplay/missions/west_coast_usa/crawl/myMission', 'west_coast_usa')
-- Or open the UI dialog
portTool.openPortingDialog()Dialog Features
- Port All Missions: Iterates all levels, finds crawl missions, ports everything
- Per-mission buttons with green "Successfully ported" indicator
- Auto-reloads editor objects after porting via
editor_crawlEditor.loadAllObjects()
Notes
- Uses
gameplay_crawl_saveSystemfor serialization - Recovery checkpoints are detected by
pathnode.recoverypointing to startPosition oldIds - Starting position rotation is computed with
quatFromDir()pointing toward the first checkpoint
See Also
- Crawl Editor - Boundaries - Related reference
- Crawl Editor Input - Related reference
- Crawl Editor Paths - Related reference
- World Editor Guide - Guide
Crawl Editor Input
Mouse input handling for the Crawl Editor. Provides raycasting from the camera through the mouse cursor, tracking click/hold/release states with world-space hit positions.
Crawl Editor Paths
Class-based path and pathnode editor for the Crawl Editor. Manages path creation, node selection, gizmo manipulation, and the ImGui detail panel.