RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Flowgraph Base ModuleFlowgraph Base NodeFlowgraph Base State NodeFlowgraph Node BuilderFlowgraph GraphFlowgraph Group HelperFlowgraph LinkFlowgraph ManagerNew Node TemplateFlowgraph PinFlowgraph States ManagerFlowgraph UtilsFlowgraph Variable Storage

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 Extensionsflowgraph

New Node Template

Template file demonstrating the structure for creating new flowgraph nodes. Shows all available pin types, node metadata fields, and the minimal `work()` entry point.

Template file demonstrating the structure for creating new flowgraph nodes. Shows all available pin types, node metadata fields, and the minimal work() entry point.


Node Metadata

FieldDescription
C.nameDisplay name shown in the flowgraph editor
C.descriptionTooltip description for the node
C.colorim.ImVec4(r,g,b,a) - node header color
C.iconIcon from ui_flowgraph_editor.nodeIcons
C.categoryCategory for node browser organization
C.tagsString array for search/filtering

Pin Schema

The C.pinSchema table defines all input and output pins:

FieldTypeDescription
dir"in" or "out"Pin direction
typestring or tablePin data type (see below)
namestringPin identifier
defaultanyDefault value (input pins only)
descriptionstringTooltip text
tableTypestringSub-type hint for table pins (output only)

Available Pin Types

TypeDefault ExampleDescription
"flow"trueExecution flow signal
"number"42Numeric value
"bool"trueBoolean toggle
"string""Text"Text value
"vec3"{1,2,3}3D vector
"quat"{0,0,0,1}Quaternion rotation
"color"{1,1,1,0.5}RGBA color
"table"nilGeneric table
"any"nilAccepts any type
Multi-type{'number','bool'}Accepts multiple specified types

Node Structure

local C = {}

C.name = 'My Custom Node'
C.description = "What this node does"
C.color = ui_flowgraph_editor.nodeColors.default
C.icon = ui_flowgraph_editor.nodeIcons.default
C.category = 'once_instant'
C.tags = { 'custom' }

C.pinSchema = {
  -- Input pins
  { dir = 'in',  type = 'flow',   name = 'flow',   default = true,  description = "Execution trigger" },
  { dir = 'in',  type = 'number', name = 'speed',   default = 10,    description = "Speed value" },

  -- Output pins
  { dir = 'out', type = 'flow',   name = 'flow',   description = "Passes flow through" },
  { dir = 'out', type = 'bool',   name = 'result', description = "Operation result" },
}

-- Called each frame when flow is active
function C:work()
  -- Access input: self.pinIn.speed.value
  -- Set output:   self.pinOut.result.value = true
end

return _flowgraph_createNode(C)

Common Node Categories

CategoryBehavior
once_instantworkOnce() fires once per flow trigger
once_p_durationworkOnce() fires once, node stays active for duration
logicContinuous work() called every frame with flow
repeat_instantwork() called every frame

Key Conventions

  • Always end with return _flowgraph_createNode(C) (not _flowgraph_createModule)
  • Use C:work() for continuous nodes, C:workOnce() for single-fire nodes
  • Pin names must be unique within their direction
  • fixed = true prevents user from removing the pin
  • hidden = true hides pin by default (accessible via node properties)
  • impulse = true on flow outputs means the pin auto-resets after one trigger

See Also

  • Flowgraph Base Module - Related reference
  • Flowgraph Base State Node - Related reference
  • Flowgraph Base Node - Related reference
  • FlowGraph Guide - Guide

Flowgraph Manager

Top-level controller for a single flowgraph project. Manages multiple graphs (parent-child hierarchy), unique ID allocation, execution lifecycle (start/stop/pause), editor integration, node selection,

Flowgraph Pin

- **File:** `extensions/flowgraph/pin.lua`

On this page

Node MetadataPin SchemaAvailable Pin TypesNode StructureCommon Node CategoriesKey ConventionsSee Also