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

Flowgraph Editor

Main extension module for the BeamNG flowgraph visual scripting editor.

Main extension module for the BeamNG flowgraph visual scripting editor.


Overview

The central editor extension (editor_flowgraphEditor) that manages the flowgraph editing environment. Handles project lifecycle (open, save, close, autosave), window initialization, menu bars, keyboard shortcuts, undo/redo history, clipboard operations, and coordinates all sub-windows (node library, properties, search, welcome, etc.).


Module Globals

FieldTypeDescription
M.lastOpenedFolderstringLast folder used in open/save dialogs
M.allowTooltipbooleanWhether tooltips are enabled (mouse idle > 0.5s)
M.settings.viewModestableAvailable view modes: default, simple, flowLevel, debug
M.requestedEditorbooleanWhether the editor was requested to open
M.showSmallFgWindowBoolPtrToggle for compact flowgraph window
M.pushedNodeLibActionMapbooleanWhether NodeLibrary action map is active
M.switchToSmallWindowbooleanWhether to switch to compact window mode
M.forceOpentableWindows to force open (e.g. {states = true, log = true})

Public API

FunctionSignatureDescription
M.open(filePath)Opens a flowgraph file or shows the editor
M.closeCurrent()Removes the current manager and switches to the next
M.save()Saves the current project; opens save dialog if unsaved
M.saveFile()Writes the current project to its saved path
M.saveAsFile(fCbData)Saves to a new path from the file dialog
M.openFile(fCbData, openAsNewManager, keepSavedDirs)Opens a .flow.json file, optionally as a new manager
M.autoSave()Auto-saves to flowgraphEditor/autoSaves/ on timer
M.saveMacro(graph)Saves a macro graph, checking for dirty children
M.saveCurrent()Saves current macro or project depending on context
M.setManager(mgr)Sets the active flowgraph manager
M.getManager() → mgrReturns the active flowgraph manager
M.getPropertiesWindow() → windowReturns the properties sub-window
M.drawEditor(dtReal, dtSim, dtRaw)Draws the full editor with menu bar and all windows
M.drawContextMenus()Draws the right-click create-node context menu
M.drawRestoreMenu()Draws the autosave restore menu
M.drawExecution()Draws the execution state UI
M.addHistory(title, graph)Adds an undo history snapshot
M.showNodeReferences(node)Shows references for a specific node
M.windowsMenu()Draws the Windows submenu
M.isActionMapEnabled(map) → boolChecks if a specific action map is enabled
M.arrowControllableWindowCall(fun, ...)Calls a function on the arrow-controllable window

UI Shortcut Functions

FunctionDescription
M.uiFocusNodesShortcut()Focus selected nodes
M.uiHideShortcut(hide)Hide/show selected nodes
M.uiShowSourceShortcut()Show source of selected node
M.uiAutoConnectShortcut()Auto-connect nodes
M.uiFindShortcut()Open search
M.uiDisconnectShortcut()Disconnect selected pins
M.uiToggleCategoryShortcut()Toggle node category

Editor Hooks

HookDescription
M.onEditorGuiMain per-frame draw entry
M.onEditorInitializedRegisters windows, edit mode, preferences
M.onEditorActivatedEditor activation callback
M.onEditorDeactivatedEditor deactivation callback
M.onSerializeSerializes state for persistence
M.onDeserializedRestores state from serialized data
M.onUpdatePer-frame update (small FG window)
M.onClientStartMissionMission start callback
M.onEditorRegisterPreferencesRegisters flowgraph preferences

Sub-Windows Initialized

WindowSource Module
Main canvaseditor/flowgraph/main
Overvieweditor/flowgraph/overview
State Vieweditor/flowgraph/stateView
Eventseditor/flowgraph/events
Exampleseditor/flowgraph/examples
Propertieseditor/flowgraph/properties
Variableseditor/flowgraph/variables
Project Settingseditor/flowgraph/projectSettings
Historyeditor/flowgraph/history
Welcomeeditor/flowgraph/welcome
Node Libraryeditor/flowgraph/nodelibrary
Executioneditor/flowgraph/execution
Searcheditor/flowgraph/search
Referenceseditor/flowgraph/references
Node Previeweditor/flowgraph/nodePreview
Garbage Debugeditor/flowgraph/garbageDebug

Autosave

  • Directory: flowgraphEditor/autoSaves/
  • Interval: configurable via flowgraph.general.autosaveInterval preference
  • Format: <unix_timestamp>_<project_name>.flow.json
  • Only runs for non-transient, editing-allowed projects

Usage Example

-- Opening a flowgraph file programmatically
editor_flowgraphEditor.openFile({filepath = "/gameplay/missions/myMission.flow.json"}, true)

-- Saving the current project
editor_flowgraphEditor.save()

-- Setting the active manager
editor_flowgraphEditor.setManager(myMgr)

-- Accessing sub-windows
local props = editor_flowgraphEditor.getPropertiesWindow()

See Also

  • Flowgraph Welcome - Start screen
  • Flowgraph Search - Project search
  • Flowgraph References - Node usage statistics
  • Flowgraph Variables - Variable management
  • Flowgraph State View - State machine view

File Dialog

Editor file dialog providing Open/Save functionality with directory browsing, file preview, favourites, smart search, column customization, and recent directories.

Forest Editor

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

On this page

OverviewModule GlobalsPublic APIUI Shortcut FunctionsEditor HooksSub-Windows InitializedAutosaveUsage ExampleSee Also