BPC_EndingAccumulator — Actor Component
Blueprint Spec — UE 5.5–5.7
Parent Class
ActorComponent
Dependencies
Purpose
Evaluates all narrative flags accumulated throughout gameplay and determines which ending the player qualifies for. Supports weighted scoring systems, required flag checks, and ending priority ranking.
Responsibilities
- Maintain an ending score table (flags → points)
- Listen for narrative flag changes and accumulate score
- Evaluate ending eligibility on demand or at game-end trigger
- Rank endings by priority: specific requirements win over general
- Provide preview data to UI for ending readiness indicator
- Trigger the winning ending cutscene via
BPC_CutsceneBridge
Does NOT Handle
- Setting individual narrative flags (that is
BPC_NarrativeStateSystem)
- Playing ending cutscene sequence (that is
BPC_CutsceneBridge)
- UI display of ending readiness (that is UI layer)
Variables
| Name |
Type |
Description |
EndingDefinitions |
Array of DA_EndingData |
All possible endings loaded at game start |
EndingScores |
Map: GameplayTag → Float |
Current accumulated scores per category |
bEndingReady |
Bool |
At least one ending is achievable |
QualifiedEndings |
Array of DA_EndingData |
Endings that meet requirements |
bGameEndTriggered |
Bool |
Prevents re-evaluation after game end |
HighestPriorityEnding |
DA_EndingData |
The selected ending |
Enums
| Enum |
Values |
Description |
EEndingEvaluationMode |
OnDemand, Continuous, OnGameEndTrigger |
When to evaluate ending eligibility |
Structs
| Struct |
Fields |
Description |
FEndingScoreEntry |
FlagTag: GameplayTag, ScoreValue: Float, Category: FName |
Scores accumulate when flag is set |
FEndingQualification |
Ending: DA_EndingData, Score: Float, bRequiredFlagsMet: Bool, bExclusiveFlagsMet: Bool, Priority: Integer, bIsQualified: Bool |
Full qualification result |
Functions / Events
| Name |
Inputs |
Outputs |
Description |
InitializeEndings |
— |
— |
Load all DA_EndingData from content registry |
OnNarrativeFlagChanged |
FlagTag: GameplayTag, bIsSet: Bool |
— |
Accumulate score when flag is set |
EvaluateEndings |
— |
DA_EndingData |
Evaluate all endings, return highest priority |
GetEndingQualification |
Ending: DA_EndingData |
FEndingQualification |
Check specific ending qualification |
GetQualifiedEndings |
— |
Array of FEndingQualification |
All endings player qualifies for |
GetEndingReadinessPercentage |
— |
Float |
0-1 how close player is to any ending |
GetTotalScoreForEnding |
Ending: DA_EndingData |
Float |
Current accumulated score |
TriggerGameEnding |
OverrideEndingTag: GameplayTag (optional) |
— |
Force game end with specific or best ending |
ResetEndingState |
— |
— |
Clear scores (for new game+) |
Event Dispatchers
| Name |
Parameters |
Fired When |
OnEndingScoresUpdated |
Scores: Map of GameplayTag → Float |
Any score changes |
OnEndingQualificationChanged |
QualifiedEndings: Array of DA_EndingData |
Qualification set changed |
OnGameEndingTriggered |
SelectedEnding: DA_EndingData |
Game ending sequence begins |
OnEndingReadyChanged |
bReady: Bool |
Player became eligible / lost eligibility |
Blueprint Flow
Communications With
Reuse Notes
Completely data-driven. Designers create DA_EndingData assets with required flags, exclusive flags, score thresholds, and score entries. The priority system ensures specific endings (e.g., "True Ending") override general ones. The system supports both linear and score-based ending evaluation simultaneously.
- Renamed from
45_BPC_EndingAccumulatorSystem to BPC_EndingAccumulator per Master naming convention.
- Cross-references updated:
BPC_CheckpointSystem → BP_Checkpoint.