country_decisions = {
	dutch_provinces_reform_1 = {
		major = yes
		potential = {
			NOT = { has_global_flag = dutch_province_subject_no_internal_war }
			has_subject_of_type = dutch_province_subject
		}
		allow = {
			is_month = 1
			is_subject = no
			is_nomad = no
			is_at_war = no
			stability = 1
			if = {
				limit = {
					has_global_flag = extended_timeline_mod
					NOT = { adm_tech = 40 }
				}
				adm_power = 200
				dip_power = 200
				mil_power = 200
			}
			else = {
				adm_power = 100
				dip_power = 100
				mil_power = 100
			}
			custom_trigger_tooltip = {
				tooltip = HAS_AT_LEAST_2_DUTCH_PROVINCE_SUBJECTS
				calc_true_if = {
					all_subject_country = {
						is_subject_of_type = dutch_province_subject
					}
					amount = 2
				}
			}
			custom_trigger_tooltip = {
				tooltip = HAS_ANY_DUTCH_PROVINCE_SUBJECTS_FOR_AT_LEAST_2_YEARS
				any_subject_country = {
					is_subject_of_type = dutch_province_subject
					years_in_vassalage_under = {
						who = ROOT
						years = 2
						all_subject_country = yes
					}
				}
			}
			custom_trigger_tooltip = {
				tooltip = HAS_ALL_DUTCH_PROVINCE_SUBJECTS_FOR_AT_LEAST_1_YEAR
				NOT = {
					any_subject_country = {
						is_subject_of_type = dutch_province_subject
						NOT = {
							years_in_vassalage_under = {
								who = ROOT
								years = 1
								all_subject_country = yes
							}
						}
					}
				}
			}
			custom_trigger_tooltip = {
				tooltip = ALL_DUTCH_PROVINCE_SUBJECTS_HAVE_LESS_THAN_50_LIBERTY_DESIRE
				all_subject_country = {
					OR = {
						NOT = { is_subject_of_type = dutch_province_subject }
						NOT = { liberty_desire = 50 }
					}
				}
			}
		}
		effect = {
			if = {
				limit = {
					NOT = { full_idea_group = administrative_ideas }
					NOT = { full_idea_group = diplomatic_ideas }
				}
				add_stability = -1
				custom_tooltip = DUTCH_PROVINCE_SUBJECT_NO_STAB_HIT_WITH_IDEAS_TT
			}
			if = {
				limit = {
					has_global_flag = extended_timeline_mod
					NOT = { adm_tech = 40 }
				}
				add_adm_power = -200
				add_dip_power = -200
				add_mil_power = -200
			}
			else = {
				add_adm_power = -100
				add_dip_power = -100
				add_mil_power = -100
			}
			custom_tooltip = DUTCH_PROVINCE_SUBJECT_NO_INTERNAL_WAR_TT
			set_global_flag = dutch_province_subject_no_internal_war
			every_subject_country = {
				limit = {
					is_subject_of_type = dutch_province_subject
				}
				add_liberty_desire = -10
			}
			hidden_effect = {
				country_event = { id = subjects_expanded_dutch_province_subject_events.1 }
			}
		}
		ai_will_do = {
			factor = 10
			modifier = {
				factor = 0
				any_neighbor_country = {
					OR = {
						tech_difference = 3
						institution_difference = {
							who = ROOT
							value = 2
						}
					}
				}
			}
		}
	}

	dutch_provinces_reform_2 = {
		major = yes
		potential = {
			has_global_flag = dutch_province_subject_no_internal_war
			NOT = { has_global_flag = dutch_province_subject_no_external_war }
			has_subject_of_type = dutch_province_subject
		}
		allow = {
			is_month = 1
			is_subject = no
			is_nomad = no
			is_at_war = no
			stability = 1
			if = {
				limit = {
					has_global_flag = extended_timeline_mod
					NOT = { adm_tech = 40 }
				}
				adm_power = 200
				dip_power = 200
				mil_power = 200
			}
			else = {
				adm_power = 100
				dip_power = 100
				mil_power = 100
			}
			custom_trigger_tooltip = {
				tooltip = AT_LEAST_5_YEARS_AFTER_DUTCH_PROVINCES_REFORM_1
				had_global_flag = { flag = dutch_province_subject_no_internal_war days = 1825 }
			}
			custom_trigger_tooltip = {
				tooltip = HAS_AT_LEAST_2_DUTCH_PROVINCE_SUBJECTS
				calc_true_if = {
					all_subject_country = {
						is_subject_of_type = dutch_province_subject
					}
					amount = 2
				}
			}
			custom_trigger_tooltip = {
				tooltip = HAS_ANY_DUTCH_PROVINCE_SUBJECTS_FOR_AT_LEAST_2_YEARS
				any_subject_country = {
					is_subject_of_type = dutch_province_subject
					years_in_vassalage_under = {
						who = ROOT
						years = 2
						all_subject_country = yes
					}
				}
			}
			custom_trigger_tooltip = {
				tooltip = HAS_ALL_DUTCH_PROVINCE_SUBJECTS_FOR_AT_LEAST_1_YEAR
				NOT = {
					any_subject_country = {
						is_subject_of_type = dutch_province_subject
						NOT = {
							years_in_vassalage_under = {
								who = ROOT
								years = 1
								all_subject_country = yes
							}
						}
					}
				}
			}
			custom_trigger_tooltip = {
				tooltip = ALL_DUTCH_PROVINCE_SUBJECTS_HAVE_LESS_THAN_50_LIBERTY_DESIRE
				all_subject_country = {
					OR = {
						NOT = { is_subject_of_type = dutch_province_subject }
						NOT = { liberty_desire = 50 }
					}
				}
			}
		}
		effect = {
			if = {
				limit = {
					NOT = { full_idea_group = administrative_ideas }
					NOT = { full_idea_group = diplomatic_ideas }
				}
				add_stability = -1
				custom_tooltip = DUTCH_PROVINCE_SUBJECT_NO_STAB_HIT_WITH_IDEAS_TT
			}
			if = {
				limit = {
					has_global_flag = extended_timeline_mod
					NOT = { adm_tech = 40 }
				}
				add_adm_power = -200
				add_dip_power = -200
				add_mil_power = -200
			}
			else = {
				add_adm_power = -100
				add_dip_power = -100
				add_mil_power = -100
			}
			custom_tooltip = DUTCH_PROVINCE_SUBJECT_NO_EXTERNAL_WAR_TT
			set_global_flag = dutch_province_subject_no_external_war
			every_subject_country = {
				limit = {
					is_subject_of_type = dutch_province_subject
				}
				add_liberty_desire = -10
			}
			hidden_effect = {
				country_event = { id = subjects_expanded_dutch_province_subject_events.2 }
			}
		}
		ai_will_do = {
			factor = 10
			modifier = {
				factor = 0
				any_neighbor_country = {
					OR = {
						tech_difference = 3
						institution_difference = {
							who = ROOT
							value = 2
						}
					}
				}
			}
		}
	}

	dutch_provinces_reform_3 = {
		major = yes
		potential = {
			has_global_flag = dutch_province_subject_no_external_war
			NOT = { has_global_flag = dutch_province_subject_no_leader_election }
			has_subject_of_type = dutch_province_subject
		}
		allow = {
			is_month = 1
			is_subject = no
			is_nomad = no
			is_at_war = no
			stability = 1
			if = {
				limit = {
					has_global_flag = extended_timeline_mod
					NOT = { adm_tech = 40 }
				}
				adm_power = 200
				dip_power = 200
				mil_power = 200
			}
			else = {
				adm_power = 100
				dip_power = 100
				mil_power = 100
			}
			custom_trigger_tooltip = {
				tooltip = AT_LEAST_5_YEARS_AFTER_DUTCH_PROVINCES_REFORM_2
				had_global_flag = { flag = dutch_province_subject_no_external_war days = 1825 }
			}
			custom_trigger_tooltip = {
				tooltip = HAS_AT_LEAST_2_DUTCH_PROVINCE_SUBJECTS
				calc_true_if = {
					all_subject_country = {
						is_subject_of_type = dutch_province_subject
					}
					amount = 2
				}
			}
			custom_trigger_tooltip = {
				tooltip = HAS_ANY_DUTCH_PROVINCE_SUBJECTS_FOR_AT_LEAST_2_YEARS
				any_subject_country = {
					is_subject_of_type = dutch_province_subject
					years_in_vassalage_under = {
						who = ROOT
						years = 2
						all_subject_country = yes
					}
				}
			}
			custom_trigger_tooltip = {
				tooltip = HAS_ALL_DUTCH_PROVINCE_SUBJECTS_FOR_AT_LEAST_1_YEAR
				NOT = {
					any_subject_country = {
						is_subject_of_type = dutch_province_subject
						NOT = {
							years_in_vassalage_under = {
								who = ROOT
								years = 1
								all_subject_country = yes
							}
						}
					}
				}
			}
			custom_trigger_tooltip = {
				tooltip = ALL_DUTCH_PROVINCE_SUBJECTS_HAVE_LESS_THAN_50_LIBERTY_DESIRE
				all_subject_country = {
					OR = {
						NOT = { is_subject_of_type = dutch_province_subject }
						NOT = { liberty_desire = 50 }
					}
				}
			}
		}
		effect = {
			if = {
				limit = {
					NOT = { full_idea_group = administrative_ideas }
					NOT = { full_idea_group = diplomatic_ideas }
				}
				add_stability = -1
				custom_tooltip = DUTCH_PROVINCE_SUBJECT_NO_STAB_HIT_WITH_IDEAS_TT
			}
			if = {
				limit = {
					has_global_flag = extended_timeline_mod
					NOT = { adm_tech = 40 }
				}
				add_adm_power = -200
				add_dip_power = -200
				add_mil_power = -200
			}
			else = {
				add_adm_power = -100
				add_dip_power = -100
				add_mil_power = -100
			}
			custom_tooltip = DUTCH_PROVINCE_SUBJECT_NO_LEADER_ELECTION_TT
			set_global_flag = dutch_province_subject_no_leader_election
			every_subject_country = {
				limit = {
					is_subject_of_type = dutch_province_subject
				}
				add_liberty_desire = -10
			}
			hidden_effect = {
				country_event = { id = subjects_expanded_dutch_province_subject_events.3 }
			}
		}
		ai_will_do = {
			factor = 10
			modifier = {
				factor = 0
				any_neighbor_country = {
					OR = {
						tech_difference = 3
						institution_difference = {
							who = ROOT
							value = 2
						}
					}
				}
			}
		}
	}

	dutch_provinces_overlord_form_netherlands = {
		major = yes
		potential = {
			has_global_flag = dutch_province_subject_no_leader_election
			NOT = { exists = NED }
			NOT = { has_country_flag = formed_netherlands_flag }
			has_subject_of_type = dutch_province_subject
		}
		provinces_to_highlight = {
			region = low_countries_region
			OR = {
				AND = {
					NOT = { owned_by = ROOT }
					owner = {
						OR = {
							NOT = { is_subject_of = ROOT }
							NOT = { is_subject_of_type = dutch_province_subject }
						}
					}
				}
				NOT = { is_core = owner }
			}
			ROOT = {
				NOT = {
					num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
						value = 15
						region = low_countries_region
						OR = {
							AND = {
								owned_by = ROOT
								is_core = ROOT
							}
							custom_trigger_tooltip = {
								tooltip = PROVINCE_OWNED_BY_DUTCH_PROVINCE_AND_IS_CORE
								owner = {
									is_subject_of = ROOT
									is_subject_of_type = dutch_province_subject
								}
								is_core = owner
							}
						}
					}
				}
			}
		}
		allow = {
			is_subject = no
			is_nomad = no
			is_at_war = no
			stability = 1
			if = {
				limit = {
					has_global_flag = extended_timeline_mod
					NOT = { adm_tech = 40 }
				}
				adm_power = 200
				dip_power = 200
				mil_power = 200
			}
			else = {
				adm_power = 100
				dip_power = 100
				mil_power = 100
			}
			custom_trigger_tooltip = {
				tooltip = AT_LEAST_5_YEARS_AFTER_DUTCH_PROVINCES_REFORM_3
				had_global_flag = { flag = dutch_province_subject_no_leader_election days = 1825 }
			}
			custom_trigger_tooltip = {
				tooltip = HAS_AT_LEAST_2_DUTCH_PROVINCE_SUBJECTS
				calc_true_if = {
					all_subject_country = {
						is_subject_of_type = dutch_province_subject
					}
					amount = 2
				}
			}
			custom_trigger_tooltip = {
				tooltip = HAS_ANY_DUTCH_PROVINCE_SUBJECTS_FOR_AT_LEAST_2_YEARS
				any_subject_country = {
					is_subject_of_type = dutch_province_subject
					years_in_vassalage_under = {
						who = ROOT
						years = 2
						all_subject_country = yes
					}
				}
			}
			custom_trigger_tooltip = {
				tooltip = HAS_ALL_DUTCH_PROVINCE_SUBJECTS_FOR_AT_LEAST_1_YEAR
				NOT = {
					any_subject_country = {
						is_subject_of_type = dutch_province_subject
						NOT = {
							years_in_vassalage_under = {
								who = ROOT
								years = 1
								all_subject_country = yes
							}
						}
					}
				}
			}
			custom_trigger_tooltip = {
				tooltip = ALL_DUTCH_PROVINCE_SUBJECTS_HAVE_LESS_THAN_50_LIBERTY_DESIRE
				all_subject_country = {
					OR = {
						NOT = { is_subject_of_type = dutch_province_subject }
						NOT = { liberty_desire = 50 }
					}
				}
			}
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				value = 15
				region = low_countries_region
				OR = {
					AND = {
						owned_by = ROOT
						is_core = ROOT
					}
					custom_trigger_tooltip = {
						tooltip = PROVINCE_OWNED_BY_DUTCH_PROVINCE_AND_IS_CORE
						owner = {
							is_subject_of = ROOT
							is_subject_of_type = dutch_province_subject
						}
						is_core = owner
					}
				}
			}
		}
		effect = {
			if = {
				limit = {
					NOT = { full_idea_group = administrative_ideas }
					NOT = { full_idea_group = diplomatic_ideas }
				}
				add_stability = -1
				custom_tooltip = DUTCH_PROVINCE_SUBJECT_NO_STAB_HIT_WITH_IDEAS_TT
			}
			if = {
				limit = {
					has_global_flag = extended_timeline_mod
					NOT = { adm_tech = 40 }
				}
				add_adm_power = -200
				add_dip_power = -200
				add_mil_power = -200
			}
			else = {
				add_adm_power = -100
				add_dip_power = -100
				add_mil_power = -100
			}
			every_subject_country = {
				limit = {
					is_subject_of_type = dutch_province_subject
				}
				ROOT = { inherit = PREV }
			}
			if = {
				limit = {
					any_owned_province = {
						is_part_of_hre = yes
					}
					is_elector = no
					is_emperor = no
				}
				tooltip = {
					set_in_empire = no
				}
				hidden_effect = {
					every_owned_province = {
						limit = {
							is_part_of_hre = yes
						}
						set_in_empire = no
					}
				}
			}
			if = {
				limit = {
					government = theocracy
					religion = catholic
					exists = PAP
				}
				PAP = {
					add_opinion = {
						who = ROOT
						modifier = opinion_displeased
					}
				}
			}
			change_tag = NED
			swap_non_generic_missions = yes
			wallonia_area = {
				limit = {
					NOT = { owned_by = ROOT }
				}
				add_permanent_claim = ROOT
			}
			picardy_area = {
				limit = {
					NOT = { owned_by = ROOT }
					NOT = {
						province_id = 89
					}
				}
				add_permanent_claim = NED
			}
			if = {
				limit = {
					NOT = {
						government_rank = 2
					}
				}
				set_government_rank = 2
			}
			set_country_flag = formed_netherlands_flag
			set_country_flag = united_the_dutch_provinces
			add_prestige = 25
			if = {
				limit = {
					has_custom_ideas = no
					NOT = { has_idea_group = NED_ideas }
				}
				country_event = { id = ideagroups.1 } #Swap Ideas
			}
			if = {
				limit = {
					NOT = { has_reform = dutch_republic }
				}
				country_event = { id = subjects_expanded_dutch_province_subject_events.12 }
			}
		}
		ai_will_do = {
			factor = 10
			modifier = {
				factor = 0
				any_neighbor_country = {
					OR = {
						tech_difference = 3
						institution_difference = {
							who = ROOT
							value = 2
						}
					}
				}
			}
		}
	}

	dutch_provinces_player_election = {
		potential = {
			ai = no
			NOT = { has_global_flag = dutch_province_subject_no_leader_election }
			NOT = { has_country_flag = has_dutch_provinces_player_election }
			OR = {
				is_subject_of_type = dutch_province_subject
				has_subject_of_type = dutch_province_subject
			}
		}
		allow = {
			is_month = 1
		}
		effect = {
			set_country_flag = has_dutch_provinces_player_election
			country_event = { id = subjects_expanded_dutch_province_subject_events.9 }
			if = {
				limit = {
					has_country_flag = elected_as_dutch_province_overlord_by_@ROOT
				}
				custom_tooltip = WE_SUPPORT_THIS_FOR_NEXT_DUTCH_PROVINCE_ELECTION
			}
			else_if = {
				limit = {
					any_country = {
						has_country_flag = elected_as_dutch_province_overlord_by_@ROOT
					}
				}
				random_country = {
					limit = {
						has_country_flag = elected_as_dutch_province_overlord_by_@ROOT
					}
					custom_tooltip = WE_SUPPORT_THIS_FOR_NEXT_DUTCH_PROVINCE_ELECTION
				}
			}
		}
		ai_will_do = {
			factor = 0
		}
	}
}