Hi guys,
I have pretty much made up my mind about my items/gear system and I’m gonna use scriptable objects.
I don’t know yet how to set up my sort of “RPG attributes” script to be able to :
attributes points on level up
get my attributes to impact certain items/weapons properties depending on their type (like force would impact only “heavy type” weapon etc.
Use a ScriptableObject for your attributes too and expose methods that let you dynamically calculate values.
int baseHealth = 100;
int currentDamage = 0;
public int CalculateActualHealth(Equipment equipment)
{
int boostedHealth = equipment.CalculateHealthBonus();
return (baseHealth + boostedHealth) - currentDamage;
}
You could expose a LevelUp() function to adjust attributes, it depends on how your points are allocated.