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
Route Distance (Flowgraph Node)Closest Road (Flowgraph Node)Custom Lua (Flowgraph Node)Distance Between (Flowgraph Node)Waypoints Distance (Flowgraph Node)File Exists (Flowgraph Node)Get First Element of Table (Flowgraph Node)Get Level Data (Flowgraph Node)Get Map Objects IDs by DynField (Flowgraph Node)Get Table Value By Key (Flowgraph Node)GHOST (Flowgraph Node)Hide Loading Screen (Flowgraph Node)Color HSV (Flowgraph Node)Line Point From Xnorm (Flowgraph Node)Load Level (Flowgraph Node)Load Project (Flowgraph Node)On Menu (Flowgraph Node)Perlin Noise (Flowgraph Node)Pop Action Map (Flowgraph Node)Get Project InfoPush Action MapRandom ColorRandom NumberRandom QuaternionRandom VectorRoad PropertiesGet Navgraph RouteRoute PositionTemplate NodeTimeTimed SequenceTo NumberTo StringWorld Editor Open

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 Extensionsflowgraphnodesutil

GHOST (Flowgraph Node)

- **Node Name:** `GHOST`

Overview

  • Node Name: GHOST
  • Category: logic
  • File: extensions/flowgraph/nodes/util/ghost.lua
  • Hidden: true - not shown in the node palette

A placeholder node that represents a deserialized node whose original type no longer exists. When a flowgraph references a node type that has been removed or renamed, the ghost node preserves the original data.

Pin Schema

No pins defined. The ghost node is inert.

Internals

Key Methods

MethodDescription
init()Sets formerNodeType to "NOT GHOST"
work()Empty - does nothing
drawMiddle(builder, style)Displays the former node type name and a "Dump ghost data" button
__onSerialize()Returns the stored ghostData for re-serialization
_onDeserialized(nodeData)Sets an error, stores original type name, extracts short name, saves raw node data

How It Works

  1. When a flowgraph file is loaded and a node type cannot be found, the engine creates a GHOST node instead.
  2. _onDeserialized() is called with the original node data:
    • Sets a work error indicating the node type doesn't exist.
    • Stores the original type name in formerNodeType.
    • Extracts the last path component for the display name (e.g., [GHOST]myNode).
    • Preserves all original data in ghostData.
  3. If the flowgraph is re-saved, __onSerialize() returns the original data, allowing recovery if the node type is restored.

Usage Example

-- Ghost nodes are not manually created. They appear automatically when:
-- 1. A mod removes a custom node type
-- 2. A flowgraph file references a node that was renamed
-- 3. A project is loaded in a version missing certain nodes

-- To debug ghost data in the editor:
-- Click the "Dump ghost data" button in the node's middle area
-- The original node data will be printed to the console via dump()

Key Dependencies

  • _flowgraph_createNode() - standard node registration
  • Flowgraph deserialization system - triggers ghost creation for missing types

See Also

  • Route Distance (Flowgraph Node) - Related reference
  • Closest Road (Flowgraph Node) - Related reference
  • Custom Lua (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

Get Table Value By Key (Flowgraph Node)

- **Node Name:** `Get Table Value By Key`

Hide Loading Screen (Flowgraph Node)

- **Node Name:** `Hide Loading Screen`

On this page

OverviewPin SchemaInternalsKey MethodsHow It WorksUsage ExampleKey DependenciesSee Also