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

Forest Editor

Full-featured editor for placing and manipulating forest vegetation items in BeamNG levels.

Full-featured editor for placing and manipulating forest vegetation items in BeamNG levels.


Overview

The editor_forestEditor extension provides a comprehensive vegetation/forest editing toolset. It supports brush-based painting, transform tools (select, translate, rotate, scale), lasso selection, parallax mapping texture set editing, and detailed per-item property inspection. Works with ForestBrush, ForestBrushElement, and ForestItemData objects.


Module Globals

FieldTypeDescription
var.selectedToolenumCurrently active tool (transform, brush, instantiate)
var.selectedForestBrushestableCurrently selected forest brushes
var.selectedForestItemDatastableCurrently selected forest item data objects
var.transformToolSelectionModeenumCurrent transform sub-mode (select/translate/rotate/scale/lasso)
var.forestBrushToolobjectThe brush tool controller
var.forestDataobjectForest data handle
var.forestBrushestableAll forest brushes
var.forestBrushesMaptableName-to-brush lookup map
var.selectedTabenumActive tab: brushes or meshes

Tool Types

EnumValueDescription
transformTool1Select/move/rotate/scale items
brush2Paint vegetation with brushes
instantiate3Place single items

Brush Modes

ModeValueDescription
paint0Paint vegetation items
snap1Snap items to terrain
erase2Erase vegetation items
eraseSelected3Erase only selected items
instantiate4Place individual items

Transform Modes

ModeValueDescription
select1Selection mode
translate2Move items
rotate3Rotate items
scale4Scale items
lassoSelect5Freehand or polyline lasso selection

Key Functions

FunctionDescription
M.dumpForestBrushes()Debug: prints all forest brushes
M.dumpBrushProperties()Debug: prints brush size, pressure, hardness
updateCentroid()Recalculates selection centroid from selected forest items
readOrIntializeParallaxMappingTextureSets()Loads or creates parallax texture set data
updateAutoRepeatChangeBrushSize()Handles held-key brush size adjustment

Debug Functions

-- Dump all forest brushes to console
editor_forestEditor.dumpForestBrushes()

-- Dump brush properties (size, pressure, hardness)
editor_forestEditor.dumpBrushProperties()

-- Dump brush name mapping
editor_forestEditor.dumpForestBrushesMap()

Usage Example

-- The forest editor is activated via the editor's edit mode system.
-- When "Edit Forest" mode is active, the forest editor window appears.

-- Brush properties are accessed via the internal var table
-- (no public getVar export exists - use the exported functions instead)
editor_forestEditor.selectToolByName("brush")
editor_forestEditor.selectBrushByIndex(1)

Module Variables

  • M.dependencies (table) - {"core_forest"}.

Functions

M.beginChangeBrushSizeWithKeys(direction)

Starts auto-repeat brush size change with keyboard.

  • direction (number)

M.endChangeBrushSizeWithKeys()

Stops auto-repeat brush size change.

M.onEditorInitialized()

Registers edit mode, tool windows, preferences, and legend action names.

M.onEditorGui()

Main per-frame UI rendering and 3D visualization.

M.onEditorAfterSaveLevel()

Saves forest data after level save.

M.onEditorRegisterPreferences(prefsRegistry)

Registers forest editor preferences.

  • prefsRegistry (any)

M.onEditorAxisGizmoAligmentChanged()

Updates gizmo when alignment mode changes.

M.onEditorAxisGizmoModeChanged(mode)

Updates gizmo when mode changes.

  • mode (any)

M.onEditorInspectorFieldChanged(selectedIds, fieldName, fieldValue, arrayIndex)

Handles inspector field changes for forest items.

  • selectedIds (any)
  • fieldName (string)
  • fieldValue (any)
  • arrayIndex (any)

M.onDeserialize(data)

Restores forest editor state from serialized data.

  • data (table)

M.onSerialize()

Serializes forest editor state for persistence.

Returns: table

M.changeBrush(value, step)

Changes brush size/pressure by value and step.

  • value (any)
  • step (any)

M.selectBrushByIndex(index)

Selects a brush by its index.

  • index (number)

M.selectForestItems(forestItems, addToSelection)

Selects forest items in the editor.

  • forestItems (table)
  • addToSelection (boolean)

M.selectToolByName(toolName)

Activates a tool by name (e.g. "brush", "transform").

  • toolName (string)

M.clearForestItemsSelection()

Clears the current forest items selection.

M.dumpForestBrushes()

Debug: prints all forest brushes to console.

M.dumpForestBrushesMap()

Debug: prints brush name-to-object mapping.

M.dumpBrushProperties()

Debug: prints brush size, pressure, hardness.


See Also

  • Forest View - List view of forest items
  • Gen Terrain - Terrain editing tools

Flowgraph Editor

Main extension module for the BeamNG flowgraph visual scripting editor.

Forest View

Provides a list view of all forest items when the forest editor is active.

On this page

OverviewModule GlobalsTool TypesBrush ModesTransform ModesKey FunctionsDebug FunctionsUsage ExampleModule VariablesFunctionsM.beginChangeBrushSizeWithKeys(direction)M.endChangeBrushSizeWithKeys()M.onEditorInitialized()M.onEditorGui()M.onEditorAfterSaveLevel()M.onEditorRegisterPreferences(prefsRegistry)M.onEditorAxisGizmoAligmentChanged()M.onEditorAxisGizmoModeChanged(mode)M.onEditorInspectorFieldChanged(selectedIds, fieldName, fieldValue, arrayIndex)M.onDeserialize(data)M.onSerialize()M.changeBrush(value, step)M.selectBrushByIndex(index)M.selectForestItems(forestItems, addToSelection)M.selectToolByName(toolName)M.clearForestItemsSelection()M.dumpForestBrushes()M.dumpForestBrushesMap()M.dumpBrushProperties()See Also