API ReferenceGE Extensionsgameplayrallytranscripts
Rally Transcripts Path
Class-based container managing a sorted list of transcript entries. Handles loading/saving transcript files and debug visualization of all entries.
Class-based container managing a sorted list of transcript entries. Handles loading/saving transcript files and debug visualization of all entries.
Constructor
local TranscriptPath = require('gameplay/rally/transcripts/path')
local path = TranscriptPath(fname)| Parameter | Type | Description |
|---|---|---|
fname | string | File path for the transcripts JSON file |
Methods
| Method | Signature | Returns | Description |
|---|---|---|---|
getNextUniqueIdentifier | () | number | Returns next auto-increment ID |
load | () | bool | Load transcripts from self.fname |
save | () | nil | Save transcripts to self.fname |
onSerialize | () | table | Serialize all transcripts |
onDeserialized | (data) | nil | Deserialize from data |
drawDebug | (selected_id) | nil | Draw all transcript entries in 3D |
Internals
transcripts: AsortedListoftranscripts/entryobjects_uid: Auto-incrementing unique identifier counter_draw_debug_hover_tsc_id: ID of currently hovered transcript for highlight drawingselection_sphere_r: Hover detection radius (default 4)
Dependencies
gameplay/rally/util/colors- color constantsgameplay/rally/util- utility functionsgameplay/util/sortedList- ordered list managementgameplay/rally/transcripts/entry- individual entry class
How It Works
- Initializes with a
sortedListthat manages transcript entries load()reads a JSON file and deserializes all transcript entriessave()serializes and writes the current state back to JSONdrawDebug()iterates all sorted transcripts, passing hover/selection state to each entry for 3D visualization
-- Load and display transcript data
local tPath = TranscriptPath('/path/to/transcripts.json')
if tPath:load() then
log('I', '', 'Loaded ' .. #tPath.transcripts.sorted .. ' transcripts')
tPath:drawDebug(selectedId)
end
-- Save after modifications
tPath:save()Notes
- The file format is a JSON object with a
transcriptskey containing the sorted list data - Hover detection (
_draw_debug_hover_tsc_id) is set externally by the rally editor UI
Public API
| Function | Signature | Returns | Description |
|---|---|---|---|
M.init | (fname) | nil | init |
M.drawDebugTranscripts | (selected_id) | nil | drawDebugTranscripts |
See Also
- Rally Transcripts Entry - Related reference
- Rally Transcripts Vehicle Snapshot - Related reference
- Gameplay Systems Guide - Guide
Rally Transcripts Entry
Class-based object representing a single transcript entry in the rally editor. Stores vehicle position/rotation data, speech-to-text results, and capture data for pacenote corner analysis. Provides de
Rally Transcripts Vehicle Snapshot
Lightweight class representing a single vehicle position/rotation snapshot within a transcript. Acts as a data holder for position, quaternion, steering angle, timestamp, and corner call.