Brightmare Gestaltguardbrain
Based on game build 714014 | Last updated: 2026-02-27
Overview
This brain component implements the decision-making logic for the Brightmare Gestalt Guard entity. It extends the base Brain class and defines a hierarchical behavior tree (BT) that governs movement and combat actions based on behaviour_level, proximity to players, and presence of a combat target. When active, it coordinates interactions with the combat and knownlocations components to handle aggression, relocation, and navigation.
Dependencies & Tags
- Components used:
inst.components.combat: Used to readcombat.targetduring target-facing logic.inst.components.knownlocations: Used to remember the entity's spawn point on initialization.
- Tags: None directly added/removed by this component.
Properties
| Property | Type | Default Value | Description |
|---|---|---|---|
inst | Entity | (passed) | Reference to the entity instance owned by this brain component. |
bt | BT | nil | Behavior tree instance set in OnStart(). |
Main Functions
GestaltGuardBrain:OnStart()
- Description: Initializes and assigns the behavior tree root node for the entity. Constructs a priority-based tree that evaluates high-priority conditions first: aggressive state (
behaviour_level == 3), player proximity (relocation trigger), target-facing, and finally default wandering. - Parameters: None.
- Returns: None.
GestaltGuardBrain:OnInitializationComplete()
- Description: Registers the entity's current position as its
spawnpointin theknownlocationscomponent. Prevents overwriting if aspawnpointalready exists (dont_overwrite = true). - Parameters: None.
- Returns: None.
Behavior Tree Structure
The root behavior tree is built as follows:
- Relocation Priority
- Condition:
IsPlayerTooClose(self.inst)returns true (player withinRELOCATED_DISTSQ = 9units squared). - Actions: Triggers
"relocate"state viaRelocate()and then executesStandStill.
- Condition:
- Target-Facing Priority
- Uses
FaceEntitywithGetFacingTargetandKeepFacingTargethelpers. GetFacingTargetreturnscombat.targetonly if:behaviour_level == 2, and- Target is valid, and
- Distance squared to target is
<= GETFACINGTARGET_DISTSQ(i.e., withinTUNING.GESTALTGUARD_WATCHING_RANGE).
- Uses
- Aggression (behaviour_level == 3)
- Uses
ChaseAndAttackwithATTACK_CHASE_TIME = 5.
- Uses
- Default State
Wander(self.inst, nil, nil, WANDER_TIMES)with fixed timing parameters.
Events & Listeners
None identified — this component does not register or push any events.