#############################
#
# Custom Starting Systems #
#
#############################

@distance = 50
@jumps = 3
@planet_min_size = 10
@planet_max_size = 25
@base_moon_distance = 10
@moon_min_size = 6
@moon_max_size = 10
@homeworld_min_size = 18
@homeworld_max_size = 21

# Trinary System I
custom_starting_init_01 = {
	class = "rl_trinary_stars"

	usage = custom_empire

	flags = { empire_home_system }

	init_effect = {
		every_neighbor_system = {
			set_star_flag = empire_cluster
			every_neighbor_system = {
				set_star_flag = empire_cluster
			}
		}

		generate_home_system_resources = yes
	}

	planet = {
		count = 1
		class = star
		orbit_distance = 0
		orbit_angle = 0
		size = { min = 30 max = 35 }
		has_ring = no
	}

	planet = {
		count = 1
		class = star
		orbit_distance = 260
		orbit_angle = { min = 90 max = 270 }
		size = { min = 20 max = 30 }
		has_ring = no
		satellite_naming_policy = upper_case_roman_numerals

		change_orbit = 30

		planet = {
			count = { min = 2 max = 3 }
			orbit_angle = { min = 90 max = 270 }
			class = random_non_colonizable
			orbit_distance = 25
			satellite_naming_policy = lower_case_latin_letters

			change_orbit = @base_moon_distance

			moon = {
				count = { min = 0 max = 1 }
				class = random_non_colonizable
				orbit_angle = { min = 90 max = 270 }
				orbit_distance = 5
			}
		}
	}

	planet = {
		count = 1
		class = star
		orbit_distance = 0
		orbit_angle = { min = 90 max = 270 }
		size = { min = 15 max = 30 }
		has_ring = no
		satellite_naming_policy = upper_case_roman_numerals

		change_orbit = 30

		planet = {
			count = { min = 2 max = 4 }
			orbit_angle = { min = 90 max = 270 }
			class = random_non_colonizable
			orbit_distance = 25
			satellite_naming_policy = lower_case_latin_letters

			change_orbit = @base_moon_distance
		}
	}

	change_orbit = -210

	planet = {
		count = { min = 1 max = 2 }
		orbit_distance = 15
		class = random_non_colonizable
		orbit_angle = { min = 90 max = 270 }
	}

	planet = {
		count = 1
		orbit_distance = 20
		home_planet = yes
		class = ideal_planet_class
		orbit_angle = { min = 90 max = 270 }
		size = { min = @homeworld_min_size max = @homeworld_max_size }
		deposit_blockers = none
		modifiers = none

		init_effect = {
			prevent_anomaly = yes
		}

		init_effect = {
			generate_empire_home_planet = yes
		}

		change_orbit = @base_moon_distance

		moon = {
			count = { min = 0 max = 1 }
			class = random_non_colonizable
			orbit_angle = { min = 90 max = 270 }
			orbit_distance = 5
		}
	}

	planet = {
		count = { min = 1 max = 2 }
		orbit_distance = 20
		class = pc_gas_giant
		orbit_angle = { min = 90 max = 270 }

		change_orbit = @base_moon_distance

		moon = {
			count = { min = 1 max = 2 }
			class = random_non_colonizable
			orbit_angle = { min = 90 max = 270 }
			orbit_distance = 5
		}
	}

	neighbor_system = {
		trigger = { num_guaranteed_colonies >= 2 }
		hyperlane_jumps = { min = 1 max = @jumps }
		initializer = "neighbor_t1"
	}
	neighbor_system = {
		trigger = { num_guaranteed_colonies >= 1 }
		hyperlane_jumps = { min = 1 max = @jumps }
		initializer = "neighbor_t1_first_colony"
	}
}

# Trinary System II
custom_starting_init_02 = {
	class = "rl_trinary_stars"

	usage = custom_empire

	flags = { empire_home_system }

	init_effect = {
		every_neighbor_system = {
			set_star_flag = empire_cluster
			every_neighbor_system = {
				set_star_flag = empire_cluster
			}
		}

		generate_home_system_resources = yes
	}

	planet = {
		count = 1
		class = star
		orbit_distance = 25
		orbit_angle = 0
		size = { min = 25 max = 30 }
		has_ring = no
	}

	planet = {
		count = 1
		class = star
		orbit_distance = { min = 0 max = 20 }
		orbit_angle = 120
		size = { min = 25 max = 30 }
		has_ring = no
	}

	planet = {
		count = 1
		class = star
		orbit_distance = { min = 0 max = 20 }
		orbit_angle = 120
		size = { min = 25 max = 30 }
		has_ring = no
	}

	change_orbit = 45

	planet = {
		count = { min = 1 max = 3 }
		orbit_distance = 15
		class = random_non_colonizable
		orbit_angle = { min = 90 max = 270 }
	}

	planet = {
		count = 1
		orbit_distance = 20
		home_planet = yes
		class = ideal_planet_class
		orbit_angle = { min = 90 max = 270 }
		size = { min = @homeworld_min_size max = @homeworld_max_size }
		deposit_blockers = none
		modifiers = none

		init_effect = {
			prevent_anomaly = yes
		}

		init_effect = {
			generate_empire_home_planet = yes
		}

		change_orbit = @base_moon_distance

		moon = {
			count = { min = 0 max = 1 }
			class = random_non_colonizable
			orbit_angle = { min = 90 max = 270 }
			orbit_distance = 5
		}
	}

	planet = {
		count = { min = 1 max = 3 }
		orbit_distance = 25
		class = random_non_colonizable
		orbit_angle = { min = 90 max = 270 }
	}

	planet = {
		count = { min = 1 max = 2 }
		orbit_distance = 20
		class = pc_gas_giant
		orbit_angle = { min = 90 max = 270 }

		change_orbit = @base_moon_distance

		moon = {
			count = { min = 1 max = 3 }
			class = random_non_colonizable
			orbit_angle = { min = 90 max = 270 }
			orbit_distance = 5
		}
	}

	planet = {
		count = { min = 0 max = 1 }
		orbit_distance = 20
		class = random_non_colonizable
		orbit_angle = { min = 90 max = 270 }
	}

	neighbor_system = {
		trigger = { num_guaranteed_colonies >= 2 }
		hyperlane_jumps = { min = 1 max = @jumps }
		initializer = "neighbor_t1"
	}
	neighbor_system = {
		trigger = { num_guaranteed_colonies >= 1 }
		hyperlane_jumps = { min = 1 max = @jumps }
		initializer = "neighbor_t1_first_colony"
	}
}

# Binary System I
custom_starting_init_03 = {
	class = "rl_binary_starting_stars"

	usage = custom_empire

	flags = { empire_home_system }

	init_effect = {
		every_neighbor_system = {
			set_star_flag = empire_cluster
			every_neighbor_system = {
				set_star_flag = empire_cluster
			}
		}

		generate_home_system_resources = yes
	}

	planet = {
		count = 1
		class = star
		orbit_distance = 0
		orbit_angle = 0
		size = { min = 30 max = 35 }
		has_ring = no
	}

	planet = {
		count = 1
		class = star
		orbit_distance = 280
		orbit_angle = { min = 0 max = 360 }
		size = { min = 15 max = 25 }
		has_ring = no
		satellite_naming_policy = upper_case_roman_numerals

		change_orbit = 25

		 planet = {
			count = { min = 2 max = 3 }
			class = rl_unhabitable_planets
			size = { min = 14 max = 24 }
			orbit_angle = { min = 90 max = 270 }
			orbit_distance = 25
			satellite_naming_policy = lower_case_latin_letters

			change_orbit = @base_moon_distance

			moon = {
				count = { min = 0 max = 1 }
				class = random_non_colonizable
				orbit_angle = { min = 90 max = 270 }
				orbit_distance = 5
			}
		}
	}

	change_orbit = -245

	planet = {
		count = { min = 1 max = 2 }
		orbit_distance = 15
		class = random_non_colonizable
		orbit_angle = { min = 90 max = 270 }
	}

	planet = {
		count = 1
		orbit_distance = 20
		home_planet = yes
		class = ideal_planet_class
		orbit_angle = { min = 90 max = 270 }
		size = { min = @homeworld_min_size max = @homeworld_max_size }
		deposit_blockers = none
		modifiers = none

		init_effect = {
			prevent_anomaly = yes
		}

		init_effect = {
			generate_empire_home_planet = yes
		}

		change_orbit = @base_moon_distance

		moon = {
			count = { min = 0 max = 1 }
			class = random_non_colonizable
			orbit_angle = { min = 90 max = 270 }
			orbit_distance = 5
		}
	}

	planet = {
		count = { min = 3 max = 4 }
		orbit_distance = 20
		class = pc_gas_giant
		orbit_angle = { min = 90 max = 270 }

		change_orbit = @base_moon_distance

		moon = {
			count = { min = 1 max = 2 }
			class = random_non_colonizable
			orbit_angle = { min = 90 max = 270 }
			orbit_distance = 5
		}
	}

	neighbor_system = {
		trigger = { num_guaranteed_colonies >= 2 }
		hyperlane_jumps = { min = 1 max = @jumps }
		initializer = "neighbor_t1"
	}
	neighbor_system = {
		trigger = { num_guaranteed_colonies >= 1 }
		hyperlane_jumps = { min = 1 max = @jumps }
		initializer = "neighbor_t1_first_colony"
	}
}

# Binary System II
custom_starting_init_04 = {
	class = "rl_binary_starting_stars"

	usage = custom_empire

	flags = { empire_home_system }

	init_effect = {
		every_neighbor_system = {
			set_star_flag = empire_cluster
			every_neighbor_system = {
				set_star_flag = empire_cluster
			}
		}

		generate_home_system_resources = yes
	}

	planet = {
		count = 1
		class = star
		orbit_distance = 25
		orbit_angle = 0
		size = { min = 30 max = 35 }
		has_ring = no
	}

	planet = {
		count = 1
		class = star
		orbit_distance = 0
		size = { min = 15 max = 25 }
		has_ring = no
	}

	change_orbit = 35

	planet = {
		count = { min = 1 max = 3 }
		orbit_distance = 15
		class = random_non_colonizable
		orbit_angle = { min = 90 max = 270 }
	}

	planet = {
		count = 1
		orbit_distance = 20
		home_planet = yes
		class = ideal_planet_class
		orbit_angle = { min = 90 max = 270 }
		size = { min = @homeworld_min_size max = @homeworld_max_size }
		deposit_blockers = none
		modifiers = none

		init_effect = {
			prevent_anomaly = yes
		}

		init_effect = {
			generate_empire_home_planet = yes
		}

		change_orbit = @base_moon_distance

		moon = {
			count = { min = 0 max = 1 }
			class = random_non_colonizable
			orbit_angle = { min = 90 max = 270 }
			orbit_distance = 5
		}
	}

	planet = {
		count = { min = 1 max = 3 }
		orbit_distance = 25
		class = random_non_colonizable
		orbit_angle = { min = 90 max = 270 }
	}

	planet = {
		count = { min = 1 max = 2 }
		orbit_distance = 20
		class = pc_gas_giant
		orbit_angle = { min = 90 max = 270 }

		change_orbit = @base_moon_distance

		moon = {
			count = { min = 1 max = 3 }
			class = random_non_colonizable
			orbit_angle = { min = 90 max = 270 }
			orbit_distance = 5
		}
	}

	planet = {
		count = { min = 0 max = 1 }
		orbit_distance = 20
		class = random_non_colonizable
		orbit_angle = { min = 90 max = 270 }
	}

	neighbor_system = {
		trigger = { num_guaranteed_colonies >= 2 }
		hyperlane_jumps = { min = 1 max = @jumps }
		initializer = "neighbor_t1"
	}
	neighbor_system = {
		trigger = { num_guaranteed_colonies >= 1 }
		hyperlane_jumps = { min = 1 max = @jumps }
		initializer = "neighbor_t1_first_colony"
	}
}

# Unary System I
custom_starting_init_05 = {
	class = "rl_starting_stars"
	asteroid_belt = {
		type = rocky_asteroid_belt
		radius = 115
	}

	usage = custom_empire

	flags = { empire_home_system }

	init_effect = {
		every_neighbor_system = {
			set_star_flag = empire_cluster
			every_neighbor_system = {
				set_star_flag = empire_cluster
			}
		}

		generate_home_system_resources = yes
	}

	planet = {
		count = 1
		class = star
		orbit_distance = 0
		orbit_angle = 1
		size = { min = 20 max = 30 }
		has_ring = no
	}

	change_orbit = 50

	planet = {
		count = 1
		home_planet = yes
		class = ideal_planet_class
		orbit_distance = 0
		orbit_angle = { min = 90 max = 270 }
		size = { min = @homeworld_min_size max = @homeworld_max_size }
		deposit_blockers = none
		modifiers = none

		init_effect = {
			prevent_anomaly = yes
		}

		init_effect = {
			generate_empire_home_planet = yes
		}

		change_orbit = @base_moon_distance

		moon = {
			count = { min = 0 max = 1 }
			class = random_non_colonizable
			orbit_angle = { min = 90 max = 270 }
			orbit_distance = 5
		}
	}

	planet = {
		count = 2
		orbit_distance = 20
		class = random_non_colonizable
		orbit_angle = { min = 90 max = 270 }
		change_orbit = @base_moon_distance

		moon = {
			count = { min = 0 max = 1 }
			class = random_non_colonizable
			orbit_angle = { min = 90 max = 270 }
			orbit_distance = 5
		}
	}

	change_orbit = 25

	planet = {
		count = { min = 2 max = 3 }
		class = pc_asteroid
		orbit_distance = 0
		orbit_angle = { min = 40 max = 110 }
	}

	planet = {
		count = { min = 2 max = 4 }
		orbit_distance = 25
		class = random_non_colonizable
		orbit_angle = { min = 90 max = 270 }

		change_orbit = @base_moon_distance

		moon = {
			count = { min = 0 max = 1 }
			class = random_non_colonizable
			orbit_angle = { min = 90 max = 270 }
			orbit_distance = 5
		}
	}

	planet = {
		count = { min = 1 max = 2 }
		orbit_distance = 20
		class = pc_gas_giant
		orbit_angle = { min = 90 max = 270 }

		change_orbit = @base_moon_distance

		moon = {
			count = { min = 0 max = 3 }
			class = random_non_colonizable
			orbit_angle = { min = 90 max = 270 }
			orbit_distance = 5
		}
	}

	planet = {
		count = { min = 0 max = 2 }
		orbit_distance = 20
		class = random_non_colonizable
		orbit_angle = { min = 90 max = 270 }
	}

	neighbor_system = {
		trigger = { num_guaranteed_colonies >= 2 }
		hyperlane_jumps = { min = 1 max = @jumps }
		initializer = "neighbor_t1"
	}
	neighbor_system = {
		trigger = { num_guaranteed_colonies >= 1 }
		hyperlane_jumps = { min = 1 max = @jumps }
		initializer = "neighbor_t1_first_colony"
	}
}

# Unary System II
custom_starting_init_06 = {
	class = "rl_starting_stars"
	asteroid_belt = {
		type = rocky_asteroid_belt
		radius = 85
	}

	usage = custom_empire

	flags = { empire_home_system }

	init_effect = {
		every_neighbor_system = {
			set_star_flag = empire_cluster
			every_neighbor_system = {
				set_star_flag = empire_cluster
			}
		}

		generate_home_system_resources = yes
	}

	planet = {
		count = 1
		class = star
		orbit_distance = 0
		orbit_angle = 1
		size = { min = 20 max = 30 }
		has_ring = no
	}

	change_orbit = 40

	planet = {
		count = 1
		orbit_distance = 20
		class = random_non_colonizable
		orbit_angle = { min = 90 max = 270 }
		change_orbit = @base_moon_distance

		moon = {
			count = { min = 0 max = 1 }
			class = random_non_colonizable
			orbit_angle = { min = 90 max = 270 }
			orbit_distance = 5
		}
	}

	change_orbit = 25

	planet = {
		count = { min = 1 max = 2 }
		class = pc_asteroid
		orbit_distance = 0
		orbit_angle = { min = 120 max = 300 }
	}

	planet = {
		count = 1
		orbit_distance = 25
		class = random_non_colonizable
		orbit_angle = { min = 90 max = 270 }
		change_orbit = @base_moon_distance

		moon = {
			count = { min = 0 max = 1 }
			class = random_non_colonizable
			orbit_angle = { min = 90 max = 270 }
			orbit_distance = 5
		}
	}

	planet = {
		count = 1
		orbit_distance = 25
		class = pc_gas_giant
		orbit_angle = { min = 90 max = 270 }
		size = 25

		change_orbit = @base_moon_distance

		moon = {
			count = 1
			class = random_non_colonizable
			orbit_angle = { min = 90 max = 270 }
			orbit_distance = 4
		}

		moon = {
			count = 1
			home_planet = yes
			class = ideal_planet_class
			orbit_distance = 10
			orbit_angle = { min = 90 max = 270 }
			size = { min = @homeworld_min_size max = @homeworld_max_size }
			deposit_blockers = none
			modifiers = none

			init_effect = {
				prevent_anomaly = yes
			}

			init_effect = {
				generate_empire_home_planet = yes
			}
		}
	}

	planet = {
		count = { min = 1 max = 3 }
		orbit_distance = 25
		class = random_non_colonizable
		orbit_angle = { min = 90 max = 270 }
	}

	planet = {
		count = { min = 1 max = 2 }
		orbit_distance = 20
		class = pc_gas_giant
		orbit_angle = { min = 90 max = 270 }

		change_orbit = @base_moon_distance

		moon = {
			count = { min = 0 max = 3 }
			class = random_non_colonizable
			orbit_angle = { min = 90 max = 270 }
			orbit_distance = 5
		}
	}

	planet = {
		count = { min = 0 max = 1 }
		orbit_distance = 20
		class = random_non_colonizable
		orbit_angle = { min = 90 max = 270 }
	}

	neighbor_system = {
		trigger = { num_guaranteed_colonies >= 2 }
		hyperlane_jumps = { min = 1 max = @jumps }
		initializer = "neighbor_t1"
	}
	neighbor_system = {
		trigger = { num_guaranteed_colonies >= 1 }
		hyperlane_jumps = { min = 1 max = @jumps }
		initializer = "neighbor_t1_first_colony"
	}
}

# u Andromedae
titawin_init = {
	class = "rl_binary_starting_stars"
	name = "NAME_Titawin"
	usage = custom_empire

	flags = { empire_home_system theian_system }

	init_effect = {
		every_neighbor_system = {
			set_star_flag = empire_cluster
			every_neighbor_system = {
				set_star_flag = empire_cluster
			}
		}

		generate_home_system_resources = yes
	}

	asteroid_belt = {
		type = rocky_asteroid_belt
		radius = 160
	}

	planet = {
		count = 1
		class = pc_f_star
		orbit_distance = 0
		orbit_angle = 0
		name = "NAME_Titawin_A"
		size = 32
		has_ring = no
		planet = {
			name = "NAME_Saffar"
			class = "pc_gas_giant"
			orbit_distance = 210
			orbit_angle = { min = 30 max = 270 }
			size = 20
			has_ring = no
			change_orbit = 4

			moon = {
				orbit_angle = { min = 90 max = 270 }
				size = 7
				class = "pc_barren_cold"
				orbit_distance = 12
			}
		}
		planet = {
			name = "NAME_Samh"
			class = "pc_gas_giant"
			orbit_distance = 35
			orbit_angle = { min = 30 max = 270 }
			size = 20
			has_ring = no
			change_orbit = 4
		}
		planet = {
			name = "NAME_Majriti"
			class = "pc_gas_giant"
			orbit_distance = 35
			orbit_angle = { min = 30 max = 270 }
			size = 20
			has_ring = no
			change_orbit = 4

			moon = {
				count = 2
				size = 7
				class = "pc_frozen"
				orbit_angle = { min = 90 max = 270 }
				orbit_distance = 7
			}
		}
		planet = {
			class = "pc_gas_giant"
			name = "NAME_Curiel"
			orbit_distance = 35
			orbit_angle = { min = 30 max = 270 }
			size = 20
			has_ring = no
			change_orbit = 4
		}
	}
	planet = {
		name = "NAME_PHS_03"
		class = "pc_asteroid"
		orbit_distance = 160
		orbit_angle = -230
		size = 5
		has_ring = no
	}

	planet = {
		name = "NAME_PHS_02"
		class = "pc_asteroid"
		orbit_distance = 0
		orbit_angle = -95
		size = 5
		has_ring = no
	}

	planet = {
		name = "NAME_PHS_04"
		class = "pc_asteroid"
		orbit_distance = 0
		orbit_angle = 285
		size = 5
		has_ring = no
	}

	planet = {
		name = "NAME_PHS_01"
		class = "pc_asteroid"
		orbit_distance = 0
		orbit_angle = -80
		size = 5
		has_ring = no
	}
	planet = {
		count = 1
		name = "NAME_Theia"
		class = pc_m_star
		orbit_distance = -70
		orbit_angle = 250
		size = 16
		has_ring = no
		satellite_naming_policy = upper_case_roman_numerals
		change_orbit = 25

		planet = {
			count = 1
			orbit_distance = 20
			home_planet = yes
			class = ideal_planet_class
			orbit_angle = 190
			size = { min = @homeworld_min_size max = @homeworld_max_size }
			deposit_blockers = none
			modifiers = none

			init_effect = {
				prevent_anomaly = yes
			}

			init_effect = {
				generate_empire_home_planet = yes
			}

			change_orbit = @base_moon_distance

			moon = {
				class = pc_barren
				name = "NAME_Akal_Amectuh"
				size = 4
				orbit_angle = 120
				orbit_distance = 5
			}
		}

		planet = {
			class = pc_molten
			name = "NAME_Yessefsi"
			size = 7
			orbit_angle = 90
			orbit_distance = 15
			satellite_naming_policy = lower_case_latin_letters
		}
	}

	change_orbit = -245

	neighbor_system = {
		trigger = { num_guaranteed_colonies >= 2 }
		hyperlane_jumps = { min = 1 max = @jumps }
		initializer = "neighbor_t1"
	}
	neighbor_system = {
		trigger = { num_guaranteed_colonies >= 1 }
		hyperlane_jumps = { min = 1 max = @jumps }
		initializer = "neighbor_t1_first_colony"
	}
}
