Class StatModifiers
- Namespace
- Vintagestory.API.Common
- Assembly
- VintagestoryAPI.dll
public class StatModifiers
- Inheritance
-
StatModifiers
- Inherited Members
- Extension Methods
Fields
canEat
public bool canEat
Field Value
generalStats
Unaffected by item being broken
public Dictionary<string, float>? generalStats
Field Value
healingeffectivness
public float healingeffectivness
Field Value
hungerrate
public float hungerrate
Field Value
negativeEffectStats
When item broken only positive values applied
public Dictionary<string, float>? negativeEffectStats
Field Value
positiveEffectStats
When item broken only negative values applied
public Dictionary<string, float>? positiveEffectStats
Field Value
rangedWeaponsAcc
public float rangedWeaponsAcc
Field Value
rangedWeaponsSpeed
public float rangedWeaponsSpeed
Field Value
walkSpeed
public float walkSpeed
Field Value
Methods
AddFrom(StatModifiers, bool, float, float)
public virtual void AddFrom(StatModifiers other, bool broken = false, float multiplier = 1, float walkSpeedDebufMultiplier = 1)
Parameters
otherStatModifiersbrokenboolmultiplierfloatwalkSpeedDebufMultiplierfloat
AggregateStatsFrom(Dictionary<string, float>?, Dictionary<string, float>, string)
protected static void AggregateStatsFrom(Dictionary<string, float>? statValues, Dictionary<string, float> aggregatedValues, string code)
Parameters
statValuesDictionary<string, float>aggregatedValuesDictionary<string, float>codestring
Apply(EntityStats, string)
public virtual void Apply(EntityStats entityStats, string entityStatCode)
Parameters
entityStatsEntityStatsentityStatCodestring
GetDescription(StringBuilder, bool)
public virtual void GetDescription(StringBuilder description, bool broken = false)
Parameters
descriptionStringBuilderbrokenbool
GetStatDescription(string, float)
Gets translated stat value description entry
"wearable-stat-description-hungerrate": "Hunger rate: {1}{0:0%}" - will result in 'Hunger rate: +12%' from value of 0.123
"wearable-stat-description-rangedweaponsspeed": "Ranged Weapon Charge Time: {2}{0:0.#%}" - will result in 'Ranged Weapon Charge Time: -12.3%' from value of 0.123
public static string GetStatDescription(string entityStatCategory, float value)