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 Test

Internal test/debug module for the Building Architect Tool (BAT) procedural generation system. Contains test routines for mesh generation, DAE export, LOD creation, XML manipulation, and building geom

Internal test/debug module for the Building Architect Tool (BAT) procedural generation system. Contains test routines for mesh generation, DAE export, LOD creation, XML manipulation, and building geometry validation.


Module Overview

AspectDetail
Fileextensions/editor/gen/test.lua
ModuleM (local table)
Requireseditor/gen/utils, editor/gen/mesh, editor/gen/top, editor/gen/network, editor/gen/region
RoleDevelopment-only test harness for procedural building systems

Public Functions

FunctionDescription
M.clear(forestName)Wipes all test objects from the bat SimGroup, removes generated DAE/JSON files, and recreates the Forest object
M.pretest_BAT(inworld)Sets up pre-test camera positions and optional in-world test geometry (roads, decals, regions)
M.test_BAT(p)Main test entry point - exercises mesh creation, DAE import/export, LOD generation, XML editing, building scanning, roof geometry, and robot scene tests

Key Capabilities Tested

  • Mesh generation: ProceduralMesh creation, vertex colors, UV mapping, face winding
  • DAE pipeline: XML parsing (xmlOn), node manipulation (forNode, toNode, ofNode), LOD insertion, material replacement, file export (xml2file)
  • Building geometry: Wall paving (rcPave, framePave, frameSpline), roof ridge/gable generation, polygon splitting
  • Forest items: Creation, positioning, transform updates via editor.updateForestItem
  • Material loading: Reading material JSON files, setting up BAT-specific material variants

Usage Context

-- Only runs in development mode (U._PRD == 0)
local Tst = require('/lua/ge/extensions/editor/gen/test')
Tst.test_BAT()      -- Run full test suite
Tst.pretest_BAT(true) -- Set up in-world test scene
Tst.clear('theForest') -- Wipe all test artifacts

Note: This module is gated behind U._PRD == 0 checks and contains extensive commented-out experimental code. Not intended for production use.

Exported Functions

M.inject(olist)

Injects module dependencies and triggers onUp.

  • olist (table?) - {E, W, UI, UU} module references

M.onUp(arg)

Activates the test/conf editor mode, reloads modules, shows LAT/TEST windows.

  • arg (any) - Optional argument

M.clear(forestName)

Wipes all test objects, generated files (DAE/JSON), and recreates the Forest object.

  • forestName (string) - Name of the Forest scene object to recreate

Returns: Forest - The newly created Forest object

M.pretest_BAT(inworld)

Sets up camera positions and optional in-world test geometry.

  • inworld (boolean?) - If true, places player and generates test roads/regions

M.test_BAT(p)

Main test entry point - exercises mesh, DAE, LOD, XML, building, and roof geometry.

  • p (vec3?) - Optional position

See Also

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

Gen Terrain Module

Procedural terrain and road lattice generation module for the gen editor.

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

On this page

Module OverviewPublic FunctionsKey Capabilities TestedUsage ContextExported FunctionsM.inject(olist)M.onUp(arg)M.clear(forestName)M.pretest_BAT(inworld)M.test_BAT(p)See Also