country_event = {
	id = $EVENT_ID$
	title = shroud.first_contact.title
	diplomatic_title = shroud.3.diplo_title
	desc = {
		trigger = {
			if = {
				limit = { has_country_flag = shroud_first_major_contact_4 }
				if = {
					limit = { is_robot_empire = yes }
					text = shroud.first_contact.4.desc.robot
				}
				else = {
					text = shroud.first_contact.4.desc.default
				}
			}
			else_if = {
				limit = { has_country_flag = shroud_first_major_contact_3 }
				if = {
					limit = { is_robot_empire = yes }
					text = shroud.first_contact.3.desc.robot
				}
				else = {
					text = shroud.first_contact.3.desc.default
				}
			}
			else_if = {
				limit = { has_country_flag = shroud_first_major_contact_2 }
				text = shroud.first_contact.2.desc.all
				text = newline
				if = {
					limit = { is_robot_empire = yes }
					text = shroud.first_contact.2.desc.robot
				}
				else = {
					text = shroud.first_contact.2.desc.default
				}
			}
			else = {
				if = {
					limit = { is_robot_empire = yes }
					text = shroud.first_contact.1.desc.robot
				}
				else_if = {
					limit = { is_hive_empire = yes }
					text = shroud.first_contact.1.desc.hive
				}
				else = {
					text = shroud.first_contact.1.desc.default
				}
			}
		}
	}

	is_triggered_only = yes
	diplomatic = yes
	force_open = yes

	picture_event_data = {
		portrait = shroud1
		room = shroud_room
	}

	show_sound = {
		trigger = { is_robot_empire = yes }
		sound = event_psionic_robot
	}
	show_sound = {
		trigger = { is_robot_empire = no }
		sound = event_psionic
	}

	immediate = {
		set_country_flag = shroud_first_contact_$PATRON_TYPE$
		if = {
			limit = { has_country_flag = shroud_first_major_contact_3 }
			remove_country_flag = shroud_first_major_contact_3
			set_country_flag = shroud_first_major_contact_4
		}
		else_if = {
			limit = { has_country_flag = shroud_first_major_contact_2 }
			remove_country_flag = shroud_first_major_contact_2
			set_country_flag = shroud_first_major_contact_3
		}
		else_if = {
			limit = { has_country_flag = shroud_first_major_contact_1 }
			remove_country_flag = shroud_first_major_contact_1
			set_country_flag = shroud_first_major_contact_2
		}
		else = {
			set_country_flag = shroud_first_major_contact_1
		}
	}

	after = {
		remove_country_flag = shroud_first_contact_$PATRON_TYPE$
	}

	option = {
		name = shroud.first_contact.prompt
		inline_script = {
			script = shroud/patron_start_first_contact_special_project
			PATRON_TYPE = $PATRON_TYPE$
			SPECIAL_PROJECT_KEY = $SPECIAL_PROJECT_KEY$
		}
	}
}
