bm_personal_body_armor_project = {
	specialization = specialization_land
	icon = GFX_sp_personal_body_armor

	breakthrough_cost = {
		specialization_land = {
			base = 1
			modifier = {
				add = -1
				OR = {
					has_tech = support_weapons3
					has_tech = improved_infantry_weapons_2
				}
			}
		}
	}

	resource_cost = {
		resources = {
			steel = 2
		}
	}

	ai_will_do = {
		base = 1
	}

	prototype_time = sp_time.prototype.short
	complexity = sp_complexity.small

	available = {
		FROM = {
			has_tech = improved_infantry_weapons
		}
	}

	generic_prototype_rewards = {
		bm_progress_reward_low
		bm_progress_reward_medium
		bm_progress_loss_low
		bm_progress_loss_medium
		bm_land_breakthrough_reward_low
		bm_land_breakthrough_reward_medium
		bm_land_breakthrough_reward_high
		bm_land_scientist_xp_reward_low
		bm_land_scientist_xp_reward_medium
	}
	
	project_output = {
		country_effects = {
			if = {
				limit = {
					has_country_flag = bm_personal_body_armor_project_reinforced_flag
				}
				custom_effect_tooltip = {
					localization_key = bm_personal_body_armor_project_reinforced_tt
					NAME = bm_personal_body_armor_reinforced_tech
					DESC = bm_personal_body_armor_reinforced_tech_desc
					ICON = GFX_bm_reinforced_icon
					STATS = tech_effect|bm_personal_body_armor_reinforced_tech
				}
				hidden_effect = {
					set_technology = {
						bm_personal_body_armor_reinforced_tech = 1
						popup = no
					}
				}
			}
			else = {
				if = {
					limit = {
						has_country_flag = bm_personal_body_armor_project_lightweight_flag
					}
					custom_effect_tooltip = {
						localization_key = bm_personal_body_armor_project_lightweight_tt
						NAME = bm_personal_body_armor_lightweight_tech
						DESC = bm_personal_body_armor_lightweight_tech_desc
						ICON = GFX_bm_lightweight_icon
						STATS = tech_effect|bm_personal_body_armor_lightweight_tech
					}
					hidden_effect = {
						set_technology = {
							bm_personal_body_armor_lightweight_tech = 1
							popup = no
						}
					}							
				}
				else = {
					custom_effect_tooltip = {
						localization_key = bm_personal_body_armor_project_conclusion_tt
						REINFORCED = bm_personal_body_armor_reinforced_tech
						LIGHTWEIGHT = bm_personal_body_armor_lightweight_tech
					}
					custom_effect_tooltip = bm_divider_2
					custom_effect_tooltip = {
						localization_key = bm_personal_body_armor_project_reinforced_tt
						NAME = bm_personal_body_armor_reinforced_tech
						DESC = bm_personal_body_armor_reinforced_tech_desc
						ICON = GFX_bm_reinforced_icon
						STATS = tech_effect|bm_personal_body_armor_reinforced_tech
					}
					custom_effect_tooltip = bm_divider
					custom_effect_tooltip = {
						localization_key = bm_personal_body_armor_project_lightweight_tt
						NAME = bm_personal_body_armor_lightweight_tech
						DESC = bm_personal_body_armor_lightweight_tech_desc
						ICON = GFX_bm_lightweight_icon
						STATS = tech_effect|bm_personal_body_armor_lightweight_tech
					}
					custom_effect_tooltip = bm_divider_2
					custom_effect_tooltip = {
						localization_key = bm_personal_body_armor_project_tip_tt
						TECH_1 = support_weapons3
						TECH_2 = improved_infantry_weapons_2
					}
				}
			}
		}
	}


	unique_prototype_rewards = {
		bm_personal_body_armor_project_upgrade = {
			fire_only_once = yes

			threshold = {
				min = 40
				max = 90
			}

			weight = {
				base = 1000
			}

			option = {
				token = bm_personal_body_armor_project_reinforced

				iteration_output = {
					country_effects = {
						set_country_flag = bm_personal_body_armor_project_reinforced_flag
						custom_effect_tooltip = {
							localization_key = bm_personal_body_armor_project_reinforced_tt
							NAME = bm_personal_body_armor_reinforced_tech
							DESC = bm_personal_body_armor_reinforced_tech_desc
							ICON = GFX_bm_reinforced_icon
							STATS = tech_effect|bm_personal_body_armor_reinforced_tech
						}					
					}
				}
			}
			option = {
				token = bm_personal_body_armor_project_lightweight

				iteration_output = {
					country_effects = {
						set_country_flag = bm_personal_body_armor_project_lightweight_flag
						custom_effect_tooltip = {
							localization_key = bm_personal_body_armor_project_lightweight_tt
							NAME = bm_personal_body_armor_lightweight_tech
							DESC = bm_personal_body_armor_lightweight_tech_desc
							ICON = GFX_bm_lightweight_icon
							STATS = tech_effect|bm_personal_body_armor_lightweight_tech
						}
					}
				}
			}
		}
	}
}