Bird Mutant Brain
Based on game build 714014 | Last updated: 2026-02-27
Overview
The BirdMutantBrain component implements the behavior tree logic for Mutant Birds (both bird_mutant and bird_mutant_spitter variants) in Don't Starve Together. It coordinates core behaviors such as panic, wall breaking, skeleton shattering, chasing and attacking swarm targets, and—specifically for spitter variants—spitting projectiles. This brain uses a priority-based behavior tree to evaluate high-priority triggers (e.g., panic, electric fences) before falling back to routine tasks like movement and combat.
Key external dependencies include the combat component for attack targeting and cooldown management, entitytracker for locating swarm targets, and several predefined behaviors (chaseandattack, panic, attackwall, leash, standstill) imported via the behaviors module.
Dependencies & Tags
- Components used:
combat,entitytracker,follower,timer,workable - Tags:
bird_mutant_spitter(conditional logic branch),playerskeleton,HAMMER_workable
Properties
No public properties are initialized or exposed by this brain component itself. Behavior state is maintained internally via the behavior tree node hierarchy and component-accessed variables (e.g., inst.components.combat.target).
Main Functions
No public methods are defined outside the constructor. The core behavior logic resides in the OnStart() method, which constructs and initializes the behavior tree.
BirdMutantBrain:OnStart()
- Description: Constructs and assigns the behavior tree for the Mutant Bird. Builds a priority-ordered sequence of behavior nodes, optionally extending it for spitter variants with spitting logic.
- Parameters: None (method of the class).
- Returns:
nil. The constructedPriorityNodetree is stored inself.bt.
The behavior tree sequence (in order of priority) includes:
- Panic triggers (electric fence, general panic).
- For spitter variants only:
WhileNodefor continuous spitting while in range (shouldspit).IfNodeto enter aStandStillnode when very close to target (shouldwaittospit).
- Skeleton breaking and wall attacking sequence (always executed first among core actions).
- Attack node, triggered if a valid target is within range (
CanBirdAttack). - Movement node (chase swarm target via
Leash). - Stand-still node (to approach/swarm near target).
- General panic fallback.
Events & Listeners
This component does not register any event listeners or fire custom events directly. Behavior transitions and state management are handled entirely through the behavior tree nodes and their action functions.