System: Armor
	Name: #SS_PLATEARMOR_NAME
	Description: #SS_PLATEARMOR_DESC
	Appearance: ArmorPlate
	Explosion: armor_explode lasting 0.25
	
	Tags: Armor
	Tied To: Armor 0
	
	Equips To: Armor
	PreDamageOrder: -5
	
	Available: 1//Techs.Armor.Level > 0
	Level: max(Techs.Armor.Level,1)
	Size: Scale
	Durability: Size * 100 * pow(LEVEL_GAIN_CURVE, Level) * GAME_ARMOR_MULT
	Mass: Size * 150
	
	Costs: Metals[400 * Size], Labr[5 * Size]
	Complexity: 0.2
	
	Tick Rate: 1
	
	Provides: SoakDamage with Amount[1 * sqrt(Object.Size) * pow(LEVEL_GAIN_CURVE, Level)]
	
	Hints: Local/DamageReduction[1 * sqrt(Object.Size) * pow(LEVEL_GAIN_CURVE, Level)], Armor[Durability]


System: SoakArmor
	Name: #SS_SOAKARMOR_NAME
	Description: #SS_SOAKARMOR_DESC
	Appearance: AblativePlate
	Explosion: armor_explode
	
	Tags:  Armor
	Tied To: Armor 4
	
	Equips To: Armor
	PreDamageOrder: -5
	
	Available: Techs.Armor.Level > 3
	Level: Techs.Armor.Level
	Size: Scale
	Durability: Size * 50 * pow(LEVEL_GAIN_CURVE, Level) * GAME_ARMOR_MULT
	Mass: Size * 100
	
	Costs: Metals[400 * Size], Labr[5 * Size]
	Complexity: 0.35
	
	Tick Rate: 1
	
	Provides: SoakDamage with Amount[5 * sqrt(Object.Size) * pow(LEVEL_GAIN_CURVE, Level)]

	Hints: Local/DamageReduction[5 * sqrt(Object.Size) * pow(LEVEL_GAIN_CURVE, Level)], Armor[Durability]


System: ReactArmor
	Name: #SS_REACTARMOR_NAME
	Description: #SS_REACTARMOR_DESC
	Appearance: ReactiveArmor
	Explosion: armor_explode lasting 0.25
	
	Tags: Armor
	Tied To: Armor 4, Missiles 5
	
	Equips To: Armor
	PreDamageOrder: -5
	
	Available: (Techs.Armor.Level > 3) && (Techs.Missiles.Level > 4)
	Level: floor(weight(Techs.Armor.Level, 0.5, Techs.Missiles.Level, 0.5))
	Size: Scale
	Durability: Size * 50 * pow(LEVEL_GAIN_CURVE, Level) * GAME_ARMOR_MULT
	Mass: Size * 125
	
	Costs: Metals[400 * Size], Labr[5 * Size]
	Complexity: 0.35
	
	Tick Rate: 1
	
	vReactLevel: 1 + decay(pow(LEVEL_GAIN_CURVE,Level),30)
	vAbsorbPercent: 0.3 + 0.2 * decay(pow(LEVEL_GAIN_CURVE, Level),30)
	
	Provides: ReactDamage with Amount[vReactLevel * 12.5 * sqrt(Object.Size)], AbsorbPct[vAbsorbPercent]

	Hints: Armor[Durability], Local/ImpactLevel[vReactLevel * 12.5 * sqrt(Object.Size)], Local/AbsorbPct[vAbsorbPercent]
	
System: PowerArmor
	Name: #SS_POWERARMOR_NAME
	Description: #SS_POWERARMOR_DESC
	Appearance: PoweredArmor
	Explosion: armor_explode lasting 0.25
	
	Tags: Armor
	Tied To: Armor 4, EnergyPhysics 5
	
	Equips To: Armor
	PreDamageOrder: -5
	
	Available: (Techs.Armor.Level > 3) && (Techs.EnergyPhysics.Level > 4)
	Level: ceil(weight(Techs.Armor.Level, 0.6, Techs.EnergyPhysics.Level, 0.4))
	Size: Scale
	Durability: Size * 100 * pow(LEVEL_GAIN_CURVE, Level) * GAME_ARMOR_MULT
	Mass: Size * 100
	
	Costs: Metals[300 * Size], Electronics[75 * Size], AdvParts[25 * Size], Labr[5 * Size]
	Complexity: 1
	
	Tick Rate: 4
	
	Provides: SoakDamage with Amount[10 * sqrt(Object.Size) * pow(LEVEL_GAIN_CURVE, Level)]
	
	Consumes:
		To Run:
			Power[Size * 15]
	
	Hints: Local/DamageReduction[10 * sqrt(Object.Size) * pow(LEVEL_GAIN_CURVE, Level)], Armor[Durability]


System: NanoArmor
	Name: #SS_NANOARMOR_NAME
	Description: #SS_NANOARMOR_DESC
	Appearance: Nanoarmor
	Explosion: armor_explode lasting 0.25
	
	Tags: Armor
	Tied To: Armor 5, Nanotech 1
	
	Equips To: Armor
	PreDamageOrder: -5
	
	Available: (Techs.Armor.Level > 4) && (Techs.Nanotech.Level > 0)
	Level: ceil(weight(Techs.Armor.Level, 0.5, Techs.Nanotech.Level, 0.5))
	armorLevel: Techs.Armor.Level As Level
	nanoLevel: Techs.Nanotech.Level As Level

	Size: Scale
	Durability: Size * 50 * pow(LEVEL_GAIN_CURVE, armorLevel) * GAME_ARMOR_MULT
	Mass: Size * 50
	
	Costs: Metals[200 * Size], Electronics[75 * Size], AdvParts[50 * Size], Labr[5 * Size]
	Complexity: 1
	
	Tick Rate: 10
	
	vHitPoints: Size * 50 * pow(LEVEL_GAIN_CURVE, armorLevel) * GAME_ARMOR_MULT
	vHealRate: vHitPoints / (60 * decay(pow(LEVEL_GAIN_CURVE, nanoLevel), 10))
	
	Provides: SoakDamage with Amount[1 * sqrt(Object.Size) * pow(LEVEL_GAIN_CURVE, armorLevel)]
	Provides: SelfHeal with Rate[vHealRate], UpToHP[min(vHitPoints * (1 - (0.5 * decay(pow(LEVEL_GAIN_CURVE, nanoLevel), 5))), vHitPoints * 0.9)]
	
	Consumes:
		To Run:
			Power[Size * 10]
	
	Hints: Local/DamageReduction[1 * sqrt(Object.Size) * pow(LEVEL_GAIN_CURVE, armorLevel)], Armor[Durability], ArmorRegen[vHealRate]

System: ShieldGen
	Name: #SS_SHIELDGEN_NAME
	Description: #SS_SHIELDGEN_DESC
	Appearance: ShieldGenerator
	Explosion: subsys_powerexplode lasting 0.75
	
	Tags: Defense
	Tied To: Shields 1
	
	PreDamageOrder: -10

	Available: Techs.Shields.Level > 0
	Level: Techs.Shields.Level
	Size: Scale
	HPLevel: Techs.Materials.Level-1 As Level
	Durability: HEALTH_MULT * 50 * Size * pow(HEALTH_CURVE,HPLevel)
	Mass: 50 * Size

	Costs: Metals[100 * Size], Electronics[75 * Size], AdvParts[10 * Size], Labr[5 * Size]
	Complexity: 1.1 //Build complexity - Higher results in a slower build
	
	//A single, large generator produces a stronger shield than several small ones, but several small ones permit less leakage
	vAbsorption: 1
	vShielding: pow(Scale / Object.Scale, 0.5) * Size * 60 * pow(LEVEL_GAIN_CURVE, Level) * GAME_SHIELD_MULT
	vShieldReg: Size * 1 * pow(LEVEL_GAIN_CURVE, Level) * GAME_SHIELD_REG_MULT
	vRegCost: 0
	
	Provides: Shields with
		Amount[vShielding],
		Absorption[vAbsorption]
	
	Provides: ShieldRegen with
		Rate[vShieldReg],
		Cost[vRegCost]

	Consumes:
		To Run: Power[2 * Size]

	Requires:
		To Run: Control[5 * Size]
	
	Hints: Shields[vShielding], ShieldReg[vShieldReg], Local/ShieldAbsorption[vAbsorption]



System: ShieldCharger
	Name: #SS_SHIELDCHARGE_NAME
	Description: #SS_SHIELDCHARGE_DESC
	Appearance: ShieldHardener
	Explosion: subsys_powerexplode lasting 0.5
	
	Tags: Defense
	Tied To: Shields 1

	Available: Techs.Shields.Level > 0
	Level: Techs.Shields.Level
	Size: Scale
	HPLevel: Techs.Materials.Level-1 As Level
	Durability: HEALTH_MULT * 50 * Size * pow(HEALTH_CURVE,HPLevel)
	Mass: 50 * Size

	Costs: Metals[100 * Size], Electronics[75 * Size], AdvParts[10 * Size], Labr[5 * Size]
	Complexity: 1.1

	vShieldReg: Size * 5 * pow(LEVEL_GAIN_CURVE, Level) * GAME_SHIELD_REG_MULT
	vRegCost: 0
	
	Provides: ShieldRegen with
		Rate[vShieldReg],
		Cost[vRegCost]

	Consumes:
		To Run: Power[7 * Size]

	Requires:
		To Run: Control[5 * Size]

	Hints: ShieldReg[vShieldReg]



System: ShieldHardener
	Name: #SS_SHIELDHARD_NAME
	Description: #SS_SHIELDHARD_DESC
	Appearance: ShieldHardener
	Explosion: subsys_powerexplode lasting 0.5
	
	Tags: Link
	Tied To: Shields 5

	Available: Techs.Shields.Level > 4
	Level: Techs.Shields.Level - 4
	Size: Scale
	HPLevel: Techs.Materials.Level-1 As Level
	Durability: HEALTH_MULT * 25 * Size * pow(HEALTH_CURVE,HPLevel)
	Mass: 50 * Size

	Costs: Metals[80 * Size], Electronics[75 * Size], AdvParts[20 * Size], Labr[5 * Size]
	Complexity: 1.1

	Alters: subSysAlterations::increaseShieldAbsorption[Scale/Object.Scale]

	Requires:
		To Run: Control[10 * Size]
	
	Consumes:
		To Run: Power[Size * 5]
		
	Hints: Local/ShieldHarden[Scale/Object.Scale]


System: Bulkhead
	Name: #SS_BULKHEAD_NAME
	Description: #SS_BULKHEAD_DESC
	Appearance: Bulkhead
	Explosion: armor_explode lasting 0.125
	
	Tags: IndependentLink, Link
	Tied To: Materials 1
	
	Available: Techs.Materials.Level > 0
	Level: floor(Techs.Materials.Level)
	Size: Scale
	Durability: HEALTH_MULT * 25 * Size * pow(LEVEL_GAIN_CURVE, Level)
	Mass: 100 * Size
	
	Costs: Metals[80 * Size]
	Complexity: 0.2
	
	Tick Rate: 1
	
	vBonusHP: Size * HEALTH_MULT * 120 * pow(LEVEL_GAIN_CURVE, Level)

	Alters: subSysAlterations::addMaxHealth[vBonusHP]

	Hints: Local/BonusHP[vBonusHP]


System: StealthField
	Name: #SS_STEALTHFIELD_NAME
	Description: #SS_STEALTHFIELD_DESC
	Appearance: StealthFieldGenerator
	
	Tags: Defense
	Tied To: Stealth 1
	PreDamageOrder: -7
	
	Available: Techs.Stealth.Level > 0
	Level: Techs.Stealth.Level
	Size: Scale
	HPLevel: Techs.Materials.Level-1 As Level
	Durability: HEALTH_MULT * 25 * Size * pow(HEALTH_CURVE,HPLevel)
	Mass: Size * 50
	
	Tick Rate: 4
	
	Costs: Metals[200 * progress(Size, 0.05, Level)], Electronics[15 * progress(Size, 0.05, Level)], AdvParts[100 * progress(Size, 0.05, Level)], Labr[5 * Size]
	
	Provides: Chameleon with HitMod[decay(pow(LEVEL_GAIN_CURVE,Level),3) ^ (Size / Object.Size)]
	
	Consumes:
		To Run:
			Power[Size * 7.5]
	
	Requires:
		To Run:
			Control[Size * 5]
	
	Hints: Local/MissChance[100 * (1 - (decay(pow(LEVEL_GAIN_CURVE,Level),3) ^ (Size / Object.Size)))]


System: BoardingDefense
	Name: #SS_BOARDINGDEFENSE_NAME
	Description: #SS_BOARDINGDEFENSE_DESC

	Appearance: FlakTurret

	Tags: BoardingDefense, Defense, NoBonusHealth
	Tied To: Computers 3, ShipSystems 6

	Size: Scale
	Available: (Techs.Computers.Level > 2) && (Techs.ShipSystems.Level > 5)
	Level: floor(weight(Techs.Computers.Level, 0.5, Techs.ShipSystems.Level, 0.5))
	Durability: (2 - decay(Level,50)) * 6 * Size

	Costs: Metals[20 * Size], Electronics[80 * Size], AdvParts[10 * Size] Labr[5 * Size]

	Requires:
		To Run:
			Control[5 * Size]

	Consumes:
		To Run:
			Power[10 * Size]

	Hints: BoardingDefense[Durability]
