In this Tutorial we want to create following Stats:
Vitality (Primary)
Default Value should be 10.
Each Primary Point should add 1 to the Value up to 99.
Show it to the Player in this Format: Vitality 10
Health (Secondary) - Should contain the Value of the MaxHealth
Each Level should gain 5 Value.
Each Vitality Value should gain 100 Value.
Show it to the Player in this Format: Health 100
Health Regeneration (Secondary) - Percentage on how much faster the Player regenerates
Each Level should add 1%.
Each Vitality should add 3%.
Show it to the Player in this Format: Health Regeneration +10%
Create Stats
1. First of all we need to create for each Primary and Secondary Stat which we want to have a own Gameplay Tag.
I will create those for now:
Stats.Primary.Vitality
Stats.Secondary.Health
Stats.Secondary.HealthRegeneration
Read more about Gameplay Tags!
2. Now we have to go to our Player BP and inside the Details Panel of the Stat Component we need to do following:
Add one Item to the Primary Stat Info Array:
Key: Stats.Primary.Vitality
DefaultValue: 10
AddValuePerLevel: 0
MaxPrimaryStatPoints: 99
AddValuePerPrimaryStatPoint: 1
TextFormat: Vitality {VALUE}
Add two Items to the Secondary Stat Info Array:
Health:
Key: Stats.Secondary.Health
DefaultValue: 0
AddValuePerLevel: 5
AddValuePerPrimaryStat:
Key: Stats.Primary.Vitality
Value: 100
TextFormat: Health {VALUE}
Health Regeneration:
Key: Stats.Secondary.HealthRegeneration
DefaultValue: 0
AddValuePerLevel: 1
AddValuePerPrimaryStat:
Key: Stats.Primary.Vitality
Value: 3
TextFormat: Health Regeneration +{VALUE}%
Now we can call whenever we want getStatValue on each of those Stats to get the current Value of it.
Using Primary Stat Points
1. Open your Player BP and inside the Details Panel of the Stat Component set the Variable AddPrimaryStatPointsPerLevel to 1.

This will be the Primary Stat Points the Player will get for each Level.
Of course you can set it to any Number you want.
If you do not want to use this System, just set it to 0.
2. In this example, if the Player would be Level 5, he would have 4 Primary Stat Points.
Now he can decide on which Primary Stat he wants to put the Points.
In the example we created earlier, we only have Vitality which would give 1 Value per Point.
You can simply call AddPointToPrimaryStat on the Stat Component to add it.
The current Primary Points will be reduced and the Primary Stat will be increased.