@distance = 50
@base_moon_distance = 10

### Ringworld
ringworld_st_system = {
	asteroids_distance = 150
	usage = custom_empire	

	class = "sc_g"
	
	planet = {
		class = star
		orbit_distance = 0
	}
	
	change_orbit = 45
	
	planet = {
		class = "pc_ringworld_habitable"
		name = "NAME_Habitable_Section_A"
		orbit_angle = 30
		size = 25
		orbit_distance = 0
		tile_blockers = none
		modifiers = none
		starting_planet = yes
		
		init_effect = {
			prevent_anomaly = yes
			change_pc = "pc_ringworld_habitable"
			set_planet_flag = megastructure
			trigger_megastructure_icon = yes
		}
		
		init_effect = {
			generate_start_buildings_and_blockers = yes		
		}

	}
	planet = {
		class = "pc_ringworld_tech"
		name = "NAME_Ring_Section"
		orbit_angle = 30
		orbit_distance = 0
	}
	planet = {
		class = "pc_ringworld_seam"
		name = "NAME_Ring_Section"
		orbit_angle = 30
		orbit_distance = 0
	}
	planet = {
		class = "pc_ringworld_habitable"
		name = "NAME_Habitable_Section_B"
		orbit_angle = 30
		orbit_distance = 0
		tile_blockers = none
		modifiers = none
		set_planet_flag = megastructure
		
		init_effect = {
			prevent_anomaly = yes
			set_planet_flag = megastructure
			trigger_megastructure_icon = yes
		}
	}
	planet = {
		class = "pc_ringworld_tech"
		name = "NAME_Ring_Section"
		orbit_angle = 30
		orbit_distance = 0
	}
	planet = {
		class = "pc_ringworld_seam"
		name = "NAME_Ring_Section"
		orbit_angle = 30
		orbit_distance = 0
	}
	planet = {
		class = "pc_ringworld_habitable"
		name = "NAME_Habitable_Section_C"
		orbit_angle = 30
		orbit_distance = 0
		tile_blockers = none
		modifiers = none
		set_planet_flag = megastructure
		
		init_effect = {
			prevent_anomaly = yes
			set_planet_flag = megastructure
			trigger_megastructure_icon = yes
		}
	}
	planet = {
		class = "pc_ringworld_tech"
		name = "NAME_Ring_Section"
		orbit_angle = 30
		orbit_distance = 0
	}
	planet = {
		class = "pc_ringworld_seam"
		name = "NAME_Ring_Section"
		orbit_angle = 30
		orbit_distance = 0
	}
	planet = {
		class = "pc_ringworld_habitable"
		name = "NAME_Habitable_Section_D"
		orbit_angle = 30
		orbit_distance = 0
		tile_blockers = none
		modifiers = none
		set_planet_flag = megastructure
		
		init_effect = {
			prevent_anomaly = yes
			set_planet_flag = megastructure
			trigger_megastructure_icon = yes
		}
	}
	planet = {
		class = "pc_ringworld_tech"
		name = "NAME_Ring_Section"
		orbit_angle = 30
		orbit_distance = 0
	}
	planet = {
		class = "pc_ringworld_seam"
		name = "NAME_Ring_Section"
		orbit_angle = 30
		orbit_distance = 0
	}
	
	change_orbit = 105
	
	planet = {
		count = { min = 1 max = 4 }
		class = random_asteroid
		orbit_distance = 0
		orbit_angle = { min = 90 max = 270 }
	}
	
	change_orbit = 45
	
	planet = {
		class = pc_gas_giant
		orbit_angle = { min = 90 max = 270 }
		size = 25
		
		change_orbit = @base_moon_distance
		
		moon = {
			count = { min = 1 max = 4 }
			size = { min = 8 max = 20 }
			orbit_angle = { min = 90 max = 270 }
			orbit_distance = 6
		}
	}
	
	change_orbit = 30
	
	planet = {
		count = { min = 0 max = 2 }
		orbit_distance = 20
		orbit_angle = { min = 90 max = 270 }
	}
}

### Ringworld Damaged
ringworld_dmg_st_system = {
	asteroids_distance = 150
	usage = custom_empire	

	class = "sc_g"
	
	planet = {
		class = star
		orbit_distance = 0
	}
	
	change_orbit = 45
	
	planet = {
		class = "pc_ringworld_habitable"
		name = "NAME_Habitable_Section_A"
		orbit_angle = 30
		size = 25
		orbit_distance = 0
		tile_blockers = none
		modifiers = none
		starting_planet = yes
		
		init_effect = {
			prevent_anomaly = yes
			change_pc = "pc_ringworld_habitable"
			set_planet_flag = megastructure
			trigger_megastructure_icon = yes
		}

		init_effect = {
			generate_start_buildings_and_blockers = yes		
		}
	}
	planet = {
		class = "pc_ringworld_tech"
		name = "NAME_Ring_Section"
		orbit_angle = 30
		orbit_distance = 0
	}
	planet = {
		class = "pc_ringworld_seam"
		name = "NAME_Ring_Section"
		orbit_angle = 30
		orbit_distance = 0
	}
	planet = {
		class = "pc_ringworld_habitable"
		name = "NAME_Habitable_Section_B"
		orbit_angle = 30
		orbit_distance = 0
		tile_blockers = none
		modifiers = none
		
		init_effect = {
			prevent_anomaly = yes
			set_planet_flag = megastructure
			trigger_megastructure_icon = yes
		}
	}
	planet = {
		class = "pc_ringworld_tech"
		name = "NAME_Ring_Section"
		orbit_angle = 30
		orbit_distance = 0
	}
	planet = {
		class = "pc_ringworld_seam"
		name = "NAME_Ring_Section"
		orbit_angle = 30
		orbit_distance = 0
	}
	planet = {
		class = "pc_ringworld_habitable"
		name = "NAME_Habitable_Section_C"
		orbit_angle = 30
		orbit_distance = 0
		tile_blockers = none
		modifiers = none
		
		init_effect = {
			prevent_anomaly = yes
			set_planet_flag = megastructure
			trigger_megastructure_icon = yes
		}
	}
	planet = {
		class = "pc_ringworld_tech"
		name = "NAME_Ring_Section"
		orbit_angle = 30
		orbit_distance = 0
		
	}
	planet = {
		class = "pc_ringworld_seam_damaged"
		name = "NAME_Ring_Section"
		orbit_angle = 30
		orbit_distance = 0
		
		init_effect = {
			create_ambient_object = {
				type = "medium_debris_01_object"
				location = THIS
			}
		}
	}
	planet = {
		class = "pc_ringworld_habitable"
		name = "NAME_Habitable_Section_D"
		orbit_angle = 30
		orbit_distance = 0
		tile_blockers = none
		modifiers = none
		
		init_effect = {
			prevent_anomaly = yes
			set_planet_flag = megastructure
			trigger_megastructure_icon = yes
		}
	}
	planet = {
		class = "pc_ringworld_tech"
		name = "NAME_Ring_Section"
		orbit_angle = 30
		orbit_distance = 0
	}
	planet = {
		class = "pc_ringworld_seam"
		name = "NAME_Ring_Section"
		orbit_angle = 30
		orbit_distance = 0
	}
	
	change_orbit = 105
	
	planet = {
		count = { min = 1 max = 4 }
		class = random_asteroid
		orbit_distance = 0
		orbit_angle = { min = 90 max = 270 }
	}
	
	change_orbit = 45
	
	planet = {
		class = pc_gas_giant
		orbit_angle = { min = 90 max = 270 }
		size = 25
		
		change_orbit = @base_moon_distance
		
		moon = {
			count = { min = 1 max = 4 }
			size = { min = 8 max = 20 }
			orbit_angle = { min = 90 max = 270 }
			orbit_distance = 6
		}
	}
	
	change_orbit = 30
	
	planet = {
		count = { min = 0 max = 2 }
		orbit_distance = 20
		orbit_angle = { min = 90 max = 270 }
	}
}

### Ringworld Destroyed
ringworld_des_st_system = {
	asteroids_distance = 150
	usage = custom_empire	

	class = "sc_g"
	
	planet = {
		class = star
		orbit_distance = 0
		orbit_angle = 0
	}
	
	change_orbit = 45

	planet = {
		class = "pc_ringworld_habitable"
		name = "NAME_Habitable_Section_A"
		orbit_angle = -30
		size = 25
		orbit_distance = 0
		tile_blockers = none
		modifiers = none
		starting_planet = yes
		
		init_effect = {
			prevent_anomaly = yes
			change_pc = "pc_ringworld_habitable"
			set_planet_flag = megastructure
			trigger_megastructure_icon = yes
		}

		init_effect = {
			generate_start_buildings_and_blockers = yes		
		}
	}
	planet = {
		class = "pc_ringworld_tech"
		name = "NAME_Ring_Section"
		orbit_angle = 30
		orbit_distance = 0
		set_planet_flag = megastructure
	}
	planet = {
		class = "pc_ringworld_seam"
		name = "NAME_Ring_Section"
		orbit_angle = 30
		orbit_distance = 0
		set_planet_flag = megastructure
	}	
	init_effect = {
		spawn_megastructure = {
			type = "ring_world_ruined"
			orbit_angle = 90
			orbit_distance = 45
			location = planet
		}
		spawn_megastructure = {
			type = "ring_world_ruined"
			orbit_angle = 180
			orbit_distance = 45
			location = planet
		}
		spawn_megastructure = {
			type = "ring_world_ruined"
			orbit_angle = 270
			orbit_distance = 45
			location = planet
		}
	}

	change_orbit = 105
	
	planet = {
		count = { min = 1 max = 4 }
		class = random_asteroid
		orbit_distance = 0
		orbit_angle = { min = 90 max = 270 }
	}
	
	change_orbit = 45
	
	planet = {
		class = pc_gas_giant
		orbit_angle = { min = 90 max = 270 }
		size = 25
		
		change_orbit = @base_moon_distance
		
		moon = {
			count = { min = 1 max = 4 }
			size = { min = 8 max = 20 }
			orbit_angle = { min = 90 max = 270 }
			orbit_distance = 6
		}
	}
	
	change_orbit = 30
	
	planet = {
		count = { min = 0 max = 2 }
		orbit_distance = 20
		orbit_angle = { min = 90 max = 270 }
	}
}

### Ringworld Super
ringworld_sup_st_system = {
	asteroids_distance = 150
	usage = custom_empire	

	class = "sc_g"
	
	planet = {
		class = star
		orbit_distance = 0
	}
	
	change_orbit = 45
	
	planet = {
		class = "pc_ringworld_habitable"
		name = "NAME_Ring_Section_G"
		orbit_angle = 30
		size = 25
		orbit_distance = 0
		tile_blockers = none
		modifiers = none
		starting_planet = yes
		
		init_effect = {
			prevent_anomaly = yes
			change_pc = "pc_ringworld_habitable"
			set_planet_flag = megastructure
			trigger_megastructure_icon = yes
		}

		init_effect = {
			generate_start_buildings_and_blockers = yes		
		}
	}
	planet = {
		class = "pc_ringworld_habitable"
		name = "NAME_Ring_Segment_H"
		orbit_angle = 30
		orbit_distance = 0
		tile_blockers = none
		modifiers = none
		
		init_effect = {
			prevent_anomaly = yes
			set_planet_flag = megastructure
			trigger_megastructure_icon = yes
		}
	}
	planet = {
		class = "pc_ringworld_habitable"
		name = "NAME_Ring_Segment_I"
		orbit_angle = 30
		orbit_distance = 0
		tile_blockers = none
		modifiers = none
		
		init_effect = {
			prevent_anomaly = yes
			set_planet_flag = megastructure
			trigger_megastructure_icon = yes
		}
	}
	planet = {
		class = "pc_ringworld_habitable"
		name = "NAME_Ring_Segment_J"
		orbit_angle = 30
		orbit_distance = 0
		tile_blockers = none
		modifiers = none
		
		init_effect = {
			prevent_anomaly = yes
			set_planet_flag = megastructure
			trigger_megastructure_icon = yes
		}
	}
	planet = {
		class = "pc_ringworld_habitable"
		name = "NAME_Ring_Segment_K"
		orbit_angle = 30
		orbit_distance = 0
		tile_blockers = none
		modifiers = none
		
		init_effect = {
			prevent_anomaly = yes
			set_planet_flag = megastructure
			trigger_megastructure_icon = yes
		}
	}
	planet = {
		class = "pc_ringworld_habitable"
		name = "NAME_Ring_Segment_L"
		orbit_angle = 30
		orbit_distance = 0
		tile_blockers = none
		modifiers = none
		
		init_effect = {
			prevent_anomaly = yes
			set_planet_flag = megastructure
			trigger_megastructure_icon = yes
		}
	}
	planet = {
		class = "pc_ringworld_habitable"
		name = "NAME_Ring_Segment_A"
		orbit_angle = 30
		orbit_distance = 0
		tile_blockers = none
		modifiers = none
		
		init_effect = {
			prevent_anomaly = yes
			set_planet_flag = megastructure
			trigger_megastructure_icon = yes
		}
	}
	planet = {
		class = "pc_ringworld_habitable"
		name = "NAME_Ring_Segment_B"
		orbit_angle = 30
		orbit_distance = 0
		tile_blockers = none
		modifiers = none
		
		init_effect = {
			prevent_anomaly = yes
			set_planet_flag = megastructure
			trigger_megastructure_icon = yes
		}
	}
	planet = {
		class = "pc_ringworld_habitable"
		name = "NAME_Ring_Segment_C"
		orbit_angle = 30
		orbit_distance = 0
		tile_blockers = none
		modifiers = none
		
		init_effect = {
			prevent_anomaly = yes
			set_planet_flag = megastructure
			trigger_megastructure_icon = yes
		}
	}
	planet = {
		class = "pc_ringworld_habitable"
		name = "NAME_Ring_Segment_D"
		orbit_angle = 30
		orbit_distance = 0
		tile_blockers = none
		modifiers = none
		
		init_effect = {
			prevent_anomaly = yes
			set_planet_flag = megastructure
			trigger_megastructure_icon = yes
		}
	}
	planet = {
		class = "pc_ringworld_habitable"
		name = "NAME_Ring_Segment_E"
		orbit_angle = 30
		orbit_distance = 0
		tile_blockers = none
		modifiers = none
		
		init_effect = {
			prevent_anomaly = yes
			set_planet_flag = megastructure
			trigger_megastructure_icon = yes
		}
	}
	planet = {
		class = "pc_ringworld_habitable"
		name = "NAME_Ring_Segment_F"
		orbit_angle = 30
		orbit_distance = 0
		tile_blockers = none
		modifiers = none
		
		init_effect = {
			prevent_anomaly = yes
			set_planet_flag = megastructure
			trigger_megastructure_icon = yes
		}
	}
	
	change_orbit = 105
	
	planet = {
		count = { min = 1 max = 4 }
		class = random_asteroid
		orbit_distance = 0
		orbit_angle = { min = 90 max = 270 }
	}
	
	change_orbit = 45
	
	planet = {
		class = pc_gas_giant
		orbit_angle = { min = 90 max = 270 }
		size = 25
		
		change_orbit = @base_moon_distance
		
		moon = {
			count = { min = 1 max = 4 }
			size = { min = 8 max = 20 }
			orbit_angle = { min = 90 max = 270 }
			orbit_distance = 6
		}
	}
	
	change_orbit = 30
	
	planet = {
		count = { min = 0 max = 2 }
		orbit_distance = 20
		orbit_angle = { min = 90 max = 270 }
	}
}