######################
# BASE GAME ARC SITES
######################

# Note that a base-game arc site must offer a reward other than Minor Artifacts (or else feature no rewards).

# empty type for random assignments, = random .. handled via code. So do not rename or remove this entry!
random =  {
	visible = { OR = { } }
	on_roll_failed = { from = { } }
}

# Ruins of Shallash
site_ruins_of_shallash = {
	desc = "site_ruined_starsystem_intro"
	picture = GFX_evt_tomb_world
	stages = 4
	weight = 0 #set via initialiser
	allow = {
		exists = leader
		leader = { leader_class = scientist }
	}
	visible = {
		default_site_visible_trigger = yes
	}

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

	stage = {
		difficulty = 1
		icon = GFX_archaeology_runes_E1
		event = federations2.2
	}

	stage = {
		difficulty = 2
		icon = GFX_archaeology_runes_E2
		event = federations2.3
	}

	stage = {
		difficulty = 3
		icon = GFX_archaeology_runes_E3
		event = federations2.4
	}

	stage = {
		difficulty = 4
		icon = GFX_archaeology_runes_E4
		event = federations2.5
	}

	on_roll_failed = {
		from = {
			standard_archaeological_site_on_roll_failed = { RANDOM_EVENTS = site_ruins_of_shallash_random_events }
		}
	}
}

# Message in a Bottle
site_space_shanty_dig = {
	desc = {
		trigger = { 
			owner = {
				country_uses_bio_ships = no
			}
		} 
		text = "space_shanty_intro"
	}
	desc = {
		trigger = { 
			owner = {
				country_uses_bio_ships = yes
			}
		} 
		text = "space_shanty_intro_bio"
	}
	picture = GFX_evt_frozen
	stages = 5
	weight = 0 #via system initializer

	allow = {
		exists = leader
		leader = { leader_class = scientist }
	}

	visible = {
		default_site_visible_trigger = yes
	}

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

	stage = {
		difficulty = 1
		icon = GFX_archaeology_runes_A2
		event = ancrel.15021
	}

	stage = {
		difficulty = 1
		icon = GFX_archaeology_runes_A2
		event = ancrel.15022
	}

	stage = {
		difficulty = 1
		icon = GFX_archaeology_runes_A3
		event = ancrel.15023
	}

	stage = {
		difficulty = 1
		icon = GFX_archaeology_runes_A3
		event = ancrel.15024
	}

	stage = {
		difficulty = 1
		icon = GFX_archaeology_runes_A3
		event = ancrel.15025
	}

	on_roll_failed = {
		from = {
			standard_archaeological_site_on_roll_failed = { RANDOM_EVENTS = site_spaceship_random_events }
		}
	}
}

###################
# RANDOM ARC SITES
###################
# i.e. spawned via on_survey

# Fumongus
site_fumongus_dig = {
	desc = site_fumongus_intro
	picture = GFX_evt_warm_barren
	stages = 5
	weight = 0 #via system initializer
	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_C1
		event = ancrel.13100
	}

	stage = {
		difficulty = 4
		icon = GFX_archaeology_runes_C2
		event = ancrel.13105
	}

	stage = {
		difficulty = 4
		icon = GFX_archaeology_runes_C3
		event = ancrel.13110
	}

	stage = {
		difficulty = 6
		icon = GFX_archaeology_runes_C4
		event = ancrel.13115
	}

	stage = {
		difficulty = 5
		icon = GFX_archaeology_runes_C5
		event = ancrel.13120
	}

	on_roll_failed = {
		from = {
			standard_archaeological_site_on_roll_failed = { RANDOM_EVENTS = site_fumongus_random_events }
		}
	}
}

site_ancient_robot_world = {
	desc = site_ancient_robot_world_desc
	picture = GFX_evt_ai_planet
	stages = 5
	weight = 0

	allow = {
		exists = leader
		leader = { leader_class = scientist }
	}

	visible = {
		default_site_visible_trigger = yes
	}

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

	stage = {
		difficulty = 1
		icon = GFX_archaeology_runes_D1
		event = ancrel.12070
	}

	stage = {
		difficulty = 2
		icon = GFX_archaeology_runes_D3
		event = ancrel.12075
	}

	stage = {
		difficulty = 2
		icon = GFX_archaeology_runes_D6
		event = ancrel.12080
	}

	stage = {
		difficulty = 5
		icon = GFX_archaeology_runes_D2
		event = ancrel.12085
	}

	stage = {
		difficulty = 8
		icon = GFX_archaeology_runes_D5
		event = ancrel.12090
	}

	on_roll_failed = {
		from = {
			standard_archaeological_site_on_roll_failed = { RANDOM_EVENTS = no_events } #maybe later?
		}
	}
}

# The Mask of Transformation
site_transformation_dig = {
	desc = site_transformation_intro
	picture = GFX_evt_tropical
	stages = 4
	weight = {
		base = 0
		modifier = {
			add = 50
			is_planet_class = pc_tropical
			has_moon = yes
		}
	}
	allow = {
		exists = leader
		leader = { leader_class = scientist }
	}

	visible = {
		default_site_visible_trigger = yes
	}

	stage = {
		difficulty = 2
		icon = GFX_archaeology_runes_C1
		event = ancrel.15000
	}

	stage = {
		difficulty = 3
		icon = GFX_archaeology_runes_C2
		event = ancrel.15001
	}

	stage = {
		difficulty = 4
		icon = GFX_archaeology_runes_C3
		event = ancrel.15002
	}

	stage = {
		difficulty = 3
		icon = GFX_archaeology_runes_C4
		event = ancrel.15003
	}

	on_roll_failed = {
		from = {
			standard_archaeological_site_on_roll_failed = { RANDOM_EVENTS = site_transformation_random_events }
		}
	}
}

# Tiyanki Space Graveyard
site_tiyanki_graveyard = {
	desc = site_tiyanki_graveyard_intro
	picture = GFX_evt_gray_goo
	stages = 5
	max_instances = 1
	weight = 0 # Generated from an event
	allow = {
		is_ship_class = shipclass_science_ship
		exists = leader
	}

	visible = {
		has_global_flag = tiyanki_graveyard_access
		has_country_flag = tiyanki_encountered
		default_site_visible_trigger = yes
	}

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

	stage = {
		difficulty = 3
		icon = GFX_archaeology_runes_B1
		event = ancrel.14100
	}

	stage = {
		difficulty = 3
		icon = GFX_archaeology_runes_B2
		event = ancrel.14200
	}

	stage = {
		difficulty = 3
		icon = GFX_archaeology_runes_B3
		event = ancrel.14300
	}

	stage = {
		difficulty = 4
		icon = GFX_archaeology_runes_B4
		event = ancrel.14400
	}

	stage = {
		difficulty = 5
		icon = GFX_archaeology_runes_B5
		event = ancrel.14500
	}

	on_roll_failed = {
		from = {
			standard_archaeological_site_on_roll_failed = { RANDOM_EVENTS = tiyanki_graveyard_random_events }
		}
	}
}

# Under the Ice
site_ice_trauma = {
	desc = site_ice_trauma_desc
	picture = GFX_evt_frozen
	stages = 5

	weight = {
		base = 0
		modifier = {
			add = 30
			is_planet_class = pc_frozen
		}
		modifier = {
			add = 5
			is_cold = yes #inhabitable planets
		}
	}
	max_instances = 1
	allow = { #fleet scope | from = arcsite
		exists = leader
		leader = { leader_class = scientist }
	}
	visible = { #country scope
		default_site_visible_trigger = yes
		is_regular_empire = yes
		is_homicidal = no
	}
	on_visible = {
		set_global_flag = site_ice_trauma_found
	}

	stage = {
		difficulty = { min = 1 max = 3 }
		icon = GFX_archaeology_runes_A1
		event = arcsite.1000
	}
	stage = {
		difficulty = 3
		icon = GFX_archaeology_runes_A2
		event = arcsite.1005
	}
	stage = {
		difficulty = { min = 2 max = 4 }
		icon = GFX_archaeology_runes_A3
		event = arcsite.1010
	}
	stage = {
		difficulty = 4
		icon = GFX_archaeology_runes_A4
		event = arcsite.1015
	}
	stage = {
		difficulty = 2
		icon = GFX_archaeology_runes_A5
		event = arcsite.1020
	}

	on_roll_failed = {
		from = {
			standard_archaeological_site_on_roll_failed = {
				RANDOM_EVENTS = site_ice_trauma_random_events
			}
		}
	}
}

# Engineered Species
site_engineered_species = {
	desc = site_engineered_species_desc
	picture = GFX_evt_alien_wildlife
	stages = 5

	weight = {
		base = 0
		modifier = {
			add = 25
			habitable_planet = yes
		}
	}
	max_instances = 1
	allow = { #fleet scope | from = arcsite
		exists = leader
		leader = { leader_class = scientist }
	}
	visible = { #country scope
		default_site_visible_trigger = yes
	}

	stage = {
		difficulty = { min = 2 max = 3 }
		icon = GFX_archaeology_runes_A1
		event = arcsite.2000
	}
	stage = {
		difficulty = 3
		icon = GFX_archaeology_runes_A2
		event = arcsite.2010
	}
	stage = {
		difficulty = 3
		icon = GFX_archaeology_runes_A3
		event = arcsite.2020
	}
	stage = {
		difficulty = 5
		icon = GFX_archaeology_runes_A4
		event = arcsite.2030
	}
	stage = {
		difficulty = { min = 5 max = 7 }
		icon = GFX_archaeology_runes_A5
		event = arcsite.2040
	}

	on_roll_failed = {
		from = {
			standard_archaeological_site_on_roll_failed = { RANDOM_EVENTS = site_engineered_species_random_events } #Random Events
		}
	}
}

# Debris Ring
site_debris_belt = {
	desc = site_debris_belt_desc
	picture = GFX_evt_space_debris
	stages = 4

	weight = 0 #set via initialiser
	allow = {
		exists = leader
		leader = { leader_class = scientist }
	}
	visible = {
		default_site_visible_trigger = yes
	}

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

	#difficulty a bit high because gives relic at end
	stage = {
		difficulty = 9
		icon = GFX_archaeology_runes_C1
		event = arcsite.2500
	}
	stage = {
		difficulty = 8
		icon = GFX_archaeology_runes_C2
		event = arcsite.2505
	}
	stage = {
		difficulty = 6
		icon = GFX_archaeology_runes_C3
		event = arcsite.2515 #arcsite.2510 is on vacation... permanently (no actually I messed up the numbers)
	}
	stage = {
		difficulty = 6
		icon = GFX_archaeology_runes_C4
		event = arcsite.2520
	}

	on_roll_failed = {
		from = {
			standard_archaeological_site_on_roll_failed = { RANDOM_EVENTS = space_station_random_events } #Random Events
		}
	}
}

#Krazura Arcsite - AoW / Stellaris Crossover
site_krazura_dig = {
	desc = site_krazura_desc
	picture = GFX_evt_overgrown_city
	stages = 5
	weight = {
		base = 0
		modifier = {
			add = 15
			habitable_planet = yes
		}
	}
	allow = {
		exists = leader
		leader = { leader_class = scientist }
	}
	visible = {
		default_site_visible_trigger = yes
	}

	stage = {
		difficulty = 3
		icon = GFX_archaeology_runes_A1
		event = arcsite.3025
	}
	stage = {
		difficulty = 3
		icon = GFX_archaeology_runes_A2
		event = arcsite.3030
	}
	stage = {
		difficulty = 3
		icon = GFX_archaeology_runes_A3
		event = arcsite.3035
	}
	stage = {
		difficulty = 5
		icon = GFX_archaeology_runes_A4
		event = arcsite.3040
	}
	stage = {
		difficulty = 6
		icon = GFX_archaeology_runes_A5
		event = arcsite.3045
	}

	on_roll_failed = {
		from = {
			standard_archaeological_site_on_roll_failed = { RANDOM_EVENTS = site_krazura_random_events } #Random Events
		}
	}
}
