API ReferenceGE ExtensionseditorcrawlEditor
Crawl Editor Trails
Class-based trail editor for the Crawl Editor. Trails are the top-level objects that link paths, boundaries, starting positions, and prefabs together.
Class-based trail editor for the Crawl Editor. Trails are the top-level objects that link paths, boundaries, starting positions, and prefabs together.
Constructor
local Trails = require('editor/crawlEditor/trails')
local trailEditor = Trails()Class Methods
| Method | Signature | Description |
|---|---|---|
C:init() | Initialize with default tab "paths" | |
C:setTrail(trail) | Set the active trail | |
C:setFields(trail) | Populate ImGui buffers from trail data | |
C:drawTrailsList(allTrails, selection) | Render selectable list with Add/Delete (also deletes file on disk) | |
C:drawTrailDetail(trail) | Full detail panel: name, file rename, description, mission properties, thumbnail, preview, path/boundary/startingPosition combos, prefabs, rules | |
C:getNewTrail() | → table | Create a default trail template |
C:getPrefabFiles() | → table | Scan current level's crawls directory for .prefab.json files |
C:draw(mouseInfo) | Draw starting position indicators for the trail's linked starting position |
Trail Structure
{
name = "New Trail",
description = "...",
pathId = "", -- file path to .path.json
boundaryId = "", -- file path to .boundary.json
startingPositionId = "", -- file path to .startingPosition.json
startingPositionIdReversed = "",
pathReversed = false,
thumbnail = "",
preview = "",
prefabs = {}, -- list of prefab filenames
rules = { description = "..." },
isFromMission = false,
metadata = { created = "...", version = "1.0" }
}Detail Panel Features
| Section | Description |
|---|---|
| Name / File Rename | Editable name with file rename button |
| Mission Properties | Toggle isFromMission, shows mission name |
| Thumbnail / Preview | File path inputs with Browse buttons |
| Path | Combo selector from gameplay_crawl_saveSystem.getAllPaths() |
| Boundary | Combo selector from all boundaries |
| Starting Position | Combo selector, plus reversed starting position when pathReversed |
| Prefabs | Dropdown per prefab + add/remove controls |
| Rules | Text input for rule description |
Notes
- Trail deletion also removes the file from disk via
FS:removeFile - File rename delegates to
editor_crawlEditor.renameObjectFile - Undo/redo via
editor.history:commitAction - Visual indicators drawn for linked starting position (area sphere + icon sphere)
All Class Methods
| Method | Signature | Description |
|---|---|---|
C:init() | Initialize with default tab "paths" | |
C:setTrail(trailParam) | Set the active trail | |
C:setFields(trail) | Populate ImGui buffers from trail data | |
C:clearSelection() | No-op (no selection state to clear) | |
C:setCurrentTab(tab) | Set the current editor tab | |
C:getPrefabFiles() | → table | Scan current level's crawls directory for .prefab.json files |
C:drawTrailsList(allTrails, selection) | Render selectable list with Add/Delete (deletes file on disk) | |
C:drawTrailDetail(trail) | Full detail panel with all trail properties | |
C:getNewTrail() | → table | Create a default trail template |
C:input(mouseInfo) | No-op (no input handling for trails) | |
C:draw(mouseInfo) | Draw starting position indicators for linked starting position |
See Also
- Crawl Editor - Boundaries - Related reference
- Crawl Editor Input - Related reference
- Crawl Editor Mission Port Tool - Related reference
- World Editor Guide - Guide
Crawl Editor Starting Positions
Class-based starting position editor for the Crawl Editor. Manages area transform (position, rotation, radius), icon position, and placement with Ctrl-drag rotation.
Crawl Editor Waypoints
Class-based waypoint/pathnode editor for the Crawl Editor. Manages pathnode selection, gizmo manipulation, segment visualization, and the pathnode detail inspector with custom fields.