Skip to main content

Stats

A stat is a StatDefinition asset (Alta.StatSystem, a HashedGeneralValue) that a StatManager applies to an entity under a name such as health. The code looks stats up by that name (StatManager.GetStat("health", ...) in HealthObject, for example). The default, minimum and maximum come from the StatManager on each prefab, not from the definition.

Stat definitions​

  • Stat is statName, the name StatManager uses. In the game's assets two definitions share damageprotection. TavernLib renames the cripple one (hash 44538) to crippledamageprotection when the first StatManager wakes, so on a TavernLib server look it up by that name (see Stats).
  • Saved means isSaveSerialized: the value goes into the save.
  • Sync step is changeToSync, the change needed before a new value is sent to clients.
  • Command range is commandMinimumAndMaximumValues: when it's turned on, IsValueValidForCommands only accepts values in this range. Nothing in the server build calls that method, so the range isn't enforced.
  • Other values are the fields the subclass adds.
StatAssetClassHashSavedSync stepDurationCommand rangeOther values
aggroAggroing StatCrippleStatDefinition508400.1regenPerTick 0.2, isBuildup 1
cripplehealthCripple Health StatCrippleStatDefinition36208yes0.01regenPerTick 0.075, isBuildup 0
damageDamage StatStatDefinition333780.1
damageprotectionCripple Damage Protection StatStatDefinition445380.1
damageprotectionDamage Protection StatStatDefinition230300.1
FrostFrostIncrementingStat470860.1statChangePerSecond -0.5
fullnessFullness StatFullnessStat34710yes0.01notchesCount 6, hungerDefinition: Hunger Stat
healthHealth StatStatDefinition32712yes0.01
hungerHunger StatHungerStat42940yes0.01notchesCount 3, hungerStarveDamage 0.03, starveDamageHealthCutoff 0.1, hungerTick 0.001, healthDefinition: Health Stat, recentDamageDefinition: RecentDamageStat, fullnessStatDefinition: Fullness Stat
left-hand-staminaHand Stamina Left StatStatDefinition53068yes0.01
luminosityLuminosityStatDefinition466020.1
maxHandStaminaMaxHandStaminaMaxStatDefinition41666yes0.12controlDefinitions: Hand Stamina Left Stat, Hand Stamina Right Stat
maxhealthMaxHealth StatMaxStatDefinition42070yes0.120.001 to 100000controlDefinitions: Health Stat
nightmareNightmareOnFullAffectTargetStatDefinition56516yes0.01affectedStatDefinition: Health Stat, builddownCooldown 1, tickBuilddown 0.05, modifierValue -0.05, isMultiplier 0, isContinuous 1, isRevertingOnEnd 0
playerweightPlayer Weight StatPlayerWeightStat59222yes0.01
poisonPoison StatPoisonStat41264yes0.1poisonedStatDefinition: Health Stat, tickDamage 0.05
recentdamageRecentDamageStatStatDefinition182100.1
right-hand-staminaHand Stamina Right StatStatDefinition18866yes0.01
speedSpeed StatStatDefinition323400.1
visibilityVisibilityStatDefinition509200.1
wetWet StatIncrementingStat407680.1statChangePerSecond 0.1
xpboostExperienceBoostStatDefinition152020.1

Threshold levels​

ThresholdStat subclasses (hunger, fullness) apply the modifiers of the highest level whose threshold the value is above (level 0 otherwise). x multiplies the target stat, + adds to it.

StatLevelMin thresholdModifiers
fullnessfamished0
fullnessstarving1
fullnesshungry2
fullnesspeckish3
fullnesssatiated4
fullnessstuffed4.9Damage Stat x1.07
fullnessmaximum5.9Damage Stat x1.15
hungerwasting0Speed Stat x0.8, Damage Stat x0.65
hungermal-nourished0.1Speed Stat x0.9, Damage Stat x0.8
hungerunder-nourished0.15Damage Stat x0.85, Speed Stat x0.9
hungernourished0.5Speed Stat x1
hungerbuffed1.75Speed Stat x1.15

Player defaults​

The StatManager on the player prefab (VR Player Character New): every stat a player has, with the value a new player starts with and its limits.

StatDefinitionDefaultMinMax
healthHealth Stat202
maxhealthMaxHealth Stat2031
speedSpeed Stat1015
damageDamage Stat1015
poisonPoison Stat0031
hungerHunger Stat202
recentdamageRecentDamageStat001
damageprotectionDamage Protection Stat10.110
luminosityLuminosity1015
cripplehealthCripple Health Stat101
xpboostExperienceBoost10.110
damageprotectionCripple Damage Protection Stat10.110
nightmareNightmare001
fullnessFullness Stat306
playerweightPlayer Weight Stat0099999
left-hand-staminaHand Stamina Left Stat0.200.2
right-hand-staminaHand Stamina Right Stat0.200.2
aggroAggroing Stat1110
maxHandStaminaMaxHandStamina0.20.20.2
FrostFrost001

Creature stats are on the Creatures page.

Stat effects​

Assets that change a stat over time, used by food and stews. Their strength comes from whatever applies them (see Recipes).

EffectClassValues
FeedStatChangeEffectstatToAffect: Fullness Stat
HealStatChangeEffectstatToAffect: Health Stat
NourishStatChangeEffectstatToAffect: Hunger Stat
Damage Indirect effectIndirectStatModifierDefinitiontargetStat: Damage Stat, baseValue 1, strengthAffects 2, curve Static
Damage Protection Indirect effectIndirectStatModifierDefinitiontargetStat: Damage Protection Stat, baseValue 1, strengthAffects 2, curve Static
Luminosiy indirect effectIndirectStatModifierDefinitiontargetStat: Luminosity, baseValue 2, strengthAffects 2, curve Static
Speed Indirect EffectIndirectStatModifierDefinitiontargetStat: Speed Stat, baseValue 1, strengthAffects 2, curve Static

Game action and achievement stats​

These track player actions for tasks and achievements. They aren't StatDefinitions and a StatManager doesn't hold them.

AssetClassHash
Cook Food ItemGameActionStat29596
Distance TravelledGameActionStat7800
Level UpGameActionStat18452
Light CampfireGameActionStat54410
Player DiedGameActionStat14008
Player Finished CustomizationGameActionStat52862
Receive Postbox ItemGameActionStat24024
deathsAchievementStatDefinition
player_killsAchievementStatDefinition