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

Sites Editor

Main editor extension for creating/editing gameplay sites (locations, zones, parking spots). Provides an ImGui-based editor window with tabs, file I/O, sorting tools, and sites manager integration.

Main editor extension for creating/editing gameplay sites (locations, zones, parking spots). Provides an ImGui-based editor window with tabs, file I/O, sorting tools, and sites manager integration.


Public Functions

FunctionDescription
M.onEditorGui()Draws the main Sites Editor ImGui window with menu bar and tabs
M.onEditorInitialized()Registers the editor window, edit mode, and sub-editors
M.onEditorToolWindowHide(windowName)Switches to objectSelect mode when window is hidden
M.onEditorToolWindowGotFocus(windowName)Switches to sites edit mode when window gets focus
M.onSerialize()Serializes current sites state
M.onDeserialized(data)Restores sites from serialized data
M.allowGizmo()Returns true if sites edit mode is active
M.getCurrentSites()Returns the current sites object
M.getCurrentLocation()Returns the currently selected location
M.getCurrentZone()Returns the currently selected zone
M.getCurrentParkingSpot()Returns the currently selected parking spot
M.selectZone(elem, mode)Selects a zone element
M.show()Shows the editor window and activates edit mode
M.loadSites(loadPath)Loads sites from a .sites.json file
M.saveSites(sites, savePath)Saves sites to a .sites.json file
M.managerSites()Draws the Sites Manager submenu (browse by level)

Example: Sites Editor Workflow

-- The Sites Editor is an extension-based editor tool
-- It registers itself during onEditorInitialized and creates sub-editors:

-- Tab structure:
-- 1. Locations - point-based gameplay locations with radius
-- 2. Zones - polygon-based areas with vertices
-- 3. Parking Spots - oriented bounding boxes for vehicle placement
-- 4. Loc Tags - tag management for locations
-- 5. Parking Spot Tags - tag management for parking spots
-- 6. Zone Tags - tag management for zones

-- File operations via menu:
-- File > New - creates empty sites
-- File > Load - opens .sites.json file dialog
-- File > Save / Save As - writes current sites to disk

-- Tools menu provides sorting utilities:
-- Sort Locations/Zones/Parking Spots by Name
-- Enumerate Parking Spots - auto-number duplicate names
-- Parking Spot Names by Zone Containment - rename spots to zone name

-- Accessing current state from other extensions:
local sitesEditor = extensions.editor_sitesEditor
local sites = sitesEditor.getCurrentSites()
local location = sitesEditor.getCurrentLocation()
local zone = sitesEditor.getCurrentZone()
local spot = sitesEditor.getCurrentParkingSpot()

-- Loading sites programmatically:
local sites = sitesEditor.loadSites("/gameplay/sites/my_site.sites.json")

-- Saving sites:
sitesEditor.saveSites(sites, "/gameplay/sites/my_site.sites.json")

-- Show the editor:
sitesEditor.show()

Architecture

The editor uses a tabbed window pattern with pluggable sub-editors:

  • locations.lua - location element editor (position + radius gizmo)
  • zones.lua - zone polygon editor (vertex manipulation)
  • parkingSpots.lua - parking spot editor (pos/rot/scale + multi-spot)
  • sortedListDisplay.lua - generic sorted list UI wrapper
  • tags.lua - tag management UI for any element type

Each sub-editor implements: init, setSites, select, draw, selected, unselect

Module Variables

  • onExtensionLoaded (any) - Module variable.

Additional Exports

  • M.onExtensionLoaded

See Also

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

Sidewalk Spline Editor

Editor tool for placing sidewalk meshes along splines - uses mesh kits with base pieces and variations, supports distribution control (round-robin/random with weights), terrain conforming/terraforming

Slot Traffic Editor

Editor extension for editing navgraph-based traffic slot configurations - provides a visual node/link editor for road networks with traffic lane assignment, road properties, and navgraph manipulation.

On this page

Public FunctionsExample: Sites Editor WorkflowArchitectureModule VariablesAdditional ExportsSee Also