Trying to remove a warning of missing SetByCaller default magnitude value.

Hi there!

I have an issue with an unwanted error message from the GAS, when a GE with SetByCallerData in applied, without a defaut value.

“FGameplayEffectSpec::GetMagnitude called for Data %s on Def %s when magnitude had not yet been set by caller”

My specific case is that I am applying a GE on an ASC, which applies another sub GE through UAdditionalEffectsGameplayEffectComponent. This is this sub GE which contains a SetByCaller data magnitude.

As the sub GE is created automatically by the first GE, I cannot modify the Spec to fill in a default value for the SetByCaller magnitude.

I have consider doing it in this override, juste before the effect is applied: UBrimstoneAbilitySystemComponent::ApplyGameplayEffectSpecToSelf

But the Spec is const, so I cannot modify the magnitude…

We are now considering the following option:

* Modify the Engine to add a virtual method UAbilitySystemComponet::ShouldWarnMissingMagnitude, and override it in our Asc to test if the GE matches some conditions. And modify UAbilitySystemComponent::ApplyGameplayEffectSpecToSelf to call this method:

Modifier.ModifierMagnitude.AttemptCalculateMagnitude(Spec, Magnitude, ShouldWarnMissingMagnitude(Spec));

Do you see a better option?

Thanks!

Mathieu

Hello there, if you assign a SetByCallerMagnitude on the spec of the original GE they can be copied to the spec of the additional GE by checking the following boolean on the UAdditionalEffectsGameplayEffectComponent. Does that solve your problem or does that feature not provide you want you need?

[Image Removed]

That seems smart. I wilk try that!

Thanks!

Mathieu

Ok! I’ll wait for your update on whether that solves your problem.

Confirmed, it works. It still feels a bit weird to assign SetByCallerData to the parent GE_ which will not use it.

You can close the issue in any case. Thanks a lot!

Glad to be of assistance!