BlaziumGoapWorldState

Inherits: RefCounted < Object

Contains native dictionaries representing the current state of the game world.

Description

BlaziumGoapWorldState acts as the global blackboard for a BlaziumGoapAgent, mapping literal string keys to boolean, float, int, or generic object states. The planner uses these properties statically, while action executions mutate the state actively via set_state() upon finishing.

Variables bind intuitively across varying scalar definitions identically in C++ logic:

var valid = BlaziumGoapWorldState.is_satisfied(true, true)
print(valid) # True outputs True!

# Mathematical checks execute automatically:
valid = BlaziumGoapWorldState.is_satisfied(5.0, 5)
print(valid) # Matches securely irrespective of typing formats!

Properties

Dictionary

state

{}

Methods

void

clear_state()

void

erase_state(state_name: StringName)

Array

get_elements() const

Variant

get_state(state_name: StringName, default: Variant = null) const

bool

is_satisfied(blackboard_value: Variant, desired_value: Variant) static

void

set_state(state_name: StringName, value: Variant)


Signals

state_updated() 🔗

Emitted explicitly whenever the internal state dictionary adds, updates, or erases values securely.


Property Descriptions

Dictionary state = {} 🔗

Manages the raw data mappings internally. Changing it emits state_updated.


Method Descriptions

void clear_state() 🔗

Erases all key-value entries currently tracked in the state dictionary.


void erase_state(state_name: StringName) 🔗

Removes the specific state_name from the state dictionary if it exists.


Array get_elements() const 🔗

Returns an Array formatted strictly for the built-in Editor Debugger natively syncing property panels.


Variant get_state(state_name: StringName, default: Variant = null) const 🔗

Accesses the state matching state_name, falling back to default if it is unregistered.


bool is_satisfied(blackboard_value: Variant, desired_value: Variant) static 🔗

Evaluates whether a value present in the blackboard_value fully satisfies the requirements of a target desired_value, securely handling integer matching against float bounds dynamically.


void set_state(state_name: StringName, value: Variant) 🔗

Binds the given value mapping strictly to state_name.