Skip to content

SeinARTS Effect

Class · USeinEffect : UObject

#include "Effects/SeinEffect.h"

abstract: use a subclass · can be subclassed in Blueprint · deterministic: safe in simulation code

Designer-authored effect base. Subclass in Blueprint to define behavior.

Effects are deterministic, stateless class-default strategies that run sim-side. Hooks are BlueprintImplementable — designers fill them in BP graphs; C++ provides no default behavior. Future-affecting state belongs in FSeinActiveEffect or world component storage; callbacks must never mutate this definition object.

Lifetime: pick a DurationMode (Instant / Persistent / Timed). Timed effects read Duration for the timer length; Instant/Persistent ignore it.

TickInterval semantics: Zero = no periodic firing, positive = fire OnTick every N sim-seconds while active. Orthogonal to DurationMode — a Persistent aura can periodically pulse, a Timed DoT can tick per second.

Effect / Tech

Overridable in Blueprint, with a native default

Blueprint eligibility for researching this tech (faction-specific, time-gated, map conditions). Enqueue Production runs it after the tag checks and refuses the research when it returns false. The UI asks it too through Can Enqueue Production, so it only reads.

bool CanResearch(FSeinPlayerID PlayerID) const;

Effect

Implement in Blueprint

Runs after the new instance and its tags are committed, after the On Removed events of the effects it replaced, and after its GrantedAbilities are granted. Skipped when one of those callbacks removed the effect, or destroyed the target of an Instance effect, which goes with its target. Class and Player effects outlive their target and always get On Apply. The EffectApplied visual event is queued at commit, so self-removal produces EffectApplied then EffectRemoved, never the reverse.

void OnApply(FSeinEntityHandle Target, FSeinEntityHandle Source) const;

Implement in Blueprint

Runs every Tick Interval sim-seconds while the effect is active, when Tick Interval is above zero. Delta Time is the interval. Target is the entity the effect was applied to. If a long step covers several intervals, it runs once for each.

void OnTick(FSeinEntityHandle Target, FFixedPoint DeltaTime) const;

Implement in Blueprint

Runs when a Timed effect reaches the end of its Duration, just before On Removed. It does not run for removal by other means, or for Instant and Persistent effects.

void OnExpire(FSeinEntityHandle Target) const;

Implement in Blueprint

Runs whenever the effect instance ends, after the abilities it granted are revoked. By Expiration is true when it ran out of time and for an Instant effect’s immediate removal; it is false when a Remove Effect node, a replacing effect or the source’s death removed it.

void OnRemoved(FSeinEntityHandle Target, bool bByExpiration) const;

FText DisplayName

Editable in class defaults · Blueprint read-only

Optional display name for effect lists and tooltips.

FText Description

Editable in class defaults · Blueprint read-only

Optional description for effect tooltips.

TObjectPtr<UTexture2D> Icon · default nullptr

Editable in class defaults · Blueprint read-only

Optional icon for effect lists and status indicators. Production queues use the queued entity’s identity.

FGameplayTag EffectTag

Editable in class defaults · Blueprint read-only

Tag that identifies this effect class. Remove Effects With Tag and Has Effect With Tag match against it. Class and Player effects also grant it to the owning player, which is how a researched tech shows up as a player tag.

bool bAutoGeneratedTag · default false

Read-only in Details · Blueprint read-only

Provenance flag for the auto-tag-generation system. See USeinAbility::bAutoGeneratedTag for full semantics.

ESeinModifierScope Scope · default ESeinModifierScope::Instance

Editable in class defaults · Blueprint read-only

Where this effect lives + what its modifiers target.

FGameplayTag DefaultTargetClassTag · shown when Scope == ESeinModifierScope::Class

Editable in class defaults · Blueprint read-only

For Class-scope effects: the modifier’s TargetClassTag is usually authored per-modifier, but this field lets a designer default every modifier on this effect to a single class tag. Left unset = modifiers carry their own per-entry TargetClassTag. (Design convenience, not framework-enforced.)

ESeinEffectDurationMode DurationMode · default ESeinEffectDurationMode::Instant

Editable in class defaults · Blueprint read-only

How this effect’s lifetime is handled. Instant / Persistent ignore the Duration field below; Timed reads it. The details panel hides Duration unless DurationMode is Timed.

FFixedPoint Duration · default FFixedPoint::FromInt(10) · shown when DurationMode == ESeinEffectDurationMode::Timed · min 0.0

Editable in class defaults · Blueprint read-only

Lifetime in sim-seconds. Only read when DurationMode == Timed.

FFixedPoint TickInterval · default FFixedPoint::Zero

Editable in class defaults · Blueprint read-only

Zero = no periodic firing. Positive = fire OnTick every TickInterval sim-seconds while active. Orthogonal to Duration: an effect can be finite + periodic (DoT for 30s, 1 dmg/s) or infinite + periodic (aura fires every 5s forever).

ESeinEffectStackingRule StackingRule · default ESeinEffectStackingRule::Stack

Editable in class defaults · Blueprint read-only

How re-applying this effect to a target that already has it behaves. Max Stacks sets the cap.

int32 MaxStacks · default 1 · min 1

Editable in class defaults · Blueprint read-only

Cap for stack count (Stack / Independent rules). 1 = non-stacking. Designers wanting effectively-unlimited stacks use a large number (e.g. 9999).

bool bRemoveOnSourceDeath · default false

Editable in class defaults · Blueprint read-only

When the source entity dies, remove the effect. Default false — most effects persist past source death (bleed from a dead attacker, tech modifier after the researcher-building dies). Opt in for source-dependent effects.

TArray<FSeinModifier> Modifiers

Editable in class defaults · Blueprint read-only

Changes to component and ability fields. A Persistent or Timed effect’s modifiers hold while it is active, and the fields return to their base when it ends. An Instant effect’s modifiers change the base for good, such as +10 Max Health on a level-up. The effect’s Scope says which entities they reach.

FGameplayTagContainer GrantedTags

Editable in class defaults · Blueprint read-only

Tags granted while this effect is active. Instance scope grants them to the target entity; Class/Player scope grants them to the owning player’s tag state. All paths are refcounted so overlapping grants survive removal.

FGameplayTagContainer RemoveEffectsWithTag

Editable in class defaults · Blueprint read-only

On apply, remove every active effect on the target, and every class or player effect of its owner, whose EffectTag matches a tag in this container (“anti-poison removes poison”). The removals and this effect commit together; the removed effects’ On Removed events run afterwards, before this effect’s On Apply.

TArray<TSubclassOf<USeinAbility>> GrantedAbilities

Editable in class defaults · Blueprint read-only

Ability classes granted on apply. See class docblock for fan-out rules per scope. Empty = no abilities granted.

FGameplayTag AbilityTargetClassTag

Editable in class defaults · Blueprint read-only

Entity-tag filter for Class/Player scope ability fan-out. Required for Class/Player scope — empty value skips ability grants (modifier/tag grants on the effect still apply). For Instance scope this field is ignored. Eligibility is sampled during apply, spawn replay, and owner-transfer replay (and rechecked between callback-capable grants); later standalone tag changes do not automatically grant or revoke. Example: a Vehicle Depot tech effect with AbilityTargetClassTag = Unit.Role.ConstructionWorker grants PlaceVehicleDepot to every construction unit the player owns (existing + future).

FGameplayTagContainer ForbiddenPrerequisiteTags

Editable in class defaults · Blueprint read-only

Researching this tech needs the player to hold none of these tags: Enqueue Production refuses it otherwise. For mutually exclusive picks, such as one of two upgrade branches.

C++ members (1)
  • void FindAuthoringProblems(TArray<FString>& OutProblems) const; Problems in the authored modifiers, one sentence each: a missing component, ability tag or field, an Add or Multiply on a field that isn’t a number, or an Override with no value. A Blueprint compile warns; at runtime a modifier that can’t apply is skipped with an error.