BlaziumGoapAgent
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
|
||
|
||
|
||
|
||
|
Methods
void |
|
get_current_action() const |
|
get_world_state() const |
|
void |
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.
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 🔗
BlaziumGoapGoal get_current_goal()
The Goal currently deemed highest priority natively guiding real-time pathing.
Array get_current_plan()
An iterated Array listing the actions strictly formulated by the ActionPlanner backwards A* search sequentially.
Allows engine-remote profiler integration via native Godot debugger pipelines natively tracing tree states.
String debug_prefix = "goap" 🔗
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.
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.