Skip to main content

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

PropertyTypeDefaultDescription
HandlersTArray<UERP_ImpactHandler*> (Instanced)emptyHandler instances that fire together. Edit inline in the Details panel.
IntensityMultiplierfloat (≥0)1.0Asset-level intensity scale.
ChannelsFGameplayTagContaineremptyChannel tags for group muting/amplification.
ChoreographyGroupFERP_ChoreographyGroupChoreography group configuration.
DramaticContributionfloat (0–5)0.5DI gained per play = DramaticContribution × Magnitude. Set to 0 to exclude from DI.
ReplicationModeERP_EImpactReplicationModeLocalOnlyNetwork replication behavior.
AssetColorFLinearColororangeEditor 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

FieldTypeDefaultDescription
TargetAActor*nullActor receiving the response. Required.
SourceAActor*nullActor that caused the event (attacker, projectile).
InstigatorAController*nullInstigating controller.
EventTagFGameplayTagnoneSemantic event tag (e.g., ImpactEvent.Hit.Critical).
Magnitudefloat (≥0)1.0Raw event magnitude (damage dealt, force, etc.). Scales DI accumulation.
ImpactPointFVectorzeroWorld-space impact location.
ImpactNormalFVectorupWorld-space impact surface normal.
IntensityOverridefloat (≥0)1.0Per-call intensity multiplier stacked on asset and global intensity.
bSkipReplicationboolfalseWhen 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:

  1. Cache what you need from Context and FinalIntensity.
  2. Call RegisterForTick() if NeedsTick() is true.
  3. For instant handlers, call MarkComplete() at the end.
  4. For timed handlers, call MarkComplete() in TickHandler when Elapsed >= 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

PropertyTypeDefaultDescription
DefaultIntensityfloat (≥0)1.0Per-actor intensity applied on top of each call's IntensityOverride.
MutedChannelsFGameplayTagContaineremptyPer-actor channel muting (only affects responses on this actor).

Enums

ERP_EImpactReplicationMode

ValueDescription
LocalOnlyPlay only on the calling machine. No replication.
ServerToClientsServer plays and multicasts to all clients.
LocalThenServerPlay locally immediately; server reconciles.

ERP_EChoreographyRole

ValueDescription
PrimaryActor is the main responder (plays full response).
SecondaryActor plays a reduced secondary response.
SuppressedActor is suppressed and plays nothing.

ERP_EBeatDivision

ValueDescription
WholeQuantize to whole note.
HalfQuantize to half note.
QuarterQuantize to quarter note (beat).
EighthQuantize to eighth note.
SixteenthQuantize 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)