Skip to main content

Intent Nodes

GCS · Built-In Node Library

Define how an enemy chooses and previews its next behavior.

Intent nodes build reusable enemy behavior patterns. Combine leaf intents with sequencing, thresholds, weighted choices, or turn conditions, then connect the result to the enemy behavior setup.

Intent nodes build reusable enemy behavior patterns. Combine leaf intents with sequencing, thresholds, weighted choices, or turn conditions, then connect the result to the enemy behavior setup.


Node Usage

Leaf Intent

Ends an enemy's pattern-selection path and declares the intent shown before that enemy acts. Connect Out to the Action and FX chain that performs the telegraphed behavior.

Inputs

  • In(Control):Receives the selected pattern branch

Outputs

  • Out(Control):Starts the behavior executed on the enemy turn
  • Intent(String):Declared as String, but the current executor stores an IntentKind enum; String consumers receive null
  • Target(Unit reference):Declared by the node, but not populated by the current runtime

Parameters

  • IntentAttack, Defend, Buff, Debuff, Heal, Special, Multi, Hidden):Attack;Icon/tag shown by the intent UI; Hidden suppresses a normal telegraph

For Attack, Defend, and Heal, GCS scans the single Out chain for the first Deal Damage, Change Armor, or positive Change HP node and uses that amount as the preview value. The Change HP Inspector amount must itself be positive for extraction; wiring a positive value while leaving its field at 0 does not currently produce a heal preview.

Current Intent and Target outputs

The current executor stores an enum behind the declared String Intent port and never writes Target, so neither port is safe to use as its advertised type. Read the configured intent from the enemy UI, and connect an explicit unit source such as Player Unit to the behavior nodes instead

Leaf Intent node configured as Attack

Sequence Pattern

Cycles through intent branches in a fixed order, optionally repeating each branch for several enemy turns. Use it for enemies whose plan should be learnable and deterministic.

Inputs

  • In(Control):Enters the pattern during intent resolution

Outputs

  • Step0StepN(Control):One branch per Repeat Counts item, in list order

Parameters

  • Steps (Repeat Counts)(Integer list):Empty;The UI creates one Turns n row per step; each value is its consecutive-turn count and values below 1 behave as 1

After the enemy turn call returns, the pattern advances its per-enemy state. For [1, 2], it uses Step0 once, Step1 twice, then loops back to Step0. A selected step still consumes its repeat count when it is unconnected or never reaches a leaf; an empty list creates no selectable branch.

Sequence Pattern node with two steps and repeat counts

HP Threshold Pattern

Selects an intent branch from the enemy's current HP percentage. Use it for phase changes and desperation moves.

Inputs

  • In(Control):Enters the pattern during intent resolution

Outputs

  • Branch0BranchN(Control):One branch per threshold item
  • Default(Control):Used when current HP is above every listed threshold

Parameters

  • Thresholds(Percentage list):Empty;Each branch matches when current HP% is less than or equal to its threshold

Thresholds are checked from top to bottom and the first match wins. Arrange them from low to high: [25, 50] means Branch0 at 25% or less, Branch1 above 25% and at most 50%, and Default above 50%. Reversing the order would make the 25% branch unreachable.

The enemy HP percentage is calculated with integer division before it is compared with the float thresholds, so an actual 66.7% is evaluated as 66.

HP Threshold Pattern node configured with 25 and 50 percent branches

Weighted Random Pattern

Chooses one intent branch by relative weight each time the enemy plans. Use it when behavior should vary while preserving designer-controlled odds.

Inputs

  • In(Control):Enters the random choice during intent resolution

Outputs

  • Branch0BranchN(Control):One branch per weight item

Parameters

  • Branches (Weights)(Integer list):Empty;The UI creates one Weight n row per branch; each value is that branch's relative chance

Negative weights behave as zero. With [3, 1], the first branch has a 75% share and the second 25%. If every weight is zero or negative, Branch0 is selected; an empty list selects no branch.

Weighted Random Pattern node with weights 3 and 1

Once Per Battle

Chooses Body the first time this enemy reaches the node, then chooses Done for every later turn. Use it for an opener or one-time phase action.

Inputs

  • In(Control):Enters the per-battle check

Outputs

  • Body(Control):Selected once; connect it to the one-time intent path
  • Done(Control):Selected on later visits; connect it to the regular plan

Parameters: none

The fired state belongs to this node on this enemy. Selecting Body marks it fired when the enemy turn call returns, even if Body is unconnected, never reaches a leaf, or reaches an asynchronous boundary whose continuation has not finished.

Once Per Battle node with Body and Done branches

Every N Turns

Chooses Body on a repeating interval and Done on the turns between. Use it to insert a periodic heavy attack, buff, or defensive move into an enemy plan.

Inputs

  • In(Control):Enters the interval check

Outputs

  • Body(Control):Selected on every Nth visit
  • Done(Control):Selected on intervening visits

Parameters

  • Turn Interval (N)(Integer):1;Interval in enemy turns; values below 1 behave as 1

The counter is kept per enemy and advances when the enemy turn call returns, then resets after the Body visit. With N = 3, the first two visits use Done, the third uses Body, and the cycle repeats. An unconnected branch or missing leaf still consumes that visit.

Every N Turns node with Body and Done branches