Blueprint API Reference
This page provides a detailed reference for all the custom Blueprint nodes provided by the FactsDB plugin.
Main K2Nodes
These are the primary nodes you will use to interact with the FactsDB system.
Get Fact by Tag
A pure node that retrieves the value of a single fact from a specified context.
- Context ID (In): The unique runtime ID of the context to read from.
- Value (Out): The current value of the fact. The pin's data type is dynamically determined by the
Fact To Access
selected in the node's Details panel. - Operation Result (Out): An
FFactOperationResult
struct. Break this to checkbSuccess
to see if the fact was found.
Update Fact by Tag
An execution node that sets the value of a single fact in a specified context.
- Exec (In/Out): Standard execution pins.
- Context ID (In): The unique runtime ID of the context to write to.
- Value (In): The new value to assign to the fact. The pin's data type is dynamically determined.
- Operation Result (Out): An
FFactOperationResult
struct.bSuccess
will be false if the update failed (e.g., no network authority, or the fact is read-only).
Get Multiple Facts
A pure node that retrieves the values of several facts from a single context in one efficient operation.
- Context ID (In): The context to read from.
- Fact Output Pins (Out): The node dynamically generates one output value pin for each fact listed in its Details panel configuration.
- Operation Result (Out): An
FFactBatchQueryResult
struct. Break this to see if the overall operation was successful and which, if any, facts were not found.
Evaluate Query
A pure node that evaluates a data-driven query and returns a boolean result.
- Target Context (In): The primary context the query will be evaluated against.
- Instigator Context (In): A secondary context, often representing the actor initiating the query (e.g., the player).
- Return Value (Out): A boolean that is
true
if the query's conditions are met, andfalse
otherwise.
Asynchronous Nodes
These latent nodes handle operations that occur over time.
Listen For Fact Changes
An asynchronous node that fires an event every time a specific fact (or any fact) changes.
- Node Configuration: The node's behavior is configured in the Details panel via the
Listen Level
property, which changes the available input pins. - On Fact Changed (Out Exec): The execution pin that fires when a matching fact is updated.
- Data Pins (Out): Provides the
SourceComponent
of the change, theFactDefinitionTag
that changed, and theOldValue
andNewValue
. - Then (Out Exec): Fires once immediately after the listener has been successfully activated.
- Async Action (Out): Outputs the listener object itself, which can be stored and used to
Cancel
the listener later.
Wait For Fact Value
An asynchronous node that waits until a specific fact meets a certain value condition.
- Expected Value (In): The value to compare against. The pin type is resolved dynamically.
- Comparison Type (In): The type of comparison to perform (Equal, NotEqual, Greater, etc.).
- Timeout (In): How long to wait in seconds before giving up. A value of
0
or less means wait forever. - On Condition Met (Out Exec): Fires once when the fact's value satisfies the condition.
- On Timeout (Out Exec): Fires if the timeout duration is reached before the condition is met.
- Current Fact Value (Out): Provides the fact's value at the moment the condition was met or the timeout occurred.
Utility Nodes
Make Fact Update Payload
A pure node used to construct a single entry for a batch update operation.
- Inputs: Takes a
Context ID
and aValue
for a specific fact (resolved via the Details panel). - Payload (Out): Outputs a single
FFactBatchUpdatePayload
struct. - Usage: Use this node with a
Make Array
node to build a list of payloads to pass into theUpdate Facts in Batch
function.
Update Facts in Batch (Function)
A standard library function that takes an array of payloads and applies all the changes in one efficient, atomic operation. This is the most performant way to update many facts at once as it only triggers a single batch of change events.
Fact Action: [Action Name] (Dynamic)
These nodes are generated dynamically for every Blueprint class that inherits from UFactAction_Async
. They provide a powerful way to create complex, reusable, and stateful asynchronous gameplay logic.
- Inputs:
Activate
andCancel
execution pins. Data inputs depend on the properties exposed in the specific action's Blueprint class. - Outputs:
OnSuccess
andOnFailure
execution pins, which are triggered from within the action's own graph logic. Also outputs theActionObject
instance.