# Absolute Zero
site_absolute_zero = {
	desc = site_absolute_zero_desc
	picture = GFX_evt_cold_barren
	stages = 5
	weight = {
		base = 0
		modifier = {
			add = 50
			is_planet_class = pc_frozen
			has_shroud_dlc = yes
		}
	}
	allow = {
		exists = leader
		leader = { leader_class = scientist }
	}

	visible = {
		default_site_visible_trigger = yes
	}

	stage = {
		difficulty = 1
		icon = GFX_archaeology_runes_A1
		event = extreme_frontiers.1000
	}

	stage = {
		difficulty = 2
		icon = GFX_archaeology_runes_A2
		event = extreme_frontiers.1005
	}

	stage = {
		difficulty = 4
		icon = GFX_archaeology_runes_A3
		event = extreme_frontiers.1010
	}

	stage = {
		difficulty = 5
		icon = GFX_archaeology_runes_A4
		event = extreme_frontiers.1015
	}

	stage = {
		difficulty = 5
		icon = GFX_archaeology_runes_A5
		event = extreme_frontiers.1020
	}

	on_roll_failed = {
		from = {
			standard_archaeological_site_on_roll_failed = { RANDOM_EVENTS = all_random_events } # Wildlife is already trimmed because the planet is unhabitable
		}
	}
}

# Toxic Matrix
site_toxic_matrix = {
	desc = site_toxic_matrix_desc
	picture = GFX_evt_toxic_matrix
	stages = 4
	weight = {
		base = 0
		modifier = {
			add = 50
			is_planet_class = pc_toxic
			has_shroud_dlc = yes
		}
	}
	allow = {
		exists = leader
		leader = { leader_class = scientist }
	}

	visible = {
		default_site_visible_trigger = yes
	}

	stage = {
		difficulty = 1
		icon = GFX_archaeology_runes_B1
		event = extreme_frontiers.1100
	}

	stage = {
		difficulty = 2
		icon = GFX_archaeology_runes_B2
		event = extreme_frontiers.1105
	}

	stage = {
		difficulty = 3
		icon = GFX_archaeology_runes_B3
		event = extreme_frontiers.1110
	}

	stage = {
		difficulty = 5
		icon = GFX_archaeology_runes_B4
		event = extreme_frontiers.1115
	}

	on_roll_failed = {
		from = {
			standard_archaeological_site_on_roll_failed = { RANDOM_EVENTS = no_events }
		}
	}
}

# Ruined Reactors
site_ruined_reactors = {
	desc = site_ruined_reactors_desc
	picture = GFX_evt_alien_ruins
	stages = 5
	weight = {
		base = 0
		modifier = {
			add = 50
			OR = {
				is_planet_class = pc_toxic
				is_planet_class = pc_barren
				is_planet_class = pc_barren_cold
			}
			has_shroud_dlc = yes
			NOT = { has_deposit_for = shipclass_research_station }
		}
	}
	allow = {
		exists = leader
		leader = { leader_class = scientist }
	}

	visible = {
		default_site_visible_trigger = yes
	}

	stage = {
		difficulty = 2
		icon = GFX_archaeology_runes_C1
		event = extreme_frontiers.1200
	}

	stage = {
		difficulty = 3
		icon = GFX_archaeology_runes_C2
		event = extreme_frontiers.1205
	}

	stage = {
		difficulty = 3
		icon = GFX_archaeology_runes_C3
		event = extreme_frontiers.1210
	}

	stage = {
		difficulty = 4
		icon = GFX_archaeology_runes_C4
		event = extreme_frontiers.1215
	}

	stage = {
		difficulty = 5
		icon = GFX_archaeology_runes_C5
		event = extreme_frontiers.1220
	}

	on_roll_failed = {
		from = {
			standard_archaeological_site_on_roll_failed = { RANDOM_EVENTS = all_random_events }
		}
	}
}

# Deserted Mining Facility
site_deserted_mining_facility = {
	desc = site_deserted_mining_facility_desc
	picture = GFX_evt_barren_dig_site
	stages = 5
	weight = {
		base = 0
		modifier = {
			add = 50
			is_planet_class = pc_barren_cold
			has_shroud_dlc = yes
		}
	}
	allow = {
		exists = leader
		leader = { leader_class = scientist }
	}

	visible = {
		default_site_visible_trigger = yes
	}

	stage = {
		difficulty = 1
		icon = GFX_archaeology_runes_D1
		event = extreme_frontiers.1300
	}

	stage = {
		difficulty = 2
		icon = GFX_archaeology_runes_D2
		event = extreme_frontiers.1305
	}

	stage = {
		difficulty = 4
		icon = GFX_archaeology_runes_D3
		event = extreme_frontiers.1310
	}

	stage = {
		difficulty = 5
		icon = GFX_archaeology_runes_D4
		event = extreme_frontiers.1315
	}

	stage = {
		difficulty = 5
		icon = GFX_archaeology_runes_D5
		event = extreme_frontiers.1320
	}

	on_roll_failed = {
		from = {
			standard_archaeological_site_on_roll_failed = { RANDOM_EVENTS = all_random_events }
		}
	}
}

# Chronicles of Dendrus
site_chronicles_of_dendrus = {
	desc = site_chronicles_of_dendrus_desc
	picture = GFX_evt_chronicles_of_dendrus
	stages = 4
	weight = {
		base = 0
		modifier = {
			add = 50
			OR = {
				is_planet_class = pc_barren
				is_planet_class = pc_barren_cold
				is_planet_class = pc_toxic
				is_planet_class = pc_frozen
			}
			solar_system = {
				is_star_class = sc_black_hole
			}
			has_shroud_dlc = yes
		}
	}
	allow = {
		exists = leader
		leader = { leader_class = scientist }
	}

	visible = {
		default_site_visible_trigger = yes
	}

	on_visible = {
		country_event = { id = story.5 days = 30 }
	}

	stage = {
		difficulty = 2
		icon = GFX_archaeology_runes_E1
		event = extreme_frontiers.1400
	}

	stage = {
		difficulty = 3
		icon = GFX_archaeology_runes_E2
		event = extreme_frontiers.1405
	}

	stage = {
		difficulty = 4
		icon = GFX_archaeology_runes_E3
		event = extreme_frontiers.1410
	}

	stage = {
		difficulty = 4
		icon = GFX_archaeology_runes_E4
		event = extreme_frontiers.1415
	}

	on_roll_failed = {
		from = {
			standard_archaeological_site_on_roll_failed = { RANDOM_EVENTS = no_events }
		}
	}
}

# Georadiation Terraforming
site_georadiation_terraforming = {
	desc = site_georadiation_terraforming_desc
	picture = GFX_evt_mysterious_signal
	stages = 3
	weight = {
		base = 0
		modifier = {
			add = 50
			is_planet_class = pc_toxic
			is_terraforming_candidate = no
			has_shroud_dlc = yes
		}
	}
	allow = {
		exists = leader
		leader = { leader_class = scientist }
	}

	visible = {
		default_site_visible_trigger = yes
		is_lithoid_devouring_swarm = no
		# blocked for countries that haven't found the given strategic resources yet
		# (crystals were found via one of the projects already)
		has_country_flag = volatile_motes_found
		has_country_flag = exotic_gases_found
	}

	on_visible = {
		country_event = { id = story.5 days = 30 }
	}

	stage = {
		difficulty = 2
		icon = GFX_archaeology_runes_F1
		event = extreme_frontiers.1500
	}

	stage = {
		difficulty = 3
		icon = GFX_archaeology_runes_F2
		event = extreme_frontiers.1505
	}

	stage = {
		difficulty = 5
		icon = GFX_archaeology_runes_F3
		event = extreme_frontiers.1510
	}

	on_roll_failed = {
		from = {
			standard_archaeological_site_on_roll_failed = { RANDOM_EVENTS = no_events }
		}
	}
}
