API ReferenceGE Extensionsflowgraphnodesutilfile
Save Data (Flowgraph Node)
- **Node Name:** `Save Data`
Overview
- Node Name:
Save Data - Category:
once_instant - File:
extensions/flowgraph/nodes/util/file/saveData.lua
Saves simple data into a file for reuse across multiple sessions. Supports user-defined input pins of various types.
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
file | string (fixed) | Name of the file to save into (extension not needed) |
Additional user-defined custom input pins. Allowed types: string, number, bool, any, table, vec3, quat, color.
Internals
Key Methods
| Method | Description |
|---|---|
init(mgr) | Enables pin saving and allows custom input pins |
workOnce() | Writes each custom input pin's value to the file module |
Properties
| Property | Value |
|---|---|
savePins | true - pin configuration is persisted |
allowCustomInPins | true - user can add input pins in the editor |
allowedManualPinTypes | string, number, bool, any, table, vec3, quat, color |
How It Works
- User adds custom input pins in the flowgraph editor (e.g., a
numberpin namedscore). - When the node executes, it iterates all input pins except
flow,reset, andfile. - For each custom pin, calls
self.mgr.modules.file:write(file, pinName, value)to persist the value.
Usage Example
-- Save player progress data:
-- [Get Score] → score → [Save Data] file="progress"
-- [Get Level] → level →
-- Load it back in a future session:
-- [Load Data] file="progress" → score, levelKey Dependencies
self.mgr.modules.file- flowgraph file module for persistent key/value storage
See Also
- Load Data (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide