class unreal.GameplayModMagnitudeCalculation(outer=None, name='None')

Bases: unreal.GameplayEffectCalculation

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

C++ Source:

  • Plugin: GameplayAbilities

  • Module: GameplayAbilities

  • File: GameplayModMagnitudeCalculation.h

Editor Properties: (see get_editor_property/set_editor_property)

  • allow_non_net_authority_dependency_registration (bool): [Read-Write] 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.

  • relevant_attributes_to_capture (Array(GameplayEffectAttributeCaptureDefinition)): [Read-Write] Attributes to capture that are relevant to the calculation


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.


spec (GameplayEffectSpec) – Gameplay effect spec to use to calculate the magnitude with


Computed magnitude of the modifier

Return type