
special_project = {
	key = "DEAL_WITH_FLORA"
	#cost = 0
	days_to_research = 60
	tech_department = society_technology
	picture = GFX_evt_alien_nature
	icon = "gfx/interface/icons/situation_log/situation_log_quest.dds"

	event_scope = ship_event

	requirements = {
		shipclass_science_ship = 1
		leader = scientist
		#skill = 3
	}

	on_success = {
		ship_event = { id = anomaly.91 }
	}
}

special_project = {
	key = "HELPFUL_DRONES_1_PROJECT"
	#cost = 80
	days_to_research = 30
	tech_department = engineering_technology
	picture = GFX_evt_satellite_in_orbit
	icon = "gfx/interface/icons/situation_log/situation_log_quest.dds"

	event_scope = ship_event

	requirements = {
		shipclass_science_ship = 1
		leader = scientist
		#skill = 2
	}

	on_success = {
		from = {
			carrier_event = { id = colony.1501 }
		}
	}
}

special_project = {
	key = "POLLEN_1_PROJECT"
	#cost = 0
	days_to_research = 20
	tech_department = society_technology
	timelimit = 1080
	picture = GFX_evt_alien_planet
	icon = "gfx/interface/icons/situation_log/situation_log_quest.dds"

	event_scope = ship_event

	requirements = {
		shipclass_science_ship = 1
		leader = scientist
		#skill = 2
	}

	on_success = {
		from = { carrier_event = { id = colony.1534 } }
	}
}

special_project = {
	key = "POLLEN_2_PROJECT"
	#cost = 200
	days_to_research = 30
	tech_department = society_technology
	timelimit = 1080
	picture = GFX_evt_alien_planet
	icon = "gfx/interface/icons/situation_log/situation_log_quest.dds"

	event_scope = ship_event

	requirements = {
		shipclass_science_ship = 1
		leader = scientist
		#skill = 3
	}

	on_success = {
		from = { carrier_event = { id = colony.1523 } }
	}
}

special_project = {
	key = "POLLEN_3_PROJECT"
	days_to_research = 10
	tech_department = society_technology
	timelimit = 1080
	picture = GFX_evt_alien_planet
	icon = "gfx/interface/icons/situation_log/situation_log_quest.dds"

	event_scope = ship_event

	requirements = {
		shipclass_science_ship = 1
		leader = scientist
	}

	on_success = {
		from = { carrier_event = { id = colony.1531 } }
	}

	on_fail = {
		fromfrom = { carrier_event = { id = colony.1532 } }
	}
}

special_project = {
	key = "OLD_GODS_BENEFACTRESS_PROJECT"
	event_chain = old_gods_chain
	#cost = 30
	days_to_research = 90
	tech_department = society_technology
	timelimit = -1
	picture = GFX_evt_archaeological_dig
	icon = "gfx/interface/icons/situation_log/situation_log_quest.dds"

	event_scope = ship_event

	requirements = {
		shipclass_science_ship = 1
		leader = scientist
		#skill = 3
	}

	on_success = { ship_event = { id = anomaly.165 } }
}

special_project = {
	key = "OLD_GODS_UNDAUNTED_PROJECT"
	event_chain = old_gods_chain
	#cost = 30
	days_to_research = 90
	tech_department = engineering_technology
	timelimit = -1
	picture = GFX_evt_archaeological_dig
	icon = "gfx/interface/icons/situation_log/situation_log_quest.dds"

	event_scope = ship_event

	requirements = {
		shipclass_science_ship = 1
		leader = scientist
		#skill = 3
	}

	on_success = { ship_event = { id = anomaly.166 } }
}

special_project = {
	key = "OLD_GODS_PERCIPIENT_PROJECT"
	event_chain = old_gods_chain
	#cost = 30
	days_to_research = 90
	tech_department = physics_technology
	timelimit = -1
	picture = GFX_evt_archaeological_dig
	icon = "gfx/interface/icons/situation_log/situation_log_quest.dds"

	event_scope = ship_event

	requirements = {
		shipclass_science_ship = 1
		leader = scientist
		#skill = 3
	}

	on_success = { ship_event = { id = anomaly.167 } }
}

special_project = {
	key = "ROGUE_SCIENTIST_1_PROJECT"
	#cost = 0
	days_to_research = 10
	tech_department = physics_technology
	timelimit = -1
	picture = GFX_evt_ship_in_orbit
	icon = "gfx/interface/icons/situation_log/situation_log_quest.dds"

	event_scope = ship_event

	requirements = {
		shipclass_science_ship = 1
		leader = scientist
		#skill = 2
	}

	on_success = { ship_event = { id = country.1025 } }
}

# Asteroid
special_project = {
	key = "MASSEX_1_PROJECT"
	event_chain = "mass_extinction_chain"
	#cost = 1000
	days_to_research = 60
	tech_department = society_technology
	timelimit = -1
	picture = GFX_evt_asteroid_field

	event_scope = ship_event

	requirements = {
		shipclass_science_ship = 1
		leader = scientist
		#skill = 2
	}

	on_success = { ship_event = { id = country.1130 } }
}

# Molten
special_project = {
	key = "MASSEX_2_PROJECT"
	event_chain = "mass_extinction_chain"
	#cost = 1000
	days_to_research = 60
	tech_department = society_technology
	timelimit = -1
	picture = GFX_evt_molten

	event_scope = ship_event

	requirements = {
		shipclass_science_ship = 1
		leader = scientist
		#skill = 2
	}

	on_success = { ship_event = { id = country.1135 } }
}

# Barren
special_project = {
	key = "MASSEX_3_PROJECT"
	event_chain = "mass_extinction_chain"
	#cost = 1000
	days_to_research = 60
	tech_department = society_technology
	timelimit = -1
	picture = GFX_evt_warm_barren

	event_scope = ship_event

	requirements = {
		shipclass_science_ship = 1
		leader = scientist
		#skill = 2
	}

	on_success = {
		ship_event = {
			id = country.1140
			scopes = {
				from = prev
				fromfrom = from
			}
		}
	}
}

# Toxic
special_project = {
	key = "MASSEX_4_PROJECT"
	event_chain = "mass_extinction_chain"
	#cost = 1000
	days_to_research = 60
	tech_department = society_technology
	timelimit = -1
	picture = GFX_evt_toxic

	event_scope = ship_event

	requirements = {
		shipclass_science_ship = 1
		leader = scientist
		#skill = 2
	}

	on_success = { ship_event = { id = country.1145 } }
}

# Frozen
special_project = {
	key = "MASSEX_5_PROJECT"
	event_chain = "mass_extinction_chain"
	#cost = 1000
	days_to_research = 60
	tech_department = society_technology
	timelimit = -1
	picture = GFX_evt_frozen

	event_scope = ship_event

	requirements = {
		shipclass_science_ship = 1
		leader = scientist
		#skill = 2
	}

	on_success = { ship_event = { id = country.1150 } }
}

special_project = {
	key = "LIMBO_1_PROJECT"
	#cost = 1000
	days_to_research = 60
	tech_department = society_technology
	timelimit = -1
	picture = GFX_evt_sapient_AI

	event_scope = ship_event

	requirements = {
		shipclass_science_ship = 1
		leader = scientist
		#skill = 3
	}

	on_success = {
		ship_event = { id = anomaly.186 }
		owner = { set_country_flag = machine_age_virtuality_studied } # Familiarity with virtual entities gained for Machine Ascension
	}
}

special_project = {
	key = "PROJECTING_MOON_PROJECT"
	#cost = 1000
	days_to_research = 60
	tech_department = engineering_technology
	timelimit = -1
	picture = GFX_evt_asteroid_approaching_planet

	event_scope = ship_event

	requirements = {
		shipclass_science_ship = 1
		leader = scientist
		#skill = 2
	}

	on_success = { from = { carrier_event = { id = anomaly.191 } } }
}

special_project = {
	key = "GRIMACING_PLANET_PROJECT"
	#cost = 1000
	days_to_research = 10
	tech_department = engineering_technology
	timelimit = 1080
	picture = GFX_evt_satellite_in_orbit

	event_scope = ship_event

	requirements = {
		shipclass_science_ship = 1
		leader = scientist
		#skill = 3
	}

	on_success = { ship_event = { id = anomaly.233 } }
}

special_project = {
	key = "OLFACTORY_PROJECT"
	#cost = 1000
	days_to_research = 30
	tech_department = society_technology
	timelimit = -1
	picture = GFX_evt_ship_in_orbit

	event_scope = ship_event

	requirements = {
		shipclass_science_ship = 1
		leader = scientist
		#skill = 3
	}

	on_success = { ship_event = { id = anomaly.251 } }
}

special_project = {
	key = "ULTIMATE_WEAPON_PROJECT"
	#cost = 1000
	days_to_research = 200
	tech_department = engineering_technology
	timelimit = -1
	picture = GFX_evt_alien_city

	event_scope = ship_event

	requirements = {
		shipclass_science_ship = 1
		leader = scientist
		#skill = 3
	}

	on_success = {
		random_list = {
			50 = { ship_event = { id = anomaly.258 } } # fail
			40 = { ship_event = { id = anomaly.256 } } # basic
			10 = { ship_event = { id = anomaly.257 } } # exotic
		}
	}
}

special_project = {
	key = "REFINE_ROCK_PROJECT"
	#cost = 1000
	days_to_research = 60
	tech_department = physics_technology
	timelimit = -1
	picture = GFX_evt_underground_civilization

	event_scope = ship_event

	requirements = {
		shipclass_science_ship = 1
		leader = scientist
		#skill = 2
	}

	on_success = {
		ship_event = { id = anomaly.292 }
	}
}

special_project = {
	key = "ALIEN_BARRACKS_PROJECT"
	#cost = 1000
	days_to_research = 60
	tech_department = society_technology
	timelimit = -1
	picture = GFX_evt_archaeological_dig
	icon = "gfx/interface/icons/situation_log/situation_log_quest.dds"

	event_scope = ship_event

	requirements = {
		shipclass_science_ship = 1
		leader = scientist
		#skill = 3
	}

	on_success = {
		ship_event = { id = anomaly.3017 }
	}
}

special_project = {
	key = "CRYSTAL_CODEX_PROJECT"
	days_to_research = 60
	tech_department = society_technology
	timelimit = -1
	picture = GFX_evt_ship_in_orbit

	event_scope = ship_event

	requirements = {
		shipclass_science_ship = 1
		leader = scientist
		#skill = 3
	}

	on_success = {
		ship_event = { id = anomaly.3012 }
	}
}

special_project = {
	key = "ROBOT_MINERALS_PROJECT"
	days_to_research = 60
	tech_department = engineering_technology
	timelimit = -1
	picture = GFX_evt_ship_in_orbit

	event_scope = ship_event

	requirements = {
		shipclass_science_ship = 1
		leader = scientist
		#skill = 3
	}

	on_success = {
		ship_event = { id = anomaly.3027 }
	}
}

special_project = {
	key = "AMOEBAS_PROJECT"
	cost = 1500
	tech_department = society_technology
	timelimit = -1
	picture = GFX_evt_fleet_evil
	icon = "gfx/interface/icons/situation_log/situation_log_tick.dds"
	location = no

	event_scope = planet_event

	on_success = {
		prev = { country_event = { id = story.105 } }
	}
}

special_project = {
	key = "AMOEBAS_PACIFICATION_PROJECT"
	cost = 3000
	tech_department = physics_technology
	timelimit = -1
	picture = GFX_evt_fleet_evil
	icon = "gfx/interface/icons/situation_log/situation_log_tick.dds"
	location = no

	event_scope = planet_event

	on_success = {
		prev = { country_event = { id = story.107 } }
	}
}

special_project = {
	key = "CRYSTALS_PROJECT"
	cost = 1500
	tech_department = physics_technology
	timelimit = -1
	picture = GFX_evt_fleet_evil
	icon = "gfx/interface/icons/situation_log/situation_log_tick.dds"
	location = no

	event_scope = planet_event

	on_success = {
		prev = { country_event = { id = story.205 } }
	}
}

special_project = {
	key = "CRYSTALS_PACIFICATION_PROJECT"
	cost = 3000
	tech_department = physics_technology
	timelimit = -1
	picture = GFX_evt_fleet_evil
	icon = "gfx/interface/icons/situation_log/situation_log_tick.dds"
	location = no

	event_scope = planet_event

	on_success = {
		prev = { country_event = { id = story.207 } }
	}
}

special_project = {
	key = "DRONES_PROJECT"
	cost = 1500
	tech_department = engineering_technology
	timelimit = -1
	picture = GFX_evt_mining_station
	icon = "gfx/interface/icons/situation_log/situation_log_tick.dds"
	location = no

	event_scope = planet_event

	on_success = {
		prev = { country_event = { id = story.305 } }
	}
}

special_project = {
	key = "CLOUDS_PROJECT"
	cost = 1500
	tech_department = physics_technology
	timelimit = -1
	picture = GFX_evt_wormhole
	icon = "gfx/interface/icons/situation_log/situation_log_tick.dds"
	location = no

	event_scope = planet_event

	on_success = {
		prev = { country_event = { id = story.405 } }
	}
}

special_project = {
	key = "BALANCE_ECOSYSTEM_PROJECT"
	days_to_research = 100
	tech_department = society_technology
	timelimit = -1
	picture = GFX_evt_tropical
	icon = "gfx/interface/icons/situation_log/situation_log_tick.dds"

	event_scope = ship_event

	requirements = {
		shipclass_science_ship = 1
		leader = scientist
		#skill = 3
	}

	on_success = {
		random_list = {
			50 = { ship_event = { id = anomaly.3056 } }
			50 = { ship_event = { id = anomaly.3057 } }
		}
	}

	on_fail = {}
}

special_project = {
	key = "HEAD_IN_SAND_PROJECT"
	days_to_research = 100
	tech_department = engineering_technology
	timelimit = -1
	picture = GFX_evt_desert
	icon = "gfx/interface/icons/situation_log/situation_log_tick.dds"

	event_scope = ship_event

	requirements = {
		shipclass_military = 1
	}

	on_success = {
		random_list = {
			33 = { ship_event = { id = anomaly.3061 } }
			33 = { ship_event = { id = anomaly.3062 } }
			33 = { ship_event = { id = anomaly.3063 } }
		}
	}

	on_fail = {}
}

special_project = {
	key = "THE_PRINCE_PROJECT"
	cost = 1000
	tech_department = society_technology
	timelimit = -1
	picture = GFX_evt_star_chart
	icon = "gfx/interface/icons/situation_log/situation_log_tick.dds"

	event_scope = country_event

	on_success = {
		owner = { country_event = { id = anomaly.3086 } }
	}

	on_fail = {}
}

# Pirate Captives
special_project = {
	key = "EMERGENCY_BUOY_PROJECT"
	#event_chain = "ransomeer_chain"
	#cost = 1000
	days_to_research = 30
	tech_department = engineering_technology
	timelimit = -1
	picture = GFX_evt_satellite_in_orbit
	icon = "gfx/interface/icons/situation_log/situation_log_tick.dds"

	event_scope = ship_event

	requirements = {
		shipclass_science_ship = 1
		leader = scientist
		#skill = 3
	}

	on_success = { ship_event = { id = anomaly.3091 } }

	on_fail = {
	}
}

# Ancient Alliance - beacon
special_project = {
	key = WRECKED_FLEET_1
	days_to_research = 60
	tech_department = society_technology
	timelimit = -1
	picture = GFX_evt_alien_ruins
	icon = "gfx/interface/icons/situation_log/situation_log_radar.dds"

	event_scope = ship_event

	requirements = {
		shipclass_science_ship = 1
		leader = scientist
		#skill = 3
	}

	on_success = { owner = { country_event = { id = anomaly.3113 } } }

	on_fail = {}
}

# Ancient Alliance - fleet
special_project = {
	key = WRECKED_FLEET_2
	event_chain = wrecked_fleet_chain
	days_to_research = 120
	tech_department = engineering_technology
	timelimit = -1
	picture = GFX_evt_federation_fleet
	icon = "gfx/interface/icons/situation_log/situation_log_ship.dds"

	event_scope = ship_event

	requirements = {
		shipclass_military = 6
	}

	on_success = {
		owner = {
			#if = {
			#	limit = { has_country_flag = wrecked_fleet }
				country_event = { id = anomaly.3116 }
			#	break = yes
			#}
			#if = {
			#	limit = { has_country_flag = hostile_fleet }
			#	country_event = { id = anomaly.3117 }
			#	break = yes
			#}
		}
	}
}

# Crystal Manufactory
special_project = {
	key = MANUFACTORY_PROJECT
	days_to_research = 80
	tech_department = engineering_technology
	timelimit = -1
	picture = GFX_evt_mining_station
	icon = "gfx/interface/icons/situation_log/situation_log_engineering.dds"

	event_scope = ship_event

	triggered_requirement = {
		text = MANUFACTORY_PROJECT_FLEET_REQUIREMENT
		count = 1
		trigger = {
			OR = {
				is_ship_class = shipclass_military
				is_ship_class = shipclass_starbase
			}
			leader? = { leader_class = commander }
		}
	}

	abort_trigger = {
		NOT = {
			fromfrom = {
				solar_system = {
					has_access_fleet = root
				}
			}
		}
	}

	on_success = {
		if = {
			limit = {
				from.solar_system = {
					OR = {
						NOT = { exists = space_owner }
						AND = {
							exists = space_owner
							space_owner = { NOT = { is_same_value = root.owner } }
						}
					}
				}
			}
			random_list = {
				33 = { ship_event = { id = anomaly.3128 } }
				33 = { ship_event = { id = anomaly.3129 } }
				33 = { ship_event = { id = anomaly_failure.2670 } }
			}
		}
		else_if = {
			limit = {
				owner = {
					has_country_flag = manufactory4
					has_country_flag = manufactory3
					has_country_flag = manufactory2
				}
			}
			ship_event = { id = anomaly.3126 }
		}
		else_if = {
			limit = {
				owner = {
					has_country_flag = manufactory4
					has_country_flag = manufactory3
					NOT = { has_technology = tech_mine_rare_crystals }
				}
			}
			random_list = {
				50 = { ship_event = { id = anomaly.3126 } }
				50 = { ship_event = { id = anomaly.3131 } }
			}
		}
		else_if = {
			limit = {
				owner = {
					has_country_flag = manufactory4
					has_country_flag = manufactory2
				}
			}
			random_list = {
				50 = { ship_event = { id = anomaly.3126 } }
				50 = { ship_event = { id = anomaly.3128 } }
			}
		}
		else_if = {
			limit = {
				owner = {
					has_country_flag = manufactory3
					has_country_flag = manufactory2
				}
			}
			random_list = {
				50 = { ship_event = { id = anomaly.3126 } }
				50 = { ship_event = { id = anomaly.3129 } }
			}
		}
		else_if = {
			limit = {
				owner = {
					has_country_flag = manufactory4
					NOT = { has_technology = tech_rare_crystals }
				}
			}
			random_list = {
				33 = { ship_event = { id = anomaly.3126 } }
				33 = { ship_event = { id = anomaly.3131 } }
				33 = { ship_event = { id = anomaly.3128 } }
			}
		}
		else_if = {
			limit = {
				owner = {
					has_country_flag = manufactory3
					NOT = { has_technology = tech_rare_crystals }
				}
			}
			random_list = {
				33 = { ship_event = { id = anomaly.3126 } }
				33 = { ship_event = { id = anomaly.3131 } }
				33 = { ship_event = { id = anomaly.3129 } }
			}
		}
		else_if = {
			limit = {
				owner = {
					has_country_flag = manufactory2
				}
			}
			random_list = {
				33 = { ship_event = { id = anomaly.3126 } }
				33 = { ship_event = { id = anomaly.3128 } }
				33 = { ship_event = { id = anomaly.3129 } }
			}
		}
		else = {
			random_list = {
				33 = { ship_event = { id = anomaly.3126 } }
				#33 = { ship_event = { id = anomaly.3131 } }
				16 = { ship_event = { id = anomaly.3128 } }
				16 = { ship_event = { id = anomaly.3129 } }
			}
		}
	}
}
