21#include <unordered_map>
25#include "../Editor/ConditionPreset/NodeConditionRef.h"
26#include "../Editor/ConditionPreset/DynamicDataPin.h"
27#include "../Editor/ConditionPreset/ConditionPreset.h"
28#include "../BlueprintEditor/ConditionRef.h"
29#include "../BlueprintEditor/MathOpOperand.h"
30#include "../json_helper.h"
114 std::unordered_map<std::string, ParameterBinding>
Parameters;
189 std::vector<TaskNodeDefinition>
Nodes;
ComponentTypeID GetComponentTypeID_Static()
Core enumerations and TaskValue type-safe variant for the Atomic Task System.
Immutable, shareable task graph asset.
std::vector< TaskNodeDefinition > Nodes
All graph nodes.
std::vector< ExecPinConnection > ExecConnections
Explicit exec connections (ATS VS only)
bool IsSubGraph
True if this template is a SubGraph.
std::string Name
Friendly name of this template (e.g. "PatrolBehaviour")
std::vector< BlackboardEntry > Blackboard
Local blackboard declared in this graph.
std::vector< SubGraphParameterDef > InputParameters
Declared inputs (for subgraphs)
int32_t RootNodeID
ID of the root node (must exist in Nodes)
int SanitizeExecConnections()
Phase 24.3 - Poka-Yoke: Sanitizes exec connections to remove invalid links.
void BuildLookupCache()
Rebuilds the internal ID-to-node lookup map from the Nodes vector.
const TaskNodeDefinition * GetNode(int32_t nodeId) const
Returns a pointer to the node with the given ID, or nullptr.
bool Validate() const
Validates the structural integrity of the template.
json GlobalVariableValues
Stores JSON representation of global variable values for this specific graph instance.
std::vector< SubGraphParameterDef > OutputParameters
Declared outputs (for subgraphs)
std::vector< VariableDefinition > LocalVariables
Blackboard schema.
int32_t EntryPointID
ID of the EntryPoint node (for VS graphs)
std::string GraphType
Graph type: "BehaviorTree" (legacy) or "VisualScript" (ATS VS)
std::vector< DataPinConnection > DataConnections
Explicit data connections (ATS VS only)
std::vector< ConditionPreset > Presets
Presets are now stored in the graph JSON, not in external files.
std::unordered_map< int32_t, const TaskNodeDefinition * > m_nodeLookup
Fast lookup: node ID -> pointer into Nodes vector.
std::string Description
Optional human-readable description.
C++14-compliant type-safe value container for task parameters.
< Provides AssetID and INVALID_ASSET_ID
VariableType
Type tags used by TaskValue to identify stored data.
@ None
Uninitialized / empty value.
ParameterBindingType
Describes how a parameter value is provided to a task node.
@ Literal
Value is embedded directly in the template.
TaskNodeType
Identifies the role of a node in the task graph.
@ AtomicTask
Leaf node that executes a single atomic task.
constexpr int32_t NODE_INDEX_NONE
Sentinel value for "no node" in node index / ID fields.
Single entry in the graph's declared blackboard schema (local or global).
bool IsGlobal
false = local scope, true = global BB
Explicit connection between an output data pin of a source node and an input data pin of a target nod...
std::string TargetPinName
std::string SourcePinName
Explicit connection between a named exec-out pin of a source node and the exec-in pin of a target nod...
std::string SourcePinName
e.g. "Then", "Else", "Loop", "Completed"
std::string TargetPinName
e.g. "In"
Complete reference for a MathOp node: left operand, operator, right operand.
Describes how a single parameter value is supplied to a task node.
TaskValue LiteralValue
Used when Type == Literal.
std::string VariableName
Used when Type == LocalVariable.
ParameterBindingType Type
Binding mode.
Full description of a single node in the task graph.
MathOpRef mathOpRef
For MathOp: complete operand configuration (left operand, operator, right operand).
std::vector< NodeConditionRef > conditionRefs
Multi-condition refs to global presets (Phase 24)
int32_t NextOnSuccess
ID of next node on success (NODE_INDEX_NONE = none)
std::string SubGraphPath
For SubGraph: path to the sub-graph JSON.
std::vector< Condition > conditions
For Branch/While: structured condition list (implicit AND)
std::string BBKey
For GetBBValue/SetBBValue: BB key (scope:key)
std::vector< std::string > SwitchCases
For Switch: ordered case labels (legacy; prefer switchCases)
std::string ConditionID
For Branch/While/Switch: ATS condition ID.
std::vector< int32_t > ChildrenIDs
Child node IDs (control-flow nodes only; empty for AtomicTask/Decorator leaf)
std::string MathOperator
For MathOp: "+", "-", "*", "/".
float EditorPosY
Canvas Y position loaded from JSON.
std::string AtomicTaskID
Atomic task type identifier (used when Type == AtomicTask)
std::string switchVariable
For Switch: BB key of the variable to switch on.
float EditorPosX
Canvas X position loaded from JSON.
int32_t NextOnFailure
ID of next node on failure (NODE_INDEX_NONE = none)
TaskNodeType Type
Node role.
std::vector< DataPinDefinition > DataPins
Data pins declared on this node.
std::vector< ConditionRef > conditionOperandRefs
Parallel to conditions[]: each entry stores the OperandRef->DynamicDataPin UUID mapping for the corre...
std::unordered_map< std::string, ParameterBinding > InputParams
Input parameter bindings.
std::unordered_map< std::string, std::string > OutputParams
Output param -> BB key mapping.
std::vector< SwitchCaseDefinition > switchCases
For Switch: structured case definitions.
std::string NodeName
Human-readable name.
std::unordered_map< std::string, ParameterBinding > Parameters
Named parameter bindings passed to the atomic task.
std::vector< DynamicDataPin > dynamicPins
Dynamic data-input pins for Pin-mode operands (Phase 24)
std::vector< std::string > DynamicExecOutputPins
For VSSequence: dynamically-added exec-out pins beyond the default "Out".
float DelaySeconds
For Delay: duration in seconds.
bool HasEditorPos
True when EditorPosX/Y were loaded from JSON.
int32_t NodeID
Unique ID within this template.
Declares a single variable in the task graph's blackboard schema.
std::string Name
Variable name (must be unique within the template)
bool IsLocal
true = local BB; false = global BB (future)
VariableType Type
Declared type.
TaskValue DefaultValue
Initial value (used by LocalBlackboard::Reset)