country_decisions = {
	british_nation = {
		major = yes
		potential = {
			OR = {
				NOT = { has_government_attribute = english_parliament }	#Formation through the Parliament
				ai = yes
			}
			normal_or_historical_nations = yes
			NOT = { has_country_flag = formed_great_britain_flag }
			was_never_end_game_tag_trigger = yes
			OR = {
				ai = no
				is_playing_custom_nation = no
			}
			OR = {
				is_free_or_tributary_trigger = yes
				ai = no
			}
			NOT = { exists = GBR }
			NOT = { tag = PAP }
			NOT = { tag = HLR }
			NOT = { tag = AVE }
			
			NOT = { tag = DM1 }		#New added in MMETR mod tags
			NOT = { tag = DM2 }
			
			NOT = { has_country_flag = eng_took_ave_branch }
			OR = {
				culture_group = british
				primary_culture = highland_scottish
			}
			OR = {
				ai = no
				AND = {
					ai = yes
					num_of_cities = 3
				}
			}
			is_colonial_nation = no
			OR = {
				is_former_colonial_nation = no
				AND = {
					is_former_colonial_nation = yes
					ai = no
				}
			}
		}
		provinces_to_highlight = {
			OR = {
				province_id = 236		# London
				province_id = 237		# Oxfordshire
				province_id = 234		# Wessex
				province_id = 248		# Lothian
				province_id = 251		# Aberdeen
			}
			OR = {
				NOT = { owned_by = ROOT }
				NOT = { is_core = ROOT }
			}
		}
		allow = {
			adm_tech = 55 #10
			is_free_or_tributary_trigger = yes
			is_nomad = no
			is_at_war = no
			owns_core_province = 237		# Oxfordshire
			owns_core_province = 234		# Wessex
			owns_core_province = 248		# Lothian
			owns_core_province = 251		# Aberdeen
			owns_core_province = 236		# London
			236 = {							# London
				is_state = yes
			}
		}
		effect = {
			236 = {
				move_capital_effect = yes
			}
			hidden_effect = {
				complete_mission = eng_rb_war_of_roses
			}
			hidden_effect = {
				if = {
					limit = {
						tag = SCO
					}
					complete_mission = eng_mighty_army
					complete_mission = conquer_scotland
				}	
			}
			hidden_effect = {
				if = {
					limit = {
						tag = IRE
					}
					complete_mission = eng_mighty_army
					complete_mission = conquer_scotland
					complete_mission = conquer_ireland
				}	
			}
			change_tag = GBR
			on_change_tag_effect = yes
			restore_country_name = yes
			swap_non_generic_missions = yes
			remove_non_electors_emperors_from_empire_effect = yes
			if = {
				limit = {
					NOT = { government_rank = 2 }
				}
				set_government_rank = 2
			}
			british_isles_region = {
				limit = {
					NOT = { owned_by = ROOT }
				}
				add_permanent_claim = GBR
			}
			add_prestige = 25
			add_country_modifier = {
				name = "centralization_modifier"
				duration = 7300
			}
			set_country_flag = formed_great_britain_flag
			if = {
				limit = {
					mission_completed = conquer_scotland
					has_dlc = "Rule Britannia"
				}
				369 = {
					add_permanent_claim = GBR
				}
				1978 = {
					add_permanent_claim = GBR
				}
				1979 = {
					add_permanent_claim = GBR
				}
				370 = { add_claim = GBR }
				371 = { add_claim = GBR }
			}
			if = {
				limit = {
					mission_completed = eng_rb_spice_islands
					has_dlc = "Rule Britannia"
				}
				west_bengal_area = {
					limit = {
						NOT = { is_core = ROOT }
						NOT = { owned_by = ROOT }
					}
					add_permanent_claim = GBR
				}
			}
			if = {
				limit = { 
					has_custom_ideas = no
					NOT = { has_idea_group = GBR_ideas }
				}
				country_event = { id = ideagroups.1 } #Swap Ideas
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				tag = SCO
				NOT = { is_enemy = ENG }
				NOT = { is_rival = ENG }
			}
		}
		ai_importance = 400
	}
	
	british_nation_diplomatically = {
		major = yes
		potential = {
			OR = {
				NOT = { has_government_attribute = english_parliament }	#Formation through the Parliament
				ai = yes
			}
			normal_or_historical_nations = yes
			was_never_end_game_tag_trigger = yes
			NOT = { exists = GBR }
			NOT = { tag = AVE }
			NOT = { has_country_flag = eng_took_ave_branch }
			OR = {
				ai = no
				is_playing_custom_nation = no
			}
			OR = {
				is_free_or_tributary_trigger = yes
				ai = no
			}
			OR = {
				AND = {
					tag = ENG
					OR = {
						ai = no
						AND = {
							ai = yes
							SCO = {	is_subject_of = ENG	}
							#This overlaps with allow for AI, is meant to negate do_not_integrate
							SCO = { NOT = { num_of_cities = 15 } } #Keep this number the same as in allow
						}
					}
				}
				AND = {
					tag = SCO
					OR = {
						ai = no
						AND = {
							ai = yes
							ENG = {	is_subject_of = SCO	}
							#This overlaps with allow for AI, is meant to negate do_not_integrate
							ENG = { NOT = { num_of_cities = 41 } } #Keep this number the same as in allow
						}
					}
				}
			}
		}
		allow = {
			adm_tech = 55 #10
			is_free_or_tributary_trigger = yes
			is_nomad = no
			is_at_war = no
			legitimacy = 100
			OR = {
				AND = {
					tag = ENG
					OR = {
						SCO = {	junior_union_with = ENG	}
						SCO = {	is_subject_of = ENG	}
					}
					SCO = { NOT = { num_of_cities = 15 } } #Keep this number the same as in potential
				}
				AND = {
					tag = SCO
					OR = {
						ENG = {	junior_union_with = SCO	}
						ENG = {	is_subject_of = SCO	}
					}
					ENG = { NOT = { num_of_cities = 41 } } #Keep this number the same as in potential
				}
			}
		}
		effect = {
			if = {
				limit = {
					tag = ENG
					SCO = {
						ai = yes
					}
				}
				inherit = SCO
			}
			if = {
				limit = {
					tag = SCO
					ENG = {
						ai = yes
					}
				}
				inherit = ENG
			}
			hidden_effect = {
				if = {
					limit = {
						tag = SCO
					}
					complete_mission = eng_mighty_army
					complete_mission = conquer_scotland
					complete_mission = eng_rb_war_of_roses
				}	
			}
			change_tag = GBR
			on_change_tag_effect = yes
			restore_country_name = yes
			swap_non_generic_missions = yes
			remove_non_electors_emperors_from_empire_effect = yes
			if = {
				limit = {
					NOT = { government_rank = 2 }
				}
				set_government_rank = 2
			}
			british_isles_region = {
				limit = {
					NOT = { owned_by = ROOT }
				}
				add_permanent_claim = GBR
			}
			add_prestige = 25
			
			add_country_modifier = {
				name = "centralization_modifier"
				duration = 7300
			}
			if = {
				limit = { 
					has_custom_ideas = no
					NOT = { has_idea_group = GBR_ideas }
				}
				country_event = { id = ideagroups.1 } #Swap Ideas
			}
		}
		ai_will_do = {
			factor = 1
		}
		ai_importance = 200
		do_not_integrate = ENG
		do_not_integrate = SCO
	}
	
	force_british_union_debate = {
		major = yes
		potential = {
			has_government_attribute = english_parliament
			ai = no
			normal_or_historical_nations = yes
			was_never_end_game_tag_trigger = yes
			NOT = { exists = GBR }
			NOT = { tag = AVE }
			NOT = { has_country_flag = eng_took_ave_branch }
			has_not_enacted_parliament_action = { parliament_action = english_scottish_act_of_union }
		}
		provinces_to_highlight = {
			OR = {
				province_id = 237		# Oxfordshire
				province_id = 234		# Wessex
				province_id = 248		# Lothian
				province_id = 251		# Aberdeen
				province_id = 236		# London
			}
			OR = {
				NOT = { owned_by = ROOT }
				NOT = { is_core = ROOT }
			}
		}
		allow = {
			adm_tech = 10
			has_issue_unlocked_tooltip = {
				issue = english_scottish_act_of_union
			}
			has_active_debate = no
			is_free_or_tributary_trigger = yes
			is_nomad = no
			is_at_war = no
			OR = {
				AND = {
					owns_core_province = 237		# Oxfordshire
					owns_core_province = 234		# Wessex
					owns_core_province = 248		# Lothian
					owns_core_province = 251		# Aberdeen
					owns_core_province = 236		# London
					236 = {							# London
						is_state = yes
					}
				}
				AND = {
					OR = {
						SCO = {	junior_union_with = ROOT }
						SCO = {	is_subject_of = ROOT }
					}
					SCO = { NOT = { num_of_cities = 15 } }
				}
			}
		}
		effect = {
			start_debate = english_scottish_act_of_union
			custom_tooltip = DEBATE_EFFECT_TT
			tooltip = {
				if = {
					limit = {
						SCO = {
							exists = yes
							ai = yes
							is_subject_of = ROOT
							NOT = { num_of_cities = 15 }
						}
					}
					inherit = SCO
					custom_tooltip = english_scottish_act_of_union_bt
				}
				change_tag = GBR
				add_prestige = 25
			}
		}
		ai_will_do = {
			factor = 1
		}
		ai_importance = 200
		do_not_integrate = SCO
	}
	
	force_french_union_debate = {
		major = yes
		potential = {
			has_government_attribute = english_parliament
			ai = no
			normal_or_historical_nations = yes
			was_never_end_game_tag_trigger = yes
			NOT = { exists = GBR }
			NOT = { tag = AVE }
			has_country_flag = eng_took_ave_branch
			has_not_enacted_parliament_action = { parliament_action = english_french_act_of_union }
		}
		provinces_to_highlight = {
			OR = {
				province_id = 237		# Oxfordshire
				province_id = 234		# Wessex
				province_id = 236		# London
				province_id = 177		# Maine
				province_id = 183		# Paris
				province_id = 178		# Anjou
			}
			OR = {
				NOT = { owned_by = ROOT }
				NOT = { is_core = ROOT }
			}
		}
		allow = {
			adm_tech = 10
			has_issue_unlocked_tooltip = {
				issue = english_french_act_of_union
			}
			has_active_debate = no
			is_free_or_tributary_trigger = yes
			is_nomad = no
			is_at_war = no
			OR = {
				AND = {
					owns_core_province = 237		# Oxfordshire
					owns_core_province = 234		# Wessex
					owns_core_province = 236		# London
					owns_core_province = 177		# Maine
					owns_core_province = 183		# Paris
					owns_core_province = 178		# Anjou
					178 = {							# Anjou
						is_state = yes
					}
				}
				AND = {
					OR = {
						FRA = {	junior_union_with = ROOT }
						FRA = {	is_subject_of = ROOT }
					}
					FRA = { NOT = { num_of_cities = 40 } }
				}
			}
			num_of_owned_provinces_with = {
				region = france_region
				value = 25
			}
		}
		effect = {
			start_debate = english_french_act_of_union
			custom_tooltip = DEBATE_EFFECT_TT
			tooltip = {
				if = {
					limit = {
						FRA = {
							exists = yes
							ai = yes
							is_subject_of = ROOT
							NOT = { num_of_cities = 40 }
						}
					}
					inherit = FRA
					custom_tooltip = english_french_act_of_union_ct
				}
				change_tag = AVE
				add_prestige = 25
			}
		}
		ai_will_do = {
			factor = 1
		}
		ai_importance = 200
		do_not_integrate = FRA
	}
}