Choose your operating system:
Windows
macOS
Linux
Module |
|
Header |
/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/GameplayEffect.h |
Include |
#include "GameplayEffect.h" |
USTRUCT(BlueprintType)
struct FGameplayEffectSpec
GameplayEffect Specification. Tells us: -What UGameplayEffect (const data) -What Level -Who instigated
FGameplayEffectSpec is modifiable. We start with initial conditions and modifications be applied to it. In this sense, it is stateful/mutable but it is still distinct from an FActiveGameplayEffect which in an applied instance of an FGameplayEffectSpec.
Name | Description | ||
---|---|---|---|
|
uint32: 1 |
bCompletedSourceAttributeCapture |
Whether the spec has had its source attribute capture completed or not yet |
|
uint32: 1 |
bCompletedTargetAttributeCapture |
Whether the spec has had its target attribute capture completed or not yet |
|
uint32: 1 |
bDurationLocked |
Whether the duration of the spec is locked or not; If it is, attempts to set it will fail |
|
CapturedRelevantAttributes |
Attributes captured by the spec that are relevant to custom calculations, potentially in owned modifiers, etc.; NOT replicated to clients |
|
|
CapturedSourceTags |
Captured Source Tags on GameplayEffectSpec creation |
|
|
CapturedTargetTags |
Tags from the target, captured during execute |
|
|
float |
ChanceToApplyToTarget |
The chance, in a 0.0-1.0 range, that this GameplayEffect will be applied to the target Attribute or GameplayEffect |
|
const UGameplay... |
Def |
GameplayEfect definition. The static data that this spec points to. |
|
float |
Duration |
The duration in seconds of this effect instantaneous effects should have a duration of FGameplayEffectConstants::INSTANT_APPLICATION effects that last forever should have a duration of FGameplayEffectConstants::INFINITE_DURATION |
|
DynamicGrantedTags |
Tags that are granted and that did not come from the UGameplayEffect def. |
|
|
GrantedAbilitySpecs |
List of abilities granted by this effect |
|
|
ModifiedAttributes |
A list of attributes that were modified during the application of this spec |
|
|
Modifiers |
The calcuated modifiers for this effect |
|
|
float |
Period |
The period in seconds of this effect, nonperiodic effects should have a period of FGameplayEffectConstants::NO_PERIOD |
|
SetByCallerNameMagnitudes |
Map of set by caller magnitudes |
|
|
SetByCallerTagMagnitudes |
||
|
StackCount |
Total number of stacks of this effect |
|
|
TargetEffectSpecs |
Other effects that need to be applied to the target if this effect is successful |
Name | Description | |
---|---|---|
|
FGameplayEffectSpec() |
IMPORTANT: Any state added to FGameplayEffectSpec must be handled in the move/copy constructor/operator! |
|
FGameplayEffectSpec ( |
|
|
FGameplayEffectSpec ( |
|
|
FGameplayEffectSpec ( |
|
|
FGameplayEffectSpec ( |
Name | Description | ||
---|---|---|---|
|
AddDynamicAssetTag ( |
Dynamically add an asset tag not originally from the source GE definition; Added to DynamicAssetTags as well as injected into the captured source spec tags |
|
|
FGameplayEff... |
AddModifiedAttribute ( |
Adds a new modified attribute struct, will always add so check to see if it exists first |
|
AppendDynamicAssetTags ( |
Dynamically append asset tags not originally from the source GE definition; Added to DynamicAssetTags as well as injected into the captured source spec tags |
|
|
AttemptCalculateDurationFromDef ( |
Helper function to attempt to calculate the duration of the spec from its GE definition |
|
|
float |
CalculateModifiedDuration() |
Helper function that returns the duration after applying relevant modifiers from the source and target ability system components |
|
CalculateModifierMagnitudes() |
Fills out the modifier magnitudes inside the Modifier Specs |
|
|
CaptureAttributeDataFromTarget ( |
||
|
CopySetByCallerMagnitudes ( |
Copies SetbyCallerMagnitudes from OriginalSpec into this |
|
|
DuplicateEffectContext() |
||
|
GetAllAssetTags ( |
Appends all tags that apply to this gameplay effect spec |
|
|
GetAllGrantedTags ( |
Appends all tags granted by this gameplay effect spec |
|
|
float |
GetChanceToApplyToTarget() |
|
|
FGameplayEff... |
GetContext() |
|
|
float |
GetDuration() |
|
|
const FGamep... |
GetDynamicAssetTags() |
Simple const accessor to the dynamic asset tags |
|
const FGamep... |
GetEffectContext() |
|
|
float |
GetLevel() |
|
|
FGameplayEff... |
GetModifiedAttribute ( |
Looks for an existing modified attribute struct, may return NULL |
|
const FGamep... |
GetModifiedAttribute ( |
Looks for an existing modified attribute struct, may return NULL |
|
float |
GetModifierMagnitude |
Get the computed magnitude of the modifier on the spec with the specified index |
|
float |
GetPeriod() |
|
|
float |
GetSetByCallerMagnitude ( |
Returns the magnitude of a SetByCaller modifier. |
|
float |
GetSetByCallerMagnitude |
Returns the magnitude of a SetByCaller modifier. |
|
HasValidCapturedAttributes ( |
Determines if the spec has capture specs with valid captures for all of the specified definitions. |
|
|
Initialize ( |
Can be called manually but it is preferred to use the 3 parameter constructor |
|
|
InitializeFromLinkedSpec ( |
Initialize the spec as a linked spec. |
|
|
MergeSetByCallerMagnitudes ( |
Copies SetbuCallerMagnitudes, but only if magnitudes don't exist in our map (slower but preserves data) |
|
|
PrintAll() |
||
|
RecaptureAttributeDataForClone ( |
Recapture attributes from source and target for cloning |
|
|
RecaptureSourceActorTags() |
Recaptures source actor tags of this spec without modifying anything else |
|
|
SetContext ( |
Set the context info: who and where this spec came from. |
|
|
SetDuration ( |
Sets duration. |
|
|
SetLevel ( |
||
|
SetSetByCallerMagnitude ( |
Sets the magnitude of a SetByCaller modifier |
|
|
SetSetByCallerMagnitude ( |
Sets the magnitude of a SetByCaller modifier |
|
|
SetupAttributeCaptureDefinitions() |
Helper function to initialize all of the capture definitions required by the spec |
|
|
ToSimpleString() |
Name | Description | ||
---|---|---|---|
|
FGameplayEff... |
operator= ( |
|
|
FGameplayEff... |
operator= ( |
Name | Description | ||
---|---|---|---|
|
DynamicAssetTags |
This member will be made private. Please use AddDynamicAssetTag, AppendDynamicAssetTags, or GetDynamicAssetTags as appropriate. |