62 — BPC_DifficultyManager
Blueprint Spec — UE 5.5–5.7
Parent Class
ActorComponent
Dependencies
Purpose
Central difficulty orchestrator. Dynamically adjusts game challenge based on player performance metrics and explicit difficulty profile settings. Operates as a non-intrusive governor that tunes encounter intensity, resource availability, AI aggression, puzzle complexity, and survival pressure without direct player awareness (unless overridden by explicit difficulty mode selection).
Variables
| Name |
Type |
Description |
CurrentDifficulty |
EGameDifficulty |
Active difficulty preset |
bIsAdaptive |
Bool |
Auto-adjust based on performance |
AdaptiveBias |
Float (0.0–1.0) |
Current adaptive tuning bias |
PlayerEfficiencyScore |
Float (0.0–1.0) |
Rolling efficiency metric |
PlayerSurvivalScore |
Float (0.0–1.0) |
Rolling survival metric |
ExplorationThoroughness |
Float (0.0–1.0) |
How much player explores |
ResourceConsumptionRate |
Float |
Scarcity/frequency of resources |
bIsPaused |
Bool |
Pause all difficulty adjustments |
AdjustmentCooldown |
Float |
Seconds between recalibrations |
LastAdjustmentTime |
Float |
Timestamp of last adjustment |
PerformanceWindow |
TArray<Float> |
Sliding window of recent metric samples |
MaxWindowSize |
Int |
Max samples before averaging |
Enums
| Enum |
Values |
Description |
EGameDifficulty |
Story, Easy, Normal, Hard, Survival, Adaptive |
Difficulty presets |
Structs
| Struct |
Fields |
Description |
FDifficultyParams |
HealthMultiplier, DamageMultiplier, AmmoScarcity, EnemyAggression, PuzzleComplexity, FearIntensity, ReviveCount, CheckpointFrequency, TimedPressure |
Tuning package |
Functions
| Name |
Inputs |
Outputs |
Description |
Initialize |
Difficulty: EGameDifficulty |
— |
Set initial difficulty state |
SetDifficulty |
Difficulty: EGameDifficulty |
— |
Apply explicit difficulty preset |
SetAdaptiveMode |
bEnabled: Bool |
— |
Toggle adaptive adjustment |
RecalculateDifficulty |
— |
— |
Analyze metrics and adjust |
GetCurrentParams |
— |
FDifficultyParams |
Return current tuning |
ApplyHealthMultiplier |
BaseValue: Float |
Float |
Scaled health |
ApplyDamageMultiplier |
BaseValue: Float |
Float |
Scaled damage |
GetAmmoScarcity |
— |
Float |
0.0 = abundant, 1.0 = scarce |
GetEnemyAggressionModifier |
— |
Float |
Multiplier for AI aggression |
GetFearIntensityModifier |
— |
Float |
Scare system intensity |
GetReviveLimit |
— |
Int |
Max revives allowed |
GetCheckpointFrequency |
— |
Float |
Time between auto-saves |
IsTimedPressureActive |
— |
Bool |
Survival timer enabled |
PauseAdjustments |
bPaused: Bool |
— |
Freeze recalibration |
Event Dispatchers
| Name |
Parameters |
Fired When |
OnDifficultyChanged |
NewDifficulty: EGameDifficulty |
Difficulty preset changes |
OnAdaptiveShift |
ShiftAmount: Float |
Adaptive tuning adjusts |
OnPerformanceWarning |
Metric: EPerformanceMetric, Value: Float |
Player struggling/excelling |
Blueprint Flow
Communications With
Reuse Notes
- Single instance per game (attach to GameMode or persistent GameState)
- Designed to be optional; game works without it using static defaults
- Adaptive mode is additive; explicit difficulty modes override everything
- Performance window smooths out spikes before adjustment triggers
- All tuning values are configurable at runtime via console or debug menu