API Reference GE Extensions editor Flowgraph Editor Main extension module for the BeamNG flowgraph visual scripting editor.
Main extension module for the BeamNG flowgraph visual scripting editor.
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.).
Field Type Description M.lastOpenedFolderstring Last folder used in open/save dialogs M.allowTooltipboolean Whether tooltips are enabled (mouse idle > 0.5s) M.settings.viewModestable Available view modes: default, simple, flowLevel, debug M.requestedEditorboolean Whether the editor was requested to open M.showSmallFgWindowBoolPtr Toggle for compact flowgraph window M.pushedNodeLibActionMapboolean Whether NodeLibrary action map is active M.switchToSmallWindowboolean Whether to switch to compact window mode M.forceOpentable Windows to force open (e.g. {states = true, log = true})
Function Signature Description 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
Function Description 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
Hook Description 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
Window Source Module Main canvas editor/flowgraph/mainOverview editor/flowgraph/overviewState View editor/flowgraph/stateViewEvents editor/flowgraph/eventsExamples editor/flowgraph/examplesProperties editor/flowgraph/propertiesVariables editor/flowgraph/variablesProject Settings editor/flowgraph/projectSettingsHistory editor/flowgraph/historyWelcome editor/flowgraph/welcomeNode Library editor/flowgraph/nodelibraryExecution editor/flowgraph/executionSearch editor/flowgraph/searchReferences editor/flowgraph/referencesNode Preview editor/flowgraph/nodePreviewGarbage Debug editor/flowgraph/garbageDebug
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
-- 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 ()