Etheri Dev Log #8: More ways to initialise attributes. How to make secondary attributes and custom calculations for attributes.
- camjhill737
- Apr 9
- 1 min read
Another way to initialise attributes is through data tables, this is a nice way to organise your attributes. Another way is to apply an instant gameplay effect at the start of the game. Both of these methods work on primary attributes.
Secondary attributes are attributes that are derived from other attributes you see this in rpg games like Elden ring when you increase the value of endurance your stamina increases.
You do this by setting the modifier calculation to attribute based and to initialise your secondary attributes you'll need to use an infinite gameplay effect because at all times you want your secondary attributes to be calculated based off their backing attributes.
If you want external factors to contribute to your attribute values for example player level which isn't an attribute more so a indication of player progression. You can create a custom calculation class. Unreal created a class for you to use in this scenario called UGameplayModMagnitudeCalculation.
The beauty of attributes in GAS is that it can be as simple or as complicated as you want depends on your game design.

All you need is a constructor to capture the parent attribute and override the float function CalculateBaseMagnitude_Implementation.
Comments