Documentation Index
Fetch the complete documentation index at: https://dev.docs.inworld.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview > Inworld Graph Runtime Data Goals
Class: UInworldGraphRuntimeData_Goals | Inherits from: UInworldGraphRuntimeData
Runtime data component for managing character goals and intent-driven behaviors. This runtime data component stores and manages a character’s goals, which define intent-based triggers and responses. Goals can be activated through dialogue intents or explicit triggers, enabling dynamic character behaviors based on conversation context. The component also supports dynamic parameter resolution through the IInworldGoalParameterInterface.
Methods
Reference
AddGoal
Adds a goal to the goals map.
Examples
void AddGoal(
FName Name,
const FInworldGoal& Goal
)
Parameters
| Parameter | Type | Description |
|---|
| Name | FName | |
| Goal | const FInworldGoal& | The goal to add to the goals map. |
ClearAllGoals
Removes all goals from the goals map.
Examples
CompleteGoal
Removes a goal from the goals map if it is not repeatable.
Examples
void CompleteGoal(FName GoalName)
Parameters
| Parameter | Type | Description |
|---|
| GoalName | FName | The name of the goal to complete. |
GetGoalsMapKeys
Retrieves all goal names currently stored in the goals map.
Examples
TArray<FName> GetGoalsMapKeys()
Returns
Type: TArray<FName>
Description: Array of goal names (keys from the goals map).
GetParameterSourceObject
Returns a pointer to the parameter source object.
Examples
IInworldGoalParameterInterface* GetParameterSourceObject()
Returns
Type: IInworldGoalParameterInterface*
Description: A pointer to the parameter source object.
RemoveGoal
Removes a goal from the goals map.
Examples
void RemoveGoal(FName GoalName)
Parameters
| Parameter | Type | Description |
|---|
| GoalName | FName | The name of the goal to remove. |
Set
Sets the goals data table and loads its contents into the goals map.
Examples
void Set(UDataTable* InGoalTable)
Parameters
| Parameter | Type | Description |
|---|
| InGoalTable | UDataTable* | The data table containing goal definitions. |
SetParameterSourceObject
Register a UObject that implements IInworldGoalParameterInterface as the parameter source. When a goal is “text”
triggered (meaning triggered by FInworldData_Text and NOT FInworldData_Trigger), the source object will be
queried for parameter data.
Examples
void SetParameterSourceObject(UObject* Source)
Parameters
| Parameter | Type | Description |
|---|
| Source | UObject* | The object to register as the parameter source. It must implement the |
TryGetGoal
Returns reference to an Inworld Goal by name.
Examples
bool TryGetGoal(
FName GoalName,
FInworldGoal& GoalOut
)
Parameters
| Parameter | Type | Description |
|---|
| GoalName | FName | Name of the goal to retrieve. |
| GoalOut | FInworldGoal& | Reference to store the retrieved goal in. |
Returns
Type: bool
Description: True if a goal exists with the given name, false if not.
TryGetGoalFromIntent
Returns reference to the first Inworld Goal in the goals map which has the specified intent.
Examples
bool TryGetGoalFromIntent(
FName IntentName,
FInworldGoal& GoalOut
)
Parameters
| Parameter | Type | Description |
|---|
| IntentName | FName | Name of the intent. |
| GoalOut | FInworldGoal& | Reference to store the retrieved goal in. |
Returns
Type: bool
Description: True if a goal exists with the given intent, false if not.