Purpose: The attribute system is used to add variable attributes, fixed attributes, and bonus attributes to characters
Attributes are divided into variable attributes (health, endurance, and other values that can be increased or decreased), fixed attributes (attributes with only one value such as attack power and armor), and bonus attributes (attributes of equipment or BUFF)
Individual attributes can be set for automatic recovery
Variable Name | Explain |
---|---|
DefaultStatsTable(Setting)->DefaultStats | The default properties of the character can be set using the DefaultStatsTable The structure is FTableStatusSetting |
BasicStats | Variable and fixed attributes |
AddationStats | Bonus attribute |
RegenTimerSecond(Setting) | The recovery interval does not represent the amount of recovery, but rather how often the recovery is triggered |
RegenerateLimits(NotPublic) | Current interrupt regeneration list |
Function | Explain |
---|---|
GetStat/GetMaxStat(EAbilityStatType StatType) | Obtain the current/maximum value, if it is a fixed attribute, it will be obtained from MaxValue This function is only for basic attributes and does not include additive attributes |
GetRegenStat(EAbilityStatType StatType) | Obtain recovery speed |
GetAddationStat(EAbilityStatType StatType) | Obtain bonus attribute values |
GetTotalStat/GetMaxTotalStat(EAbilityStatType StatType) | Obtain the total attribute value, including bonus attributes |
ModifyValue(EAbilityStatType StatType,float Value,bool bInterruptRegeneration,bool bWithoutClamp) | Modify the value, deduct health, and restore health using this function bInterruptRegeneration Whether to interrupt regeneration (how many seconds will it resume after deducting the value) bWithoutClamp Is the range limited? If not, it will exceed the maximum value Server or host only |
ModifyAddation(EAbilityStatType StatType, float Value) | Modify bonuses, wear or remove equipment, enable/remove BUFF, use this function to increase or decrease bonus attributes Server or host only |
Override Function/Event Delegation | Explain |
---|---|
OnStatValueChange | Modify attributes and call this delegate when modifying values. Please determine if the health level is below 0 before triggering death, etc |