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
Flowgraph Base WindowFlowgraph EventsFlowgraph ExamplesFlowgraph Execution (Task Manager)Flowgraph Garbage DebugFlowgraph HistoryFlowgraph LegendFlowgraph Main WindowFlowgraph Mission Variable HelperFlowgraph Node LibraryFlowgraph Node PreviewFlowgraph OverviewFlowgraph Project SettingsFlowgraph PropertiesFlowgraph References WindowFlowgraph Search WindowFlowgraph State View WindowFlowgraph Variables WindowFlowgraph Welcome Window

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 Extensionseditorflowgraph

Flowgraph Node Library

The node library window and context menu for browsing, searching, and creating flowgraph nodes, variables, macros, and states.

The node library window and context menu for browsing, searching, and creating flowgraph nodes, variables, macros, and states.


Overview

fg_nodelibrary is the primary interface for finding and placing nodes into flowgraph graphs. It serves double duty: as a standalone dockable window and as the background context menu in the graph canvas. Features include frecency-weighted search, pin-compatible filtering, tree view browsing, variable get/set creation, macro insertion, state creation, drag-and-drop, and keyboard arrow navigation.


Class Fields

FieldTypeDescription
C.windowNamestring'fg_nodelib'
C.windowDescriptionstring'Node library'
C.arrowControllablebooltrue

Class Methods

MethodDescription
C:init()Registers window, initializes search utility and frecency data
C:clear()Reset search text, filters, and scroll position
C:setNewNodeLinkPin(pin)Set the pin being dragged for compatible filtering
C:draw()Draws the standalone node library window
C:drawContent(menuPos, usedForContextMenu)Main content: search bar + results or tree
C:drawTextFilter(usedForContextMenu)Search input with clear and paste buttons
C:drawContentAsTreeNodes(menuPos)Tree view: nodes, variables, macros, states
C:displayResults(menuPos)Renders frecency-scored search results
C:displayNode(dir, menuPos, name, node)Renders a single node entry
C:displayVariable(var, menuPos, read, fromMgr)Renders a get/set variable entry
C:displayMacro(name, macro, menuPos)Renders a macro entry
C:displayStateTemplate(dir, menuPos, name, state)Renders a state template entry
C:createNodeFromButon(menuPos, node)Creates a node and auto-links to dragged pin
C:createVariableButton(var, menuPos, read, fromMgr)Creates get/set variable node
C:createStateButton(menuPos, state)Creates a state from template
C:linkState(node)Links newly created state to dragged pin
C:pinsFilter(node)Check if node has compatible pins for filtering
C:filterTemplates(filterPins, mode)Filter node templates by pin compatibility
C:filterMacroTemplates(filterPins)Filter macro templates
C:findFlowNodes()Search query for regular flow nodes
C:findStateNodes()Search query for state nodes
C:navigateList(up)Keyboard arrow navigation
C:createNode()Confirm selection of current highlighted item
C:highlightText(label, highlight)Render text with highlighted search matches
C:ratePinSimilarity(a, b)Score pin compatibility for auto-linking

Search Features

  • Frecency: Combines frequency + recency of node usage
  • Tag matching: Searches node tags at 75% weight
  • Pin filtering: When dragging a link, only compatible nodes shown
  • Type prefix: node:, graph:, pin: to filter by type
  • Keyboard: Arrow keys navigate, Enter creates selected node

Usage Example

-- The node library is used both as a window and context menu
-- Creating a node programmatically:
local node = mgr.graph:createNode("types/getVariable")
ui_flowgraph_editor.SetNodePosition(node.id, position)
node:alignToGrid()
node:setGlobal(true)
node:setVar("myVariable")

Additional Class Methods

MethodDescription
C:hasFoldersOnly(dir)Recursively checks if a directory contains only folders (no nodes)
C:setStatic()Marks the library as static mode
C:variablePinFilter(var, dir)Check if a variable is compatible with the dragged pin
C:getFilterType()Parse search prefix (node:/graph:/pin:) from search text
C:findVar(source, sourceName, sourceNameTag)Add variables from a source to the search index
C:filterNodes(dir, filterPins, mode)Recursively filter node templates by pin compatibility
C:checkEmpty(dir, mode)Mark directory branches as empty if no matching nodes
C:filterMacros(dir, filterPins)Filter macro templates by name
C:refreshMacro()Refresh macro list when new macros are added
C:refreshStateTemplates()Refresh and sort state templates
C:displayDir(dir, menuPos, elementFieldName, elementFunction)Recursively render a directory tree with elements
C:displaySimpleElement(menuPos, text, clickFn, ...)Render a generic clickable bullet item
C:displayStateExitButton(menuPos, label)Render a state exit button entry
C:arrowHelper(cursor, itemSize, doHover, hoverFun)Keyboard arrow navigation with selection/hover highlighting
C:printNodesWithTags()Export all nodes to nodeLib.csv and pins to pinLib.csv (debug)
C:printDir(dir, name, tagIndex, libtxt)Helper for CSV export of node directory
C:recursiveGetTags(dir, list, pins)Recursively collect all tags and pin schemas

See Also

  • Flowgraph Base Window - Related reference
  • Flowgraph Events - Related reference
  • Flowgraph Examples - Related reference
  • World Editor Guide - Guide

Flowgraph Mission Variable Helper

Shared utility module for applying mission variables from the Mission Editor to flowgraph managers before execution.

Flowgraph Node Preview

Tooltip popup that renders a live preview of a flowgraph node, macro, or graph when hovering over library items.

On this page

OverviewClass FieldsClass MethodsSearch FeaturesUsage ExampleAdditional Class MethodsSee Also