How to override AttributeSet with Gameplay Effect and Curve Table?

Hello guys,

I’m doing some research to try to understand GAS. During my code analysis on ARPG Demo project I found that Epic uses a Gameplay Effect to initialize attributes based on a Curve Table. Reading topics about, I found that data driven attributes can be done through Data Tables using UAbilitySystemComponent::InitStats() function, the problem is that in the documentation we have a note saying that this is “not well supported, a gameplay effect with curve table references may be a better solution”. That being said, I couldn’t find any documentation or tutorial explaining how to use this method, and everything I got is the function used in ARPG to set this up:

for (TSubclassOf<UGameplayEffect>& GameplayEffect : PassiveGameplayEffects)
	FGameplayEffectContextHandle EffectContext = AbilitySystemComponent->MakeEffectContext();

FGameplayEffectSpecHandle NewHandle = AbilitySystemComponent->MakeOutgoingSpec(GameplayEffect, GetCharacterLevel(), EffectContext);
if (NewHandle.IsValid())
	FActiveGameplayEffectHandle ActiveGEHandle = AbilitySystemComponent->ApplyGameplayEffectSpecToTarget(*NewHandle.Data.Get(), AbilitySystemComponent);


I don’t know what is going on in these lines, but I think they’re responsible for filling the AttributeSet for this project and I would like and explanation on what is going on, please.