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
Vehicle Editor - Toolbar
Vehicle Editor - JBeam BeautifierVehicle Editor - JBeam Modifier Leaking VisualizerVehicle Editor - JBeam SpellcheckerVehicle Editor - JBeam Table VisualizerVehicle Editor - JBeam Variables CheckerVehicle Editor - Part ListVehicle Editor - Part Property ViewVehicle Editor - Part Text ViewVehicle Editor - Part TreeVehicle Editor - Static Render View

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 ExtensionseditorvehicleEditorstaticEditor

Vehicle Editor - Part Text View

Syntax-highlighted, scrollable text view of JBeam source files using AST rendering, with inline editing of string, number, and boolean values.

Syntax-highlighted, scrollable text view of JBeam source files using AST rendering, with inline editing of string, number, and boolean values.


Module Exports

ExportTypeDescription
M.menuEntrystring"Part Text View" - menu label
M.openfunctionShows the text view window
M.onEditorGuihookRenders the AST-based text view and edit modal
M.onEditorInitializedhookRegisters window and modal

Key Internals

VariableTypePurpose
clipperImGuiListClipperVirtual scrolling for large files
maxLineLengthnumberMaximum rendered line width (for horizontal scroll)
lineToScrollTonumberTarget line for auto-scroll (-1 = none)
editNodeIdxnumber/nilAST node being edited in modal
scrollToSelectionBoolPtrAuto-scroll to selected AST nodes
colorTabletableSyntax colors for AST node types

Syntax Colors

AST Node TypeColor
string / string_singleBlue (0.31, 0.73, 1)
comment / comment_multilineGreen (0.42, 0.6, 0.29)
list_begin / list_endYellow (0.95, 0.84, 0.06)
object_begin / object_endPink (0.85, 0.39, 0.63)

How It Works

  1. Reads the JBeam file for the selected part via jbeamIO.getPart()
  2. Renders AST nodes line-by-line using ImGuiListClipper for virtual scrolling
  3. Each AST node is rendered with type-appropriate syntax coloring
  4. Selected nodes (from modifier leak visualizer, etc.) are highlighted with a red overlay
  5. Double-clicking a node opens an edit modal for strings, numbers, or booleans
  6. Menu bar provides: Reload, Save, Close, Delete, scroll-to-selection toggle
  7. File explorer button and file timestamp display

Lua Code Example

-- Open text view
extensions.editor_vehicleEditor_staticEditor_vePartTextView.open()

-- The text view uses virtual scrolling via ImGuiListClipper:
-- im.ImGuiListClipper_Begin(clipper, numLines, fontSize)
-- for lineNo = clipper.DisplayStart+1, clipper.DisplayEnd+1 do
--   -- render AST nodes for this line
-- end

-- AST node rendering with syntax highlighting:
-- local text = jsonAST.stringifyNodes({node})
-- local color = colorTable[node[1]]  -- e.g., colorTable['string']
-- if color then im.PushStyleColor2(im.Col_Text, color) end
-- im.TextUnformatted(text)

-- Selected AST nodes (from other tools) highlighted with red overlay:
-- if vEditor.selectedASTNodeMap[nodeIdx] then
--   im.ImDrawList_AddRectFilled(drawList, rMin, rMax, nodeColorHighlightRed)
-- end

-- Double-click editing opens a modal:
-- if nodeType == 'string' then
--   nodeEditTextInput = im.ArrayChar(256, node[2])
-- elseif nodeType == 'number' then
--   nodeEditDoubleInput[0] = node[2]
-- elseif nodeType == 'bool' then
--   node[2] = not node[2]  -- immediate toggle
-- end

-- Saving writes modified AST back to file:
-- writeFile(vEditor.astFilename, jsonAST.stringify(vEditor.ast.ast))

-- Auto-scroll to selected nodes:
-- local sumLineNums = 0
-- for nodeIdx in pairs(vEditor.selectedASTNodeMap) do
--   sumLineNums = sumLineNums + vEditor.ast.transient.nodeIdxToLineNum[nodeIdx]
-- end
-- lineToScrollTo = sumLineNums / numSelectedLines

See Also

  • Vehicle Editor - JBeam Beautifier - Related reference
  • Vehicle Editor - JBeam Modifier Leaking Visualizer - Related reference
  • Vehicle Editor - JBeam Spellchecker - Related reference
  • World Editor Guide - Guide

Vehicle Editor - Part Property View

Generic property inspector window for editing individual JBeam table entries (nodes, beams, etc.) selected via the Part Tree view.

Vehicle Editor - Part Tree

Hierarchical tree view of JBeam part data with interactive 3D node/beam picking, selection, visibility toggling, and integration with the AST text view.

On this page

Module ExportsKey InternalsSyntax ColorsHow It WorksLua Code ExampleSee Also