Skip to main content

Stat Default Values (SDV)

When creating a Data Table for the default values of your Stats, you'll have to choose a SDV (Stat Default Values) structure type.

SDV_Minimal

SDV_Minimal provides an array of Stats with their Value, along with Value Influences.

SDV_Advanced

SDV_Advanced supports a Parenting System and Value Progression depending on the Level.

Parenting System

The Parenting System inside a SDV_Advanced Table allows you to make a Row inherit its values and influences from another Row inside the Data Table and override or modify them.

Each Row will inherit from every Stat present in the Parents hierarchy (Complex Stat or Progress Stat).
Adding a Stat will give you the opportunity to set its Base Value and Value Influences (if no parent includes this stat), or override / modify the Parent's Base Value and Value Influences.

Example

In this example:

  • Warrior, Ranger and Wizard inherit from Default.
  • Demon Warrior inherits from Warrior
  • Bandit and Skeleton_Archer inherit from Ranger
  • Undead Mage inherits from Wizard
note

You're not obligated to make a Default row as in this example, but it can be useful to have a root for Stats that are shared between all children.

Along with modifying their parent values (the Warrior might have more Constitution, the Wizard more Intellect), Rows can also have different Value Influences (the Ranger might change how its Attack Power is calculated).

note

There is no limit to the number of Parents you can create, and don't worry about it taking a load when initializing a StatsComponent during runtime: when the Default Values are first used, the Default Values Manager will compute the SDV_Advanced tables to generate a new Data Table with static rows for each entry using their parent values.

Adding Complex Stats

You can add Complex Stats to the Complex Stats and Values array.

note

In this example, the row Skeleton_Archer will inherit all Stats from the row Ranger (which itself inherits from the row Default).
Also, Skeleteon_Archer is adding or overriding the Stat "Agility" with a Base Value of 10 and a Value Influence that uses a curve depending on the Level.

Value Type:

The Value Type will determine how the Value will affect the Base Value of your Stat:

  • Override Base Value: Set the Base Value at the specified amount
  • Base Value Modifier (%): Modify the parent Base Value by a modifier (12 -> +12%, -37 -> -37%)

Value Influences:

The Parenting System also works with Value Influences:

  • A Stat inherits all value Influences from the Parent Stat
  • You can add new Value Influences or override a Value Influence from the Parent by using the same ID
  • Overriding the Parent Operation with an empty Operation will remove the Value Influence, even if it's present in the Parent.
  • Overriding the Parent Curve with an empty Curve will remove the Curve, but keep the operation
note

In the image above, we're overriding the Value Influence Agility_FromLevel in the Agility stat by overriding the Parent Operation and overriding the Parent Curve.
If this Value Influence (Agility_FromLevel) didn't exist in the Agility stat of the Parent, it will simply create it.

In effect, this will add to Agility a value progression based on the Level using the "AgilityFromLevel" curve.

Practical Example

In the following example for the AttackPower stat, I'm adding a 50% modifier to the Parent value. (If the Parent's Agility has a Base Value of 10, it should now be 15 for this Row).
I'm also creating or overriding two Value Influences: AttackPower_FromAgility and AttackPower_FromStrength.

We could also have combined those two Value Influences into a single ID: {Strength} + {Agility} *1.5, but separating Value Influences like I did in this example will allow me to override only one ID in the future.

For example, if a child of this Row only wants to modify how Strength will affect its Attack Power, I would only have to override AttackPower_FromStrength instead of rewriting the whole operation.

info

Value Influences created through the Default Values Table will target the default Value Set and the Value Type "Value Influence".

Adding Progress Stats

You can also add Progress Stats.

  • Reset on Level Up: Whenever the Level value increases, will reset the Progress Stat to the specified value
  • Type: Choose whether you want to apply a Ratio in percent or a flat amount
  • Value: The Value (in percent or flat amount)
Example

In the image above, the Health stat will be set at 100% (the Maximum Health Value) when the game starts, and reset to 100% whenever the integer value of Level increases.

Important

To use the Ratio Type, make sure your Progress Stat has a Maximum Value.

Level Range

While optional, the Level Range can help you determine the starting Level of Actors created using the SDV_Advanced structure.

The Level Range will always override its parent row.

You can use it to load the Default Values of your StatsComponent.

Example

By using the same archetypes found in the illustration of the Parenting System above, I will determine the Level Range of my different rows.
Since only players can directly use Warrior, Ranger and Wizard archetypes, I will set their Level Range to (1,1). This way, they will always start at Level 1.
For Demon Warrior, Bandit, Skeleton Archer and Undead Mage, I can randomly pick from their Level Range to Initialize their Stats. For example, the Bandit could have a Level Range of (1,2), the Skeleton Archer of (2,4), and the Demon Warrior would only be level 10 (10,10).