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
Gen Decal EditorGen Experimental Frame EditorGen Mesh ExplorerGen Experimental SolidFlexGen Mesh ModuleGen Network ModuleGen Region ModuleGen Render ModuleGen Terrain ModuleEditor Gen TestEditor Gen Top (Roof Geometry)Editor Gen UI (Building Architect UI)Editor Gen UtilsEditor Gen World

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 Extensionseditorgen

Editor Gen UI (Building Architect UI)

ImGui-based user interface for the Building Architect Tool (BAT). Provides the main editor windows for building shape selection, scope navigation, material/mesh picking, roof type selection, architect

ImGui-based user interface for the Building Architect Tool (BAT). Provides the main editor windows for building shape selection, scope navigation, material/mesh picking, roof type selection, architectural element toggles, and keyboard shortcut help.


Module Overview

AspectDetail
Fileextensions/editor/gen/ui.lua
ReturnsM table
Requireseditor/gen/mesh, editor/gen/utils, editor/shortcutLegend, editor/gen/decal
WindowsBAT (Building Architect), LAT (Landscape Gen), TEST (Performance Test)

Public Functions

FunctionSignatureDescription
M.inject(olib)Injects utility and world module references (olib.U, olib.W)
M.tree2ui(htree)Renders a shortcut help tree as ImGui text rows

UI Windows

Window IDTitlePurpose
BATBuilding Architect (WIP)Main building editor - shape type, scope selector, material list, element toggles, roof controls
LATWIP_Landscape_GenLandscape tools - road conforming, junction params, sector grid settings
TESTWIP_Performance_TestBatch building generation benchmarks

Key UI Sections (BAT Window)

SectionControls
Shape Type6 building shape buttons (rectangle, hexagon, corner_cut, u/t/x_shape), Load/Save/Export
Scope SelectorBuilding → Floor → Wall → Side → Top navigation tabs
Material ListCombo or list box of wall/roof materials with UV offset/scale sliders
ElementsToggle buttons: Window, Door, Storefront, Balcony, Corner, Stringcourse, Plinth, Pilaster, Stairs, Gutter
Roof ControlsRidge/Border/Chimney toggles, shape buttons (flat/pyramid/shed/gable)
Numeric InputsFloor height, wall pull, UV params, window spacing, pillar settings, balcony/door indices

UI Helper Functions (Internal)

FunctionDescription
combo(lbl, key, list, isel)Dropdown combo box bound to env.ui[key]
input(lbl, key, isint, step)Numeric input (int or float) bound to env.ui[key]
slider(lbl, key, mm, isint)Slider control with min/max range
check(lbl, key)Checkbox bound to env.ui[key]
button(lbl, key, icon, c, isactive)Icon button with tooltip
buttonT(text, key, ctxt, cbg)Text overlay button
buttonC(lbl, key, c, dim)Custom image button using loaded icon textures
buttonCC(lbl, key, c, dim)Custom image button with overlay icon

Usage Context

-- The UI module is loaded by the world module and called each frame
local UI = require('/lua/ge/extensions/editor/gen/ui')
UI.inject({U = utils, W = world})

-- Main render call (inside onEditorGui)
local handled = UI.control(materialList, world, decal, region)

Shortcut Help System

The module builds context-sensitive keyboard shortcut trees (HTree, HTreeR, HTreeTer) based on current scope, selection state, and modifier keys. These are rendered as help text in the BAT window.

Exported Functions

M.inject(olib)

Injects utility and world module references.

  • olib (table) - {U = utils, W = world}

M.control(list, w, dec, reg)

Main per-frame UI render function. Builds and renders all BAT/LAT/TEST editor windows.

  • list (table) - Material list (wall or roof depending on scope)
  • w (table) - World module reference
  • dec (table) - Decal module reference
  • reg (table) - Region module reference

Returns: boolean - true if a UI interaction was handled

M.tree2ui(htree)

Renders a shortcut help tree as ImGui text rows.

  • htree (table) - Nested shortcut tree structure

M.hint(emode)

Sets up editor mode hints.

  • emode (table) - Editor edit mode object

See Also

  • Gen Decal Editor - Related reference
  • Gen Experimental Frame Editor - Related reference
  • Gen Mesh Explorer - Related reference
  • World Editor Guide - Guide

Editor Gen Top (Roof Geometry)

Roof geometry generation module for the Building Architect Tool. Handles polygon decomposition, parallel-pair detection, ridge/gable/flat roof construction, and triangulated paving of arbitrary polygo

Editor Gen Utils

Core utility library for the Building Architect Tool. Provides geometric math (line intersection, polygon operations, splines), array/string helpers, debug drawing, camera control, file I/O, and the s

On this page

Module OverviewPublic FunctionsUI WindowsKey UI Sections (BAT Window)UI Helper Functions (Internal)Usage ContextShortcut Help SystemExported FunctionsM.inject(olib)M.control(list, w, dec, reg)M.tree2ui(htree)M.hint(emode)See Also