Skip to main content

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 Nodes are 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 Nodes do not modify data directly.


Port Connection Rules​

Input Ports​

  • Condition Type Input Port

  • True/False Input Ports (Availability depends on the specific Branch Type implementation)

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 Type implementation)

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 Nodes evaluate conditions

  • They control execution flow

  • They do not produce gameplay effects

  • They direct execution toward Branch or Action Nodes