# If you add a new component building, also add it to common/inline_scripts/arkship/ai_design.txt
# and update the weights for all arkship starbase types in common/starbase_types/00_starbase_types.txt

arkship_armor = {
	icon = "GFX_arkship_armor"
	starbase_type = arkship
	construction_days = 180
	category = sm_defense_cat

	starbase_limit = {
		base = -1		# Uncapped
	}

	potential = {
		owner? = {
			has_technology = tech_ship_armor_1
		}
		is_arkship_starbase = yes
	}

	show_in_tech = "tech_ship_armor_1"

	show_tech_unlock_if = {
		is_nomadic = yes
	}

	resources = {
		category = starbase_arkship_upgrades
		cost = {
			alloys = @arkship_cost_alloys_250
		}
	}

	equipped_component = LARGE_ARMOR_1
	equipped_component = LARGE_ARMOR_1
	equipped_component = LARGE_ARMOR_1
	show_component_tooltips = yes
	custom_tooltip = sm_arkship_armor_tt

	ai_weight = {
		weight = 100 #use same weight here - ai weighting is done in starbase_types.txt
		modifier = {
			factor = 2
			ai_owner_prefers_armor = yes
		}
	}
}

arkship_lm_armor = {
	icon = "GFX_arkship_lm_armor"
	starbase_type = arkship
	construction_days = 180
	category = sm_defense_cat

	starbase_limit = {
		base = -1		# Uncapped
	}

	potential = {
		owner? = {
			is_galvanic_empire = yes
			has_technology = tech_ship_armor_1
		}
		is_arkship_starbase = yes
	}

	show_in_tech = "tech_ship_armor_1"

	show_tech_unlock_if = {
		is_nomadic = yes
		is_galvanic_empire = yes
	}

	show_in_tech = "tech_archaeoarmor"

	resources = {
		category = starbase_arkship_upgrades
		cost = {
			sr_living_metal = @arkship_cost_rare_265
		}
	}

	equipped_component = LARGE_LM_ARMOR_1
	equipped_component = LARGE_LM_ARMOR_1
	equipped_component = LARGE_LM_ARMOR_1
	show_component_tooltips = yes
	custom_tooltip = sm_arkship_lm_armor_tt

	ai_weight = {
		weight = 100 #use same weight here - ai weighting is done in starbase_types.txt
		modifier = {
			factor = 2
			ai_owner_prefers_armor = yes
		}
	}
}

arkship_archaeo_armor = {
	icon = "GFX_arkship_archaeo_armor"
	starbase_type = arkship
	construction_days = 180
	category = sm_defense_cat

	starbase_limit = {
		base = -1		# Uncapped
	}

	potential = {
		owner? = {
			has_technology = tech_archaeoarmor
		}
		is_arkship_starbase = yes
	}

	show_tech_unlock_if = {
		is_nomadic = yes
	}

	show_in_tech = "tech_archaeoarmor"

	resources = {
		category = starbase_arkship_upgrades
		cost = {
			alloys = @arkship_cost_alloys_340
			minor_artifacts = @arkship_cost_rare_100
		}
	}

	equipped_component = LARGE_ARCHAEO_ARMOR
	equipped_component = LARGE_ARCHAEO_ARMOR
	equipped_component = LARGE_ARCHAEO_ARMOR
	show_component_tooltips = yes
	custom_tooltip = sm_arkship_archaeo_armor_tt

	ai_weight = {
		weight = 100 #use same weight here - ai weighting is done in starbase_types.txt
		modifier = {
			factor = 2
			ai_owner_prefers_armor = yes
		}
		modifier = {
			factor = 1.25
			ai_owner_has_archaeoengineers = yes
		}
	}
}

arkship_shield = {
	icon = "GFX_arkship_shield"
	starbase_type = arkship
	construction_days = 180
	category = sm_defense_cat

	starbase_limit = {
		base = -1		# Uncapped
	}

	potential = {
		owner? = {
			has_technology = tech_shields_1
		}
		is_arkship_starbase = yes
	}

	show_in_tech = "tech_shields_1"

	show_tech_unlock_if = {
		is_nomadic = yes
	}

	resources = {
		category = starbase_arkship_upgrades
		cost = {
			alloys = @arkship_cost_alloys_65
			exotic_gases = @arkship_cost_strategic_45
		}
	}

	equipped_component = LARGE_SHIELD_1
	equipped_component = LARGE_SHIELD_1
	equipped_component = LARGE_SHIELD_1
	show_component_tooltips = yes
	custom_tooltip = sm_arkship_shield_tt

	ai_weight = {
		weight = 100 #use same weight here - ai weighting is done in starbase_types.txt
		modifier = {
			factor = 2
			ai_owner_prefers_shields = yes
		}
	}
}

arkship_psi_shield = {
	icon = "GFX_arkship_psi_shield"
	starbase_type = arkship
	construction_days = 180
	category = sm_defense_cat

	starbase_limit = {
		base = -1		# Uncapped
	}

	potential = {
		owner? = {
			has_technology = tech_psionic_shield
		}
		is_arkship_starbase = yes
	}

	show_in_tech = "tech_psionic_shield"

	show_tech_unlock_if = {
		is_nomadic = yes
	}

	resources = {
		category = starbase_arkship_upgrades
		cost = {
			alloys = @arkship_cost_alloys_150
			sr_zro = @arkship_cost_rare_75
		}
	}

	equipped_component = LARGE_PSI_SHIELD
	equipped_component = LARGE_PSI_SHIELD
	equipped_component = LARGE_PSI_SHIELD
	show_component_tooltips = yes
	custom_tooltip = sm_arkship_psi_shield_tt

	ai_weight = {
		weight = 125 #psionic components are weighted higher as the AI needs to be psionic to unlock them
		modifier = {
			factor = 2
			ai_owner_prefers_shields = yes
		}
	}
}

arkship_archaeo_shield = {
	icon = "GFX_arkship_archaeo_shield"
	starbase_type = arkship
	construction_days = 180
	category = sm_defense_cat

	starbase_limit = {
		base = -1		# Uncapped
	}

	potential = {
		owner? = {
			has_technology = tech_archaeoshield
		}
		is_arkship_starbase = yes
	}

	show_in_tech = "tech_archaeoshield"

	show_tech_unlock_if = {
		is_nomadic = yes
	}

	resources = {
		category = starbase_arkship_upgrades
		cost = {
			alloys = @arkship_cost_alloys_225
			minor_artifacts = @arkship_cost_rare_100
		}
	}

	equipped_component = LARGE_ARCHAEO_SHIELD
	equipped_component = LARGE_ARCHAEO_SHIELD
	equipped_component = LARGE_ARCHAEO_SHIELD
	show_component_tooltips = yes
	custom_tooltip = sm_arkship_archaeo_shield_tt

	ai_weight = {
		weight = 100 #use same weight here - ai weighting is done in starbase_types.txt
		modifier = {
			factor = 2
			ai_owner_prefers_shields = yes
		}
		modifier = {
			factor = 1.25
			ai_owner_has_archaeoengineers = yes
		}
	}
}

arkship_crystal_plating = {
	icon = "GFX_arkship_crystal_plating"
	starbase_type = arkship
	construction_days = 180
	category = sm_defense_cat

	starbase_limit = {
		base = -1		# Uncapped
	}

	potential = {
		owner? = {
			has_technology = tech_crystal_armor_1
		}
		is_arkship_starbase = yes
	}

	show_in_tech = "tech_crystal_armor_1"

	show_tech_unlock_if = {
		is_nomadic = yes
	}

	resources = {
		category = starbase_arkship_upgrades
		cost = {
			rare_crystals = 2.5
		}
	}

	equipped_component = LARGE_CRYSTAL_ARMOR_1
	equipped_component = LARGE_CRYSTAL_ARMOR_1
	equipped_component = LARGE_CRYSTAL_ARMOR_1
	show_component_tooltips = yes
	custom_tooltip = sm_arkship_crystal_plating_tt

	ai_weight = {
		weight = 100 #use same weight here - ai weighting is done in starbase_types.txt
		modifier = {
			factor = 2
			ai_owner_prefers_armor = yes
		}
	}
}

arkship_afterburner = {
	icon = "GFX_arkship_afterburner"
	starbase_type = arkship
	construction_days = 180
	category =  sm_utility_cat

	starbase_limit = {
		base = 2
	}

	potential = {
		owner? = {
			has_technology = tech_afterburners_1
		}
		is_arkship_starbase = yes
	}

	show_in_tech = "tech_afterburners_1"

	show_tech_unlock_if = {
		is_nomadic = yes
	}

	resources = {
		category = starbase_arkship_upgrades
		cost = {
			alloys = 10
		}
	}

	equipped_component = AFTERBURNER_1
	equipped_component = AFTERBURNER_1
	equipped_component = AFTERBURNER_1
	show_component_tooltips = yes
	custom_tooltip = sm_arkship_afterburner_tt

	ai_weight = {
		weight = 100 #use same weight here - ai weighting is done in starbase_types.txt
	}
}

arkship_armor_hardener = {
	icon = "GFX_arkship_armor_hardener"
	starbase_type = arkship
	construction_days = 180
	category = sm_defense_cat

	starbase_limit = {
		base = 2
	}

	potential = {
		owner? = {
			has_technology = tech_armor_hardeners_1
		}
		is_arkship_starbase = yes
	}

	show_in_tech = "tech_armor_hardeners_1"

	show_tech_unlock_if = {
		is_nomadic = yes
	}

	resources = {
		category = starbase_arkship_upgrades
		cost = {
			rare_crystals = 20
		}
	}

	equipped_component = ARMOR_HARDENER_1
	equipped_component = ARMOR_HARDENER_1
	equipped_component = ARMOR_HARDENER_1
	show_component_tooltips = yes
	custom_tooltip = sm_arkship_armor_hardener_tt

	ai_weight = {
		weight = 100 #use same weight here - ai weighting is done in starbase_types.txt
		modifier = {
			factor = 2
			ai_owner_prefers_armor = yes
		}
	}
}

arkship_shield_hardener = {
	icon = "GFX_arkship_shield_hardener"
	starbase_type = arkship
	construction_days = 180
	category = sm_defense_cat

	starbase_limit = {
		base = 2
	}

	potential = {
		owner? = {
			has_technology = tech_shield_hardeners_1
		}
		is_arkship_starbase = yes
	}

	show_in_tech = "tech_shield_hardeners_1"

	show_tech_unlock_if = {
		is_nomadic = yes
	}

	resources = {
		category = starbase_arkship_upgrades
		cost = {
			exotic_gases = 20
		}
	}

	equipped_component = SHIELD_HARDENER_1
	equipped_component = SHIELD_HARDENER_1
	equipped_component = SHIELD_HARDENER_1
	show_component_tooltips = yes
	custom_tooltip = sm_arkship_shield_hardener_tt

	ai_weight = {
		weight = 100 #use same weight here - ai weighting is done in starbase_types.txt
		modifier = {
			factor = 2
			ai_owner_prefers_shields = yes
		}
	}
}

arkship_growth_chamber = {
	icon = "GFX_spaceport_module_growth_chamber"
	starbase_type = arkship
	construction_days = 180
	category = sm_aura_cat

	starbase_limit = {
		base = 1
	}

	potential = {
		owner? = {
			country_uses_bio_ships = yes
			has_technology = tech_growth_chamber_2
		}
		is_arkship_starbase = yes
	}

	show_in_tech = "tech_growth_chamber_2"

	show_tech_unlock_if = {
		is_nomadic = yes
	}

	resources = {
		category = starbase_arkship_upgrades
		cost = {
			food = @arkship_cost_food_250
			exotic_gases = @arkship_cost_strategic_45
		}
	}

	equipped_component = ARKSHIP_GROWTH_AURA

	ai_weight = {
		weight = 100 #use same weight here - ai weighting is done in starbase_types.txt
	}
}

arkship_quantum_destabilizer = {
	icon = "GFX_arkship_quantum_destabilizer"
	starbase_type = arkship
	construction_days = 180
	category = sm_aura_cat

	starbase_limit = {
		base = 1
	}

	potential = {
		owner? = {
			has_technology = tech_titans
		}
		is_arkship_starbase = yes
	}

	# show_in_tech = "tech_titans"	# Deliberately not shown in the tech
									# see TECH_UNLOCK_ARKSHIP_TITAN_AURAS_CONSTRUCTION_TITLE

	show_tech_unlock_if = {
		is_nomadic = yes
	}

	resources = {
		category = starbase_arkship_upgrades
		cost = {
			alloys = @arkship_cost_alloys_500
		}
	}

	equipped_component = SHIP_AURA_QUANTUM_DESTABILIZER

	ai_weight = {
		weight = 100 #use same weight here - ai weighting is done in starbase_types.txt
	}
}

arkship_subspace_snare = {
	icon = "GFX_arkship_subspace_snare"
	starbase_type = arkship
	construction_days = 180
	category = sm_aura_cat

	starbase_limit = {
		base = 1
	}

	potential = {
		owner? = {
			has_technology = tech_titans
		}
		is_arkship_starbase = yes
	}

	# show_in_tech = "tech_titans"	# Deliberately not shown in the tech
									# see TECH_UNLOCK_ARKSHIP_TITAN_AURAS_CONSTRUCTION_TITLE

	show_tech_unlock_if = {
		is_nomadic = yes
	}

	resources = {
		category = starbase_arkship_upgrades
		cost = {
			alloys = @arkship_cost_alloys_500
		}
	}

	equipped_component = SHIP_AURA_SUBSPACE_SNARE

	ai_weight = {
		weight = 100 #use same weight here - ai weighting is done in starbase_types.txt
	}
}

arkship_shield_dampener = {
	icon = "GFX_arkship_shield_dampener"
	starbase_type = arkship
	construction_days = 180
	category = sm_aura_cat

	starbase_limit = {
		base = 1
	}

	potential = {
		owner? = {
			has_technology = tech_titans
		}
		is_arkship_starbase = yes
	}

	# show_in_tech = "tech_titans"	# Deliberately not shown in the tech
									# see TECH_UNLOCK_ARKSHIP_TITAN_AURAS_CONSTRUCTION_TITLE

	show_tech_unlock_if = {
		is_nomadic = yes
	}

	resources = {
		category = starbase_arkship_upgrades
		cost = {
			alloys = @arkship_cost_alloys_500
		}
	}

	equipped_component = SHIP_AURA_SHIELD_DAMPENER

	ai_weight = {
		weight = 100 #use same weight here - ai weighting is done in starbase_types.txt
	}
}

arkship_aura_strike_craft = {
	icon = "GFX_arkship_aura_strike_craft"
	starbase_type = arkship
	construction_days = 180
	category = sm_aura_cat

	starbase_limit = {
		base = 1
	}

	potential = {
		owner? = {
			has_technology = tech_juggernaut
		}
		is_arkship_starbase = yes
	}

	# show_in_tech = "tech_juggernaut"	# Deliberately not shown in the tech
										# see TECH_UNLOCK_ARKSHIP_JUGGERNAUT_AURAS_CONSTRUCTION_TITLE

	show_tech_unlock_if = {
		is_nomadic = yes
	}

	resources = {
		category = starbase_arkship_upgrades
		cost = {
			alloys = @arkship_cost_alloys_500
		}
	}

	equipped_component = SHIP_AURA_STRIKE_CRAFT

	ai_weight = {
		weight = 100 #use same weight here - ai weighting is done in starbase_types.txt
	}
}

arkship_aura_hyperlane = {
	icon = "GFX_arkship_aura_hyperlane"
	starbase_type = arkship
	construction_days = 180
	category = sm_aura_cat

	starbase_limit = {
		base = 1
	}

	potential = {
		owner? = {
			has_technology = tech_juggernaut
		}
		is_arkship_starbase = yes
	}

	# show_in_tech = "tech_juggernaut"	# Deliberately not shown in the tech
										# see TECH_UNLOCK_ARKSHIP_JUGGERNAUT_AURAS_CONSTRUCTION_TITLE

	show_tech_unlock_if = {
		is_nomadic = yes
	}

	resources = {
		category = starbase_arkship_upgrades
		cost = {
			alloys = @arkship_cost_alloys_500
		}
	}

	equipped_component = SHIP_AURA_HYPERLANE

	ai_weight = {
		weight = 100 #use same weight here - ai weighting is done in starbase_types.txt
	}
}

arkship_aura_pd_penetration = {
	icon = "GFX_arkship_aura_pd_penetration"
	starbase_type = arkship
	construction_days = 180
	category = sm_aura_cat

	starbase_limit = {
		base = 1
	}

	potential = {
		owner? = {
			has_technology = tech_juggernaut
		}
		is_arkship_starbase = yes
	}

	# show_in_tech = "tech_juggernaut"	# Deliberately not shown in the tech
										# see TECH_UNLOCK_ARKSHIP_JUGGERNAUT_AURAS_CONSTRUCTION_TITLE

	show_tech_unlock_if = {
		is_nomadic = yes
	}

	resources = {
		category = starbase_arkship_upgrades
		cost = {
			alloys = @arkship_cost_alloys_500
		}
	}

	equipped_component = SHIP_AURA_PD_PENETRATION

	ai_weight = {
		weight = 100 #use same weight here - ai weighting is done in starbase_types.txt
	}
}

arkship_aura_bombardment = {
	icon = "GFX_arkship_aura_bombardment"
	starbase_type = arkship
	construction_days = 180
	category = sm_aura_cat

	starbase_limit = {
		base = 1
	}

	potential = {
		owner? = {
			has_technology = tech_juggernaut
		}
		is_arkship_starbase = yes
	}

	# show_in_tech = "tech_juggernaut"	# Deliberately not shown in the tech
										# see TECH_UNLOCK_ARKSHIP_JUGGERNAUT_AURAS_CONSTRUCTION_TITLE

	show_tech_unlock_if = {
		is_nomadic = yes
	}

	resources = {
		category = starbase_arkship_upgrades
		cost = {
			alloys = @arkship_cost_alloys_500
		}
	}

	equipped_component = SHIP_AURA_BOMBARDMENT

	ai_weight = {
		weight = 100 #use same weight here - ai weighting is done in starbase_types.txt
	}
}

arkship_aura_range = {
	icon = "GFX_arkship_aura_range"
	starbase_type = arkship
	construction_days = 180
	category = sm_aura_cat

	starbase_limit = {
		base = 1
	}

	potential = {
		owner? = {
			has_technology = tech_juggernaut
		}
		is_arkship_starbase = yes
	}

	# show_in_tech = "tech_juggernaut"	# Deliberately not shown in the tech
										# see TECH_UNLOCK_ARKSHIP_JUGGERNAUT_AURAS_CONSTRUCTION_TITLE

	show_tech_unlock_if = {
		is_nomadic = yes
	}

	resources = {
		category = starbase_arkship_upgrades
		cost = {
			alloys = @arkship_cost_alloys_500
		}
	}

	equipped_component = SHIP_AURA_RANGE

	ai_weight = {
		weight = 100 #use same weight here - ai weighting is done in starbase_types.txt
	}
}

arkship_offspring_outlook = {
	icon = "GFX_offspring_aura_sb"
	starbase_type = arkship
	construction_days = 180
	category = sm_aura_cat

	starbase_limit = {
		base = 1
	}

	potential = {
		is_arkship_starbase = yes
		owner? = {
			has_origin = origin_progenitor_hive
		}
	}

	possible = {
		NOT = {
			colony? = {
				has_building = building_offspring_nest
			}
		}
	}

	resources = {
		category = starbase_arkship_upgrades
		cost = {
			alloys = @arkship_cost_alloys_100
			rare_crystals = @arkship_cost_strategic_45
		}
		upkeep = {
			energy = @arkship_upkeep_energy_5
		}
	}

	equipped_component = "STARBASE_OFFSPRING_OUTLOOK"

	triggered_planet_modifier = {
		potential = {
			owner? = {
				is_hive_empire = yes
			}
		}
		job_spawning_drone_add = @building_static_jobs_low
	}

	triggered_planet_modifier = {
		potential = {
			owner? = {
				has_active_tradition = tr_cybernetics_synaptic_sub_processing
			}
		}
		job_augmentor_drone_add = 200
	}

	ai_weight = {
		weight = 100
	}
}
