The Consequence Scripting Manager is an optional Blueprint class that provides project-specific hooks into global Consequence runtime behavior.
Use it when your project needs to extend Consequence with game-specific logic without modifying the Consequence plugin itself.
Create a Blueprint class inheriting from:
ConsequenceScriptingManager
Then open:
Project Settings → Plugins → Consequence Runtime Settings
and assign your Blueprint to:
Scripting Manager Class
When the Consequence System initializes at runtime, it will automatically create and manage an instance of the configured Scripting Manager.
You do not need to place the Scripting Manager in a level or create it manually.
See Engine Settings for the other Consequence Runtime Settings.
The Scripting Manager provides optional hooks for project startup and shutdown.
Initialize Blueprint
Called after the Consequence System creates and initializes the Scripting Manager.
Use this for any project-specific setup that should happen when Consequence becomes available.
Deinitialize
Called when the Consequence System deinitializes.
Use this to perform any project-specific cleanup associated with your Scripting Manager.
Payloads can request project-specific behavior using the Operation Payload type.
Override:
Handle Payload Operation
to define how your project responds to these operations.
The function receives:
A common convention is to use the first Payload Fact to identify the operation being requested, with any additional Facts or the numeric value supplying parameters.
This allows narrative content to request game-specific actions while keeping the implementation of those actions inside your game.
See Facts and Game State for more information about Payloads.
Consequence Payloads can also trigger another Consequence Event.
Handle Payload Trigger Event
provides the behavior used for Trigger Event Payloads and can be overridden if your project needs custom routing or context.
By default, the first Gameplay Tag supplied by the Payload identifies the Consequence Trigger Tag to fire.
A second optional tag can identify either:
Speaker-selection tags should use the:
Consequence.SpeakerSelection
Gameplay Tag hierarchy.
Consequence will still attempt to trigger the Event if no optional speaker is supplied or resolved.
Override:
Select Speaker Based On Selection Tag
when your project uses Consequence.SpeakerSelection tags to describe game-specific ways of choosing a speaker.
For example, a project might define selection tags representing concepts such as:
Consequence.SpeakerSelection.NearestCompanion
or:
Consequence.SpeakerSelection.CurrentTarget
The exact tags and selection logic are project-defined.
The function receives the Payload Facts, the requested selection tag, and the most recent speaking Actor where available, and returns the Actor that should be used as the speaker for the new Event.
Override:
Select Fact Context Objects For Payload Trigger Event
to provide additional UObject context for an Event triggered from a Payload.
This is useful when the new dialogue query needs information from game objects related to the previous conversation or the gameplay event that caused it.
The function can also provide a replacement speaker Actor if the project determines that a different Actor should be used after gathering the relevant context.
The Scripting Manager can add game-specific context immediately before Consequence performs dialogue selection.
Override:
Handle Additional Query Context
to modify the Additional Context of a Consequence Event Trigger before the best matching dialogue is selected.
This is useful for temporary information that should influence the current query but should not be permanently stored as saved Facts.
Examples include:
Additional context can include temporary true Facts, numeric Fact Values, and UObject context references.
See Facts and Game State for more information about temporary query context.
Override:
Handle Direct Event Query Context
to provide the same kind of additional context when a Consequence Event is being triggered directly by Event reference rather than selected through a Trigger Tag.
This is useful if Line Conditions within a directly triggered Event still depend on temporary game context.
Override:
Determine Subtitle Tier
to assign a project-specific display tier to a subtitle.
The function receives the current Consequence Subtitle Data by reference, allowing you to modify its Tier value before the subtitle line widget handles its final presentation.
Your Subtitle Line Widget can then override:
Handle Subtitle Tier
to change visual treatment based on that value.
For example, a project could use different subtitle tiers for foreground conversations, background dialogue, radio dialogue, or other project-specific presentation categories.
See Subtitle Widgets for more information.
The Scripting Manager provides several hooks used by Consequence's subtitle text processing:
Get Hero Gender
Returns the current gender to use when resolving text referring to the player-controlled hero.
Get Hero Actor
Returns the Actor that should be considered the hero. Override this if your project does not use Unreal's default Player Character for this purpose.
Get Speaker Gender
Returns the gender to use when resolving gender-aware text relating to the current speaking Actor.
Get Target Gender
Returns the gender to use when resolving gender-aware text relating to the target Actor associated with the subtitle.
These hooks allow localized FText gender formatting to use the correct runtime context.
See Localization for more information about Consequence's Unreal localization workflow.
Override:
Handle Choice Input
if your project needs additional game-specific behavior when the player selects a dialogue choice.
This hook is called by the Consequence System as part of choice input handling.
The configured Consequence Subtitle Widget is also given the choice input so that its displayed choice state can respond appropriately.
When your project loads a saved game or otherwise restores gameplay state, call:
Respawned Or Loaded From Save
on the Consequence System as part of your game's load / respawn process.
The Scripting Manager's corresponding:
Respawned Or Loaded From Save
hook is then called, allowing project-specific logic to respond to the same event.
This is useful when your game needs to reset or rebuild other systems alongside Consequence's saved dialogue state, cooldowns, and currently playing Conversations.