BlaziumGoapAgent

Inherits: Node < Object

An intelligent entity that evaluates goals and executes planned actions natively.

Description

BlaziumGoapAgent is the orchestration node of the native GOAP module. It requires a BlaziumGoapWorldState, a container of BlaziumGoapGoals, and a container of available BlaziumGoapActions. On every process tick, it dynamically evaluates the highest priority active goal and instructs the planner to find the cheapest path of actions. It seamlessly switches goals mid-execution if real-time factors shift Native properties.

To use, attach this node to an Actor, set its container paths, and call init(actor).

Example structural usage:

var agent = BlaziumGoapAgent.new()
var action_container = Node.new()
var goal_container = Node.new()

action_container.add_child(GatherWood.new())
action_container.add_child(BuildCampfire.new())
goal_container.add_child(GoalSurvive.new())

agent.add_child(action_container)
agent.add_child(goal_container)

agent.goals_node = agent.get_path_to(goal_container)
agent.actions_node = agent.get_path_to(action_container)

actor.add_child(agent)
agent.init(actor)

Properties

NodePath

actions_node

NodePath("")

BlaziumGoapGoal

current_goal

Array

current_plan

[]

bool

debug_enabled

false

String

debug_prefix

"goap"

NodePath

goals_node

NodePath("")

Methods

void

debug_select()

BlaziumGoapAction

get_current_action() const

BlaziumGoapWorldState

get_world_state() const

void

init(actor: Node)


Signals

action_changed(action: BlaziumGoapAction) 🔗

Emitted explicitly whenever the Agent completes an action natively and prepares the subsequent execution block.


goal_changed(goal: BlaziumGoapGoal) 🔗

Emitted securely whenever evaluation natively overrides the prior goal in favor of a new priority struct.


plan_changed(plan: Array) 🔗

Fired safely whenever a real-time path needs absolute resolving natively altering sequence bounds securely!


Property Descriptions

NodePath actions_node = NodePath("") 🔗

NodePath pointing to the node parenting the BlaziumGoapAction instances available for compilation.


BlaziumGoapGoal current_goal 🔗

The Goal currently deemed highest priority natively guiding real-time pathing.


Array current_plan = [] 🔗

  • Array get_current_plan()

An iterated Array listing the actions strictly formulated by the ActionPlanner backwards A* search sequentially.


bool debug_enabled = false 🔗

  • void set_debug_enabled(value: bool)

  • bool is_debug_enabled()

Allows engine-remote profiler integration via native Godot debugger pipelines natively tracing tree states.


String debug_prefix = "goap" 🔗

  • void set_debug_prefix(value: String)

  • String get_debug_prefix()

Used dynamically to construct signal headers mapping internally to the Godot Editor tools plugin system.


NodePath goals_node = NodePath("") 🔗

NodePath pointing to the node parenting the BlaziumGoapGoal instances tracking priorities.


Method Descriptions

void debug_select() 🔗

Forces the editor debugger visualizer to highlight this specific agent node for state tracking.


BlaziumGoapAction get_current_action() const 🔗

Returns the sequence action that the agent is currently attempting to loop via BlaziumGoapAction._perform()


BlaziumGoapWorldState get_world_state() const 🔗

Returns the global context dictionary attached to this agent.


void init(actor: Node) 🔗

Must be called manually! Automatically compiles all child Actions and Goals natively mapping them back to the provided Actor node and starting the planning loop dynamically.