RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

server/commands - Camera & Input Commandsge_utils - Game Engine Utility Functionsmain.lua - GE Lua Entry Point & Game Loopmap.lua - Navigation Graph (AI Road Map)screenshot.lua - Screenshot Systemserver/server - Level Loading & Game ServerserverConnection - Client-Server Connection Manager`setSpawnpoint` - Default Spawn Point Persistence`simTimeAuthority` - Simulation Time & Bullet Time Control`spawn` - Vehicle Spawning & Safe Placement`suspensionFrequencyTester` - Suspension Natural Frequency Analysis
Activity ManagerAudio Bank ManagerAudio Ribbon SystemBus Route ManagerCamera SystemCore Chat (IRC)Core CheckpointsCore Command HandlerCoupler Camera ModifierDevices (RGB Peripherals)Dynamic PropsEnvironmentFlowgraph ManagerForestFun StuffGame ContextGame StateGround Marker ArrowsGround MarkersHardware InfoHighscoresHotlappingInventoryJob SystemLap TimesLevelsLoad Map CommandMetricsMod ManagerMultiseatMultiseat CameraMulti SpawnOnlinePaths (Camera Paths)Quick Access (Radial Menu)Recovery PromptRemote ControllerReplayRepositoryRope Visual TestScheme Command ServerCore SnapshotCore SoundsCore TerrainTraffic SignalsTrailer RespawnVehicle Active PoolingVehicle Bridge (GE ↔ VLua Communication)Vehicle MirrorsVehicle PaintsCore VehiclesVehicle TriggersVersion UpdateWeather SystemWindows Console

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 Extensionscore

Flowgraph Manager

Central manager for BeamNG's visual scripting system (flowgraphs). Handles creation, loading, serialization, and per-frame execution of flowgraph manager instances.

Central manager for BeamNG's visual scripting system (flowgraphs). Handles creation, loading, serialization, and per-frame execution of flowgraph manager instances.


Public API

FunctionSignatureDescription
M.addManager(data?) → mgrCreates a new flowgraph manager, optionally deserializing from data.
M.loadManager(filepath, hidden?, keepSavedDirs?) → mgr, successLoads a .flow.json file into a new manager.
M.removeManager(mgr)Destroys and removes a manager from the active list.
M.removeNextFrame(mgr)Queues a manager for removal on the next frame.
M.startNextFrame(mgr)Queues a manager to start running next frame.
M.getManagerByID(id) → mgr|nilFinds an active manager by its unique ID.
M.getManagerGraphNode(mgrId, graphId, nodeId) → node|nilSafely retrieves a node from an active manager's graph.
M.getManagerModule(mgrId, moduleName) → module|nilSafely retrieves a module from an active manager.
M.getAllManagers() → tableReturns the list of all active managers.
M.clearAllManagers()Destroys all managers.
M.getSingleton(name) → mgr|nilLoads or returns a unique named manager from flowgraphEditor/{name}.flow.json.
M.getAvailableNodeTemplates() → tree, lookupScans node path for all .lua node definitions; returns tree structure and flat lookup.
M.getAvailablePinTypes(node) → tableExtracts available input/output pin types from a node's pinSchema.
M.getNextUniqueIdentifier() → numberReturns a monotonically increasing unique ID.
M.startOnLoadingScreenFadeout(fg)Registers a flowgraph to auto-start when the loading screen fades out.
M.refreshDependencies()Rebuilds dependency list from runningProxies keys.
M.controls(name)Broadcasts onControlsReset or onControlsAction to all managers based on name ('reset' or 'action').
M.getAvailableStateTemplates() → tree, lookupScans for *state.flow.json files under /flowgraphEditor/states/; returns tree structure and flat lookup.

Hooks / Lifecycle

FunctionDescription
M.onExtensionLoadedRegisters global _flowgraph_createNode, _flowgraph_createStateNode, _flowgraph_createModule helpers.
M.onUpdateResolves hooks, processes deferred start/remove queues, broadcasts onFlowgraphManagerPreUpdate.
M.onSerializeSerializes all non-transient managers.
M.onDeserializedRestores managers from serialized data, re-starts singletons.
M.onFileChangedHot-reloads nodes when their source .lua files change.
M.onLoadingScreenFadeoutStarts all flowgraphs queued via startOnLoadingScreenFadeout.
M.onFlowgraphSceneObjectAddCalled on FlowgraphSceneObjectAdd event
M.onFlowgraphSceneObjectRemoveCalled on FlowgraphSceneObjectRemove event
M.onFlowgraphSceneObjectChangedCalled on FlowgraphSceneObjectChanged event

Module State

VariableTypeDefault
runningProxiestable{} - tracks running proxy extensions
enableUsageTrackingbooleanfalse
nodePathstring'/lua/ge/extensions/flowgraph/nodes/'

Usage Example

-- Load and start a flowgraph
local mgr, ok = core_flowgraphManager.loadManager("flowgraphEditor/myGraph.flow.json")
if ok then
  mgr:setRunning(true)
end

-- Access a singleton (auto-creates and caches)
local hudMgr = core_flowgraphManager.getSingleton("hudManager")

-- Safely read a node value
local node = core_flowgraphManager.getManagerGraphNode(mgrId, graphId, nodeId)
if node then
  print(node.pinOut.value.value)
end

Key Internals

  • Node templates live under /lua/ge/extensions/flowgraph/nodes/.
  • _flowgraph_createNode is a global factory injected at load time.
  • Managers are require('/lua/ge/extensions/flowgraph/manager') instances.
  • M.runningProxies tracks proxy extensions for dependency management. | M.enableUsageTracking | Boolean. Enables flowgraph usage tracking (default false). | | M.nodePath(graph, nodeId) | Returns the path string for a node in a flowgraph. |
  • Custom nodes from a manager's savedDir/customNodes/ are also hot-reloaded.

Environment

Comprehensive environment control: time of day, sky colors, clouds, fog, precipitation, gravity, temperature, and ground model physics. Manages the full weather/environment pipeline for levels.

Forest

Utility wrapper for accessing the Forest scene object. Caches the forest object ID for efficient repeated lookups.

On this page

Public APIHooks / LifecycleModule StateUsage ExampleKey Internals