francia_carolingian_missions_1 = {
	slot = 1
	generic = no
	ai = yes
		potential = {
		AND = {
			tag = FRK
			started_in = 752.6.1
			NOT = { map_setup = map_setup_random }
		}
	}
	has_country_shield = yes
	
	frk_tribute_from_brittany_mission = {
		icon = mission_rb_conquer_brittany
		required_missions = { frk_king_of_the_franks_mission }
		position = 2
		provinces_to_highlight = {
			area = brittany_area
			NOT = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			has_discovered = ROOT
		}
		trigger = {
			brittany_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			OR = {
				NOT = { exists = BRI }
				overlord_of = BRI
			}
		}
		effect = {
			add_treasury = 15
			country_event = {
				id = mmetr_FRK_Carolingian_mission_events.7
			}
			custom_tooltip = frk_tribute_from_brittany_mission.tt
		}
	}
	frk_defend_corsica_mission = {
		icon = rule_corsica
		required_missions = { frk_vanquish_the_lombards_mission }
		position = 4
		provinces_to_highlight = {
			province_id = 1247	#Corsica
			NOT = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			has_discovered = ROOT
		}
		trigger = {
			navy_size = 20
			num_of_galley = 7
			owns_or_non_sovereign_subject_of = 1247
			OR = {
				NOT = { exists = COR }
				overlord_of = COR
			}
		}
		effect = {
			add_navy_tradition = 10
			country_event = {
				id = mmetr_FRK_Carolingian_mission_events.8
			}
			custom_tooltip = frk_defend_corsica_mission.tt
		}
	}
	frk_aquitaine_diplomacy_mission = {
		icon = mission_medieval_marriage
		required_missions = {  }
		position = 5
		provinces_to_highlight = {
			OR = {
				area = guyenne_area
				area = languedoc_area
				area = pyrenees_area	#Gascony
			}
			NOT = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			has_discovered = ROOT
		}
		trigger = {
			overlord_of = AQT
			marriage_with = AQT
			AQT = {
				has_opinion = {
					who = ROOT
					value = 150
				}
			}
			guyenne_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			languedoc_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			pyrenees_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			add_dip_power = 50
			custom_tooltip = frk_aquitaine_diplomacy_mission.tt
			hidden_effect = {
				catalonia_area = {
					limit = {
						OR = {
							religion_group = christian
							owner = {
								religion_group = christian
							}
						}
						NOT = { is_core = ROOT }
						NOT = { is_permanent_claim = ROOT }
					}
					add_permanent_claim = ROOT
				}
				aragon_area = {
					limit = {
						OR = {
							religion_group = christian
							owner = {
								religion_group = christian
							}
						}
						NOT = { is_core = ROOT }
						NOT = { is_permanent_claim = ROOT }
					}
					add_permanent_claim = ROOT
				}
			}
		}
	}
	frk_support_the_asturians_mission = {
		icon = mission_gothic_warrior_4th_ce
		required_missions = { frk_aquitaine_diplomacy_mission }
		position = 7
		trigger = {
			treasury = 25
			OR = {
				has_guaranteed = ASU	#Asturias
				alliance_with = ASU
				overlord_of = ASU
			}
			ASU = {
				OR = {
					has_opinion = {
						who = ROOT
						value = 100
					}
					trust = { 
						who = ROOT
						value = 60
					}
				}
			}
		}
		effect = {
			add_treasury = -25
			ASU = {
				country_event = {
					id = mmetr_FRK_Carolingian_mission_events.13
				}
				tooltip = {
					add_treasury = 25
				}
			}
			reverse_add_opinion = {
				who = ASU
				modifier = frk_sent_monetary_aid
			}
			add_country_modifier = {
				name = "me_frk_allies_of_the_faith"
				duration = 10950
			}
		}
	}
	frk_palaces_of_the_empire_mission = {
		icon = mission_castle_construction_medieval
		required_missions = {  }
		position = 9
		provinces_to_highlight = {
			OR = {
				province_id = 1878	#Aachen
				province_id = 1876	#Frankfurt
				province_id = 78	#Mainz, 15km from Ingelheim
			}
		}
		trigger = {
			1878 = {
				num_of_buildings_in_province = 2
			}
			1878 = {
				num_of_times_improved_by_owner = 3
			}
			1876 = {
				num_of_times_improved_by_owner = 2
			}
			78 = {
				num_of_times_improved_by_owner = 2
			}
		}
		effect = {
			1878 = {
				add_province_modifier = {
					name = "me_frk_royal_palace_of_aachen"
					duration = -1
				}
			}
			1876 = {
				add_province_modifier = {
					name = "me_frk_royal_palace_of_frankfurt"
					duration = -1
				}
			}
			78 = {
				add_province_modifier = {
					name = "me_frk_royal_palace_of_ingelheim"
					duration = -1
				}
			}
		}
	}
	frk_the_royal_household_mission = {
		icon = unite_the_wittelsbachs
		required_missions = { frk_palaces_of_the_empire_mission }
		position = 11
		trigger = {
			monthly_adm = 10
			monthly_dip = 10
			monthly_mil = 10
		}
		effect = {
			add_country_modifier = {
				name = "me_frk_royal_household"
				duration = 7300
			}
		}
	}
	
}

francia_carolingian_missions_2 = {
	slot = 2
	generic = no
	ai = yes
		potential = {
		AND = {
			tag = FRK
			started_in = 752.6.1
			NOT = { map_setup = map_setup_random }
		}
	}
	has_country_shield = yes
	
	frk_king_of_the_franks_mission = {
		icon = carolingian_empire
		required_missions = {  }
		position = 1
		provinces_to_highlight = {
			region = france_region
			NOT = {
				owned_by = ROOT
			}
			has_discovered = ROOT
		}
		trigger = {
			army_size_percentage = 0.95
			manpower_percentage = 0.5
			OR = {
				is_monarch_leader = yes
				is_heir_leader = yes
			}
			num_of_owned_provinces_with = {
				value = 25
				region = france_region
			}
		}
		effect = {
			country_event = {
				id = mmetr_FRK_Carolingian_mission_events.1
			}
			tooltip = {
				add_legitimacy = 10
				add_country_modifier = {
					name = "oma_buildforces_mod"
					duration = 5475
				}
				france_region = {
					limit = {
						NOT = { owned_by = ROOT }
						NOT = { is_core = ROOT }
						NOT = { is_permanent_claim = ROOT }
					}
					add_permanent_claim = ROOT
				}
			}
		}
	}
	frk_vanquish_the_lombards_mission = {
		icon = kingdom_of_lombardy
		required_missions = { frk_king_of_the_franks_mission }
		position = 3
		provinces_to_highlight = {
			OR = {
				area = lombardy_area
				area = piedmont_area
				area = liguria_area
				area = po_valley_area
				area = venetia_area
				area = emilia_romagna_area
				area = tuscany_area
			}
			NOT = {
				OR = {
					country_or_non_sovereign_subject_holds = ROOT
					owned_by = PAP
				}
			}
			has_discovered = ROOT
		}
		trigger = {
			num_of_owned_provinces_with = {
				value = 10
				region = italy_region
			}
			lombardy_area = {
				type = all
				OR = {
					country_or_non_sovereign_subject_holds = ROOT
					owned_by = PAP
				}
			}
			piedmont_area = {
				type = all
				OR = {
					country_or_non_sovereign_subject_holds = ROOT
					owned_by = PAP
				}
			}
			liguria_area = {
				type = all
				OR = {
					country_or_non_sovereign_subject_holds = ROOT
					owned_by = PAP
				}
			}
			po_valley_area = {
				type = all
				OR = {
					country_or_non_sovereign_subject_holds = ROOT
					owned_by = PAP
				}
			}
			venetia_area = {
				type = all
				OR = {
					country_or_non_sovereign_subject_holds = ROOT
					owned_by = PAP
				}
			}
			emilia_romagna_area = {
				type = all
				OR = {
					country_or_non_sovereign_subject_holds = ROOT
					owned_by = PAP
				}
			}
			tuscany_area = {
				type = all
				OR = {
					country_or_non_sovereign_subject_holds = ROOT
					owned_by = PAP
				}
			}
		}
		effect = {
			country_event = {
				id = mmetr_FRK_Carolingian_mission_events.2
			}
			tooltip = {
				add_ruler_modifier = {
					name = "me_frk_gratia_dei_rex_francorum_et_langobardorum"
					duration = -1
				}
				if = {
					limit = {
						exists = PAP
					}
					reverse_add_opinion = {
						who = PAP
						modifier = frk_defeated_the_lombards
					}
				}
				if = {
					limit = {
						exists = BNV	#Benevento
					}
					add_casus_belli = {
						target = BNV
						type = cb_vassalize_mission
						months = 360
					}
				}
				if = {
					limit = {
						1247 = {
							NOT = { is_core = ROOT }
							NOT = { is_permanent_claim = ROOT }
						}
					}
					1247 = {
						add_permanent_claim = ROOT
					}
				}
			}
		}
	}
	frk_imperator_of_italia_mission = {
		icon = a_real_roman_empire
		required_missions = { frk_imperator_romanum_mission frk_defend_corsica_mission }
		position = 5
		provinces_to_highlight = {
			region = italy_region
			NOT = {
				OR = {
					country_or_non_sovereign_subject_holds = ROOT
					owned_by = PAP
				}
			}
			has_discovered = ROOT
		}
		trigger = {
			italy_region = {
				type = all
				OR = {
					country_or_non_sovereign_subject_holds = ROOT
					owned_by = PAP
				}
			}
			OR = {
				alliance_with = PAP
				overlord_of = PAP
				NOT = { exists = PAP }
			}
		}
		effect = {
			add_prestige = 25
			country_event = {
				id = mmetr_FRK_Carolingian_mission_events.3
			}
		}
	}
	frk_marca_hispanica_mission = {
		icon = mission_guilds_of_barcelona
		required_missions = { frk_aquitaine_diplomacy_mission }
		position = 6
		provinces_to_highlight = {
			OR = {
				area = aragon_area
				area = catalonia_area
			}
			NOT = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			has_discovered = ROOT
		}
		trigger = {
			catalonia_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			aragon_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			valencia_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			country_event = {
				id = mmetr_FRK_Carolingian_mission_events.11
			}
			custom_tooltip = frk_marca_hispanica_mission.tt
		}
	}
	frk_avenge_the_goths_mission = {
		icon = mission_crusade_for_varna
		required_missions = { frk_marca_hispanica_mission }
		position = 8
		provinces_to_highlight = {
			region = iberia_region
			NOT = {
				OR = {
					country_or_vassal_holds = ROOT
					owner = {
						religion_group = christian
					}
				}
			}
		}
		trigger = {
			num_of_owned_provinces_with = {
				value = 25
				region = iberia_region
			}
			iberia_region = {
				type = all
				OR = {
					country_or_vassal_holds = ROOT
					owner = {
						religion_group = christian
					}
				}
			}
		}
		effect = {
			country_event = {
				id = mmetr_FRK_Carolingian_mission_events.15
			}
			tooltip = {
				iberia_region = {
					limit = {
						country_or_vassal_holds = ROOT
					}
					add_province_modifier = {
						name = "me_frk_aprisio"
						duration = 10950
					}
				}
			}
		}
	}
	frk_churches_of_francia_mission = {
		icon = a_strong_government
		required_missions = {  }
		position = 9
		trigger = {
			num_of_owned_provinces_with = {
				value = 10
				OR = {
					has_building = glorious_monument
					has_building = temple
				}
			}
		}
		effect = {
			add_country_modifier = {
				name = "me_frk_frankish_churches"
				duration = 10950
			}
			add_estate_loyalty = {
				estate = estate_church
				loyalty = 10
			}
		}
	}
	frk_frankish_emporia_mission = {
		icon = renaissance_city
		required_missions = { frk_churches_of_francia_mission frk_palaces_of_the_empire_mission }
		position = 10
		trigger = {
			if = {
				limit = {
					has_dlc = "Dharma"
				}
				num_of_owned_provinces_with = {
					value = 5
					province_has_center_of_trade_of_level = 2
				}
			}
			else = {
				calc_true_if = {
					all_trade_node = {
						is_strongest_trade_power = ROOT
					}
					amount = 3
				}
			}
		}
		effect = {
			add_country_modifier = {
				name = "me_frk_frankish_emporia"
				duration = 10950
			}
		}
	}
	
}

francia_carolingian_missions_3 = {
	slot = 3
	generic = no
	ai = yes
		potential = {
		AND = {
			tag = FRK
			started_in = 752.6.1
			NOT = { map_setup = map_setup_random }
		}
	}
	has_country_shield = yes
	
	frk_papal_relations_mission = {
		icon = answer_the_roman_question
		required_missions = {  }
		position = 1
		trigger = {
			OR = {
				religion = chalcedonism
				religion = catholic
			}
			OR = {
				alliance_with = PAP
				overlord_of = PAP
			}
			PAP = {
				OR = {
					has_opinion = {
						who = ROOT
						value = 120
					}
					trust = { 
						who = ROOT
						value = 70
					}
				}
			}
		}
		effect = {
			add_ruler_modifier = {
				name = "me_frk_papal_favoritism"
				duration = -1
			}
		}
	}
	frk_saxon_wars_mission = {
		icon = mission_rb_unite_the_clans
		required_missions = { frk_king_of_the_franks_mission }
		position = 2
		provinces_to_highlight = {
			OR = {
				area = weser_area
				area = braunschweig_area
				area = lower_saxony_area
				area = westphalia_area		#South Westphalia
				area = northern_saxony_area		#Saxony-Anhalt
			}
			NOT = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			has_discovered = ROOT
		}
		trigger = {
			weser_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			braunschweig_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			lower_saxony_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			westphalia_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			northern_saxony_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			country_event = {
				id = mmetr_FRK_Carolingian_mission_events.4
			}
			tooltip = {
				add_country_modifier = {
					name = "me_frk_pagan_conversion_policy"
					duration = 10950
				}
			}
			custom_trigger_tooltip = frk_saxon_wars_mission.tt
		}
	}
	frk_imperator_romanum_mission = {
		icon = mission_crowned_by_clergy
		required_missions = { frk_vanquish_the_lombards_mission }
		position = 4
		provinces_to_highlight = {
			province_id = 118	#Roma
			NOT = {
				OR = {
					owned_by = PAP
					owned_by = ROOT
				}
			}
			has_discovered = ROOT
		}
		trigger = {
			stability = 3
			has_regency = no
			num_of_cities = 50
			OR = {
				legitimacy = 90
				prestige = 50
			}
			OR = {
				custom_trigger_tooltip = {
					tooltip = frk_imperator_romanum_mission.tt1
					AND = {
						alliance_with = PAP
						118 = {
							owned_by = PAP
						}
					}
				}
				custom_trigger_tooltip = {
					tooltip = frk_imperator_romanum_mission.tt2
					AND = {
						overlord_of = PAP
						118 = {
							owned_by = PAP
						}
					}
				}
				custom_trigger_tooltip = {
					tooltip = frk_imperator_romanum_mission.tt3
					AND = {
						118 = {
							owned_by = ROOT
						}
						NOT = { exists = PAP }
					}
				}
			}
		}
		effect = {
			country_event = {
				id = mmetr_FRK_Carolingian_mission_events.6
			}
			tooltip = {
				add_prestige = 25
				add_legitimacy = 50
				add_ruler_modifier = {
					name = "me_frk_imperator_romanum_modifier"
					duration = -1
				}
				
				#From decision to establish HRE, if not already formed
				if = {
					limit = {
						NOT = { hre_size = 3 }
						NOT = { exists = HLR }
						NOT = { has_global_flag = hre_formed }
						NOT = { started_in = 962.2.2 }
					}
					if = {
						limit = { is_female = yes }
						set_allow_female_emperor = yes
					}
					set_global_flag = hre_formed
					set_emperor = yes
					elector = yes
					every_country = {
						limit = { is_subject_of = ROOT }
						elector = yes
					}
					hidden_effect = {
						every_owned_province = { set_in_empire = yes }
						every_country = {
							limit = { is_subject_of = ROOT }
							every_owned_province = { set_in_empire = yes }
						}
						every_country = {
							limit = {
								religion = catholic
								OR = {
									culture_group = ROOT
									is_neighbor_of = ROOT
									AND = {
										marriage_with = ROOT
										alliance_with = ROOT
									}
								}
								NOT = { tag = ROM }
								NOT = { tag = ROW }
								NOT = { tag = BYZ }
							}
							every_owned_province = { 
								limit = { NOT = { region = british_isles_region } }
								set_in_empire = yes 
							}
						}
						JMN = { 		#removes Jan Mayen as placeholder emperor
							elector = no
							kill_ruler = yes 
						}
						3104 = { 
							set_in_empire = no 
							cede_province = XXX
							remove_core = JMN
						}
					}
				}
			}
		}
	}
	frk_challenge_the_basileus_mission = {
		icon = mission_pf_soldier
		required_missions = { frk_imperator_romanum_mission frk_hegemonize_bavaria_mission }
		position = 7
		provinces_to_highlight = {
			OR = {
				province_id = 149	#Edirne / Adrianople
				area = macedonia_area
				area = central_greece_area
				area = northern_greece_area
				area = morea_area
			}
			NOT = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			has_discovered = ROOT
		}
		trigger = {
			owns_or_non_sovereign_subject_of = 149
			macedonia_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			central_greece_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			northern_greece_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			morea_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			151 = {
				add_permanent_claim = ROOT
			}
			add_country_modifier = {
				name = "me_frk_emperor_of_the_greeks"
				duration = -1
			}
		}
	}
	frk_there_can_only_be_one_mission = {
		icon = end_the_schism
		required_missions = { frk_challenge_the_basileus_mission }
		position = 9
		provinces_to_highlight = {
			province_id = 151	#Constantinople
			NOT = {
				owned_by = ROOT
				is_core = ROOT
			}
			has_discovered = ROOT
		}
		trigger = {
			owns_core_province = 151
			army_size = BYZ
		}
		effect = {
			country_event = {
				id = mmetr_FRK_Carolingian_mission_events.12
			}
			tooltip = {
				if = {
					limit = {
						NOT = { government_rank = 3 }
					}
					set_government_rank = 3
				}
				add_country_modifier = {
					name = "me_frk_emperor_of_constantinople"
					duration = 10950
				}
			}
		}
	}
	frk_urban_development_mission = {
		icon = public_works
		required_missions = { frk_churches_of_francia_mission }
		position = 10
		trigger = {
			num_of_owned_provinces_with = {
				value = 20
				num_of_buildings_in_province = 1
			}
			num_of_owned_provinces_with = {
				value = 7
				development = 12
			}
			grown_by_development = 50
		}
		effect = {
			add_country_modifier = {
				name = "me_frk_urban_expansion"
				duration = 10950
			}
		}
	}
	frk_carolingian_renaissance_mission = {
		icon = found_the_vatican_library
		required_missions = { frk_urban_development_mission frk_frankish_emporia_mission }
		position = 11
		trigger = {
			OR = {
				artist = 3
				philosopher = 3
				natural_scientist = 3
				theologian = 3
			}
		}
		effect = {
			country_event = {
				id = mmetr_FRK_Carolingian_mission_events.16
			}
			tooltip = {
				add_country_modifier = {
					name = "me_frk_charter_of_modern_thought"
					duration = -1
				}
			}
		}
	}
	
}

francia_carolingian_missions_4 = {
	slot = 4
	generic = no
	ai = yes
		potential = {
		AND = {
			tag = FRK
			started_in = 752.6.1
			NOT = { map_setup = map_setup_random }
		}
	}
	has_country_shield = yes
	
	frk_tame_the_danes_mission = {
		icon = mission_the_varangians
		required_missions = { frk_obotrite_diplomacy_mission }
		position = 2
		provinces_to_highlight = {
			OR = {
				area = denmark_area
				area = holstein_area
			}
			NOT = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			has_discovered = ROOT
		}
		trigger = {
			holstein_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			denmark_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			add_navy_tradition = 10
		}
	}
	frk_convert_the_pagans_mission = {
		icon = mission_mass_baptism
		required_missions = { frk_saxon_wars_mission }
		position = 3
		provinces_to_highlight = {
			OR = {
				area = weser_area
				area = braunschweig_area
				area = lower_saxony_area
				area = westphalia_area		#South Westphalia
				area = northern_saxony_area		#Saxony-Anhalt
			}
			NOT = {
				religion_group = christian
				has_owner_religion = yes
			}
			has_discovered = ROOT
		}
		trigger = {
			num_of_owned_provinces_with = {
				value = 3
				region = north_german_region
				OR = {
					has_building = glorious_monument
					has_building = temple
				}
			}
			weser_area = {
				type = all
				religion_group = christian
				has_owner_religion = yes
			}
			braunschweig_area = {
				type = all
				religion_group = christian
				has_owner_religion = yes
			}
			lower_saxony_area = {
				type = all
				religion_group = christian
				has_owner_religion = yes
			}
			westphalia_area = {
				type = all
				religion_group = christian
				has_owner_religion = yes
			}
			northern_saxony_area = {
				type = all
				religion_group = christian
				has_owner_religion = yes
			}
		}
		effect = {
			country_event = {
				id = mmetr_FRK_Carolingian_mission_events.5
			}
			tooltip = {
				add_country_modifier = {
					name = "me_frk_lex_saxonum"
					duration = -1
				}
				define_advisor = {
					type = theologian
					skill = 2
					culture = saxon
				}
			}
		}
	}
	frk_counties_of_the_empire_mission = {
		icon = friends_in_high_places
		required_missions = { frk_imperator_romanum_mission }
		position = 5
		trigger = {
			is_emperor = yes
			hre_size = 10
		}
		effect = {
			add_legitimacy = 20
			add_prestige = 20
		}
	}
	frk_hegemonize_bavaria_mission = {
		icon = mission_kneeling_before_king
		required_missions = {  }
		position = 6
		provinces_to_highlight = {
			OR = {
				area = lower_bavaria_area
				area = upper_bavaria_area
				area = east_bavaria_area
				area = inner_austria_area
			}
			NOT = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			has_discovered = ROOT
		}
		trigger = {
			lower_bavaria_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			upper_bavaria_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			east_bavaria_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			inner_austria_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			country_event = {
				id = mmetr_FRK_Carolingian_mission_events.9
			}
		}
	}
	frk_subjugate_the_croats_mission = {	#changed name to Towards Haemus Mons
		icon = capture_adriatic_ports
		required_missions = { frk_hegemonize_bavaria_mission }
		position = 8
		provinces_to_highlight = {
			OR = {
				area = east_adriatic_coast_area
				area = croatia_area
				area = bosnia_area
			}
			NOT = {
				country_or_vassal_holds = ROOT
			}
			has_discovered = ROOT
		}
		trigger = {
			east_adriatic_coast_area = {
				type = all
				country_or_vassal_holds = ROOT
			}
			croatia_area = {
				type = all
				country_or_vassal_holds = ROOT
			}
			bosnia_area = {
				type = all
				country_or_vassal_holds = ROOT
			}
		}
		effect = {
			east_adriatic_coast_area = {
				limit = {
					country_or_non_sovereign_subject_holds = ROOT
				}
				add_province_modifier = {
					name = "me_frk_croat_integration"
					duration = 10950
				}
			}
			croatia_area = {
				limit = {
					country_or_non_sovereign_subject_holds = ROOT
				}
				add_province_modifier = {
					name = "me_frk_croat_integration"
					duration = 10950
				}
			}
			bosnia_area = {
				limit = {
					country_or_non_sovereign_subject_holds = ROOT
				}
				add_province_modifier = {
					name = "me_frk_croat_integration"
					duration = 10950
				}
			}
		}
	}
	frk_vassi_dominici_mission = {
		icon = mission_rb_conquer_the_highlands
		required_missions = { frk_placitum_generalis_mission }
		position = 10
		trigger = {
			estate_loyalty = {
				estate = estate_burghers
				loyalty = 80
			}
			NOT = {
				estate_influence = {
					estate = estate_burghers
					influence = 70
				}
			}
		}
		effect = {
			add_province_modifier = {
				name = "me_frk_loyal_vassi_dominici"
				duration = 10950
			}
		}
	}
	frk_expand_the_fisc_mission = {
		icon = the_imperial_border
		required_missions = { frk_vassi_dominici_mission }
		position = 11
		trigger = {
			OR = {
				crown_land_share = 50
				crown_land_share = estate_nobles
			}
		}
		effect = {
			add_country_modifier = {
				name = "me_frk_the_fisc"
				duration = 10950
			}
		}
	}
	
}

francia_carolingian_missions_5 = {
	slot = 5
	generic = no
	ai = yes
		potential = {
		AND = {
			tag = FRK
			started_in = 752.6.1
			NOT = { map_setup = map_setup_random }
		}
	}
	has_country_shield = yes
	
	frk_obotrite_diplomacy_mission = {
		icon = hispaniae
		required_missions = {  }
		position = 1
		provinces_to_highlight = {
			OR = {
				area = mecklenburg_area
			}
			NOT = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			has_discovered = ROOT
		}
		trigger = {
			OR = {
				alliance_with = OBO
				overlord_of = OBO
				custom_trigger_tooltip = {
					tooltip = frk_obotrite_diplomacy_mission.tt
					NOT = { exists = OBO }
				}
			}
		}
		effect = {
			if = {
				limit = {
					exists = OBO
				}
				add_dip_power = 25
				OBO = {
					add_opinion = {
						who = ROOT
						modifier = frk_cordial_relations
					}
					add_country_modifier = {
						name = "me_frk_ally_of_the_franks"
						duration = 10950
					}
				}
			}
		}
	}
	frk_slavic_campaign_mission = {
		icon = mission_baltic_prussian_pagans
		required_missions = { frk_obotrite_diplomacy_mission }
		position = 3
		provinces_to_highlight = {
			OR = {
				area = hinter_pommern_area
				area = neumark_area
				area = lusatia_area
				area = silesia_area
				area = wielkopolska_area
			}
			NOT = {
				country_or_vassal_holds = ROOT
			}
			has_discovered = ROOT
		}
		trigger = {
			hinter_pommern_area = {
				type = all
				country_or_vassal_holds = ROOT
			}
			neumark_area = {
				type = all
				country_or_vassal_holds = ROOT
			}
			lusatia_area = {
				type = all
				country_or_vassal_holds = ROOT
			}
			silesia_area = {
				type = all
				country_or_vassal_holds = ROOT
			}
			wielkopolska_area = {
				type = all
				country_or_vassal_holds = ROOT
			}
		}
		effect = {
			add_country_modifier = {
				name = "me_frk_slavic_tribute"
				duration = 5475
			}
		}
	}
	frk_imperium_christianum_mission = {
		icon = mission_crown_of_jesus_roger_ii
		required_missions = { frk_imperator_romanum_mission frk_slavic_campaign_mission }
		position = 5
		trigger = {
			government_rank = 3
			religious_unity = 1.00
			is_defender_of_faith = yes
		}
		effect = {
			country_event = {
				id = mmetr_FRK_Carolingian_mission_events.10
			}
			
			#Gain claims on all Chalcedonian Holy Sites
			tooltip = {
				if = {
					limit = {
						118 = {
							NOT = { owned_by = PAP }
							NOT = { owned_by = ROOT }
							NOT = { is_core = ROOT }
							NOT = { is_permanent_claim = ROOT }
						}
					}	
					118 = {		#Rome
						add_permanent_claim = ROOT
					}
				}
				if = {
					limit = {
						151 = {
							NOT = { owned_by = ROOT }
							NOT = { is_core = ROOT }
							NOT = { is_permanent_claim = ROOT }
						}
					}
					151 = {
						add_permanent_claim = ROOT
					}
				}
				if = {
					limit = {
						358 = {
							NOT = { owned_by = ROOT }
							NOT = { is_core = ROOT }
							NOT = { is_permanent_claim = ROOT }
						}
					}
					358 = {
						add_permanent_claim = ROOT
					}
				}
				if = {
					limit = {
						2313 = {
							NOT = { owned_by = ROOT }
							NOT = { is_core = ROOT }
							NOT = { is_permanent_claim = ROOT }
						}
					}
					2313 = {
						add_permanent_claim = ROOT
					}
				}
				if = {
					limit = {
						379 = {
							NOT = { owned_by = ROOT }
							NOT = { is_core = ROOT }
							NOT = { is_permanent_claim = ROOT }
						}
					}
					379 = {
						add_permanent_claim = ROOT
					}
				}
			}
		}
	}
	frk_protect_the_holy_sites_mission = {
		icon = mission_jerusalem_dome_of_the_rock
		required_missions = { frk_imperium_christianum_mission }
		position = 6
		provinces_to_highlight = {
			OR = {
				AND = {
					province_id = 118
					NOT = { owned_by = PAP }
					NOT = { owned_by = ROOT }
				}
				AND = {
					OR = {
						province_id = 151
						province_id = 358
						province_id = 2313
						province_id = 379
					}
					NOT = {
						country_or_non_sovereign_subject_holds = ROOT
					}
				}
			}
			has_discovered = ROOT
		}
		trigger = {
			OR = {
				owns_core_province = 118
				118 = {
					owned_by = PAP
				}
			}
			owns_or_non_sovereign_subject_of = 151
			owns_or_non_sovereign_subject_of = 358
			owns_or_non_sovereign_subject_of = 2313
			owns_or_non_sovereign_subject_of = 379
		}
		effect = {
			add_prestige = 20
			add_legitimacy = 50
			add_country_modifier = {
				name = "me_frk_custodian_of_the_holy_sites"
				duration = 10950
			}
		}
	}
	frk_trounce_the_avar_khagan_mission = {
		icon = mission_avar_mounted_archers
		required_missions = { frk_hegemonize_bavaria_mission }
		position = 7
		provinces_to_highlight = {
			OR = {
				area = transdanubia_area
				area = alfold_area
				area = vojvodina_area
				area = slavonia_area
				area = transylvania_area
				area = southern_transylvania_area
			}
			NOT = {
				country_or_vassal_holds = ROOT
			}
			has_discovered = ROOT
		}
		trigger = {
			transdanubia_area = {
				type = all
				country_or_vassal_holds = ROOT
			}
			alfold_area = {
				type = all
				country_or_vassal_holds = ROOT
			}
			vojvodina_area = {
				type = all
				country_or_vassal_holds = ROOT
			}
			slavonia_area = {
				type = all
				country_or_vassal_holds = ROOT
			}
			transylvania_area = {
				type = all
				country_or_vassal_holds = ROOT
			}
			southern_transylvania_area = {
				type = all
				country_or_vassal_holds = ROOT
			}
		}
		effect = {
			country_event = {
				id = mmetr_FRK_Carolingian_mission_events.14
			}
			tooltip = {
				carpathia_region = {
					limit = {
						country_or_vassal_holds = ROOT
					}
					add_province_modifier = {
						name = "me_frk_avar_march"
						duration = 10950
					}
				}
			}
		}
	}
	frk_placitum_generalis_mission = {
		icon = mission_monarch_signing
		required_missions = {  }
		position = 9
		trigger = {
			num_of_estate_agendas_completed = {
				estate = estate_nobles
				value = 3
			}
			num_of_estate_agendas_completed = {
				estate = estate_church
				value = 2
			}
		}
		effect = {
			add_country_modifier = {
				name = "me_frk_placitum_generalis"
				duration = 10950
			}
		}
	}
	frk_military_regulations_mission = {
		icon = mission_consolidate_the_state
		required_missions = { frk_placitum_generalis_mission }
		position = 11
		trigger = {
			army_tradition = 80
			army_professionalism = 0.60
		}
		effect = {
			add_country_modifier = {
				name = "me_frk_army_supply_regulations"
				duration = 10950
			}
		}
	}
	
}