FGameplayEffectModifierMagnitude

Struct representing the magnitude of a gameplay effect modifier, potentially calculated in numerous different ways

Windows
MacOS
Linux

References

Module

GameplayAbilities

Header

/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/GameplayEffect.h

Include

#include "GameplayEffect.h"

Syntax

[USTRUCT](Programming/UnrealArchitecture/Reference/Structs)()
struct FGameplayEffectModifierMagnitude

Remarks

Struct representing the magnitude of a gameplay effect modifier, potentially calculated in numerous different ways

Variables

Name Description

Protected variable UProperty Category, EditDefaultsOnly

FAttributeBased...

 

AttributeBasedMagnitude

Magnitude value represented by an attribute-based float (Coefficient * (PreMultiplyAdditiveValue + [Eval'd Attribute Value According to Policy])) + PostMultiplyAdditiveValue

Protected variable UProperty Category, EditDefaultsOnly

FCustomCalculat...

 

CustomMagnitude

Magnitude value represented by a custom calculation class

Protected variable UProperty Category, EditDefaultsOnly

EGameplayEffect...

 

MagnitudeCalculationType

Type of calculation to perform to derive the magnitude

Protected variable UProperty Category, EditDefaultsOnly

FScalableFloat

 

ScalableFloatMagnitude

Magnitude value represented by a scalable float

Protected variable UProperty Category, EditDefaultsOnly

FSetByCallerFlo...

 

SetByCallerMagnitude

Magnitude value represented by a SetByCaller magnitude

Constructors

Name Description

Public function

FGameplayEffectModifierMagnitude()

Default Constructor

Public function

FGameplayEffectModifierMagnitude

(
    const FScalableFloat& Value
)

Constructors for setting value in code (for automation tests)

Public function

FGameplayEffectModifierMagnitude

(
    const FAttributeBasedFloat& Value
)

Public function

FGameplayEffectModifierMagnitude

(
    const FCustomCalculationBasedFloat ...
)

Public function

FGameplayEffectModifierMagnitude

(
    const FSetByCallerFloat& Value
)

Functions

Name Description

Public function Const

bool

 

AttemptCalculateMagnitude

(
    const FGameplayEffectSpec& InRelev...,
    OUT float& OutCalculatedMagnitude,
    bool WarnIfSetByCallerFail,
    float DefaultSetbyCaller
)

Attempts to calculate the magnitude given the provided spec.

Public function Const

bool

 

AttemptRecalculateMagnitudeFromDependentAggregatorChange

(
    const FGameplayEffectSpec& InRelev...,
    OUT float& OutCalculatedMagnitude,
    const FAggregator* ChangedAggr...
)

Attempts to recalculate the magnitude given a changed aggregator.

Public function Const

bool

 

CanCalculateMagnitude

(
    const FGameplayEffectSpec& InRelev...
)

Determines if the magnitude can be properly calculated with the specified gameplay effect spec (could fail if relying on an attribute not present, etc.)

Public function Const

void

 

GetAttributeCaptureDefinitions

(
    OUTTArray< FGameplayEffectAttribute...
)

Gather all of the attribute capture definitions necessary to compute the magnitude and place them into the provided array

Public function Const

TSubclassOf<...

 

GetCustomMagnitudeCalculationClass()

Returns the custom magnitude calculation class, if any, for this magnitude.

Public function Const

EGameplayEff...

 

GetMagnitudeCalculationType()

Public function Const

bool

 

GetSetByCallerDataNameIfPossible

(
    FName& OutDataName
)

Returns the DataName associated with this magnitude if it is set by caller

Public function Const

const FSetBy...

 

GetSetByCallerFloat()

Returns SetByCaller data structure, for inspection purposes

Public function Const

bool

 

GetStaticMagnitudeIfPossible

(
    float InLevel,
    float& OutMagnitude,
    const FString* ContextString
)

Returns the magnitude as it was entered in data.

Public function Const

FText

 

GetValueForEditorDisplay()

Public function Const

void

 

ReportErrors

(
    const FString& PathName
)

Public function

bool

 

Serialize

(
    FArchive& Ar
)

Implementing Serialize to clear references to assets that are not needed

Operators

Name Description

Public function Const

bool

 

operator!=

(
    const FGameplayEffectModifierMagnit...
)

Public function Const

bool

 

operator==

(
    const FGameplayEffectModifierMagnit...
)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss