Branch Node
Overview
Branch Nodes are flow-control nodes used to evaluate conditions and determine which execution path the graph should follow. They have a True input and a False input, along with a condition type input to determin whether forward the True input or False input.
Branch Nodes enable conditional logic such as comparisons, checks, and rule evaluation within the graph system.

Purpose
Branch Nodes are used to:
- Control execution flow based on conditions
- Compare values and make decisions
- Split execution paths dynamically
- Gate Action Nodes behind logical rules
They are the primary mechanism for implementing if / else-style logic in the graph.
Execution Behavior
-
Branch Nodesare evaluated when reached during graph execution. -
They read input values and evaluate a condition.
-
Based on the result, execution continues through the corresponding output port.
-
Branch Nodesdo not modify data directly.
Port Connection Rules
Input Ports
-
Condition Type Input Port- Can connect from a Condition Node
-
True/False Input Ports(Availability depends on the specificBranch Typeimplementation)- Can connect from Variable Node
- Can connect from Math Node
- Can connect from Entity Node
- Can connect from a
Root Node - Can connect from another
Branch Node
These ports supply the data required to evaluate the branch condition.
Output Ports
-
Outputs
-
Output ports represent possible evaluation results (for example, True / False).
-
Output port can connect to: (Availability depends on the specific
Branch Typeimplementation)Branch Nodes- Variable Node
- Math Node
- Action Node
- Condition Node
-
Execution continues through the output port that matches the evaluation result.
Common Use Cases
Typical Branch Nodes include:
-
State or flag checks
-
Cooldown or timing validation
-
Custom rule evaluation
Branch Nodes are commonly placed between the Root Node and Action Node, or chained together to form complex decision logic.
Design Philosophy
Branch Nodes focus exclusively on decision-making.
They:
-
Do not execute gameplay effects
-
Do not modify backend data
This separation improves readability, reusability, and maintainability of combat graphs.
Summary
-
Branch Nodesevaluate conditions -
They control execution flow
-
They do not produce gameplay effects
-
They direct execution toward Branch or Action Nodes