G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
UGameplayModMagnitudeCalculation Class Reference

Class used to perform custom gameplay effect modifier calculations, either via blueprint or native code. More...

Public Member Functions

Ability|GameplayEffect
const FGameplayTagContainer & GetSourceSpecTags (FGameplayEffectSpec EffectSpec) const
 Returns the source spec tags from a Gameplay Effect Spec.
float32 GetSetByCallerMagnitudeByName (FGameplayEffectSpec EffectSpec, FName MagnitudeName) const
 Extracts the Set by Caller Magnitude from a Gameplay Effect Spec.
float32 GetSetByCallerMagnitudeByTag (FGameplayEffectSpec EffectSpec, FGameplayTag Tag) const
 Extracts the Set by Caller Magnitude from a Gameplay Effect Spec.
const FGameplayTagContainer & GetSourceActorTags (FGameplayEffectSpec EffectSpec) const
 Returns the source actor tags from a Gameplay Effect Spec.
FGameplayTagContainer GetSourceAggregatedTags (FGameplayEffectSpec EffectSpec) const
 Copies and returns the source aggregated tags from a Gameplay Effect Spec.
const FGameplayTagContainer & GetTargetActorTags (FGameplayEffectSpec EffectSpec) const
 Returns the target actor tags from a Gameplay Effect Spec Useful for Modifier Magnitude Calculations.
FGameplayTagContainer GetTargetAggregatedTags (FGameplayEffectSpec EffectSpec) const
 Copies and returns the target aggregated tags from a Gameplay Effect Spec.
const FGameplayTagContainer & GetTargetSpecTags (FGameplayEffectSpec EffectSpec) const
 Returns the target spec tags from a Gameplay Effect Spec Useful for Modifier Magnitude Calculations.
float32 GetCapturedAttributeMagnitude (FGameplayEffectSpec EffectSpec, FGameplayAttribute Attribute, FGameplayTagContainer SourceTags, FGameplayTagContainer TargetTags) const
 Gets the captured magnitude value for the given Attribute For this to work correctly, the Attribute needs to be added to the Relevant Attributes to Capture array.
Calculation
float32 CalculateBaseMagnitude (FGameplayEffectSpec Spec) const
 Calculate the base magnitude of the gameplay effect modifier, given the specified spec. Note that the owning spec def can still modify this base value with a coeffecient and pre/post multiply adds. see FCustomCalculationBasedFloat::CalculateMagnitude for details.
Public Member Functions inherited from UObject
bool MarkPackageDirty () const
void RemoveFromRoot ()
bool GetIsRooted () const
bool IsTransient () const
bool Modify (bool bAlwaysMarkDirty=true)
void SetTransactional (bool bTransactional)
bool IsSupportedForNetworking () const
UClass GetClass () const
UObject GetOuter () const
UObject GetTypedOuter (TSubclassOf< UObject > Target) const
 Traverses the outer chain searching for the next object of a certain type.
UPackage GetOutermost () const
UPackage GetPackage () const
void AddToRoot ()
UWorld GetWorld () const
FName GetName () const
FString GetFullName (const UObject StopOuter=nullptr) const
FString GetPathName (const UObject StopOuter=nullptr) const
bool IsA (const UClass Class) const
 Returns true if this object is of the specified type, or a child of that type.
void SaveConfig ()
void LoadConfig ()
void ReloadConfig ()
void CopyScriptPropertiesFrom (const UObject OtherObject)
void opCast (?&Address) const
FString ToString () const

Static Public Member Functions

Static Functions
static UClass StaticClass ()
Static Public Member Functions inherited from UGameplayEffectCalculation
static UClass StaticClass ()
Static Public Member Functions inherited from UObject
static UClass StaticClass ()

Public Attributes

ExternalDependencies
bool bAllowNonNetAuthorityDependencyRegistration
 Whether the calculation allows non-net authorities to register the external dependency multi-cast delegate or not; Effectively whether clients are allowed to perform the custom calculation themselves or not.
Public Attributes inherited from UGameplayEffectCalculation
TArray< FGameplayEffectAttributeCaptureDefinition > RelevantAttributesToCapture
 Attributes to capture that are relevant to the calculation.
Public Attributes inherited from UObject
const UClass Class
const UObject Outer
const UPackage Outermost
const UPackage Package
const UWorld World
const FName Name
const bool IsRooted

Detailed Description

Class used to perform custom gameplay effect modifier calculations, either via blueprint or native code.

Member Function Documentation

◆ CalculateBaseMagnitude()

float32 CalculateBaseMagnitude ( FGameplayEffectSpec Spec) const

Calculate the base magnitude of the gameplay effect modifier, given the specified spec. Note that the owning spec def can still modify this base value with a coeffecient and pre/post multiply adds. see FCustomCalculationBasedFloat::CalculateMagnitude for details.

Parameters
SpecGameplay effect spec to use to calculate the magnitude with
Returns
Computed magnitude of the modifier

◆ GetCapturedAttributeMagnitude()

float32 GetCapturedAttributeMagnitude ( FGameplayEffectSpec EffectSpec,
FGameplayAttribute Attribute,
FGameplayTagContainer SourceTags,
FGameplayTagContainer TargetTags ) const

Gets the captured magnitude value for the given Attribute For this to work correctly, the Attribute needs to be added to the Relevant Attributes to Capture array.

Parameters
EffectSpecThe Gameplay Effect Spec to get the info from
AttributeThe attribute to query
Returns
The magnitude value if found, zero otherwise

◆ GetSetByCallerMagnitudeByName()

float32 GetSetByCallerMagnitudeByName ( FGameplayEffectSpec EffectSpec,
FName MagnitudeName ) const

Extracts the Set by Caller Magnitude from a Gameplay Effect Spec.

Parameters
EffectSpecThe Gameplay Effect Spec to get the info from
MagnitudeNameThe effect name to query
Returns
The magnitude value if found, zero otherwise

◆ GetSetByCallerMagnitudeByTag()

float32 GetSetByCallerMagnitudeByTag ( FGameplayEffectSpec EffectSpec,
FGameplayTag Tag ) const

Extracts the Set by Caller Magnitude from a Gameplay Effect Spec.

Parameters
EffectSpecThe Gameplay Effect Spec to get the info from
TagThe effect tag to query
Returns
The magnitude value if found, zero otherwise

◆ GetSourceActorTags()

const FGameplayTagContainer & GetSourceActorTags ( FGameplayEffectSpec EffectSpec) const

Returns the source actor tags from a Gameplay Effect Spec.

Parameters
EffectSpecThe Gameplay Effect Spec to get the info from
Returns
Gameplay Tag Container with the copied tags. The container will be empty if no captured source tags exist.

◆ GetSourceAggregatedTags()

FGameplayTagContainer GetSourceAggregatedTags ( FGameplayEffectSpec EffectSpec) const

Copies and returns the source aggregated tags from a Gameplay Effect Spec.

Parameters
EffectSpecThe Gameplay Effect Spec to get the info from
Returns
Gameplay Tag Container with the copied tags. The container will be empty if no captured source tags exist.

◆ GetSourceSpecTags()

const FGameplayTagContainer & GetSourceSpecTags ( FGameplayEffectSpec EffectSpec) const

Returns the source spec tags from a Gameplay Effect Spec.

Parameters
EffectSpecThe Gameplay Effect Spec to get the info from
Returns
Gameplay Tag Container with the copied tags. The container will be empty if no captured source tags exist.

◆ GetTargetActorTags()

const FGameplayTagContainer & GetTargetActorTags ( FGameplayEffectSpec EffectSpec) const

Returns the target actor tags from a Gameplay Effect Spec Useful for Modifier Magnitude Calculations.

Parameters
EffectSpecThe Gameplay Effect Spec to get the info from
Returns
Gameplay Tag Container with the copied tags. The container will be empty if no captured source tags exist.

◆ GetTargetAggregatedTags()

FGameplayTagContainer GetTargetAggregatedTags ( FGameplayEffectSpec EffectSpec) const

Copies and returns the target aggregated tags from a Gameplay Effect Spec.

Parameters
EffectSpecThe Gameplay Effect Spec to get the info from
Returns
Gameplay Tag Container with the copied tags. The container will be empty if no captured source tags exist.

◆ GetTargetSpecTags()

const FGameplayTagContainer & GetTargetSpecTags ( FGameplayEffectSpec EffectSpec) const

Returns the target spec tags from a Gameplay Effect Spec Useful for Modifier Magnitude Calculations.

Parameters
EffectSpecThe Gameplay Effect Spec to get the info from
Returns
Gameplay Tag Container with the copied tags. The container will be empty if no captured source tags exist.

◆ StaticClass()

UClass StaticClass ( )
static

Member Data Documentation

◆ bAllowNonNetAuthorityDependencyRegistration

bool bAllowNonNetAuthorityDependencyRegistration

Whether the calculation allows non-net authorities to register the external dependency multi-cast delegate or not; Effectively whether clients are allowed to perform the custom calculation themselves or not.

@Note: This is an advanced use case that should only be enabled under very specific circumstances. This is designed for games that are utilizing network dormancy and may want to trust the client to update non-gameplay critical attributes client-side without causing a network dormancy flush. Usage of this flag is NOT compatible with attribute capture within the calculation and will trigger an ensure if used in tandem. Clients are incapable of performing custom calculations that require attribute captures. In general, if your game is not using network dormancy, this should always remain disabled.

@Note: If enabling this for a custom calculation, be sure that the external delegate is sourced from something guaranteed to be on the client to avoid timing issues. As an example, binding to a delegate on a GameState is potentially unreliable, as the client reference to that actor may not be available during registration.