Semi-automatically generated modding documentation for Barotrauma

StatTypes

StatTypes

StatTypes are used to alter several traits of a character. They are mostly used by talents. A lot of StatTypes use a “percentage” value. The way this works is that the value is 0 by default and 1 is added to the value of the stat type to get the final multiplier. For example if the value is set to 0.2 then 1 is added to it making it 1.2 and that is used as a multiplier. This makes it so values between -100% and +100% can be easily represented as -1 and 1 respectively. For example 0.5 would translate to 1.5 for +50% and -0.2 would translate to 0.8 for -20% multiplier.

Value Description
None Used to indicate an invalid stat type. Should not be used.
ElectricalSkillBonus Boosts electrical skill by a flat amount.
HelmSkillBonus Boosts helm skill by a flat amount.
MechanicalSkillBonus Boosts mechanical skill by a flat amount.
MedicalSkillBonus Boosts medical skill by a flat amount.
WeaponsSkillBonus Boosts weapons skill by a flat amount.
HelmSkillOverride Boosts the character’s helm skill to the given value if it’s lower than the given value.
MedicalSkillOverride Boosts the character’s medical skill to the given value if it’s lower than the given value.
WeaponsSkillOverride Boosts the character’s weapons skill to the given value if it’s lower than the given value.
ElectricalSkillOverride Boosts the character’s electrical skill to the given value if it’s lower than the given value.
MechanicalSkillOverride Boosts the character’s mechanical skill to the given value if it’s lower than the given value.
MaximumHealthMultiplier Increases character’s maximum vitality by a percentage.
MovementSpeed Increases both walking and swimming speed of the character by a percentage.
WalkingSpeed Increases the character’s walking speed by a percentage.
SwimmingSpeed Increases the character’s swimming speed by a percentage.
BuffDurationMultiplier Decreases how long it takes for buffs applied to the character decay over time by a percentage.
Buffs are afflictions that have isBuff set to true.
DebuffDurationMultiplier Decreases how long it takes for debuff applied to the character decay over time by a percentage.
Debuffs are afflictions that have isBuff set to false.
MedicalItemEffectivenessMultiplier Increases the strength of afflictions that are applied to the character by a percentage.
Medicines are items that have the “medical” tag.
FlowResistance Increases the resistance to pushing force caused by flowing water by a percentage. The resistance cannot be below 0% or higher than 100%.
AttackMultiplier Increases how much damage the character deals via all attacks by a percentage.
TeamAttackMultiplier Increases how much damage the character deals to other characters on the same team by a percentage.
RangedAttackSpeed Decreases the reload time of ranged weapons held by the character by a percentage.
TurretAttackSpeed Decreases the reload time of submarine turrets operated by the character by a percentage.
TurretPowerCostReduction Decreases the power consumption of submarine turrets operated by the character by a percentage.
TurretChargeSpeed Increases how fast submarine turrets operated by the character charge up by a percentage. Affects turrets like pulse laser.
MeleeAttackSpeed Increases how fast the character can swing melee weapons by a percentage.
MeleeAttackMultiplier Increases the damage dealt by melee weapons held by the character by a percentage.
RangedSpreadReduction Decreases the spread of ranged weapons held by the character by a percentage.
RepairSpeed Increases the repair speed of the character by a percentage.
MechanicalRepairSpeed Increases the repair speed of the character when repairing mechanical items by a percentage.
DeconstructorSpeedMultiplier Increase deconstruction speed of deconstructor operated by the character by a percentage.
RepairToolStructureRepairMultiplier Increases the repair speed of repair tools that fix submarine walls by a percentage.
RepairToolStructureDamageMultiplier Increases the wall damage of tools that destroy submarine walls like plasma cutter by a percentage.
RepairToolDeattachTimeMultiplier Increase the detach speed of items like minerals that require a tool to detach from the wall by a percentage.
MaxRepairConditionMultiplierMechanical Allows the character to repair mechanical items past the maximum condition by a flat percentage amount. For example setting this to 0.1 allows the character to repair mechanical items to 110% condition.
MaxRepairConditionMultiplierElectrical Allows the character to repair electrical items past the maximum condition by a flat percentage amount. For example setting this to 0.1 allows the character to repair electrical items to 110% condition.
IncreaseFabricationQuality Increase the the quality of items crafted by the character by a flat amount.
Can be made to only affect certain item with a given tag types by specifying a tag via CharacterAbilityGivePermanentStat, when no tag is specified the ability affects all items.
GeneticMaterialRefineBonus Boosts the condition of genes combined by the character by a flat amount.
GeneticMaterialTaintedProbabilityReductionOnCombine Reduces the chance to taint a gene when combining genes by a percentage. Tainting probability can not go below 0% or above 100%.
SkillGainSpeed Increases the speed at which the character gains skills by a percentage.
ExtraLevelGain Whenever the character’s skill level up add a flat amount of more skill levels to the character.
HelmSkillGainSpeed Increases the speed at which the character gains helm skill by a percentage.
WeaponsSkillGainSpeed Increases the speed at which the character gains weapons skill by a percentage.
MedicalSkillGainSpeed Increases the speed at which the character gains medical skill by a percentage.
ElectricalSkillGainSpeed Increases the speed at which the character gains electrical skill by a percentage.
MechanicalSkillGainSpeed Increases the speed at which the character gains mechanical skill by a percentage.
MedicalItemApplyingMultiplier Increases the strength of afflictions the character applies to other characters via medicine by a percentage.
Medicines are items that have the “medical” tag.
BuffItemApplyingMultiplier Increases the strength of afflictions the character applies to other characters via medicine by a percentage.
Works only for afflictions that have isBuff set to true.
PoisonMultiplier Increases the strength of afflictions the character applies to other characters via medicine by a percentage.
Works only for afflictions that have “poison” type.
TinkeringDuration Increases how long the character can tinker with items by a flat amount where 1 = 1 second.
TinkeringStrength Increases the effectiveness of the character’s tinkerings by a percentage.
Tinkering strength affects the speed and effectiveness of the item that is being tinkered with.
TinkeringDamage Increases how much condition tinkered items lose when the character tinkers with them by a percentage.
ReputationGainMultiplier Increases how much reputation the character gains by a percentage.
Can be made to only affect certain factions with a given tag types by specifying a tag via CharacterAbilityGivePermanentStat, when no tag is specified the ability affects all factions.
ReputationLossMultiplier Increases how much reputation the character loses by a percentage.
Can be made to only affect certain factions with a given tag types by specifying a tag via CharacterAbilityGivePermanentStat, when no tag is specified the ability affects all factions.
MissionMoneyGainMultiplier Increases how much money the character gains from missions by a percentage.
ExperienceGainMultiplier Increases how much talent experience the character gains from all sources by a percentage.
MissionExperienceGainMultiplier Increases how much talent experience the character gains from missions by a percentage.
ExtraMissionCount Increases how many missions the characters crew can have at the same time by a flat amount.
ExtraSpecialSalesCount Increases how many items are in stock in special sales in the store by a flat amount.
StoreSellMultiplier Increases how much money is gained from selling items to the store by a percentage.
StoreBuyMultiplierAffiliated Decreases the prices of items in affiliated store by a percentage.
StoreBuyMultiplier Decreases the prices of items in all stores by a percentage.
ShipyardBuyMultiplierAffiliated Decreases the price of upgrades and submarines in affiliated outposts by a percentage.
ShipyardBuyMultiplier Decreases the price of upgrades and submarines in all outposts by a percentage.
MaxAttachableCount Limits how many of a certain item can be attached to the wall in the submarine at the same time.
Has to be used with CharacterAbilityGivePermanentStat to specify the tag of the item that is affected. Does nothing if no tag is specified.
ExplosionRadiusMultiplier Increase the radius of explosions caused by the character by a percentage.
ExplosionDamageMultiplier Increases the damage of explosions caused by the character by a percentage.
FabricationSpeed Decreases the time it takes to fabricate items on fabricators operated by the character by a percentage.
BallastFloraDamageMultiplier Increases how much damage the character deals to ballast flora by a percentage.
HoldBreathMultiplier Increases the time it takes for the character to pass out when out of oxygen.
Apprenticeship Used to set the character’s apprenticeship to a certain job.
Used by the “apprenticeship” talent and requires a job to be specified via CharacterAbilityGivePermanentStat.
CPRBoost Increases the revival chance of the character when performing CPR by a percentage.
LockedTalents Can be used to prevent certain talents from being unlocked by specifying the talent’s identifier via CharacterAbilityGivePermanentStat.

AbilityFlags

AbilityFlags are a set of toggleable flags that can be applied to characters.

Value Description
None Used to indicate an erroneous ability flag. Should not be used.
MustWalk Character will not be able to run.
ImmuneToPressure Character is immune to pressure.
IgnoredByEnemyAI Character won’t be targeted by enemy AI.
MoveNormallyWhileDragging Character can drag corpses without a movement speed penalty.
CanTinker Character is able to tinker with items.
CanTinkerFabricatorsAndDeconstructors Character is able to tinker with fabricators and deconstructors.
TinkeringPowersDevices Allows items tinkered by the character to consume no power.
GainSkillPastMaximum Allows the character to gain skills past 100.
RetainExperienceForNewCharacter Allows the character to retain experience when respawning as a new character.
AllowSecondOrderedTarget Allows CharacterAbilityApplyStatusEffectsToLastOrderedCharacter to affect the last 2 characters ordered.
AlwaysStayConscious Character will stay conscious even if their vitality drops below 0.
CanNotDieToAfflictions Prevents afflictions on the character from dropping the characters vitality below the kill threshold.
The character can still die from sources like getting crushed by pressure or if their head is severed.