#Xenomorph system that spawns somewhere in the galaxy
xenomorph_prime_system = {
	name = "Xenomorph Prime"
	class = sc_g
	usage = misc_system_init
	usage_odds = {
		base = 0
	}
	flags = { xenomorph_prime }
	planet = {
		class = star
		orbit_distance = 0
		size = 40
		init_effect = {
			create_ambient_object = {
				type = "space_storm_1"
				location = this
			}
			last_created_ambient_object = {
				set_location = {
					target = prev
					distance = 0
					angle = random
				}
			}
		}
	}
	change_orbit = 60
	planet = {
		class = "pc_xenomorph_hive"
		satellite_naming_policy = upper_case_roman_numerals
		orbit_distance = 0
		orbit_angle = 1
		size = 30
		has_ring = no
		name = "Xenomorph Prime"
		init_effect = {
			set_planet_flag = xenomorph_prime
			set_planet_flag = xenomorph_hive_world
			add_modifier = { modifier = xenomorph_hive_world days = -1 }
		}
	}
	change_orbit = 60
	planet = {
		class = "pc_broken"
		satellite_naming_policy = upper_case_roman_numerals
		orbit_distance = 0
		orbit_angle = 210
		size = 15
		has_ring = no
		name = "Former Xenomorph Colony"
	}
	change_orbit = 60
	planet = {
		class = "pc_broken"
		satellite_naming_policy = upper_case_roman_numerals
		orbit_distance = 0
		orbit_angle = 75
		size = 15
		has_ring = no
		name = "Former Xenomorph Colony"
	}
	change_orbit = 10
	planet = {
		class = "pc_broken"
		satellite_naming_policy = upper_case_roman_numerals
		orbit_distance = 0
		orbit_angle = 120
		size = 15
		has_ring = no
		name = "Former Xenomorph Colony"
	}
	planet = {
		class = "pc_broken"
		satellite_naming_policy = upper_case_roman_numerals
		orbit_distance = 0
		orbit_angle = 200
		size = 15
		has_ring = no
		name = "Former Xenomorph Colony"
	}
	change_orbit = 5
	planet = {
		class = "pc_broken"
		satellite_naming_policy = upper_case_roman_numerals
		orbit_distance = 0
		orbit_angle = 90
		size = 15
		has_ring = no
		name = "Former Xenomorph Colony"
	}
	planet = {
		class = "pc_broken"
		satellite_naming_policy = upper_case_roman_numerals
		orbit_distance = 0
		orbit_angle = 130
		size = 15
		has_ring = no
		name = "Former Xenomorph Colony"
	}
	change_orbit = 30
	planet = {
		class = "pc_broken"
		satellite_naming_policy = upper_case_roman_numerals
		orbit_distance = 0
		orbit_angle = 245
		size = 15
		has_ring = no
		name = "Former Xenomorph Colony"
	}
	change_orbit = 10
	planet = {
		class = "pc_broken"
		satellite_naming_policy = upper_case_roman_numerals
		orbit_distance = 0
		orbit_angle = 110
		size = 15
		has_ring = no
		name = "Former Xenomorph Colony"
	}
	change_orbit = 10
	planet = {
		class = "pc_broken"
		satellite_naming_policy = upper_case_roman_numerals
		orbit_distance = 0
		orbit_angle = 170
		size = 15
		has_ring = no
		name = "Former Xenomorph Colony"
	}
	init_effect = {
		save_global_event_target_as = xenomorph_prime_system
		create_space_storm = yes
	}
}

# Scattered Brood NPC starting system. Provides a habitable hive world.
xeno_scattered_brood_system = {
	name = "Scattered Brood"
	class = sc_g
	usage = misc_system_init
	usage_odds = {
		base = 0
	}
	flags = { xenomorph_scattered_brood_system }
	planet = {
		class = star
		orbit_distance = 0
		size = 25
	}
	change_orbit = 30
	planet = {
		class = "pc_xenomorph_hive"
		orbit_distance = 30
		size = 18
		has_ring = no
		init_effect = {
			set_planet_flag = xenomorph_hive_world
			set_planet_flag = xenomorph_scattered_brood_homeworld
			add_modifier = { modifier = xenomorph_hive_world days = -1 }
			prevent_anomaly = yes
		}
	}
	change_orbit = 20
	planet = {
		count = { min = 2 max = 4 }
		orbit_distance = { min = 15 max = 25 }
		orbit_angle = { min = 90 max = 270 }
	}
}
