API Reference
Complete C++ class documentation for ElysImpact. All public symbols use the ERP_ / UERP_ / FERP_ prefix.
UERP_ImpactStatics
Source/ElysImpact/Public/Core/UERP_ImpactStatics.h
Blueprint function library — the primary entry point for playing responses and managing global state.
Playback
static UERP_ImpactSession* PlayResponse(
const UObject* WorldContextObject,
AActor* Target,
UERP_ImpactResponseAsset* Asset,
float IntensityOverride = 1.f);
Plays a Response Asset on Target. Returns the created session, or nullptr if culled (muted channel, zero budget, etc.).
static UERP_ImpactSession* PlayResponseWithContext(
const UObject* WorldContextObject,
UERP_ImpactResponseAsset* Asset,
FERP_ImpactContext Context);
Plays with a full impact context. Use when you need Source, Magnitude, ImpactPoint, or EventTag.
static UERP_ImpactSession* PlayResponseExpanded(
const UObject* WorldContextObject,
UERP_ImpactResponseAsset* Asset,
AActor* Target,
AActor* Source,
float Magnitude,
FVector ImpactPoint,
FVector ImpactNormal,
FGameplayTag EventTag,
float IntensityOverride);
Expanded variant with all context fields as individual parameters. Used internally by the Play Impact Response Blueprint node; direct Blueprint use is possible but the dedicated node is preferred.
static void StopSession(const UObject* WorldContextObject, UERP_ImpactSession* Session);
Stops a specific playback session immediately.
static void StopAllOnActor(const UObject* WorldContextObject, AActor* Target);
Stops all active sessions targeting a given actor.
Context Helpers
static FERP_ImpactContext MakeImpactContext(AActor* Target, float Magnitude = 1.f);
Builds a minimal context from a target and optional magnitude.
static FERP_ImpactContext MakeImpactContextFromHit(const FHitResult& Hit, float Magnitude = 1.f);
Builds a context from a hit result (sets Target, ImpactPoint, ImpactNormal, Magnitude automatically).
Feel Profile
static void SetFeelProfile(const UObject* WorldContextObject, UERP_FeelProfile* Profile);
Sets the active Feel Profile. All responses are immediately affected. Pass nullptr to clear.
Channels
static void MuteChannel(const UObject* WorldContextObject, FGameplayTag Channel);
static void UnmuteChannel(const UObject* WorldContextObject, FGameplayTag Channel);
static void SetChannelIntensity(const UObject* WorldContextObject, FGameplayTag Channel, float Intensity);
Control channel muting and per-channel intensity multipliers.
Global Intensity
static void SetGlobalIntensity(const UObject* WorldContextObject, float Intensity);
Sets the global multiplier applied to all responses. 0 = silent, 1 = normal, > 1 = amplified.
Dramatic Intensity
static float GetDramaticIntensity(const UObject* WorldContextObject, const AActor* Actor);
Returns the current Dramatic Intensity for an actor, normalized to [0, 1].
static void ResetDramaticIntensity(const UObject* WorldContextObject, AActor* Actor);
Resets the Dramatic Intensity of an actor to zero.
UERP_ImpactSubsystem
Source/ElysImpact/Public/Core/UERP_ImpactSubsystem.h
UGameInstanceSubsystem + FTickableGameObject. Global runtime state manager.
Static Accessor
static UERP_ImpactSubsystem* Get(const UObject* WorldContextObject);
Returns the subsystem instance. Returns nullptr if the GameInstance is not available.
Session Management
UERP_ImpactSession* CreateSession(
UERP_ImpactResponseAsset* Asset,
const FERP_ImpactContext& Context);
Creates and immediately starts a session. Applies channel filtering, Feel Profile, Dramatic Intensity, and Choreography. Returns nullptr if culled.
void StopSession(UERP_ImpactSession* Session);
void StopAllOnActor(AActor* Target);
Force-stop sessions.
Dramatic Intensity
UFUNCTION(BlueprintPure) float GetDramaticIntensity(const AActor* Actor) const;
UFUNCTION(BlueprintPure) float GetNormalizedDramaticIntensity(const AActor* Actor) const;
UFUNCTION(BlueprintCallable) void ResetDramaticIntensity(AActor* Actor);
void AccumulateDramaticIntensity(AActor* Actor, float Magnitude, float Contribution);
Feel Profile
UFUNCTION(BlueprintCallable) void SetFeelProfile(UERP_FeelProfile* Profile);
UFUNCTION(BlueprintPure) UERP_FeelProfile* GetFeelProfile() const;
Channels
UFUNCTION(BlueprintCallable) void MuteChannel(FGameplayTag Channel);
UFUNCTION(BlueprintCallable) void UnmuteChannel(FGameplayTag Channel);
UFUNCTION(BlueprintPure) bool IsChannelMuted(FGameplayTag Channel) const;
UFUNCTION(BlueprintCallable) void SetChannelIntensity(FGameplayTag Channel, float Intensity);
UFUNCTION(BlueprintPure) float GetChannelIntensity(FGameplayTag Channel) const;
Global Settings
UFUNCTION(BlueprintCallable) void SetGlobalIntensity(float Intensity);
UFUNCTION(BlueprintPure) float GetGlobalIntensity() const;
UFUNCTION(BlueprintCallable) void SetHandlerBudget(int32 MaxConcurrent);
UFUNCTION(BlueprintPure) int32 GetActiveHandlerCount() const;
UFUNCTION(BlueprintPure) int32 GetActiveSessionCount() const;
Handler Ticking
void RegisterTickingHandler(UERP_ImpactHandler* Handler);
Called by animated handlers from Play_Internal. Adds the handler to the per-frame tick list.
UERP_ImpactResponseAsset
Source/ElysImpact/Public/Core/UERP_ImpactResponseAsset.h
UDataAsset. The primary authoring unit — groups handlers into a reusable game-feel preset.
Properties
| Property | Type | Default | Description |
|---|---|---|---|
Handlers | TArray<UERP_ImpactHandler*> (Instanced) | empty | Handler instances that fire together. Edit inline in the Details panel. |
IntensityMultiplier | float (≥0) | 1.0 | Asset-level intensity scale. |
Channels | FGameplayTagContainer | empty | Channel tags for group muting/amplification. |
ChoreographyGroup | FERP_ChoreographyGroup | — | Choreography group configuration. |
DramaticContribution | float (0–5) | 0.5 | DI gained per play = DramaticContribution × Magnitude. Set to 0 to exclude from DI. |
ReplicationMode | ERP_EImpactReplicationMode | LocalOnly | Network replication behavior. |
AssetColor | FLinearColor | orange | Editor content browser tint. |
Creation
In the Content Browser: Right-click → Miscellaneous → Data Asset → UERP_ImpactResponseAsset.
FERP_ImpactContext
Source/ElysImpact/Public/Core/ERP_ImpactTypes.h
USTRUCT(BlueprintType). Context passed to every PlayResponse call and available to every handler.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
Target | AActor* | null | Actor receiving the response. Required. |
Source | AActor* | null | Actor that caused the event (attacker, projectile). |
Instigator | AController* | null | Instigating controller. |
EventTag | FGameplayTag | none | Semantic event tag (e.g., ImpactEvent.Hit.Critical). |
Magnitude | float (≥0) | 1.0 | Raw event magnitude (damage dealt, force, etc.). Scales DI accumulation. |
ImpactPoint | FVector | zero | World-space impact location. |
ImpactNormal | FVector | up | World-space impact surface normal. |
IntensityOverride | float (≥0) | 1.0 | Per-call intensity multiplier stacked on asset and global intensity. |
bSkipReplication | bool | false | When true, this session is not replicated regardless of asset ReplicationMode. |
Constructors
// Default
FERP_ImpactContext() = default;
// Convenience: target + magnitude
explicit FERP_ImpactContext(AActor* InTarget, float InMagnitude = 1.f);
UERP_ImpactSession
Source/ElysImpact/Public/Core/UERP_ImpactSession.h
UObject. Isolated runtime state for a single PlayResponse call. Do not create manually — always go through UERP_ImpactStatics::PlayResponse.
Queries
bool IsComplete() const;
bool HasStarted() const;
const FERP_ImpactContext& GetContext() const;
float GetCombinedIntensity() const;
ERP_EChoreographyRole GetChoreographyRole() const;
Event
FERP_OnSessionComplete OnComplete;
Non-dynamic multicast delegate fired when all handlers have completed. Bound internally by the subsystem. You may also bind from C++:
Session->OnComplete.AddUObject(this, &UMyClass::OnResponseDone);
UERP_ImpactHandler
Source/ElysImpact/Public/Core/UERP_ImpactHandler.h
UObject (Abstract, EditInlineNew). Base class for all handlers.
Lifecycle (for custom handler authors)
// Entry point called by the session. Runs pre-checks, then calls Play_Internal.
void Play(UERP_ImpactSession* InOwningSession, const FERP_ImpactContext& Context, float CombinedIntensity);
// Override to implement handler logic. Called after all checks pass.
virtual void Play_Internal(UERP_ImpactSession* InOwningSession, const FERP_ImpactContext& Context, float FinalIntensity) {}
// Per-frame update for animated handlers.
virtual void TickHandler(float DeltaTime) {}
// Return the expected duration. 0 = instant. -1 = indefinite.
virtual float GetDuration() const { return 0.f; }
// Return true to receive TickHandler calls.
virtual bool NeedsTick() const { return false; }
// Call from Play_Internal when animation completes.
void MarkComplete();
// Register for ticking. Call from Play_Internal if NeedsTick() returns true.
void RegisterForTick();
// Cancel this handler immediately.
virtual void Stop();
Writing a Custom Handler
UCLASS(EditInlineNew, BlueprintType)
class MYPLUGIN_API UMyCustomHandler : public UERP_ImpactHandler
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "My Handler")
float MyProperty = 1.f;
virtual float GetDuration() const override { return Duration; }
virtual bool NeedsTick() const override { return true; }
virtual void TickHandler(float DeltaTime) override;
virtual void Stop() override;
protected:
virtual void Play_Internal(UERP_ImpactSession* InOwningSession,
const FERP_ImpactContext& Context,
float FinalIntensity) override;
private:
UPROPERTY(EditAnywhere, Category = "My Handler", meta = (ClampMin = "0.01"))
float Duration = 0.5f;
float Elapsed = 0.f;
};
In Play_Internal:
- Cache what you need from
ContextandFinalIntensity. - Call
RegisterForTick()ifNeedsTick()is true. - For instant handlers, call
MarkComplete()at the end. - For timed handlers, call
MarkComplete()inTickHandlerwhenElapsed >= Duration.
UERP_ImpactComponent
Source/ElysImpact/Public/Core/UERP_ImpactComponent.h
UActorComponent. Optional per-actor convenience component.
Blueprint API
UFUNCTION(BlueprintCallable)
UERP_ImpactSession* PlayResponse(UERP_ImpactResponseAsset* Asset, float IntensityOverride = 1.f);
UFUNCTION(BlueprintCallable)
UERP_ImpactSession* PlayResponseWithContext(UERP_ImpactResponseAsset* Asset, FERP_ImpactContext Context);
UFUNCTION(BlueprintCallable) void StopAll();
UFUNCTION(BlueprintPure) float GetDramaticIntensity() const;
UFUNCTION(BlueprintCallable) void ResetDramaticIntensity();
Configuration
| Property | Type | Default | Description |
|---|---|---|---|
DefaultIntensity | float (≥0) | 1.0 | Per-actor intensity applied on top of each call's IntensityOverride. |
MutedChannels | FGameplayTagContainer | empty | Per-actor channel muting (only affects responses on this actor). |
Enums
ERP_EImpactReplicationMode
| Value | Description |
|---|---|
LocalOnly | Play only on the calling machine. No replication. |
ServerToClients | Server plays and multicasts to all clients. |
LocalThenServer | Play locally immediately; server reconciles. |
ERP_EChoreographyRole
| Value | Description |
|---|---|
Primary | Actor is the main responder (plays full response). |
Secondary | Actor plays a reduced secondary response. |
Suppressed | Actor is suppressed and plays nothing. |
ERP_EBeatDivision
| Value | Description |
|---|---|
Whole | Quantize to whole note. |
Half | Quantize to half note. |
Quarter | Quantize to quarter note (beat). |
Eighth | Quantize to eighth note. |
Sixteenth | Quantize to sixteenth note. |
Intensity Pipeline
The final intensity applied to each handler is:
FinalIntensity =
Context.IntensityOverride (per-call)
× Asset.IntensityMultiplier (asset-level)
× ChannelIntensity(Channel) (channel)
× GlobalIntensity (global)
× DramaticIntensityModifier (DI curve from FeelProfile)
× Handler.IntensityScale (per-handler)
± Handler.IntensityRandomRange (random variance)
× DistanceFade(Camera) (LOD)