1.2.1 Hitpoints & Armor - BrettRyland/BDArmory GitHub Wiki

Hitpoint System

BDA has moved to a defined hitpoint damage system moving away from "heat" as the damage mechanic. This was done in order to have full control over the damage model and implement realistic formulas for penetration, kinetic impact and explosive power

The current Health of a part is calculated by taking into account the Density and Area of the part

Armor

Armor is now added in mm Thickness via PartModule

  • Currently defined in BD_Armors.cfg
  • Armor has several different materials that can be chosen, each with different protection characteristics
  • All parts will get a default 10mm of armor (approximating the thickness of metal) using the HitpointTracker Module, added by MM Config
  • Because Armor adds mass, by default, parts start with no armor, using armorType "None"
  • Armor panels (determined by if a part has "armor" in the part name) or any part with ArmorThickness > 10 will instead start with Steel Armor
  • can be set in SPH/VAB, either per-part, via the part's Right-Click menu, or globally across the whole craft via the Armor Tool GUI, opened with the Armor toolbar button.
  • Part max armor amount is determined by part size
  • If the part has the following module defined that armor amount will be overriden

Example Configuration

Useful for part mod makers who want to define the Armor or Hitpoints

MODULE
{
	name = HitpointTracker
	ArmorThickness = 60
        armorVolume = 2.4
        maxSupportedArmor = 120
	maxHitPoints = 100000
	ExplodeMode = Never
}
HitpointTracker fields
ArmorThickness Starting thickness of part's armor. If greater than 10, part will start with Steel Armor, and cannot be set to None
armorVolume Override default part armor surface area with a custom value. Primarily used for triangular/trapezoidal/similarly awkwardly shaped parts that the default armor volume calc won't accurately assign
maxSupportedArmor Overrides the maximum armor thickness the part can support
maxHitPoints overrides part's auto-calculated HP value with this
ExplodeMode Never / Always / Dynamic; Adds a chance to explode on penetration when liquid fuel resource is present (i.e. fuel tanks). BDA Includes a MM Config that enables for Squad stock tanks with the Dynamic ExplodeMode

Important Notes for Modders

Do NOT configure the hitpoints on the part, use an MM patch with the following syntax. The auto-calculated values will overwrite values set in the part config

 %MODULE[HitpointTracker]
{
	name = HitpointTracker
	ArmorThickness = 120
	maxHitPoints = 100000
	ExplodeMode = Never
}

Armor Config Example

BDA by default comes with several different armor materials. Mod makers who want to add their own armor materials can use this as an example

ARMOR
{
name = def // do not change this!
Density = 7850
Strength = 840
Hardness = 1176
Yield = 700
YoungModulus = 200
Ductility = 0.15
Diffusivity = 48.8
SafeUseTemp = 1694
Cost = 100
}
Armor Config fields
Density Mass of armor, in kg/m^3
Strength Ultimate Tensile Strength of the material, in MPa. Higher is better
Hardness Hardness of material in MPa, Brinell scale. Higher is better, but harder armors will spall under heavy hits
Yield Yield strength of the material in MPa. Higher is better.
YoungModulus Young's Modulus of the material in GPa. Higher is better.
Ductility Measure of material elongation / ratio of Yield Strength/Ultimate Tensile Strength; 0 is Ceramic, 1 is rubber. Higher is better vs explosions, to a point. Too high and it will provide less protection. Lower is better for bullets. Too low and armor may shatter under heavy hits
Diffusivity Ability to diffuse thermal energy, determines armor's protection vs lasers. Higher is better
SafeUseTemp Temperature at which material starts to weaken due to thermal stresses. Material 1.5x above this value will begin to melt
Cost How much the armor will cost, per cubic meter of armor on the craft