RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Editor AI TestsEditor AI VisualizationEditor – Assembly Spline ToolAsset BrowserAsset DeduplicatorAsset Management ToolSFX Previewer (Audio Events List)Audio Ribbon EditorAutoSaveBarriers EditorBiome ToolBuilding EditorBulk RenameCamera BookmarksCamera TransformCamera Path EditorCEF HelperCo-Simulation Signal EditorCrawl Data EditorCreate Object ToolDataBlock EditorDecal EditorDecal Spline EditorDocumentation HelperDrag Race EditorDrift Data EditorDrive Path EditorDynamic Decals Tool (Vehicle Livery Creator)Engine Audio DebugExtensions DebugExtensions EditorFFI Pointer Leak TestFile DialogFlowgraph EditorForest EditorForest ViewEditor Gizmo HelperEditor Ground Model Debug HelperEditor Headless Editor TestEditor Icon OverviewEditor ImGui C DemoEditor InspectorEditor Layout ManagerEditor Level SettingsEditor Level ValidatorEditor LoggerEditor Log HelperEditor MainEditor Main MenuEditor Main ToolbarEditor Main UpdateMap Sensor EditorMaster Spline EditorMaterial EditorMeasures Inspector HeaderMesh Editor (Base)Mesh Road EditorMesh Spline EditorMission EditorMission PlaybookMission Start Position EditorMulti Spawn Manager (Vehicle Groups)Navigation Mesh EditorEditor News MessageObject Tool (Object Select Edit Mode)Object To Spline EditorParticle EditorPerformance Profiler / Camera RecorderPhysics ReloaderPrefab Instance EditorEditor PreferencesRace / Path EditorRally EditorRaycast Test Editor ToolRenderer Components Editor ToolRender Test Editor ToolResource Checker Editor ToolRiver EditorRoad Architect EditorRoad DecorationsRoad Editor (Decal Road)Road Network ExporterRoad River Cache HandlerRoad River GUIRoad Spline EditorRoad Template EditorRoad UtilitiesScene TreeScene ViewScreenshot Creator BootstrapScript AI EditorScript AI ManagerSensor Configuration EditorSensor DebuggerShape EditorShortcut LegendSidewalk Spline EditorSites EditorSlot Traffic EditorSuspension Audio DebugTech Server ManagerTerraform ToolTerrain And Road ImporterTerrain EditorTerrain Materials EditorText EditorTool ManagerTool ShortcutsTraffic DebugTraffic ManagerTraffic Signals EditorUndo History ViewerVehicle Bridge TestVehicle Detail ViewerVehicle Editor MainEditor - VisualizationEditor Viz HelperEditor Water Object HelperEditor Windows Manager

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API ReferenceGE Extensionseditor

Script AI Editor

Full-featured editor for creating, editing, and executing scriptAI vehicle trajectories and camera paths - supports time-based and speed-based scripts, spline interpolation, drawing mode, recording, u

Full-featured editor for creating, editing, and executing scriptAI vehicle trajectories and camera paths - supports time-based and speed-based scripts, spline interpolation, drawing mode, recording, undo/redo, and session save/load.


Public API (Key Functions)

FunctionSignatureDescription
M.onEditorGui()Main editor GUI for all tool windows
M.onEditorInitialized()Registers the "Edit ScriptAI Scenario" edit mode and all windows
M.onSerialize / M.onDeserialized() / (data)Session persistence for trajectories, camera, and window states
M.onVehicleSubmitRecording(vid, data)Callback for vehicle submit recording event
M.onVehicleReplaced(vid)Callback for vehicle replaced event

Key Features

  • Vehicle trajectories: Create paths with time-stamps or speed values per node
  • Camera path: Independent camera trajectory with position, rotation, and smoothness per node
  • Recording: Record vehicle movements in real-time and convert to trajectories
  • Draw mode: Click to place nodes on terrain with freehand drawing
  • Spline mode: Optional Catmull-Rom interpolation of polylines
  • Execution: Synchronized playback of all vehicle trajectories + camera path
  • Timeline: Scrubable time slider with play/pause/rewind/fast-forward
  • Import/Export: Single trajectory JSON files (compatible with standard scriptAI format)
  • Session save/load: Full session persistence with vehicle spawning

Windows

WindowPurpose
scriptAIEditorMain timeline/transport controls
scriptAIEditor_VehWinVehicle list with recording controls
scriptAIEditor_TrajListWinTrajectory list and management
scriptAIEditor_TrajWin1/2/3Individual trajectory node editors (3 max)
scriptAIEditor_CamWinCamera path editor with position/rotation/smoothness
scriptAIEditor_DrawWinFreehand drawing mode controls

Trajectory Data Structure

local trajectory = {
  vehicle = "vid: name - jBeam",
  vid = vehicleId,
  jBeam = "pickup",
  isTimeBased = true,       -- false = speed-based
  polyLine = { { x=im.FloatPtr(0), y=im.FloatPtr(0), z=im.FloatPtr(0), t=im.FloatPtr(0) }, ... },
  spline = nil,             -- optional Catmull-Rom spline
  isExternalForce = true,   -- AI assistance
  isHoldVelocity = true,
  col = im.ArrayFloat(3),   -- display color
}

Notes

  • Uses gizmo for translating/rotating camera path nodes
  • Velocity visualization uses colored debug lines
  • Lock feature prevents node time/position from being modified
  • Supports both looping and one-shot playback

See Also

  • Editor AI Tests - Related reference
  • Editor AI Visualization - Related reference
  • Editor – Assembly Spline Tool - Related reference
  • World Editor Guide - Guide

Screenshot Creator Bootstrap

Minimal bootstrap module that adds a "Vehicle Screenshot Creator" menu item to the editor, delegating to `util_screenshotCreator`.

Script AI Manager

Editor window for managing scriptAI recordings across all vehicles - supports recording, playback, looping, save/load of track files, and real-time progress visualization.

On this page

Public API (Key Functions)Key FeaturesWindowsTrajectory Data StructureNotesSee Also