
monarchy_mechanic = {
	monarchy = yes
	heir = yes
	queen = yes
	basic_reform = yes # = invisible/does not take up a slot
	is_eligible_for_hre_emperor = yes
	valid_for_nation_designer = no
	custom_attributes = {
		enables_aristocratic_idea_group = yes
	}
	modifiers = {
		nobles_influence_modifier = 0.05
	}
}

#Feudalism vs Autocracy:

feudalism_reform = {
	icon = "castle"
	allow_normal_conversion = yes
	legacy_equivalent = feudal_monarchy
	valid_for_nation_designer = yes
	nation_designer_cost = 0
	modifiers = {
		vassal_income = 0.25
		nobles_influence_modifier = 0.05
		maratha_exclusive_influence_modifier = 0.05
		rajput_exclusive_influence_modifier = 0.05
	}
	custom_attributes = {
		buffed_strong_duchies = yes #+5% Loyalty
	}
	ai = {
		factor = 0.5 #generic
	}
}

autocracy_reform = {
	icon = "crown"
	allow_normal_conversion = yes
	legacy_equivalent = despotic_monarchy
	valid_for_nation_designer = yes
	nation_designer_cost = 0
	modifiers = {
		unjustified_demands = -0.1
		harsh_treatment_cost = -0.1
		global_rebel_suppression_efficiency = 0.1
	}
	ai = {
		factor = 0.5 #generic
	}
}

elective_monarchy_reform = {
	icon = "ballot_box"
	potential = {
		has_dlc = "Domination"
	}
	allow_normal_conversion = yes
	valid_for_nation_designer = yes
	nation_designer_cost = 10
	modifiers = {
		max_absolutism = -40
		all_estate_influence_modifier = 0.1
	}
	custom_attributes = {
		has_ruler_election = yes
	}
	ai = {
		factor = 0.5
	}
}

plutocratic_reform = {
	icon = "asian_scripture"
	allow_normal_conversion = yes
	legacy_equivalent = despotic_monarchy
	potential = {
		OR = {
			technology_group = indian
			technology_group = early_indian
			technology_group = muslim
			technology_group = chinese
			technology_group = early_chinese
			technology_group = east_african
		}
	}
	nation_designer_trigger = {
		OR = {
			technology_group = indian
			technology_group = early_indian
			technology_group = muslim
			technology_group = chinese
			technology_group = early_chinese
			technology_group = east_african
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 10
	modifiers = {
		merchants = 1
		nobles_influence_modifier = -0.05
		burghers_influence_modifier = 0.05
		vaisyas_influence_modifier = 0.05
	}
	custom_attributes = {
		enables_plutocratic_idea_group = yes
		enables_aristocratic_idea_group = no
	}
	boost_income = yes
	conditional = {
		allow = {
			has_dlc = "Leviathan"
		}
		allow_draft_transport_ships = yes
	}
	conditional = {
		allow = {
			has_dlc = "Res Publica"
			NOT = { has_dlc = "Mare Nostrum" }
		}
		can_use_trade_post = yes
	}
	conditional = {
		allow = {
			has_dlc = "Mare Nostrum"
			NOT = { has_dlc = "Res Publica" }
		}
		can_form_trade_league = yes
		trade_city_reform = trading_city
	}
	conditional = {
		allow = {
			has_dlc = "Res Publica"
			has_dlc = "Mare Nostrum"
		}
		can_use_trade_post = yes
		can_form_trade_league = yes
		trade_city_reform = trading_city
	}
	ai = {
		factor = 0.75 #generic
	}
}

austrian_archduchy_reform = {
	icon = "austrian_archduchy_reform"
	allow_normal_conversion = yes
	legacy_equivalent = austrian_archduchy
	valid_for_nation_designer = yes
	potential = {
		OR = {
			tag = HAB
			was_tag = HAB
			has_reform = austrian_archduchy_reform
			have_had_reform = austrian_archduchy_reform
			primary_culture = austrian
		}
	}
	nation_designer_cost = 0
	modifiers = {
		liberty_desire_from_subject_development = -0.33
		nobles_influence_modifier = 0.05
		maratha_exclusive_influence_modifier = 0.05
		rajput_exclusive_influence_modifier = 0.05
	}
	custom_attributes = {
		buffed_strong_duchies = yes #+5% Loyalty
	}
}

grand_duchy_reform = {
	icon = "peasants"
	allow_normal_conversion = yes
	potential = {
		OR = {
			AND = {
				tag = LIT
				NOT = { map_setup = map_setup_random }
			}
			has_reform = grand_duchy_reform
		}
	}
	legacy_equivalent = despotic_monarchy
	fixed_rank = 1
	valid_for_nation_designer = yes
	nation_designer_cost = 10
	modifiers = {
		governing_capacity = 100
	}
}

indian_sultanate_reform = {
	icon = "indian_sultanate"
	allow_normal_conversion = yes
	potential = {
		OR = {
			capital_scope = {
				superregion = india_superregion
			}
			has_reform = indian_sultanate_reform
		}
		religion_group = muslim
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 10
	nation_designer_trigger = {
		religion_group = muslim
		capital_scope = {
			superregion = india_superregion
		}
	}
	legacy_equivalent = indian_sultanate_legacy

	modifiers = {
		tolerance_heathen = 3
	}

	conditional = {
		allow = { has_dlc = "Cradle of Civilization" }
		government_abilities = {
			iqta_mechanic
		}
	}
}

shogunate = {
	icon = "shogunate"
	allow_normal_conversion = yes
	potential = {
		OR = {
			AND = {
				capital_scope = {
					province_id = 1020
				}
				culture_group = japanese_g
				NOT = { any_country = { has_reform = shogunate } }
			}
			has_reform = shogunate
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 50
	nation_designer_trigger = {
		culture_group = japanese_g
		technology_group = chinese
		capital_scope = { region = japan_region }
		owns = 1020
	}
	legacy_equivalent = shogunate_legacy
	fixed_rank = 2
	maintain_dynasty = yes
	allow_vassal_war = yes
	allow_vassal_alliance = yes
	lock_level_when_selected = yes
	can_change_primary_culture = no

	conditional = {
		allow = { has_dlc = "Mandate of Heaven" }
		government_abilities = {
			shogunate_mechanic
		}
	}

	modifiers = {
		diplomats = 1
		envoy_travel_time = -0.25
		max_absolutism = 5
		amount_of_samurai = 10
		has_samurai = yes
	}

	custom_attributes = {
		locked_government_type = yes
	}
}

daimyo = {
	icon = "daimyo"
	allow_normal_conversion = no
	potential = {
		overlord = { has_reform = shogunate }
	}
	replacement_on_independence_war = indep_daimyo
	legacy_equivalent = daimyo_legacy
	fixed_rank = 1
	maintain_dynasty = yes
	valid_for_nation_designer = yes
	nation_designer_cost = 0
	lock_level_when_selected = yes
	nation_designer_trigger = {
		culture_group = japanese_g
		technology_group = chinese
		capital_scope = { region = japan_region }
	}
	modifiers = {
		land_morale = 0.1
		infantry_power = 0.1
		amount_of_samurai = 4
	}
	custom_attributes = {
		locked_government_type = yes
	}
}

feudal_france_reform = {
	icon = "feudal_france_reform"
	allow_normal_conversion = no
	potential = {
		has_dlc = "Domination" 
		OR = {
			tag = FRA
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = feudal_france_reform
			}
		}
	}
	fixed_rank = 2
	lock_level_when_selected = yes

	modifiers = {
		nobles_influence_modifier = 0.1
		vassal_income = 0.2
		max_absolutism = -50
	}

	custom_attributes = {
		locked_government_type = yes
		has_appanages = yes
		#need_crownland_to_annex = yes
		nobility_loyalty_hit_on_integration = yes
	}
}

appanage_reform = {
	icon = "nobleman"
	allow_normal_conversion = no
	potential = {
		is_subject_of_type = appanage
	}
	replacement_on_independence_war = feudalism_reform
	fixed_rank = 1
	maintain_dynasty = yes
	valid_for_nation_designer = no
	lock_level_when_selected = yes
	modifiers = {
		global_manpower_modifier = 0.1
		nobles_loyalty_modifier = 0.1
		nobles_influence_modifier = 0.05
	}
	custom_attributes = {
		locked_government_type = yes
	}
}

absolutist_france_reform = {
	icon = "absolutist_france_reform"
	allow_normal_conversion = no
	potential = {
		has_dlc = "Domination" 
		OR = {
			AND = { 
				tag = FRA 
				OR = {
					has_reform = absolutist_france_reform
					have_had_reform = absolutist_france_reform
					has_unlocked_government_reform = { government_reform = absolutist_france_reform }
				}
			}
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = absolutist_france_reform
			}
			mission_completed = fra_movement_centralization
		}
	}
	trigger = {
		OR = {
			AND = { 
				tag = FRA 
				OR = {
					has_reform = absolutist_france_reform
					have_had_reform = absolutist_france_reform
				}
			}
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = absolutist_france_reform
			}
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 50
	nation_designer_trigger = {
		culture_group = french
		technology_group = western
		capital_scope = { region = france_region }
	}
	lock_level_when_selected = yes

	modifiers = {
		all_estate_influence_modifier = -0.1
		max_absolutism = 10
		
	}

	custom_attributes = {
		centralize_state_development = yes 
	}
}

indep_daimyo = {
	icon = "samurai"
	allow_normal_conversion = no
	potential = {
		NOT = { has_country_flag = formed_japan_flag }
		OR = {
			AND = {
				OR = {
					#overlord = { NOT = { has_reform = shogunate } }
					is_subject = no
					is_subject_of_type = tributary_state
				}
				capital_scope = { region = japan_region }
				culture_group = japanese_g
			}
			has_reform = indep_daimyo
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 0
	nation_designer_trigger = {
		culture_group = japanese_g
		technology_group = chinese
		capital_scope = { region = japan_region }
	}
	legacy_equivalent = indep_daimyo_legacy
	maintain_dynasty = yes

	modifiers = {
		land_morale = 0.1
		infantry_power = 0.1
		amount_of_samurai = 5
	}
	custom_attributes = {
		locked_government_type = yes
	}
}

celestial_empire = {
	icon = "celestial_empire"
	allow_normal_conversion = no
	potential = {
		if = {
			limit = {
				has_dlc = "Mandate of Heaven"
			}
			is_emperor_of_china = yes
		}
		else = {
			OR = {
				has_reform = celestial_empire
				AND = {
					culture_group = east_asian
					num_of_cities = 50
				}
			}
		}
		NOT = { has_global_flag = empire_of_china_dismantled }
	}
	legacy_equivalent = celestial_empire_legacy
	allow_force_tributary = no
	valid_for_nation_designer = yes
	nation_designer_cost = 10
	lock_level_when_selected = yes
	nation_designer_trigger = {
		culture_group = east_asian
		technology_group = chinese
		capital_scope = {
			OR = {
				region = north_china_region
				region = xinan_region
				region = south_china_region
			}
		}
	}
	factions = {
		temples
		enuchs
		bureaucrats
	}

	fixed_rank = 3
	start_territory_to_estates = 0.9

	modifiers = {
		prestige = 0.5
		church_influence_modifier = -0.1
		nobles_influence_modifier = -0.1
		burghers_influence_modifier = -0.1
		governing_capacity = 500
	}
	
	ai = {
		factor = 1000 # should always be picked if available
	}

	custom_attributes = {
		locked_government_type = yes
		has_unify_china_cb = yes
	}

	conditional = {
		allow = { has_dlc = "Mandate of Heaven" }
		has_meritocracy = yes
		factions = {}
	}
}

chinese_warlord = {
	icon = "samurai"
	allow_normal_conversion = no
	potential = {
		OR = {
			primary_culture = bai
			primary_culture = miao
			primary_culture = yi
			culture_group = east_asian
		}
		OR = {
			AND = {
				OR = {
					primary_culture = miao
					primary_culture = yi
				}
				religion = animism
			}
			AND = {
				primary_culture = bai
				religion = buddhism
			}
			religion = confucianism
		}
		technology_group = chinese
		capital_scope = {
			OR = {
				region = north_china_region
				region = xinan_region
				region = south_china_region
			}
		}
		if = {
			limit = { is_subject = yes }
			overlord = { has_reform = celestial_empire }
		}
	}
	trigger = {
		OR = {
			primary_culture = bai
			primary_culture = miao
			primary_culture = yi
			culture_group = east_asian
		}
		OR = {
			AND = {
				OR = {
					primary_culture = miao
					primary_culture = yi
				}
				religion = animism
			}
			AND = {
				primary_culture = bai
				religion = buddhism
			}
			religion = confucianism
		}
		technology_group = chinese
		capital_scope = {
			OR = {
				region = north_china_region
				region = xinan_region
				region = south_china_region
			}
		}
		if = {
			limit = { is_subject = yes }
			overlord = { has_reform = celestial_empire }
		}
	}
	maintain_dynasty = yes
	allow_force_tributary = no
	valid_for_nation_designer = yes
	nation_designer_cost = 10
	lock_level_when_selected = yes
	nation_designer_trigger = {
		OR = {
			primary_culture = bai
			primary_culture = miao
			primary_culture = yi
			culture_group = east_asian
		}
		technology_group = chinese
		OR = {
			AND = {
				OR = {
					primary_culture = miao
					primary_culture = yi
				}
				religion = animism
			}
			AND = {
				primary_culture = bai
				religion = buddhism
			}
			religion = confucianism
		}
		capital_scope = {
			OR = {
				region = north_china_region
				region = xinan_region
				region = south_china_region
			}
		}
	}
	fixed_rank = 2

	modifiers = {
		manpower_recovery_speed = 0.25
		governing_capacity = 100
		liberty_desire = 50
	}
	
	ai = {
		factor = 1000
	}

	custom_attributes = {
		has_unify_china_cb = yes
	}
}

kalmar_union = {
	icon = "kalmar_union"
	allow_normal_conversion = no
	potential = {
		has_dlc = "Lions of the North"
		has_reform = kalmar_union
	}
	trigger = {
		any_subject_country = {
			is_subject_of_type = personal_union
			capital_scope = { region = scandinavia_region }
		}
	}
	lock_level_when_selected = yes
	valid_for_nation_designer = no
	modifiers = {
		diplomatic_upkeep = 2
		advisor_pool = 1
		nobles_influence_modifier = 0.15
	}
	removed_effect = {
		hidden_effect = {
			if = {
				limit = {
					NOT = { has_dlc = "Lions of the North" }
				}
				add_government_reform = feudalism_reform
			}
		}
	}
	
	custom_attributes = {
		locked_government_type = yes
		kalmar_union_succession = yes
		cannot_integrate_personal_unions = yes
		cannot_abandon_personal_unions = yes
	}
	ai = {
		factor = 1
	}
}

danish_archkingdom = {
	icon = "danish_archkingdom"
	allow_normal_conversion = no
	potential = {
		OR = {
			has_reform = danish_archkingdom
			have_had_reform = danish_archkingdom
		}
	}
	valid_for_nation_designer = no
	modifiers = {
		diplomatic_upkeep = 2
		advisor_pool = 1
		max_absolutism = 10
		nobles_influence_modifier = -0.1
		years_to_integrate_personal_union = -40
	}
	custom_attributes = {
		personal_union_war_contribution = yes
	}
	ai = {
		factor = 1
	}
}

elective_monarchy = {
	icon = "elective_monarchy"
	allow_normal_conversion = yes
	potential = {
		OR = {
			has_reform = elective_monarchy
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = elective_monarchy
			}
		}
	}
	legacy_equivalent = elective_monarchy_legacy
	lock_level_when_selected = yes
	valid_for_nation_designer = yes
	nation_designer_cost = 10
	nation_designer_trigger = {
		has_dlc = "Res Publica"
	}
	modifiers = {
		vassal_income = 0.25
		global_unrest = -1
		max_absolutism = -30
		governing_capacity = 100
	}

	conditional = {
		allow = { has_dlc = "Res Publica" }
		is_elective = yes
		custom_attributes = {
			has_polish_election = yes
			locked_government_type = yes
		}
	}

	conditional = {
		allow = { NOT = { has_dlc = "Res Publica" } }
		custom_attributes = {
			locked_government_type = yes
		}
	}
}

iqta = {
	icon = "muslim"
	allow_normal_conversion = yes
	potential = {
		religion_group = muslim
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 10
	nation_designer_trigger = {
		religion_group = muslim
	}

	legacy_equivalent = iqta_legacy
	queen = no
	modifiers = {
		vassal_income = 0.33
		global_tax_modifier = 0.05
	}
	conditional = {
		allow = {
			OR = {
				has_dlc = "Cradle of Civilization"
				has_dlc = "Winds of Change"
			}
		}
		government_abilities = {
			iqta_mechanic
		}
	}
	ai = {
		factor = 1
	}
}

english_monarchy = {
	icon = "british_queen"
	allow_normal_conversion = no
	potential = {
		OR = {
			has_reform = english_monarchy
			have_had_reform = english_monarchy
		}
	}
	lock_level_when_selected = yes
	valid_for_nation_designer = yes
	nation_designer_cost = 15
	nation_designer_trigger = {
		OR = {
			has_dlc = "Common Sense"
			has_dlc = "Domination"
		}
	}
	legacy_equivalent = english_monarchy_legacy
	start_territory_to_estates = 0.3
	modifiers = {
		governing_capacity = 50
		legitimacy = 0.5
		global_unrest = -1
		max_absolutism = -30
		nobles_influence_modifier = -0.1
	}

	conditional = {
		allow = {
			has_dlc = "Common Sense"
			NOT = { has_dlc = "Domination" }
		}
		has_parliament = yes
	}
	conditional = {
		allow = {
			has_dlc = "Domination"
		}
		has_parliament = yes
		custom_attributes = {
			english_parliament = yes
		}
	}
}

british_monarchy = {
	icon = "british_monarchy"
	allow_normal_conversion = no
	potential = {
		OR = {
			has_reform = british_monarchy
			have_had_reform = british_monarchy
		}
	}
	lock_level_when_selected = yes
	valid_for_nation_designer = yes
	nation_designer_cost = 15
	nation_designer_trigger = {
		has_dlc = "Domination"
	}
	start_territory_to_estates = 0.3
	modifiers = {
		max_absolutism = -15
		parliament_backing_chance = 0.10
		parliament_effect_duration = 5
		annexation_relations_impact = -0.25
		diplomats = 1
	}

	conditional = {
		allow = {
			has_dlc = "Common Sense"
			NOT = { has_dlc = "Domination" }
		}
		has_parliament = yes
	}
	conditional = {
		allow = {
			has_dlc = "Domination"
		}
		has_parliament = yes
		custom_attributes = {
			english_parliament = yes
		}
	}
	ai = {
		factor = 100
	}
}

angevin_monarchy = {
	icon = "queen"
	allow_normal_conversion = no
	potential = {
		OR = {
			has_reform = angevin_monarchy
			have_had_reform = angevin_monarchy
		}
	}
	lock_level_when_selected = yes
	valid_for_nation_designer = yes
	nation_designer_cost = 40
	nation_designer_trigger = {
		has_dlc = "Domination"
	}
	modifiers = {
		governing_capacity = 100
		num_accepted_cultures = 2
		max_absolutism = 10
		prestige = 1
		max_possible_parliament_seats = 15
	}
	effect = {
		hidden_effect = {
			every_owned_province = {
				limit = {
					has_seat_in_parliament = yes
				}
				set_seat_in_parliament = no
			}
		}
	}

	conditional = {
		allow = {
			has_dlc = "Common Sense"
			NOT = { has_dlc = "Domination" }
		}
		has_parliament = yes
	}
	conditional = {
		allow = {
			has_dlc = "Domination"
		}
		has_parliament = yes
		custom_attributes = {
			english_parliament = yes
		}
	}
	ai = {
		factor = 100
	}
}

absolute_british_monarchy = {
	icon = "british_absolutism"
	allow_normal_conversion = no
	potential = {
		OR = {
			has_reform = absolute_british_monarchy
			have_had_reform = absolute_british_monarchy
		}
	}
	lock_level_when_selected = yes
	valid_for_nation_designer = yes
	nation_designer_cost = 15
	nation_designer_trigger = {
		has_dlc = "Domination"
	}
	start_territory_to_estates = 0.3
	modifiers = {
		max_absolutism = 20
		yearly_absolutism = 0.5
		can_revoke_parliament_seats = yes
		num_of_parliament_issues = -2
	}

	conditional = {
		allow = {
			has_dlc = "Common Sense"
			NOT = { has_dlc = "Domination" }
		}
		has_parliament = yes
	}
	conditional = {
		allow = {
			has_dlc = "Domination"
		}
		has_parliament = yes
		custom_attributes = {
			english_parliament = yes
			can_force_issue_through = yes
		}
	}
}

ottoman_government = {
	lock_level_when_selected = yes
	allow_normal_conversion = yes
	icon = "ottoman_government"
	potential = {
		religion_group = muslim
		OR = {
			AND = {
				tag = TUR
				NOT = { map_setup = map_setup_random }
			}
			AND = {
				tag = RUM
				NOT = { map_setup = map_setup_random }
			}
			has_reform = ottoman_government
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 20
	nation_designer_trigger = {
		religion_group = muslim
	}
	legacy_equivalent = ottoman_government_legacy
	maintain_dynasty = yes
	modifiers = {
		unjustified_demands = -0.1
		legitimacy = 0.5
		max_absolutism = 5
		governing_capacity = 150
	}

	removed_effect = {
		remove_country_modifier = tur_weakened_the_harem
	}

	custom_attributes = {
		locked_government_type = yes
	}
	conditional = {
		allow = { has_dlc = "Domination" }
		has_pashas = yes
		has_janissaries = yes
		has_harem = yes
		custom_attributes = {
			has_harem_events = yes
			enables_estate_janissaries = yes
			has_eyalets = yes
		}
		government_abilities = {
			ottoman_decadence_mechanic
		}
	}
	conditional = {
		allow = { 
			has_dlc = "Cradle of Civilization"
			NOT = { has_dlc = "Domination" }
		}
		has_pashas = yes
		has_janissaries = yes
	}
	conditional = {
		allow = {
			has_dlc = "Rights of Man" 
			NOT = { has_dlc = "Domination" }
		}
		has_harem = yes
		custom_attributes = {
			has_harem_events = yes
		}
	}
}

byzantine_autocracy_reform = {
	icon = "king"
	allow_normal_conversion = yes
	valid_for_nation_designer = no
	potential = {
		OR = {
			has_reform = byzantine_autocracy_reform
			have_had_reform = byzantine_autocracy_reform
			tag = BYZ
		}
	}
	modifiers = {
		max_absolutism = -25
		prestige = 0.5
	}
	conditional = {
		allow = { has_dlc = "King of Kings" }
		custom_attributes = {
			civil_war_on_every_new_ruler = yes
			enables_pronoias = yes 
		}
	}
}

reformed_byzantine_monarchy_reform = {
	icon = "byzantine_rule"
	allow_normal_conversion = yes
	potential = {
		OR = {
			has_reform = reformed_byzantine_monarchy_reform
			have_had_reform = reformed_byzantine_monarchy_reform
			
			#New in MMETR, so it can be adopted by reform since ET removed from mission tree
			AND = {
				has_institution = feudalism		#around 1400s
				num_of_cities = 15
				tag = BYZ
			}
		}
	}
	trigger = {		#New in MMETR
		has_institution = feudalism		#around 1400s
		num_of_cities = 15
	}
	nation_designer_cost = 30
	valid_for_nation_designer = yes
	modifiers = {
		global_autonomy = -0.05
		culture_conversion_cost = -0.2
		years_of_nationalism = -5
		yearly_absolutism = 1
	}
	
	conditional = {
		allow = { 
			OR = {
				has_dlc = "Common Sense"
				has_dlc = "Domination"
			}
			NOT = { has_dlc = "King of Kings" }
		}
		has_parliament = yes
	}
	conditional = {
		allow = { has_dlc = "King of Kings" }
		custom_attributes = {
			enables_pronoias = yes 
		}
	}
}

serbian_despotate_reform = {
	icon = "king"
	allow_normal_conversion = yes
	potential = {
		OR = {
			has_reform = serbian_despotate_reform
			have_had_reform = serbian_despotate_reform
		}
	}
	trigger = {
		primary_culture = serbian
	}
	nation_designer_trigger = {
		primary_culture = serbian
	}
	conditional = {
		allow = { 
			has_dlc = "Winds of Change" 
			has_dlc = "Golden Century"
		}
		custom_attributes = {
			order_of_the_dragon_unlocked = yes
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 15

	modifiers = {
		global_autonomy = -0.05
		warscore_cost_vs_other_religion = -0.1
		tolerance_own = 1
	}
	ai = {
		factor = 1
	}
}

bulgarian_tsardom_reform = {
	icon = "king"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		primary_culture = bulgarian
	}
	trigger = {
		religion = orthodox
		primary_culture = bulgarian
	}
	nation_designer_trigger = {
		has_dlc = "Domination"
		religion = orthodox
		primary_culture = bulgarian
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 30
	modifiers = {
		governing_capacity = 150 
		can_claim_states = yes 
		harsh_treatment_cost = -0.25
	}
	fixed_rank = 3
	ai = {
		factor = 100
	}
}

tanistry_reform = {
	icon = "tanistry"
	allow_normal_conversion = yes
	potential = {
		primary_culture = irish
	}
	nation_designer_trigger = {
		primary_culture = irish
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 5
	modifiers = {
		morale_damage = 0.05
		same_culture_advisor_cost = -0.1
		nobles_loyalty_modifier = 0.05
	}
	conditional = {
		allow = { has_dlc = "Domination" }
		custom_attributes = {
			has_ruler_election = yes
			can_elect_from_relative = yes
		}
	}
	ai = {
		factor = 1
	}
}

irish_highkingdom_reform = {
	icon = "irish_highkingdom"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		OR = {
			has_reform = irish_highkingdom_reform
			has_unlocked_government_reform = {
				government_reform = irish_highkingdom_reform
			}
			have_had_reform = irish_highkingdom_reform
		}
	}
	trigger = {
		primary_culture = irish
	}
	nation_designer_trigger = {
		primary_culture = irish
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 15
	modifiers = {
		all_estate_loyalty_equilibrium = 0.05
		morale_damage = 0.05
		same_culture_advisor_cost = -0.15
		global_manpower_modifier = 0.15
	}
	conditional = {
		allow = {
			OR = {
				has_dlc = "Common Sense"
				has_dlc = "Domination"
			}
		}
		has_parliament = yes
	}
	conditional = {
		allow = { has_dlc = "Domination" }
		custom_attributes = {
			has_ruler_election = yes
			can_elect_from_relative = yes
		}
	}
	ai = {
		factor = 1
	}
}

scottish_monarchy_reform = {
	icon = "scottish_kingdom"
	allow_normal_conversion = yes
	potential = {
		OR = {
			primary_culture = scottish
			primary_culture = highland_scottish
		}
	}
	nation_designer_trigger = {
		OR = {
			primary_culture = scottish
			primary_culture = highland_scottish
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 10
	modifiers = {
		nobles_influence_modifier = -0.1
		diplomatic_reputation = 1 
		defensiveness = 0.1
	}
	
	conditional = {
		allow = { 
			OR = {
				has_dlc = "Common Sense"
				has_dlc = "Domination"
			}
		}
		has_parliament = yes
	}
	ai = {
		factor = 1
	}
}

sharifate_reform = {
	icon = "caliphate"
	allow_normal_conversion = yes
	potential = {
		religion_group = muslim
		owns = 385
	}
	trigger = {
		owns_core_province = 385
	}
	nation_designer_trigger = {
		religion_group = muslim
		owns = 385
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 15
	modifiers = {
		tolerance_own = 2
		missionaries = 1
		global_missionary_strength = 0.01
		monthly_piety_accelerator = 0.001
		same_religion_advisor_cost = -0.1
	}
	conditional = {
		allow = {
			OR = {
				has_dlc = "Cradle of Civilization"
				has_dlc = "Winds of Change"
			}
		}
		government_abilities = {
			iqta_mechanic
		}
	}
	ai = {
		factor = 1
	}
}

league_of_lezhe_reform = {
	icon = "giga_chad"
	allow_normal_conversion = yes
	potential = {
		primary_culture = albanian
	}
	nation_designer_trigger = {
		primary_culture = albanian
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 30
	modifiers = {
		morale_damage = 0.1
		hostile_attrition = 1
		defensiveness = 0.25
	}
	custom_attributes = {
		winning_battles_increases_legitimacy = yes
	}
	ai = {
		factor = 1
	}
}

barbary_sultanate_reform = {
	icon = "barbary_eyalet_government"
	allow_normal_conversion = yes
	potential = {
		culture_group = maghrebi
	}
	queen = no
	nation_designer_trigger = {
		culture_group = maghrebi
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 40
	modifiers = {
		land_attrition = -0.1
		may_perform_slave_raid = yes
		coast_raid_range = 1 
		navy_tradition_decay = -0.005
	}
	conditional = {
		allow = {
			OR = {
				has_dlc = "Cradle of Civilization"
				has_dlc = "Winds of Change"
			}
		}
		government_abilities = {
			iqta_mechanic
		}
	}
	ai = {
		factor = 1
	}
}

persian_government_reform = {
	icon = "persian_sultanate"
	allow_normal_conversion = yes
	lock_level_when_selected = yes
	potential = {
		OR = {
			tag = PER
			AND = {
				OR = {
					has_reform = persian_government_reform
					have_had_reform = persian_government_reform
				}
				is_playing_custom_nation = yes
			}
		}
		NOT = { religion_group = zoroastrian_group }
	}
	trigger = {
		primary_culture = persian
		NOT = { religion_group = zoroastrian_group }
	}
	nation_designer_trigger = {
		primary_culture = persian
		NOT = { religion_group = zoroastrian_group }
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 40
	modifiers = {
		missionaries = 1
		global_missionary_strength = 0.01
		tolerance_own = 2
		development_cost = -0.05
		innovativeness_gain = 0.25
	}
	custom_attributes = {
		enables_divine_idea_group = yes
		enables_aristocratic_idea_group = no
	}
	maintain_dynasty = yes
	conditional = {
		allow = { has_dlc = "Cradle of Civilization" }
		government_abilities = {
			feudal_theocracy_mechanic
		}
	}
	ai = {
		factor = 1
	}
}

zoroastrian_persian_government_reform = {
	icon = "zoroastrian_persian_government_reform"
	allow_normal_conversion = yes
	lock_level_when_selected = yes
	potential = {
		OR = {
			tag = PER
			tag = ERS
			AND = {
				OR = {
					has_reform = persian_government_reform
					have_had_reform = persian_government_reform
				}
				is_playing_custom_nation = yes
			}
		}
		religion_group = zoroastrian_group
	}
	trigger = {
		primary_culture = persian
		religion_group = zoroastrian_group
	}
	nation_designer_trigger = {
		primary_culture = persian
		religion_group = zoroastrian_group
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 40
	modifiers = {
		innovativeness_gain = 0.25
		global_missionary_strength = 0.01
		tolerance_own = 2
		development_cost = -0.05
	}
	custom_attributes = {
		enables_divine_idea_group = yes
		enables_aristocratic_idea_group = no
	}
	maintain_dynasty = yes
	conditional = {
		allow = { has_dlc = "King of Kings" }
		government_abilities = {
			the_three_royal_fires_mechanic
		}
	}
	#post_removed_effect = {
	#	hidden_effect = {
	#		if = {
	#			limit = { NOT = { has_government_mechanic = the_three_royal_fires_mechanic } }
	#			clr_country_flag = can_place_center_of_reformation
	#			every_owned_province = {
	#				limit = {
	#					is_reformation_center = yes
	#					religion = root
	#				}
	#				remove_reform_center = zoroastrian
	#			}
	#		}
	#	}
	#}
	ai = {
		factor = 1
	}
}

portuguese_monarchy_reform = {
	icon = "portuguese_king"
	allow_normal_conversion = yes
	potential = {
		primary_culture = portugese
	}
	nation_designer_trigger = {
		primary_culture = portugese
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 10
	modifiers = {
		naval_forcelimit_modifier = 0.2
		global_tax_modifier = 0.1
		sailors_recovery_speed = 0.2
	}
	ai = {
		factor = 1
	}
}

holy_imperial_monarchy_reform = {
	icon = "holy_roman_emperor"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		OR = {
			tag = HLR
			AND = {
				has_reform = holy_imperial_monarchy_reform
				is_playing_custom_nation = yes
			}
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 150
	modifiers = {
		governing_capacity_modifier = 0.25
		max_absolutism = 20
		max_absolutism_effect = 0.1
		diplomatic_reputation = 2
		chance_to_inherit = 0.5
	}
	custom_attributes = {
		seizing_land_loyalty = yes
		seizing_land_no_rebels = yes
	}
	ai = {
		factor = 1
	}
}

burgundian_state_reform = {
	icon = "burgundian_state"
	allow_normal_conversion = yes
	potential = {
		primary_culture = burgundian
	}
	nation_designer_trigger = {
		primary_culture = burgundian
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 10
	modifiers = {
		rival_change_cost = -1
		rival_border_fort_maintenance = -1
		diplomatic_upkeep = 2
		years_to_integrate_personal_union = -5
	}
	ai = {
		factor = 1
	}
}

bohemian_elective_kingdom_reform = {
	icon = "bohemian_monarchy"
	allow_normal_conversion = yes
	potential = {
		primary_culture = czech
	}
	nation_designer_trigger = {
		primary_culture = czech
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 10
	modifiers = {
		diplomatic_reputation = 1
		nobles_loyalty_modifier = 0.1
		nobles_privilege_slots = 1
		nobles_influence_modifier = 0.05
	}
	conditional = {
		allow = { has_dlc = "Domination" }
		custom_attributes = {
			has_ruler_election = yes
			has_improved_ruler_election = yes
		}
	}
	ai = {
		factor = 1
	}
}

stadthalter_monarchy_reform = {
	icon = "dutch_republic"
	allow_normal_conversion = yes
	potential = {
		OR = {
			AND = {
				OR = {
					primary_culture = dutch
					primary_culture = frisian
					primary_culture = flemish
				}
				NOT = { map_setup = map_setup_random }
			}
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = stadthalter_monarchy_reform
			}
		}
	}
	trigger = {
		is_lesser_in_union = no
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 40

	modifiers = {
		heavy_ship_power = 0.1
		trade_efficiency = 0.1
		reduced_liberty_desire_on_other_continent = 10
		has_voc_indiamen = yes
		allowed_voc_indiamen_fraction = 0.2
		no_stability_loss_on_monarch_death = yes
	}

	removed_effect = {
		country_event = { id = dutch_republic.33 }
	}

	custom_attributes = {
		enables_plutocratic_idea_group = yes
		enables_aristocratic_idea_group = no
		has_dutch_election = yes
	}
	conditional = {
		allow = {
			or = {
				has_dlc = "Res Publica"
				has_dlc = "Winds of Change"
			}
		}
		queen = no
		heir = no
		duration = 4
		has_term_election = yes
		is_eligible_for_hre_emperor = no
		states_general_mechanic = {
			statists = {
				naval_forcelimit_modifier = 0.10
				global_trade_power = 0.05
				legitimacy = -0.5
			}

			orangists = {
				land_forcelimit_modifier = 0.25
				stability_cost_modifier = -0.10
				legitimacy = 0.5
			}
		}
	}
	conditional = {
		allow = {
			OR = {
				has_dlc = "Common Sense"
				has_dlc = "Domination"
			}
		}
		has_parliament = yes
	}
	ai = {
		factor = 1
	}
}

janissary_autocracy_reform = {
	icon = "janissary_government"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		OR = {
			has_reform = janissary_autocracy_reform
			have_had_reform = janissary_autocracy_reform
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 50
	modifiers = {
		global_manpower_modifier = 0.15
		land_forcelimit_modifier = 0.15
		army_tradition_from_battle = 1
		can_recruit_janissaries = yes
		allow_janissaries_from_own_faith = yes
	}
	effect = {
		hidden_effect = {
			convert_ruler_to_general = 50
		}
	}
	custom_attributes = {
		force_general_leader = yes
	}
	ai = {
		factor = 1
	}
}

admiralty_regime_reform = {
	icon = "admiralty_reform"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		OR = {
			AND = {
				has_reform = admiralty_regime_reform
				is_playing_custom_nation = yes
			}
			has_idea_group = maritime_ideas
			has_idea_group = naval_ideas
		}
	}
	trigger = {
		OR = {
			AND = {
				has_reform = admiralty_regime_reform
				is_playing_custom_nation = yes
			}
			full_idea_group = maritime_ideas
			full_idea_group = naval_ideas
		}
	}
	valid_for_nation_designer = yes
	nation_designer_trigger = {
		num_of_ports = 1
	}
	nation_designer_cost = 40
	modifiers = {
		leader_naval_fire = 1
		naval_tradition_from_battle = 0.5
		allowed_marine_fraction = 0.1
		max_admiral_fire = 1 
	}
	custom_attributes = {
		cheaper_coastal_province_core = yes
		force_admiral_leader = yes
	}
	effect = {
		hidden_effect = {
			every_owned_province = {
				limit = {
					has_port = yes
				}
				add_province_modifier = {
					name = gov_coastal_government
					duration = -1
					hidden = yes
				}
			}
		}
	}
	removed_effect = {
		hidden_effect = {
			every_owned_province = {
				limit = {
					has_province_modifier = gov_coastal_government
				}
				remove_province_modifier = gov_coastal_government
			}
		}
	}
	ai = {
		factor = 1
	}
}

modernized_ottoman_government = {
	lock_level_when_selected = yes
	allow_normal_conversion = yes
	icon = "modernized_ottoman_government"
	potential = {
		religion_group = muslim
		OR = {
			has_reform = modernized_ottoman_government
			has_unlocked_government_reform = {
				government_reform = modernized_ottoman_government
			}
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = ottoman_government
			}
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 50
	nation_designer_trigger = {
		religion_group = muslim
	}
	maintain_dynasty = yes
	modifiers = {
		monarch_admin_power = 1 
		legitimacy = 1
		all_estate_influence_modifier = -0.1
		max_absolutism = 10
		governing_capacity = 200
	}

	custom_attributes = {
		locked_government_type = yes
	}
	conditional = {
		allow = { has_dlc = "Domination" }
		has_pashas = yes
		has_janissaries = yes
		has_harem = yes
		custom_attributes = {
			has_harem_events = yes
			enables_estate_janissaries = yes
			has_eyalets = yes
		}
	}
	conditional = {
		allow = { 
			has_dlc = "Cradle of Civilization"
			NOT = { has_dlc = "Domination" }
		}
		has_pashas = yes
		has_janissaries = yes
	}
	conditional = {
		allow = {
			has_dlc = "Rights of Man" 
			NOT = { has_dlc = "Domination" }
		}
		has_harem = yes
		custom_attributes = {
			has_harem_events = yes
		}
	}
}

reorganized_ottoman_government = {
	lock_level_when_selected = yes
	allow_normal_conversion = yes
	icon = "ottoman_government"
	potential = {
		religion_group = muslim
		OR = {
			has_reform = reorganized_ottoman_government
			has_unlocked_government_reform = {
				government_reform = reorganized_ottoman_government
			}
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = ottoman_government
			}
		}
	}
	valid_for_nation_designer = no
	nation_designer_cost = 50
	nation_designer_trigger = {
		religion_group = muslim
	}
	maintain_dynasty = yes
	modifiers = {
		monarch_admin_power = 2
		legitimacy = 1
		all_estate_influence_modifier = -0.1
		max_absolutism = 10
		governing_capacity = 200
	}

	custom_attributes = {
		locked_government_type = yes
	}

	conditional = {
		allow = { 
			has_dlc = "Cradle of Civilization"
			NOT = { has_dlc = "Domination" }
		}
		has_pashas = yes
		has_janissaries = yes
	}
	conditional = {
		allow = { has_dlc = "Domination" }
		has_pashas = yes
		has_janissaries = yes
		custom_attributes = {
			enables_estate_janissaries = yes
			has_eyalets = yes
		}
	}
}

sultanate_of_rum_reform = {
	allow_normal_conversion = yes
	icon = "rum_sultanate"
	potential = {
		religion_group = muslim
		OR = {
			AND = {
				tag = RUM
				NOT = { map_setup = map_setup_random }
			}
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = sultanate_of_rum_reform
			}
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 40
	nation_designer_trigger = {
		religion_group = muslim
	}
	maintain_dynasty = yes
	modifiers = {
		core_creation = -0.1
		province_warscore_cost = -0.05
		legitimacy = 0.5
		max_absolutism = 5
		governing_capacity = 150
	}

	custom_attributes = {
		locked_government_type = yes
	}
	conditional = {
		allow = { has_dlc = "Domination" }
		has_pashas = yes
		has_janissaries = yes
		has_harem = yes
		custom_attributes = {
			has_harem_events = yes
			has_eyalets = yes
		}
	}
	conditional = {
		allow = { 
			has_dlc = "Cradle of Civilization"
			NOT = { has_dlc = "Domination" }
		}
		has_pashas = yes
		has_janissaries = yes
	}
	conditional = {
		allow = {
			has_dlc = "Rights of Man" 
			NOT = { has_dlc = "Domination" }
		}
		has_harem = yes
		custom_attributes = {
			has_harem_events = yes
		}
	}
	#conditional = {
	#	allow = {
	#		has_dlc = "Domination"
	#	}
	#	government_abilities = {
	#		devshirme_mechanic
	#	}
	#}
}

eyalet_government = {
	lock_level_when_selected = yes
	allow_normal_conversion = yes
	icon = "eyalet_government"
	potential = {
		OR = {
			is_subject_of_type = eyalet
			is_subject_of_type = core_eyalet
		}
	}
	valid_for_nation_designer = no
	maintain_dynasty = yes
	modifiers = {
		global_unrest = -1
		no_religion_penalty = yes
		governing_capacity = 100
	}
	removed_effect = {
		hidden_effect = {
			if = {
				limit = {
					NOT = { is_subject_of_type = eyalet }
					NOT = { is_subject_of_type = core_eyalet }
				}
				country_event = {
					id = flavor_tur.1000
				}
			}
		}
	}

	custom_attributes = {
		locked_government_type = yes
	}
	ai = {
		factor = 100
		modifier = {
			factor = 0
			OR = {
				has_reform = barbary_eyalet_government
				have_had_reform = barbary_eyalet_government
			}
		}
	}
}

barbary_eyalet_government = {
	lock_level_when_selected = yes
	allow_normal_conversion = yes
	icon = "barbary_eyalet_government"
	potential = {
		OR = {
			has_reform = barbary_eyalet_government
			have_had_reform = barbary_eyalet_government
		}
		OR = {
			is_subject_of_type = eyalet
			is_subject_of_type = core_eyalet
		}
	}
	valid_for_nation_designer = no
	maintain_dynasty = yes
	modifiers = {
		may_perform_slave_raid = yes
		allowed_marine_fraction = 0.1
		capture_ship_chance = 0.25
		naval_forcelimit_modifier = 0.1
		governing_capacity = 100
	}
	removed_effect = {
		hidden_effect = {
			if = {
				limit = {
					NOT = { is_subject_of_type = eyalet }
					NOT = { is_subject_of_type = core_eyalet }
				}
				country_event = {
					id = flavor_tur.1000
				}
			}
		}
	}

	custom_attributes = {
		locked_government_type = yes
		force_admiral_leader = yes
	}
	ai = {
		factor = 100
	}
}

beylik_government = {
	icon = "noble_muslim"
	allow_normal_conversion = yes
	potential = {
		religion_group = muslim
		primary_culture = turkish
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 5
	nation_designer_trigger = {
		religion_group = muslim
		primary_culture = turkish
	}
	modifiers = {
		fabricate_claims_cost = -0.5
		unjustified_demands = -0.1
		core_creation = -0.1
		governing_capacity = 100
	}
	custom_attributes = {
		winning_battles_increases_legitimacy = yes
	}
}

al_andalusia_government = {
	icon = "noble_muslim"
	allow_normal_conversion = yes
	potential = {
		OR = {
			tag = ADU
			has_reform = al_andalusia_government
			have_had_reform = al_andalusia_government
			AND = {
				has_reform = al_andalusia_government
				is_playing_custom_nation = yes
			}
		}
	}
	trigger = {
		religion_group = muslim
		primary_culture = andalucian
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 5
	nation_designer_trigger = {
		religion_group = muslim
		primary_culture = andalucian
	}
	modifiers = {
		idea_cost = -0.1
		tolerance_of_heathens_capacity = 2
		tolerance_heathen = 1
	}
	conditional = {
		allow = { has_dlc = "Cradle of Civilization" }
		custom_attributes = {
			allow_piety_switch_decision = yes	#Enables a decision which gives 1 stabhit, but turns your piety 180�
		}
	}
}

prussian_monarchy = {
	icon = "prussian_monarchy"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		NOT = { has_reform = prussian_monarchy_base }
		OR = {
			AND = {
				tag = PRU
				OR = {
					has_mission = emp_brapru_army_reforms_2
					has_mission = emp_brapru_army_reforms_3
				}
				NOT = { map_setup = map_setup_random }
			}
			has_unlocked_government_reform = {
				government_reform = prussian_monarchy
			}
			has_reform = prussian_monarchy
			have_had_reform = prussian_monarchy
		}
	}
	trigger = {
		OR = {
			religion = protestant
			religion = reformed
			religion = hussite
			religion = anglican
			has_unlocked_government_reform = {
				government_reform = prussian_monarchy
			}
		}
	}
	legacy_equivalent = prussian_monarchy_legacy

	modifiers = {
		war_exhaustion = -0.02
		global_unrest = -2
		global_autonomy = -0.075
		max_absolutism = 10
		monarch_military_power = 3
		nobles_loyalty_modifier = 0.1
		governing_capacity_modifier = -0.5
	}

	conditional = {
		allow = { has_dlc = "Domination" }
		government_abilities = {
			prussian_militarization_mechanic_1
		}
	}
	conditional = {
		allow = { has_dlc = "Domination" }
		government_abilities = {
			prussian_militarization_mechanic_2
		}
	}
	conditional = {
		allow = { has_dlc = "Domination" }
		government_abilities = {
			prussian_militarization_mechanic_3
		}
	}
}

prussian_monarchy_base = {
	icon = "prussian_monarchy"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_reform = prussian_monarchy }
		NOT = { have_had_reform = prussian_monarchy }
		OR = {
			NOT = { has_dlc = "Domination" }
			NOT = { has_mission = emp_brapru_army_reforms_2 }
			NOT = { has_mission = emp_brapru_army_reforms_3 }
		}
		OR = {
			AND = {
				tag = PRU
				NOT = { map_setup = map_setup_random }
			}
			AND = {
				tag = GER
				NOT = { map_setup = map_setup_random }
				OR = {
					has_reform = prussian_monarchy_base
					have_had_reform = prussian_monarchy_base
					have_had_reform = prussian_republic_reform
					have_had_reform = prussian_theocratic_reform
					is_hegemon_of_type = military_hegemon
					development_in_provinces = {
						value = 500
						culture = prussian
					}
				}
			}
			AND = {
				is_playing_custom_nation = yes
				OR = {
					has_reform = prussian_monarchy_base
					have_had_reform = prussian_monarchy
					have_had_reform = prussian_monarchy_base
					have_had_reform = prussian_republic_reform
					have_had_reform = prussian_theocratic_reform
				}
			}
			has_unlocked_government_reform = {
				government_reform = prussian_monarchy_base
			}
		}
	}
	trigger = {
		OR = {
			religion = protestant
			religion = reformed
			religion = hussite
			religion = anglican
			AND = {
				is_playing_custom_nation = yes
				OR = {
					hidden_trigger = {
						has_reform = prussian_monarchy_base
					}
					have_had_reform = prussian_monarchy_base
					have_had_reform = prussian_republic_reform
					have_had_reform = prussian_theocratic_reform
				}
			}
			has_unlocked_government_reform = {
				government_reform = prussian_monarchy_base
			}
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 100
	legacy_equivalent = prussian_monarchy_legacy

	modifiers = {
		war_exhaustion = -0.02
		global_unrest = -2
		global_autonomy = -0.075
		max_absolutism = 10
		monarch_military_power = 3
		nobles_loyalty_modifier = 0.1
		governing_capacity_modifier = -0.5
	}

	conditional = {
		allow = { has_dlc = "Rights of Man" }
		government_abilities = {
			militarization_mechanic
		}
	}
}

austrian_dual_monarchy = {
	icon = "austrian_dual_monarchy_reform"
	allow_normal_conversion = yes
	legacy_equivalent = austrian_archduchy
	potential = { #added via script
		has_dlc = "Emperor"
		OR = {
			has_reform = austrian_dual_monarchy
			have_had_reform = austrian_dual_monarchy
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 100
	nation_designer_trigger = {
		has_dlc = "Emperor"
	}

	modifiers = {
		num_accepted_cultures = 2
		global_unrest = -2
		monarch_diplomatic_power = 2
		promote_culture_cost = -0.33
	}
}

principality = {
	icon = "russian_principality"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_reform = tsardom }
		NOT = { have_had_reform = tsardom }
		religion = orthodox
		OR = {
			culture_group = east_slavic
			has_reform = principality
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = principality
			}
		}
	}
	fixed_rank = 1
	legacy_equivalent = principality_legacy
	valid_for_nation_designer = yes
	nation_designer_cost = 5
	nation_designer_trigger = {
		culture_group = east_slavic
		religion = orthodox
	}
	modifiers = {
		global_unrest = -1
		global_regiment_cost = -0.05
		governing_capacity = 100
		has_streltsy = yes
		allowed_streltsy_fraction = 0.1
	}
	conditional = {
		allow = { 
			OR = {
				has_dlc = "Third Rome" 
				has_dlc = "Domination"
			}
		}
		government_abilities = {
			russian_mechanic
		}
		custom_attributes = {
			weaker_russian_ability = yes
		}
	}
}

tsardom = {
	icon = "tsardom"
	allow_normal_conversion = yes
	potential = {
		religion = orthodox
		culture_group = east_slavic
		NOT = { primary_culture = ruthenian }
		NOT = { primary_culture = byelorussian }
		OR = {
			AND = {
				tag = RUS
				NOT = { map_setup = map_setup_random }
			}
			has_reform = tsardom
		}
	}
	fixed_rank = 3
	legacy_equivalent = tsardom_legacy
	valid_for_nation_designer = yes
	nation_designer_cost = 40

	nation_designer_trigger = {
		culture_group = east_slavic
		NOT = { primary_culture = ruthenian }
		NOT = { primary_culture = byelorussian }
		religion = orthodox
	}

	modifiers = {
		global_manpower_modifier = 0.20
		yearly_absolutism = 0.5
		global_autonomy = -0.05
		governing_capacity = 250
		has_streltsy = yes
		allowed_streltsy_fraction = 0.2
	}

	conditional = {
		allow = { has_dlc = "Third Rome" }
		claim_states = yes
	}
	conditional = {
		allow = { 
			has_dlc = "Third Rome" 
			NOT = { has_dlc = "Domination" }
		}
		government_abilities = {
			russian_mechanic
		}
	}
	conditional = {
		allow = { has_dlc = "Domination" }
		government_abilities = {
			russian_mechanic
			russian_modernization_mechanic
		}
	}
}

ruthenian_tsardom = {
	icon = "ruthenia_tsardom"
	allow_normal_conversion = yes
	potential = {
		religion = orthodox
		OR = {
			primary_culture = ruthenian
			primary_culture = byelorussian
		}
		OR = {
			AND = {
				tag = UKR
				NOT = { map_setup = map_setup_random }
			}
			has_reform = ruthenian_tsardom
		}
	}
	fixed_rank = 3
	nation_designer_trigger = {
		religion = orthodox
		OR = {
			primary_culture = ruthenian
			primary_culture = byelorussian
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 40

	nation_designer_trigger = {
		OR = {
			primary_culture = ruthenian
			primary_culture = byelorussian
		}
		religion = orthodox
	}

	modifiers = {
		manpower_in_true_faith_provinces = 0.2
		max_absolutism = 5
		reform_progress_growth = 0.2
		governing_capacity = 250
		has_streltsy = yes
		allowed_streltsy_fraction = 0.2
	}

	conditional = {
		allow = { has_dlc = "Third Rome" }
		government_abilities = {
			russian_mechanic
		}
		claim_states = yes
	}
}

russian_empire_reform = {
	icon = "russian_queen"
	allow_normal_conversion = yes
	potential = {
		OR = {
			has_reform = russian_empire_reform
			have_had_reform = russian_empire_reform
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = russian_empire_reform
			}
		}
	}
	fixed_rank = 3
	valid_for_nation_designer = yes
	nation_designer_cost = 40

	modifiers = {
		max_absolutism = 10
		yearly_absolutism = 0.5
		global_autonomy = -0.05
		global_manpower_modifier = 0.20
		embracement_cost = -0.5
		governing_capacity = 350
	}

	conditional = {
		allow = { has_dlc = "Third Rome" }
		claim_states = yes
	}
	conditional = {
		allow = { has_dlc = "Domination" }
		government_abilities = {
			russian_rule_mechanic
		}
	}
}

mamluk_government = {
	icon = "mamluk_government"
	allow_normal_conversion = yes
	potential = {
		religion_group = muslim
		OR = {
			AND = {
				tag = MAM
				NOT = { map_setup = map_setup_random }
			}
			has_reform = mamluk_government
			have_had_reform = mamluk_government
		}
	}
	legacy_equivalent = mamluk_government_legacy
	queen = no

	valid_for_nation_designer = yes
	nation_designer_cost = 60

	nation_designer_trigger = {
		religion_group = muslim
	}

	modifiers = {
		num_accepted_cultures = 3
		global_autonomy = -0.025
		monarch_admin_power = 2
		same_culture_advisor_cost = -0.25
		promote_culture_cost = -0.5
		governing_capacity = 50
		nobles_influence_modifier = 0.1
	}

	conditional = {
		allow = { has_dlc = "Cradle of Civilization" }
		government_abilities = {
			mamluk_mechanic
		}
		heir = no
		foreign_slave_rulers = yes
	}
}

feudal_theocracy = {
	icon = "feudal_theocracy"
	allow_normal_conversion = yes
	potential = {
		OR = {
			AND = {
				religion_group = muslim
				OR = {
					has_reform = feudal_theocracy
					have_had_reform = feudal_theocracy
				}
			}
			has_reform = feudal_theocracy
		}
	}
	nation_designer_trigger = {
		religion_group = muslim
	}
	legacy_equivalent = feudal_theocracy_legacy
	valid_for_nation_designer = yes
	nation_designer_cost = 60
	modifiers = {
		missionaries = 1
		global_missionary_strength = 0.01
		tolerance_own = 2
		governing_capacity = 50
		brahmins_hindu_loyalty_modifier = 0.05
		church_loyalty_modifier = 0.05
	}

	conditional = {
		allow = { has_dlc = "Cradle of Civilization" }
		government_abilities = {
			feudal_theocracy_mechanic
		}
	}
	custom_attributes = {
		enables_divine_idea_group = yes
		enables_aristocratic_idea_group = no
	}
}

mughal_government = {
	icon = "peacock_throne"
	allow_normal_conversion = yes
	potential = {
		OR = {
			has_dlc = "Dharma"
			has_dlc = "King of Kings"
			has_dlc = "Winds of Change"
		}
		AND = {
			tag = MUG
			NOT = { map_setup = map_setup_random }
		}
	}
	lock_level_when_selected = yes
	legacy_equivalent = feudal_monarchy

	modifiers = {
		tolerance_own = 1
		governing_capacity = 150
	}

	assimilation_cultures = {
		altaic = {
			artillery_cost = -0.1
		}
		baltic = {
			naval_forcelimit_modifier = 0.05
		}
		basque_group = {
			defensiveness = 0.1
		}
		british = {
			ship_durability = 0.05
		}
		burman = {
			free_leader_pool = 1
		}
		byzantine = {
			legitimacy = 0.25
		}
		caucasian = {
			mercenary_discipline = 0.05
		}
		gaelic = {
			shock_damage = 0.05
		}
		central_indic = {
			land_attrition = -0.1
		}
		east_asian = {
			state_maintenance_modifier = -0.2
		}
		kongo_group = {
			heir_chance = 0.5
		}
		cushitic = {
			missionaries = 1
		}
		dravidian = {
			global_trade_goods_size_modifier = 0.05
		}
		african = {
			global_tax_income = 10
		}
		east_slavic = {
			land_forcelimit_modifier = 0.1
		}
		eastern_aryan = {
			production_efficiency = 0.05
		}
		eastern_balkan = {
			shock_damage_received = -0.05
		}
		evenks = {
			cavalry_flanking = 0.2
		}
		finno_ugric = {
			land_attrition = -0.15
		}
		french = {
			diplomats = 1
		}
		germanic = {
			global_institution_spread = 0.15
		}
		great_lakes_group = {
			loot_amount = 0.5
		}
		hindusthani = {
			core_creation = -0.1
		}
		iberian = {
			global_colonial_growth = 10
		}
		iranian = {
			advisor_cost = -0.1
		}
		japanese_g = {
			land_morale = 0.1
		}
		korean_g = {
			idea_cost = -0.05
		}
		latin = {
			embracement_cost = -0.1
		}
		lost_cultures_group = {
			discipline = 0.05
		}
		turko_semitic = {
			cavalry_power = 0.1
		}
		maghrebi = {
			privateer_efficiency = 0.25
		}
		malay = {
			merchants = 1
		}
		mande = {
			tolerance_heretic = 1
		}
		mongolic = {
			cavalry_fire = 0.25
		}
		oghur = {
			mercenary_cost = -0.1
		}
		oghuz = {
			loot_amount = 0.10
		}
		pacific = {
			global_sailors_modifier = 0.1
		}
		sahelian = {
			movement_speed = 0.1
		}
		scandinavian = {
			mil_advisor_cost = -0.1
		}
		south_slavic = {
			warscore_cost_vs_other_religion = -0.1
		}
		southeastasian_group = {
			build_cost = -0.05
		}
		southern_african = {
			inflation_reduction = 0.05
		}
		sudanese = {
			caravan_power = 0.1
		}
		tartar = {
			cavalry_cost = -0.15
		}
		thai_group = {
			development_cost = -0.05
		}
		tibetan_group = {
			prestige_per_development_from_conversion = 0.5
		}
		finno_ugric = {
			prestige_decay = -0.01
		}
		west_african = {
			global_autonomy = -0.01
		}
		west_slavic = {
			leader_land_fire = 1
		}
		western_aryan = {
			trade_efficiency = 0.05
		}
		western_balkan = {
			infantry_power = 0.05
		}
	}
}

revolutionary_empire_reform = {
	lock_level_when_selected = yes
	icon = "rioting_burning_2"
	allow_normal_conversion = no
	potential = {
		has_reform = revolutionary_empire_reform
	}
	legacy_equivalent = revolutionary_empire
	valid_for_new_country = no
	uses_revolutionary_zeal = yes
	revolutionary = yes
	is_eligible_for_hre_emperor = no
	fixed_rank = 3
	modifiers = {
		global_manpower_modifier = 0.25
		land_morale = 0.10
		global_autonomy = -0.2
		governing_capacity = 150
		max_revolutionary_zeal = 50
		papal_influence = -100
		allowed_rev_guard_fraction = 0.2
	}

	custom_attributes = {
		locked_government_type = yes
	}

	conditional = {
		allow = {
			has_dlc = "Rights of Man"
		}
		factions = {
			rr_jacobins
			rr_royalists
			rr_girondists
		}
	}
	removed_effect = {
		hidden_effect = {
			if = {
				limit = {
					has_country_flag = is_revolutionary_china_flag
					is_revolutionary = no
				}
				clr_country_flag = is_revolutionary_china_flag
				restore_country_name = yes
				override_country_name = CHINA_STRING
				set_country_flag = is_china_flag
			}
			if = {
				limit = {
					has_country_flag = is_revolutionary_turkey_flag
					is_revolutionary = no
				}
				clr_country_flag = is_revolutionary_turkey_flag
				restore_country_name = yes
				override_country_name = TURKEY_STRING
				set_country_flag = is_turkey_flag
			}
			if = {
				limit = {
					has_country_flag = is_revolutionary_gurkani_flag
					is_revolutionary = no
				}
				clr_country_flag = is_revolutionary_gurkani_flag
				restore_country_name = yes
				override_country_name = GURKANI_EMPIRE_STRING
				set_country_flag = is_gurkani_flag
			}
			if = {
				limit = {
					has_country_flag = is_revolutionary_iran_flag
					is_revolutionary = no
				}
				clr_country_flag = is_revolutionary_iran_flag
				restore_country_name = yes
				override_country_name = IRAN_STRING
				set_country_flag = is_iran_flag
			}
		}
	}
}

mandala_reform = {
	icon = "mandala_system"
	allow_normal_conversion = yes
	potential = {
		OR = {
			has_reform = mandala_reform		#MMETR, allows it to be adopted by event by even those who do not meet requirement like Manipur
			AND = {
				NOT = { religion = shinto }
				NOT = { religion = confucianism }
				OR = {
					religion_group = eastern
					religion_group = dharmic
					religion_group = buddhic
					religion_group = muslim
					religion = animism
				}
				OR = {
					technology_group = chinese
					technology_group = early_chinese
				}
				OR = {
					has_dlc = "Leviathan"
					has_dlc = "Dharma"
				}
			}
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 10
	nation_designer_trigger = {
		NOT = { religion = shinto }
		NOT = { religion = confucianism }
		OR = {
			religion_group = eastern
			religion_group = dharmic
			religion_group = buddhic
			religion_group = muslim
		}
		technology_group = chinese
		OR = {
			has_dlc = "Leviathan"
			has_dlc = "Dharma"
		}
	}
	legacy_equivalent = despotic_monarchy
	modifiers = {
		vassal_income = 0.15
		vassal_forcelimit_bonus = 1
		governing_capacity_modifier = -0.33
	}
	free_concentrate_development = yes
	
	#New added MMETR Mechanic
	government_abilities = {
		mandala_system_mmetr_mechanic
	}
}

nayankara_reform = {
	icon = "nayankara_system"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Dharma"
		OR = {
			technology_group = early_indian
			technology_group = indian
		}
		OR = {
			religion_group = dharmic
			religion_group = buddhic
		}
		OR = {
			culture_group = dravidian
			primary_culture = oriya
			primary_culture = sinhala
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 10
	legacy_equivalent = feudal_monarchy
	nation_designer_trigger = {
		OR = {
			technology_group = early_indian
			technology_group = indian
		}
		OR = {
			religion_group = dharmic
			religion_group = buddhic

		}
		OR = {
			culture_group = dravidian
			primary_culture = oriya
			primary_culture = sinhala
		}
	}
	modifiers = {
		vassal_forcelimit_bonus = 1
		global_manpower_modifier = 0.15
	}
}

misl_confederacy_reform = {
	allow_normal_conversion = yes
	icon = "misl_confederacy"
	potential = {
		has_dlc = "Dharma"
		religion = sikhism
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 10
	nation_designer_trigger = {
		has_dlc = "Dharma"
		religion = sikhism
	}
	legacy_equivalent = feudal_monarchy
	modifiers = {
		global_manpower_modifier = 0.1
		land_maintenance_modifier = -0.1
	}
}

rajput_kingdom = {
	icon = "rajput_kingdom"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Dharma"
		OR = {
			culture_group = western_aryan
			primary_culture = vindhyan
		}
		NOT = { primary_culture = marathi }
		technology_group = indian
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 10
	nation_designer_trigger = {
		has_dlc = "Dharma"
		OR = {
			culture_group = western_aryan
			primary_culture = vindhyan
		}
		NOT = { primary_culture = marathi }
		technology_group = indian
	}
	legacy_equivalent = feudal_monarchy
	modifiers = {
		army_tradition = 0.25
	}
}

siamese_absolutism = {
	icon = "indian_crown"
	allow_normal_conversion = yes
	potential = {
		OR = {
			has_country_flag = siam_royal_absolutism
			has_reform = siamese_absolutism
		}
	}
	valid_for_nation_designer = no
	modifiers = {
		max_absolutism = 10
		monarch_admin_power = 1
	}
	free_concentrate_development = yes
}

confucian_bureaucracy = {
	icon = "warrior_monks_reform"
	allow_normal_conversion = yes
	valid_for_nation_designer = yes
	nation_designer_cost = 0
	nation_designer_trigger = {
		OR = {
			religion = confucianism
			primary_culture = vietnamese
		}
	}
	potential = {
		OR = {
			religion = confucianism
			primary_culture = vietnamese
		}
	}
	modifiers = {
		advisor_cost = -0.1
	}
	ai = {
		factor = 100
	}
}

korean_monarchy = {
	icon = "korean_monarchy"
	allow_normal_conversion = yes
	valid_for_nation_designer = yes
	nation_designer_cost = 20
	nation_designer_trigger = {
		primary_culture = korean
	}
	potential = {
		primary_culture = korean
	}
	modifiers = {
		development_cost_in_primary_culture = -0.1
		same_culture_advisor_cost = -0.1
		global_institution_spread = 0.15
	}
	effect = {
		hidden_effect = {
			if = {
				limit = { has_dlc = "Domination" }
				add_country_modifier = {
					name = no_perfectionism_focus
					duration = -1
					desc = has_no_perfectionism_focus
				}
			}
		}
	}
	removed_effect = {
		remove_country_modifier = hangeul_alphabet
		remove_country_modifier = hangeul_alphabet_revoked
		remove_country_modifier = no_perfectionism_focus
		remove_country_modifier = inward_focus_modifier
		remove_country_modifier = outward_focus_modifier
		remove_country_modifier = expansion_focus_modifier
	}
	conditional = {
		allow = { has_dlc = "Domination" }
		custom_attributes = {
			has_hangeul_alphabet_decisions = yes
			has_weaker_harem_events = yes
		}
	}
	conditional = {
		allow = { has_dlc = "Domination" }
		government_abilities = {
			perfectionism_mechanic
		}
	}
	ai = {
		factor = 100
	}
}

sakdina_system_reform = {
	icon = "sakdina_system_reform"
	allow_normal_conversion = yes
	valid_for_nation_designer = yes
	nation_designer_cost = 0
	nation_designer_trigger = {
		OR = {
			primary_culture = central_thai
			primary_culture = northern_thai
		}
	}
	potential = {
		OR = {
			primary_culture = central_thai
			primary_culture = northern_thai
		}
	}
	modifiers = {
		stability_cost_modifier = -0.05
		global_unrest = -2
	}
	ai = {
		factor = 100
	}
}

uparaja_reform = {
	icon = "uparaja_reform"
	allow_normal_conversion = yes
	valid_for_nation_designer = yes
	nation_designer_cost = 0
	nation_designer_trigger = {
		religion = buddhism
		technology_group = chinese
	}
	potential = {
		religion = buddhism
		technology_group = chinese
	}
	modifiers = {
		monthly_heir_claim_increase = 0.05
		legitimacy = 0.5
		prestige = 0.5
	}
	ai = {
		factor = 1.5
		modifier = {
			factor = 2
			legitimacy = 75
		}
		modifier = {
			factor = 3
			tag = SIA
		}
	}
}

negusa_nagast = {
	icon = "negusa_nagast"
	allow_normal_conversion = yes
	potential = {
		OR = {
			have_had_reform = negusa_nagast
			tag = ETH
		}
	}
	trigger = {
		OR = {
			have_had_reform = negusa_nagast
			tag = ETH
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 40
	legacy_equivalent = negusa_nagast_legacy

	modifiers = {
		move_capital_cost_modifier = -0.75
		global_unrest = -1
		stability_cost_modifier = -0.1
	}

	conditional = {
		allow = {
			has_dlc = "Origins"
		}
		custom_attributes = {
			has_itinerant_capital = yes
		}
	}

	conditional = {
		allow = {
			has_dlc = "Origins"
		}
		allow_cawa = yes
	}
}

solomonic_empire = {
	icon = "solomonic_empire"
	allow_normal_conversion = yes
	potential = {
		OR = {
			have_had_reform = solomonic_empire
			has_country_flag = unlocked_solomid_empire_reform
		}
	}
	trigger = {
		OR = {
			has_reform = solomonic_empire
			have_had_reform = solomonic_empire
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 50
	legacy_equivalent = solomonic_empire_legacy
	fixed_rank = 3

	modifiers = {
		tolerance_own = 2
		max_absolutism = 20
		global_unrest = -2
		amount_of_cawa = 1
	}

	conditional = {
		allow = {
			has_dlc = "Origins"
		}
		allow_cawa = yes
	}
}

mossi_federal_kingdom = {
	icon = "native_war_band_reform"
	allow_normal_conversion = yes
	valid_for_nation_designer = yes
	nation_designer_cost = 30
	legacy_equivalent = tribal_confederacy_legacy

	potential = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = mossi_federal_kingdom
			}
			AND = {
				has_country_flag = msi_mossi_kingdom_event
				tag = MSI
			}
		}
	}

	modifiers = {
		nobles_influence_modifier = 0.15
		nobles_loyalty_modifier = 0.1
		global_unrest = -1
		max_absolutism = -20
	}

	effect = {
		if = {
			limit = {
				has_country_flag = msi_unlocked_perma_reward
			}
			remove_country_modifier = msi_centralization_focus
			add_country_modifier = {
				name = msi_federal_kingdom_focus
				duration = -1
				desc = msi_federal_kingdom_focus_desc
			}
		}
	}

	removed_effect = {
		if = {
			limit = {
				has_country_flag = msi_unlocked_perma_reward
			}
			remove_country_modifier = msi_federal_kingdom_focus
			add_country_modifier = {
				name = msi_centralization_focus
				duration = -1
				desc = msi_centralization_focus_desc
			}
		}
	}

	conditional = {
		allow = {
			OR = {
				has_dlc = "Origins"
				has_dlc = "Cradle of Civilization"
			}
		}
		custom_attributes = {
			has_federal_kingdoms = yes
		}
	}

	conditional = {
		allow = {
			has_dlc = "Cradle of Civilization"
		}
		government_abilities = {
			tribal_federation_mechanic
		}
	}

	ai = {
		factor = 1
	}
}

musa_rule = {
	icon = "musa_rule"
	allow_normal_conversion = yes
	valid_for_nation_designer = yes
	nation_designer_cost = 30
	legacy_equivalent = musa_rule_legacy
	potential = {
		OR = {
			tag = MAL
			have_had_reform = musa_rule
		}
	}
	trigger = {
		OR = {
			tag = MAL
			have_had_reform = musa_rule
		}
	}
	modifiers = {
		advisor_pool = 1
		stability_cost_modifier = -0.05
		legitimacy = 0.5
	}

	ai = {
		factor = 1
	}
}

arabic_plutocracy_reform = {
	icon = arabian_plutocracy_reform
	allow_normal_conversion = no
	potential = {
		OR = {
			primary_culture = omani_culture
			primary_culture = gulf_arabic
		}
	}
	trigger = {
		OR = {
			primary_culture = omani_culture
			primary_culture = gulf_arabic
		}
	}
	nation_designer_trigger = {
		OR = {
			primary_culture = omani_culture
			primary_culture = gulf_arabic
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 10

	government_abilities = {
		arabic_trade_influence
	}

	modifiers = {
		merchants = 1
		placed_merchant_power = 5
	}

	boost_income = yes
	conditional = {
		allow = {
			has_dlc = "Leviathan"
		}
		allow_draft_transport_ships = yes
	}
	conditional = {
		allow = {
			has_dlc = "Res Publica"
			NOT = { has_dlc = "Mare Nostrum" }
		}
		can_use_trade_post = yes
	}
	conditional = {
		allow = {
			has_dlc = "Mare Nostrum"
			NOT = { has_dlc = "Res Publica" }
		}
		can_form_trade_league = yes
		trade_city_reform = trading_city
	}
	conditional = {
		allow = {
			has_dlc = "Res Publica"
			has_dlc = "Mare Nostrum"
		}
		can_use_trade_post = yes
		can_form_trade_league = yes
		trade_city_reform = trading_city
	}

	ai = {
		factor = 0
	}
}

polish_great_sejm = {
	icon = "parliament_hall"
	allow_normal_conversion = no
	potential = {
		have_had_reform = polish_great_sejm
	}
	lock_level_when_selected = yes
	valid_for_nation_designer = yes
	nation_designer_cost = 25
	nation_designer_trigger = {
		has_dlc = "Lions of the North"
	}
	legacy_equivalent = feudal_monarchy
	modifiers = {
		nobles_influence_modifier = 0.05
		max_absolutism = -20
		global_unrest = -1 
		reform_progress_growth = -0.2
		
	}

	conditional = {
		allow = {
			OR = {
				has_dlc = "Common Sense"
				has_dlc = "Domination"
			}
		}
		has_parliament = yes
	}
}

polish_elective_monarchy = {
	icon = "elective_monarchy"
	allow_normal_conversion = no 
	lock_level_when_selected = yes
	potential = {
		OR = {
			has_reform = polish_elective_monarchy
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = polish_elective_monarchy
			}
		}
	}
	legacy_equivalent = elective_monarchy_legacy
	valid_for_nation_designer = yes
	nation_designer_cost = 50
	nation_designer_trigger = {
		has_dlc = "Lions of the North"
	}
	modifiers = {
		global_unrest = -1
		max_absolutism = -30
		nobles_influence_modifier = 0.05
		reform_progress_growth = -0.2
	}

	conditional = {
		allow = { has_dlc = "Res Publica" }
		is_elective = yes
		custom_attributes = {
			has_polish_election = yes
			locked_government_type = yes
		}
	}

	conditional = {
		allow = { NOT = { has_dlc = "Res Publica" } }
		custom_attributes = {
			locked_government_type = yes
		}
	}
	conditional = {
		allow = {
			OR = {
				has_dlc = "Common Sense"
				has_dlc = "Domination"
			}
		}
		has_parliament = yes
	}
}

polish_autocratic_monarchy = {
	icon = "king"
	allow_normal_conversion = no 
	lock_level_when_selected = yes
	potential = {
		OR = {
			has_reform = polish_autocratic_monarchy
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = polish_autocratic_monarchy
			}
		}
	}
	legacy_equivalent = despotic_monarchy
	valid_for_nation_designer = yes
	nation_designer_cost = 75
	nation_designer_trigger = {
		has_dlc = "Lions of the North"
	}
	modifiers = {
		administrative_efficiency = 0.05
		max_absolutism = 10 
		global_manpower_modifier = 0.2 
		reform_progress_growth = 0.1
	}
}

lithuanian_grand_kingdom = {
	icon = "peasants"
	allow_normal_conversion = yes
	potential = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = lithuanian_grand_kingdom
			}
			has_reform = lithuanian_grand_kingdom
		}
	}
	legacy_equivalent = despotic_monarchy
	fixed_rank = 2
	valid_for_nation_designer = yes
	nation_designer_cost = 30
	modifiers = {
		no_religion_penalty = yes
		global_autonomy = -0.05 
		governing_capacity = 250 
	}
}

lithuanian_grand_empire = {
	icon = "peasants"
	allow_normal_conversion = yes
	potential = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = lithuanian_grand_empire
			}
			has_reform = lithuanian_grand_empire
			AND = {
				mission_completed = sca_mission_lit_polish_union
				total_development = 1000 
			}
		}
	}
	legacy_equivalent = despotic_monarchy
	fixed_rank = 3
	valid_for_nation_designer = yes
	nation_designer_cost = 55
	modifiers = {
		no_religion_penalty = yes
		monarch_admin_power = 2
		governing_capacity = 300 
	}
}

###Livonian Government Reforms - custom creations basically
# If you put everything into military	(Tall)
livonian_military_monarchy = {
	icon = "livonian_monarchy"
	allow_normal_conversion = no
	potential = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_military_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_military_monarchy
			}
		}
	}
	trigger = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_military_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_military_monarchy
			}
		}
	}
	valid_for_nation_designer = yes
	nation_designer_trigger = {
		has_dlc = "Lions of the North"
	}
	nation_designer_cost = 100

	modifiers = {
		war_exhaustion = -0.05
		development_cost = -0.05
		monarch_military_power = 2
		nobles_loyalty_modifier = 0.1
		governing_capacity_modifier = -0.5
	}

	conditional = {
		allow = { has_dlc = "Rights of Man" }
		government_abilities = {
			militarization_mechanic
		}
	}
}

# If you put everything into naval and colonialization	(Tall)
livonian_naval_monarchy = {
	icon = "livonian_monarchy"
	allow_normal_conversion = no
	potential = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_naval_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_naval_monarchy
			}
		}
	}
	trigger = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_naval_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_naval_monarchy
			}
		}
	}
	valid_for_nation_designer = yes
	nation_designer_trigger = {
		has_dlc = "Lions of the North"
	}
	nation_designer_cost = 60

	modifiers = {
		development_cost = -0.1
		allowed_marine_fraction = 0.5
		monarch_diplomatic_power = 2
		burghers_loyalty_modifier = 0.1
		governing_capacity_modifier = -0.5		
	}
	
	removed_effect = {
		country_event = { id = dutch_republic.33 }
	}

	conditional = {
		allow = { has_dlc = "Res Publica" }
		queen = no
		heir = no
		duration = 4
		has_term_election = yes
		is_eligible_for_hre_emperor = no
		states_general_mechanic = {
			statists = {
				global_colonial_growth = 10
				global_trade_power = 0.1
				trade_efficiency = 0.1
				legitimacy = -1
			}

			monarchists = {
				navy_tradition = 1
				naval_morale = 0.1
				legitimacy = 0.5
			}
		}
	}
}

# If you put everything into trade and tall	(Tall)
livonian_trade_monarchy = {
	icon = "livonian_monarchy"
	allow_normal_conversion = no
	potential = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_trade_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_trade_monarchy
			}
		}
	}
	trigger = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_trade_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_trade_monarchy
			}
		}
	}
	valid_for_nation_designer = yes
	nation_designer_trigger = {
		has_dlc = "Lions of the North"
	}
	nation_designer_cost = 60

	modifiers = {
		merchants = 1
		global_ship_trade_power = 0.25
		global_trade_goods_size_modifier = 0.15
		burghers_influence_modifier = 0.05
		governing_capacity_modifier = -0.5		
	}
	custom_attributes = {
		enables_plutocratic_idea_group = yes
		enables_aristocratic_idea_group = no
	}
	boost_income = yes
	conditional = {
		allow = {
			has_dlc = "Leviathan"
		}
		allow_draft_transport_ships = yes
	}
	conditional = {
		allow = {
			has_dlc = "Res Publica"
			NOT = { has_dlc = "Mare Nostrum" }
		}
		can_use_trade_post = yes
	}
	conditional = {
		allow = {
			has_dlc = "Mare Nostrum"
			NOT = { has_dlc = "Res Publica" }
		}
		can_form_trade_league = yes
		trade_city_reform = trading_city
	}
	conditional = {
		allow = {
			has_dlc = "Res Publica"
			has_dlc = "Mare Nostrum"
		}
		can_use_trade_post = yes
		can_form_trade_league = yes
		trade_city_reform = trading_city
	}
}

# If you want to focus on religion
livonian_theocratic_monarchy = {
	icon = "livonian_monarchy"
	allow_normal_conversion = no
	potential = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_theocratic_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_theocratic_monarchy
			}
		}
	}
	trigger = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_theocratic_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_theocratic_monarchy
			}
		}
	}
	valid_for_nation_designer = yes
	nation_designer_trigger = {
		has_dlc = "Lions of the North"
	}
	nation_designer_cost = 50

	modifiers = {
		tolerance_own = 2
		papal_influence = 0.5
		church_power_modifier = 0.1
		monthly_fervor_increase = 0.25
		church_influence_modifier = 0.25
		church_loyalty_modifier = 0.05
		no_stability_loss_on_monarch_death = yes
	}
	custom_attributes = {
		enables_aristocratic_idea_group = no
		enables_divine_idea_group = yes
	}
}

# If you want to focus on the estates and hate heirs
livonian_elective_monarchy = {
	icon = "livonian_monarchy"
	allow_normal_conversion = no
	potential = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_elective_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_elective_monarchy
			}
		}
	}
	trigger = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_elective_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_elective_monarchy
			}
		}
	}
	valid_for_nation_designer = yes
	nation_designer_trigger = {
		has_dlc = "Lions of the North"
	}
	nation_designer_cost = 50

	modifiers = {
		all_estate_loyalty_equilibrium = 0.15
		stability_cost_modifier = -0.2
		advisor_pool = 2
		church_influence_modifier = 0.05
		nobles_influence_modifier = 0.05
		burghers_influence_modifier = 0.05
		no_stability_loss_on_monarch_death = yes
	}

	conditional = {
		allow = { has_dlc = "Res Publica" }
		is_elective = yes
	}
	custom_attributes = {
		diet_increases_not_influence = yes
	}
}

# If you just want one good allrounder monarchy
livonian_monarchy = {
	icon = "livonian_monarchy"
	allow_normal_conversion = no
	potential = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_monarchy
			}
		}
	}
	trigger = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_monarchy
			}
		}
	}
	valid_for_nation_designer = yes
	nation_designer_trigger = {
		has_dlc = "Lions of the North"
	}
	nation_designer_cost = 20

	modifiers = {
		governing_capacity = 50
		global_unrest = -1
		diplomatic_reputation = 1
		global_manpower_modifier = 0.05
	}
}

# If you want to meme
livonian_mercenary_monarchy = {
	icon = "livonian_monarchy"
	allow_normal_conversion = no
	potential = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_mercenary_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_mercenary_monarchy
			}
		}
	}
	trigger = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_mercenary_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_mercenary_monarchy
			}
		}
	}
	valid_for_nation_designer = yes
	nation_designer_trigger = {
		has_dlc = "Lions of the North"
	}
	nation_designer_cost = 25

	modifiers = {
		mercenary_manpower = 0.33
		mercenary_discipline = 0.05
		mercenary_cost = -0.25
		merc_maintenance_modifier = -0.1

	}

	custom_attributes = {
		mercs_do_not_cost_army_professionalism = yes
		generals_become_rulers = yes
	}
	has_term_election = no
	queen = yes
	royal_marriage = yes
	heir = no
}

# If you want to focus heavily on Diplomacy	(Wide)
livonian_diplomatic_monarchy = {
	icon = "livonian_monarchy"
	allow_normal_conversion = no
	potential = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_diplomatic_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_diplomatic_monarchy
			}
		}
	}
	trigger = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_diplomatic_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_diplomatic_monarchy
			}
		}
	}
	valid_for_nation_designer = yes
	nation_designer_trigger = {
		has_dlc = "Lions of the North"
	}
	nation_designer_cost = 40

	modifiers = {
		diplomatic_upkeep = 2
		diplomatic_reputation = 2
		vassal_forcelimit_bonus = 0.5
		vassal_income = 0.5
		global_manpower_modifier = -0.33
		land_forcelimit_modifier = -0.33
	}

	conditional = {
		allow = {
			OR = {
				has_dlc = "Common Sense"
				has_dlc = "Domination"
			}
		}
		has_parliament = yes
	}
}

# If you want to keep security and stability	(Wide)
livonian_constitutional_monarchy = {
	icon = "livonian_monarchy"
	allow_normal_conversion = no
	potential = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_constitutional_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_constitutional_monarchy
			}
		}
	}
	trigger = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_constitutional_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_constitutional_monarchy
			}
		}
		is_not_blocked_by_estate_privilege = { estate = estate_nobles }
	}
	valid_for_nation_designer = yes
	nation_designer_trigger = {
		has_dlc = "Lions of the North"
	}
	nation_designer_cost = 50

	modifiers = {
		global_unrest = -2
		years_of_nationalism = -5
		legitimacy = 1
		improve_relation_modifier = 0.15
		no_stability_loss_on_monarch_death = yes
	}

	conditional = {
		allow = {
			OR = {
				has_dlc = "Domination"
				has_dlc = "Common Sense"
			}
		}
		has_parliament = yes
		custom_attributes = {
			disables_estate_nobles = yes
			blocked_call_diet = yes
			halved_parliament_bribes = yes
		}
	}
}

# If you want to blob like crazy basically	(Wide)
livonian_administrative_monarchy = {
	icon = "livonian_monarchy"
	allow_normal_conversion = no
	potential = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_administrative_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_administrative_monarchy
			}
		}
	}
	trigger = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_administrative_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_administrative_monarchy
			}
		}
	}
	valid_for_nation_designer = yes
	nation_designer_trigger = {
		has_dlc = "Lions of the North"
	}
	nation_designer_cost = 60

	modifiers = {
		core_creation = -0.15
		governing_capacity = 200
		legitimacy = -0.5
		diplomatic_reputation = -2
	}
}

# If you want to play naval campaigns (tall-ish)
livonian_admiral_monarchy = {
	icon = "livonian_monarchy"
	allow_normal_conversion = no
	potential = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_admiral_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_admiral_monarchy
			}
		}
	}
	trigger = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_admiral_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_admiral_monarchy
			}
		}
	}
	valid_for_nation_designer = yes
	nation_designer_trigger = {
		has_dlc = "Lions of the North"
	}
	nation_designer_cost = 25

	modifiers = {
		allowed_marine_fraction = 0.25
		governing_capacity_modifier = -0.25
		naval_forcelimit_modifier = 0.33
		global_sailors_modifier = 0.25
		ship_durability = 0.05
	}

	custom_attributes = {
		admirals_become_rulers = yes
	}
	has_term_election = no
	queen = yes
	royal_marriage = yes
	heir = no
	conditional = {
		allow = {
			has_dlc = "Leviathan"
		}
		allow_draft_transport_ships = yes
	}
}

# If you want to play naval campaigns (wide-ish)
livonian_naval_controlled_monarchy = {
	icon = "livonian_monarchy"
	allow_normal_conversion = no
	potential = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_naval_controlled_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_naval_controlled_monarchy
			}
		}
	}
	trigger = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_naval_controlled_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_naval_controlled_monarchy
			}
		}
	}
	valid_for_nation_designer = yes
	nation_designer_trigger = {
		has_dlc = "Lions of the North"
	}
	nation_designer_cost = 40

	modifiers = {
		range = 0.25
		colonist_placement_chance = 0.05
		capture_ship_chance = 0.33
		province_warscore_cost = -0.1
	}
	custom_attributes = {
		force_admiral_leader = yes
	}
}

# If you want to be a military powerhouse but wide
livonian_general_controlled_monarchy = {
	icon = "livonian_monarchy"
	allow_normal_conversion = no
	potential = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_general_controlled_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_general_controlled_monarchy
			}
		}
	}
	trigger = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_general_controlled_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_general_controlled_monarchy
			}
		}
	}
	valid_for_nation_designer = yes
	nation_designer_trigger = {
		has_dlc = "Lions of the North"
	}
	nation_designer_cost = 40

	modifiers = {
		land_maintenance_modifier = -0.1
		governing_capacity_modifier = 0.1
		land_forcelimit_modifier = 0.15
		ae_impact = -0.1
		army_tradition_decay = -0.001
	}
}

# If you want to be an absolute monarchy without regard for human lives (wide)
livonian_absolute_monarchy = {
	icon = "livonian_monarchy"
	allow_normal_conversion = no
	potential = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_absolute_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_absolute_monarchy
			}
		}
	}
	trigger = {
		has_unlocked_government_reform = {
			government_reform = livonian_absolute_monarchy
		}
	}
	valid_for_nation_designer = yes
	nation_designer_trigger = {
		has_dlc = "Lions of the North"
	}
	nation_designer_cost = 40

	modifiers = {
		max_absolutism = 30
		yearly_absolutism = 3
		autonomy_change_time = -0.5
		nobles_influence_modifier = -0.1
		church_influence_modifier = -0.1
		burghers_influence_modifier = -0.1
	}

	custom_attributes = {
		absolutism_reduction_on_ruler_death = yes
	}
}

# If you want to be a monarchy way ahead of time (tall)
livonian_enlightened_monarchy = {
	icon = "livonian_monarchy"
	allow_normal_conversion = no
	potential = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = livonian_enlightened_monarchy
			}
			has_unlocked_government_reform = {
				government_reform = livonian_enlightened_monarchy
			}
		}
	}
	trigger = {
		has_unlocked_government_reform = {
			government_reform = livonian_enlightened_monarchy
		}
	}
	valid_for_nation_designer = yes
	nation_designer_trigger = {
		has_dlc = "Lions of the North"
	}
	nation_designer_cost = 75

	modifiers = {
		monarch_admin_power = 1
		monarch_diplomatic_power = 1
		monarch_military_power = 1
		legitimacy = 1
		governing_capacity_modifier = -0.5
	}
}

norwegian_parliamentary_monarchy = {
	icon = "queen"
	allow_normal_conversion = no
	potential = {
		OR = {
			has_reform = norwegian_parliamentary_monarchy
			have_had_reform = norwegian_parliamentary_monarchy
		}
	}
	lock_level_when_selected = yes
	valid_for_nation_designer = yes
	nation_designer_cost = 15
	nation_designer_trigger = {
		has_dlc = "Lions of the North"
	}
	modifiers = {
		legitimacy = 1
		global_unrest = -1
		max_absolutism = -30
		nobles_influence_modifier = -0.1
	}

	conditional = {
		allow = {
			OR = {
				has_dlc = "Common Sense" 
				has_dlc = "Domination"
			}
		}
		has_parliament = yes
	}
}

austrian_absolute_monarchy = {
	icon = "austrian_dual_monarchy_reform"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Winds of Change"
		OR = {
			has_reform = austrian_absolute_monarchy
			have_had_reform = austrian_absolute_monarchy
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 100
	nation_designer_trigger = {
		has_dlc = "Winds of Change"
	}

	modifiers = {
		culture_conversion_cost = -0.25
		culture_conversion_time = -0.2
		monarch_diplomatic_power = 2
	}

	custom_attributes = {
		increase_nobles_loyalty_per_culture_conversion = yes
	}
	effect = {
		change_dip = 2
	}
	removed_effect = {
		change_dip = -2
	}
}

merchant_aristocracy_reform = {
	icon = "merchant_aristocracy_reform"
	allow_normal_conversion = no
	potential = {
		OR = {
			has_reform = merchant_aristocracy_reform
			have_had_reform = merchant_aristocracy_reform
			AND = {
				tag = FEO
				government = monarchy
			}
		}
	}
	trigger = {
		OR = {
			has_reform = merchant_aristocracy_reform
			have_had_reform = merchant_aristocracy_reform
			AND = {
				tag = FEO
				government = monarchy
			}
		}
	}
	nation_designer_trigger = {
		primary_culture = goths
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 10

	modifiers = {
		max_absolutism = -10
		global_trade_goods_size_modifier = 0.05
	}

	conditional = {
		allow = {
			has_dlc = "Winds of Change"
		}
		custom_attributes = {
			enables_recruit_foreign_generals = yes
		}
	}
	conditional = {
		allow = {
			has_dlc = "Leviathan"
		}
		allow_draft_transport_ships = yes
	}
	conditional = {
		allow = {
			has_dlc = "Res Publica"
		}
		can_use_trade_post = yes
	}

	ai = {
		factor = 0
	}
}

andean_empire_reform = {
	icon = "andean_empire_reform"
	allow_normal_conversion = no
	potential = {
		has_country_flag = INC_new_reform
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 60
	fixed_rank = 3
	modifiers = {
		global_unrest = -2
		max_absolutism_effect = 0.1
	}
	custom_attributes = {
		enables_divine_idea_group = yes
		enables_aristocratic_idea_group = no
	}
	
	government_abilities = {
		divine_authority_mechanic
	}
}

aztec_empire_reform = {
	icon = "aztec_empire_reform"
	allow_normal_conversion = no
	potential = {
		primary_culture = aztek
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 60
	fixed_rank = 3
	modifiers = {
		reduced_liberty_desire = 10
	}
	effect = {
		hidden_effect = {
			remove_country_modifier = the_fifth_sun
		}
	}
	removed_effect = {
		hidden_effect = {
			remove_country_modifier = the_fifth_sun
		}
	}
	
	government_abilities = {
		blood_gathering_mechanic
	}
}

nahuatl_monarchy_reform = {
	icon = "nahuatl_monarchy_reform"
	allow_normal_conversion = no
	potential = {
		religion = nahuatl
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 30
	modifiers = {
		manpower_recovery_speed = 0.10
	}
	effect = {
		hidden_effect = {
			remove_country_modifier = the_fifth_sun
		}
	}
	removed_effect = {
		hidden_effect = {
			remove_country_modifier = the_fifth_sun
		}
	}
	
	government_abilities = {
		blood_gathering_mechanic
	}
}

maya_confederation_reform = {
	icon = "maya_confederation_reform"
	allow_normal_conversion = no
	potential = {
		has_country_flag = maya_confederation_reform_unlocked
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 60
	modifiers = {
		reduced_liberty_desire = 10
		annexation_relations_impact = -0.5
		diplomatic_upkeep = 1
	}
	
	custom_attributes = {
		MAY_free_diplo_annexation = yes
	}
}

divine_kingship_reform = {
	icon = "divine_kingship_reform"
	allow_normal_conversion = no
	potential = {
		has_country_flag = divine_kingship_reform_unlocked
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 60
	modifiers = {
		max_absolutism = 5
		church_influence_modifier = 0.05
		overextension_impact_modifier = -0.1
		reform_progress_growth = -0.1
	}
	custom_attributes = {
		enables_divine_idea_group = yes
		enables_aristocratic_idea_group = no
	}
	
	custom_attributes = {
		MAY_max_abso_buff = yes
	}
}

#Hereditary vs Nobility
enforce_privileges_reform = {
	icon = "people_walking"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = no
	}
	modifiers = {
		global_manpower_modifier = 0.1
		nobles_influence_modifier = 0.1
		maratha_exclusive_influence_modifier = 0.1
		rajput_exclusive_influence_modifier = 0.1
	}
	ai = {
		factor = 1
		modifier = {
			factor = 2
			NOT = { max_manpower = 12 }
		}
	}
}

quash_noble_power_reform = {
	icon = "king_2"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = no
	}
	modifiers = {
		global_tax_modifier = 0.15
		nobles_influence_modifier = -0.1
		maratha_exclusive_influence_modifier = -0.1
		rajput_exclusive_influence_modifier = -0.1
	}
	ai = {
		factor = 1
		modifier = {
			factor = 1.5
			is_in_deficit = yes
		}
	}
}

grant_noble_castle_rights_reform = {
	icon = "castle"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = no
	}
	modifiers = {
		fort_maintenance_modifier = -0.2
		nobles_influence_modifier = 0.05
		maratha_exclusive_influence_modifier = 0.05
		rajput_exclusive_influence_modifier = 0.05
	}
	custom_attributes = {
		on_fort_built_nobles_loyalty = yes	#5 Loyalty
	}
	ai = {
		factor = 1
		modifier = {
			factor = 1.5
			num_of_owned_provinces_with = {
				OR = {
					has_building = fort_15th
					has_building = fort_16th
					has_building = fort_17th
					has_building = fort_18th
				}
				value = 5
			}
		}
	}
}

maintain_nobles_status_quo_reform = {
	icon = "conciliarism_reform"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = no
	}
	modifiers = {
		legitimacy = 0.5
		meritocracy = 0.5
		stability_cost_modifier = -0.15
	}
	custom_attributes = {
		free_noble_levies = yes
	}
	ai = {
		factor = 1
		modifier = {
			factor = 0
			crown_land_share = 50
		}
	}
}

grant_military_command_reform = {
	icon = "soldiers"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = no
	}
	modifiers = {
		army_tradition = 0.25
		cavalry_cost = -0.1
		nobles_influence_modifier = 0.05
		maratha_exclusive_influence_modifier = 0.05
		rajput_exclusive_influence_modifier = 0.05
	}
	custom_attributes = {
		recruiting_generals_increases_nobles_loyalty = yes
	}
	ai = {
		factor = 1
	}
}

grant_nobles_electorate_reform = {
	icon = "ballot_box"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = no
	}
	trigger = {
		has_idea_group = aristocracy_ideas
		NOT = { has_reform = celestial_empire }
	}
	modifiers = {
		nobles_loyalty_modifier = 0.1
		maratha_loyalty_modifier = 0.1
		rajput_loyalty_modifier = 0.1
		no_stability_loss_on_monarch_death = yes
	}
	effect = {
		hidden_effect = {
			if = {
				limit = {
					OR = {
						has_estate_led_regency = {
							estate = estate_nobles
						}
						has_estate_led_regency = {
							estate = estate_maratha
						}
						has_estate_led_regency = {
							estate = estate_rajput
						}
					}
				}
				add_ruler_modifier = {
					name = empowered_regency_modifier
					duration = -1
				}
			}
		}
	}
	removed_effect = {
		hidden_effect = {
			remove_country_modifier = empowered_regency_modifier
		}
	}
	custom_attributes = {
		improved_nobles_regency = yes
	}
	conditional = {
		allow = { has_dlc = "Domination" }
		custom_attributes = {
			has_improved_ruler_election = yes
		}
	}
	ai = {
		factor = 1
		modifier = {
			factor = 100
			has_government_attribute = has_ruler_election
		}
		modifier = {
			factor = 0
			NOT = { has_government_attribute = has_ruler_election }
		}
	}
}

blackmail_nobility_reform = {
	icon = "blackmailing"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = no
		NOT = { has_estate_privilege = estate_nobles_golden_liberty }
	}
	trigger = {
		full_idea_group = spy_ideas
	}
	modifiers = {
		nobles_influence_modifier = -0.1
		maratha_exclusive_influence_modifier = -0.1
		rajput_exclusive_influence_modifier = -0.1
		allow_free_estate_privilege_revocation = yes
	}
	custom_attributes = {
		seizing_land_no_rebels_from_estate_nobles = yes
	}
	ai = {
		factor = 0
	}
}

enforce_trader_privileges_reform = {
	icon = "paper_money_map"
	allow_normal_conversion = yes
	potential = {
		is_reform_available = plutocratic_reform
		OR = {
			technology_group = indian
			technology_group = muslim
			technology_group = chinese
			technology_group = east_african
		}
	}
	trigger = {
		has_reform = plutocratic_reform
	}
	modifiers = {
		trade_range_modifier = 0.3
		trade_efficiency = 0.05
	}
	ai = {
		factor = 2
		modifier = {
			factor = 1.5
			trade_income_percentage = 0.35
		}
		modifier = {
			factor = 0.5
			NOT = {
				trade_income_percentage = 0.25
			}
		}
	}
}

bengali_reform = {
	icon = "merchant_ship"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Dharma"
		primary_culture = bengali
		religion_group = muslim
	}
	modifiers = {
		merchants = 1
		trade_efficiency = 0.1
	}
	ai = {
		factor = 5
	}
}

sufi_syncretism_reform = {
	icon = "muslim"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Dharma"
		primary_culture = bengali
		religion_group = muslim
	}
	modifiers = {
		global_missionary_strength = 0.01
		development_cost = -0.05
	}
	ai = {
		factor = 3
	}
}

poligar_reform = {
	icon = "indian_crown"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Dharma"
		technology_group = indian
		OR = {
			culture_group = dravidian
			primary_culture = oriya
			primary_culture = sinhala
		}
	}
	modifiers = {
		infantry_power = 0.1
		development_cost = -0.05
	}
	ai = {
		factor = 3
	}
}

khalsa_reform = {
	icon = "strength_of_the_khalsa"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Dharma"
		religion = sikhism
	}
	modifiers = {
		tolerance_heathen = 1
		tolerance_heretic = 1
		land_morale = 0.05
	}
	ai = {
		factor = 5
	}
}

deccani_society_reform = {
	icon = "noble_indian"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Dharma"
		is_revolutionary = no
		OR = {
			technology_group = indian
			technology_group = early_indian
		}
		religion_group = muslim
		OR = {
			culture_group = dravidian
			primary_culture = marathi
		}
	}
	modifiers = {
		free_dip_policy = 1
	}
	ai = {
		factor = 3
	}
}

black_army_reform = {
	icon = "black_army_reform"
	allow_normal_conversion = yes
	potential = {
		is_or_was_tag = {
			tag = HUN
		}
		has_country_flag = black_army_reform_flag
		is_revolutionary = no
	}
	modifiers = {
		merc_maintenance_modifier = -0.15
		mercenary_discipline = 0.025
		nobles_loyalty_modifier = -0.1
	}
	custom_attributes = {
		mercs_do_not_cost_army_professionalism = yes
	}
	ai = {
		factor = 3
	}
}

legion_of_honor_reform = {
	icon = "legion_of_honor_reform"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = yes
	}
	trigger = {
		if = {
			limit = {
				has_government_attribute = enables_estate_nobles
			}
			can_swap_out_of_estate_granting_reform = {
				estate = estate_nobles
			}
		}
	}
	modifiers = {
		advisor_cost = -0.1
		no_stability_loss_on_monarch_death = yes
		yearly_army_professionalism = 0.005
	}
	custom_attributes = {
		winning_battles_increases_legitimacy = yes
	}
	ai = {
		factor = 2.5
	}
}

imperial_nobility_reform = {
	icon = "imperial_nobility_reform"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = yes
	}
	modifiers = {
		leader_cost = -0.1
		rr_royalists_influence = 0.1
		army_tradition = 0.25
	}
	custom_attributes = {
		enables_estate_nobles = yes
		seizing_land_no_rebels_from_estate_nobles = yes
	}
	ai = {
		factor = 2.5
	}
}

devshirme_system_reform = {
	icon = "devshirme_system"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		OR = {
			has_reform = ottoman_government
			has_reform = modernized_ottoman_government
			has_reform = reorganized_ottoman_government
			has_reform = sultanate_of_rum_reform
		}
		NOT = { has_country_flag = tur_abolished_devshirme_for_good }
	}
	trigger = {
		custom_trigger_tooltip = {
			tooltip = tur_not_has_abolished_devshirme_system_tt
			NOT = { has_country_flag = tur_abolished_devshirme_for_good }
		}
		NOT = { has_estate_privilege = estate_janissary_janissaries_from_muslims }
	}
	modifiers = {
		global_manpower_modifier = 0.1
		janissaries_influence_modifier = 0.1
		janissaries_loyalty_modifier = 0.1
		nobles_influence_modifier = -0.1
	}

	conditional = {
		allow = {
			has_dlc = "Domination"
		}
		government_abilities = {
			devshirme_mechanic
		}
	}
	ai = {
		factor = 300
	}
}

ottoman_conscription_reform = {
	icon = "feudal_theocracy"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		OR = {
			has_reform = ottoman_government
			has_reform = modernized_ottoman_government
			has_reform = reorganized_ottoman_government
			has_reform = sultanate_of_rum_reform
		}
		OR = {
			has_unlocked_government_reform = {
				government_reform = ottoman_conscription_reform
			}
			have_had_reform = ottoman_conscription_reform
		}
	}
	modifiers = {
		manpower_in_own_culture_provinces = 0.1
		manpower_in_true_faith_provinces = 0.1
	}
	ai = {
		factor = 300
	}
}

separation_of_boyars_from_court_reform = {
	icon = "king"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		OR = {
			has_reform = principality
			has_reform = tsardom
			has_reform = ruthenian_tsardom
			has_reform = russian_empire_reform
		}
		is_revolutionary = no
	}
	modifiers = {
		yearly_government_power = 1.25
		nobles_influence_modifier = -0.1
		global_tax_modifier = 0.05
		maratha_exclusive_influence_modifier = -0.1
		rajput_exclusive_influence_modifier = -0.1
	}
	ai = {
		factor = 10
	}
}

reform_the_pronoiars_reform = {
	icon = "reform_the_pronoiars_reform"
	allow_normal_conversion = yes
	potential = {
		has_government_attribute = enables_pronoias
	}
	modifiers = {
		allow_client_states = yes
		num_of_pronoiars = 2
	}
	ai = {
		factor = 10
	}
}

pronoiar_monarchy_reform = {
	icon = "pronoiar_monarchy_reform"
	allow_normal_conversion = yes
	potential = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				has_reform = pronoiar_monarchy_reform
			}
			have_had_reform = pronoiar_monarchy_reform
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 100
	modifiers = {
		allow_client_states = yes
		num_of_pronoiars = 3

	}
	conditional = {
		allow = { has_dlc = "King of Kings" }
		custom_attributes = {
			enables_pronoias = yes 
		}
	}
	ai = {
		factor = 10
	}
}

house_of_lords_reform = {
	icon = "assembly_hall"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		OR = {
			has_reform = english_monarchy
			has_reform = british_monarchy
			has_reform = angevin_monarchy
		}
	}
	modifiers = {
		reform_progress_growth = 0.1
		parliament_effect_duration = 5
		nobles_loyalty_modifier = 0.05
	}
	ai = {
		factor = 10
	}
}

ministerialis_promotion_reform = {
	icon = "commander_king_reform"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		OR = {
			tag = HLR
			is_part_of_hre = yes
		}
	}
	modifiers = {
		nobles_privilege_slots = 1
		advisor_cost = -0.1
		monthly_favor_modifier = 0.1
	}
	ai = {
		factor = 1
	}
}

TIM_plunder_economy = {
	icon = "horde_riding"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Winds of Change"
		has_unlocked_government_reform = {
			government_reform = TIM_plunder_economy
		}
	}
	custom_attributes = {
		enables_horde_idea_group = yes
		enables_aristocratic_idea_group = no
	}
	raze_province = yes
	modifiers = {
		raze_power_gain = -0.5
	}
}

#Bureaucracy:

centralize_reform = {
	icon = "paper_with_seal_3"
	allow_normal_conversion = yes
	potential = {
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
		if = {
			limit = { current_age = age_of_discovery }
			custom_trigger_tooltip = {
				tooltip = less_than_15_provinces_on_same_continent
				NOT = {
					num_of_owned_provinces_with = {
						same_continent = ROOT
						value = 15
					}
				}
			}
		}
		if = {
			limit = { current_age = age_of_reformation }
			custom_trigger_tooltip = {
				tooltip = less_than_25_provinces_on_same_continent
				NOT = {
					num_of_owned_provinces_with = {
						same_continent = ROOT
						value = 25
					}
				}
			}
		}
		if = {
			limit = { current_age = age_of_absolutism }
			custom_trigger_tooltip = {
				tooltip = less_than_35_provinces_on_same_continent
				NOT = {
					num_of_owned_provinces_with = {
						same_continent = ROOT
						value = 35
					}
				}
			}
		}
		if = {
			limit = { current_age = age_of_revolutions }
			custom_trigger_tooltip = {
				tooltip = less_than_50_provinces_on_same_continent
				NOT = {
					num_of_owned_provinces_with = {
						same_continent = ROOT
						value = 50
					}
				}
			}
		}
	}
	trigger = {
		if = {
			limit = { current_age = age_of_discovery }
			custom_trigger_tooltip = {
				tooltip = less_than_15_provinces_on_same_continent
				NOT = {
					num_of_owned_provinces_with = {
						same_continent = ROOT
						value = 15
					}
				}
			}
		}
		if = {
			limit = { current_age = age_of_reformation }
			custom_trigger_tooltip = {
				tooltip = less_than_25_provinces_on_same_continent
				NOT = {
					num_of_owned_provinces_with = {
						same_continent = ROOT
						value = 25
					}
				}
			}
		}
		if = {
			limit = { current_age = age_of_absolutism }
			custom_trigger_tooltip = {
				tooltip = less_than_35_provinces_on_same_continent
				NOT = {
					num_of_owned_provinces_with = {
						same_continent = ROOT
						value = 35
					}
				}
			}
		}
		if = {
			limit = { current_age = age_of_revolutions }
			custom_trigger_tooltip = {
				tooltip = less_than_50_provinces_on_same_continent
				NOT = {
					num_of_owned_provinces_with = {
						same_continent = ROOT
						value = 50
					}
				}
			}
		}
	}
	modifiers = {
		development_cost_modifier = -0.05
		global_prosperity_growth = 0.5
		all_estate_loyalty_equilibrium = -0.05
	}
	conditional = {
		allow = {
			has_dlc = "Leviathan"
		}
		custom_attributes = {
			centralize_state_half_refund = yes
			#centralize_state_no_reform_cost = yes
			#centralize_state_development = yes
		}
	}
}

centralize_empire_reform = {
	icon = "paper_with_seal_3"
	allow_normal_conversion = yes
	potential = {
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
		if = {
			limit = { current_age = age_of_discovery }
			custom_trigger_tooltip = {
				tooltip = at_least_15_provinces_on_same_continent
				num_of_owned_provinces_with = {
					same_continent = ROOT
					value = 15
				}
			}
		}
		if = {
			limit = { current_age = age_of_reformation }
			custom_trigger_tooltip = {
				tooltip = at_least_25_provinces_on_same_continent
				num_of_owned_provinces_with = {
					same_continent = ROOT
					value = 25
				}
			}
		}
		if = {
			limit = { current_age = age_of_absolutism }
			custom_trigger_tooltip = {
				tooltip = at_least_35_provinces_on_same_continent
				num_of_owned_provinces_with = {
					same_continent = ROOT
					value = 35
				}
			}
		}
		if = {
			limit = { current_age = age_of_revolutions }
			custom_trigger_tooltip = {
				tooltip = at_least_50_provinces_on_same_continent
				num_of_owned_provinces_with = {
					same_continent = ROOT
					value = 50
				}
			}
		}
	}
	trigger = {
		if = {
			limit = { current_age = age_of_discovery }
			custom_trigger_tooltip = {
				tooltip = at_least_15_provinces_on_same_continent
				num_of_owned_provinces_with = {
					same_continent = ROOT
					value = 15
				}
			}
		}
		if = {
			limit = { current_age = age_of_reformation }
			custom_trigger_tooltip = {
				tooltip = at_least_25_provinces_on_same_continent
				num_of_owned_provinces_with = {
					same_continent = ROOT
					value = 25
				}
			}
		}
		if = {
			limit = { current_age = age_of_absolutism }
			custom_trigger_tooltip = {
				tooltip = at_least_35_provinces_on_same_continent
				num_of_owned_provinces_with = {
					same_continent = ROOT
					value = 35
				}
			}
		}
		if = {
			limit = { current_age = age_of_revolutions }
			custom_trigger_tooltip = {
				tooltip = at_least_50_provinces_on_same_continent
				num_of_owned_provinces_with = {
					same_continent = ROOT
					value = 50
				}
			}
		}
	}
	modifiers = {
		global_autonomy = -0.05
		autonomy_change_time = -0.25
		culture_conversion_cost = -0.1
		all_estate_loyalty_equilibrium = -0.05
	}
	conditional = {
		allow = {
			has_dlc = "Leviathan"
		}
		custom_attributes = {
			centralize_state_half_refund = yes
			#centralize_state_no_reform_cost = yes
			#centralize_state_development = yes
		}
	}
}

decentralize_reform = {
	icon = "map"
	allow_normal_conversion = yes
	potential = {
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
	}
	modifiers = {
		min_autonomy_in_territories = -0.05
		num_accepted_cultures = 2
		all_estate_loyalty_equilibrium = 0.05
	}
	ai = {
		factor = 1
	}
}

expand_imperial_court_reform = {
	icon = "royal_court"
	allow_normal_conversion = yes
	potential = {
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
	}
	modifiers = {
		all_estate_influence_modifier = 0.05
		reform_progress_growth = 0.2
		advisor_pool = 1
	}
}

limit_imperial_court_reform = {
	icon = "politician"
	allow_normal_conversion = yes
	potential = {
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
	}
	modifiers = {
		all_estate_influence_modifier = -0.05
		same_culture_advisor_cost = -0.1
		meritocracy = 0.25
	}
	custom_attributes = {
		blocked_call_diet = yes
		seizing_land_loyalty = yes
	}
}

regional_council_reform = {
	icon = "peasants"
	allow_normal_conversion = yes
	potential = {
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
	}
	modifiers = {
		state_maintenance_modifier = -0.33
	}
	conditional = {
		allow = { has_dlc = "Mandate of Heaven" }
		custom_attributes = {
			unlock_special_state_edicts = yes
		}
	}
}

representation_of_the_crown_reform = {
	icon = "parliament_hall"
	allow_normal_conversion = yes
	potential = {
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
	}
	modifiers = {
		diplomatic_upkeep = 1
		vassal_forcelimit_bonus = 0.25
		monarch_power_tribute = 1
	}
	custom_attributes = {
		subject_tax_modifier_25 = yes
	}
}

sidhi_recruitment = {
	icon = "siddhi_recruitment"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Dharma"
		technology_group = indian
		religion_group = muslim
		OR = {
			culture_group = dravidian
			primary_culture = marathi
		}
	}
	modifiers = {
		fort_maintenance_modifier = -0.1
		governing_capacity = 100
	}
	ai = {
		factor = 2
	}
}

examination_system_reform = {
	icon = "asian_scripture"
	allow_normal_conversion = yes
	potential = {
		OR = {
			religion = confucianism
			primary_culture = vietnamese
		}
	}
	trigger = {
		OR = {
			has_reform = confucian_bureaucracy
			has_reform = celestial_empire
			has_reform = chinese_warlord
			has_reform = korean_monarchy
		}
	}
	modifiers = {
		advisor_pool = 2
		nobles_influence_modifier = -0.1
	}
	ai = {
		factor = 10
	}
}

corvee_reform = {
	icon = "asian_scripture"
	allow_normal_conversion = yes
	potential = {
		OR = {
			culture_group = thai_group
			culture_group = burman
			culture_group = southeastasian_group
			culture = assamese
			culture = kochi
		}
	}
	modifiers = {
		global_manpower_modifier = 0.1
		build_cost = -0.1
	}
	custom_attributes = {
		manpower_sailors_on_build = yes
	}
	ai = {
		factor = 10
	}
}

ottoman_provincial_government_system_reform = {
	icon = "provincial_government"
	allow_normal_conversion = yes
	potential = {
		OR = {
			has_reform = ottoman_government
			has_reform = modernized_ottoman_government
			has_reform = reorganized_ottoman_government
			has_reform = sultanate_of_rum_reform
		}
	}
	modifiers = {
		global_tax_modifier = 0.15
		vassal_income = 0.25
		promote_culture_cost = -0.25
	}
	conditional = {
		allow = { 
			OR = {
				has_dlc = "Cradle of Civilization"
				has_dlc = "Domination"
			}
		}
		custom_attributes = {
			pasha_extra_bonuses = yes
		}
	}
	effect = {
		hidden_effect = {
			every_owned_province = {
				limit = {
					has_pasha = yes
					NOT = { culture_group = ROOT }
				}
				add_province_modifier = {
					name = the_provincial_system
					duration = -1
				}
			}
		}
	}
	removed_effect = {
		hidden_effect = {
			every_owned_province = {
				limit = {
					has_province_modifier = the_provincial_system
				}
				remove_province_modifier = the_provincial_system
			}
		}
	}
	ai = {
		factor = 1
	}
}

legacy_of_timur_reform = {
	icon = "legacy_of_timur_reform"
	allow_normal_conversion = yes
	potential = {
		has_unlocked_government_reform = {
			government_reform = legacy_of_timur_reform
		}
	}
	modifiers = {
		global_autonomy = -0.05
		years_of_nationalism = -10
		core_creation = -0.05
	}
	custom_attributes = {
		legacy_of_timur_decision = yes
	}
	effect = {
	}
	ai = {
		factor = 10
	}
}

timurid_diwan_reform = {
    icon = "timurid_diwan_reform"
    allow_normal_conversion = yes
    potential = {
        has_dlc = "Winds of Change"
        has_unlocked_government_reform = {
            government_reform = timurid_diwan_reform
        }
    }
    modifiers = {
        national_focus_years = -5
        governing_capacity = 150
    }
    conditional = {
        allow = {
            OR = {
                has_dlc = "Common Sense"
                has_dlc = "Res Publica"
            }
        }
        custom_attributes = {
            enables_timurid_diwan = yes
        }
    }
    conditional = {
        allow = {
            NOT = { 
                OR = {
                    has_dlc = "Common Sense"
                    has_dlc = "Res Publica"
                }
            }
        }
        custom_attributes = {
            buffed_strong_duchies = yes
        }
    }
} 

#State and Religion
#in Common
restoration_of_clergy_reform = {
	icon = "religious_leader"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = yes
		has_dlc = "Emperor"
	}
	modifiers = {
		tolerance_own = 3
		max_revolutionary_zeal = -10
		papal_influence = 100
	}
	effect = {
		if = {
			limit = { has_country_modifier = cult_of_reason }
			add_stability = -1
			remove_country_modifier = cult_of_reason
		}
	}
	custom_attributes = {
		enables_estate_church = yes
	}
	ai = {
		factor = 2.5
	}
}

#Growth of Administration

clergy_in_administration_reform = {
	icon = "religious_leader"
	allow_normal_conversion = yes
	potential = {
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
	}
	modifiers = {
		free_adm_policy = 1
		
		brahmins_hindu_influence_modifier = 0.1
		brahmins_hindu_loyalty_modifier = 0.05
		church_influence_modifier = 0.1
		church_loyalty_modifier = 0.05
		tolerance_own = 1
	}
	ai = {
		factor = 1
		modifier = {
			factor = 0.1
			OR = {
				AND = {
					religion = hinduism
					estate_influence = {
						estate = estate_brahmins
						influence = 90
					}
				}
				estate_influence = {
					estate = estate_church
					influence = 90
				}
			}
		}
	}
}

of_noble_bearing_reform = {
	icon = "nobleman"
	allow_normal_conversion = yes
	potential = {
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
		NOT = {
			AND = {
				has_estate = estate_maratha
				technology_group = indian
				NOT = { has_estate = estate_nobles }
			}
		}
		NOT = {
			AND = {
				has_estate = estate_rajput
				technology_group = indian
				NOT = { has_estate = estate_nobles }
			}
		}
	}
	modifiers = {
		leader_cost = -0.1
		nobles_influence_modifier = 0.1
		maratha_exclusive_influence_modifier = 0.1
		rajput_exclusive_influence_modifier = 0.1
		nobles_loyalty_modifier = 0.05
		maratha_exclusive_loyalty_modifier = 0.05
		rajput_exclusive_loyalty_modifier = 0.05
	}
	ai = {
		factor = 1
		modifier = {
			factor = 0.1
			OR = {
				AND = {
					NOT = { has_estate = estate_nobles }
					OR = {
						estate_influence = {
							estate = estate_rajput
							influence = 90
						}
						estate_influence = {
							estate = estate_maratha
							influence = 90
						}
					}
				}
				estate_influence = {
					estate = estate_nobles
					influence = 90
				}
			}
		}
	}
}

meritocratic_focus_reform = {
	icon = "politician"
	allow_normal_conversion = yes
	potential = {
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
	}
	modifiers = {
		yearly_corruption = -0.1
		advisor_cost = -0.1
		maratha_muslim_influence_modifier = 0.1
		rajput_muslim_influence_modifier = 0.1
		burghers_influence_modifier = 0.1
		burghers_loyalty_modifier = 0.05
		vaisyas_non_muslim_influence_modifier = 0.1
	}
	ai = {
		factor = 1
		modifier = {
			factor = 0.1
			OR = {
				AND = {
					religion_group = muslim
					OR = {
						estate_influence = {
							estate = estate_rajput
							influence = 90
						}
						estate_influence = {
							estate = estate_maratha
							influence = 90
						}
					}
				}
				AND = {
					NOT = { religion_group = muslim }
					estate_influence = {
						estate = estate_vaisyas
						influence = 90
					}
				}
				estate_influence = {
					estate = estate_burghers
					influence = 90
				}
			}
		}
	}
}

dakhni_culture_reform = {
	icon = "indian_crown"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Dharma"
		technology_group = indian
		religion_group = muslim
		OR = {
			culture_group = dravidian
			primary_culture = marathi
		}
	}
	modifiers = {
		state_maintenance_modifier = -0.2
	}
	ai = {
		factor = 2
	}
}

zabt_reform = {
	icon = "general_eastern_administrative"
	allow_normal_conversion = yes
	potential = {
		OR = {
			has_dlc = "Dharma"
			has_dlc = "King of Kings"
		}
		tag = MUG
	}
	modifiers = {
		governing_capacity = 150
	}
	ai = {
		factor = 5
	}
}

dyanstic_administration_reform = {
	icon = "royal_favoritism"
	allow_normal_conversion = yes
	potential = {
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
	}
	modifiers = {
		yearly_corruption = 0.15
		all_estate_influence_modifier = -0.1
		monarch_admin_power = 1
		advisor_pool = 1
	}
	ai = {
		factor = 1
	}
}

standardized_millets_reform = {
	icon = "millet_courts"
	allow_normal_conversion = yes
	potential = {
		OR = {
			has_reform = standardized_millets_reform
			have_had_reform = standardized_millets_reform
			has_unlocked_government_reform = {
				government_reform = standardized_millets_reform
			}
		}
	}
	modifiers = {
		reform_progress_growth = 0.1
		diplomatic_annexation_cost = -0.1
	}
	ai = {
		factor = 1
	}
}

direct_royal_administration_reform = {
	icon = "british_queen"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		has_unlocked_government_reform = {
			government_reform = direct_royal_administration_reform
		}
	}
	trigger = {
		has_parliament = yes
	}
	modifiers = {
		core_creation = -0.05
		parliament_effect_duration = -5
		max_absolutism = 10
		yearly_absolutism = 0.5
	}
	custom_attributes = {
		reform_progress_from_advisors = yes
	}
	ai = {
		factor = 2
	}
}

administration_of_the_parliament_reform = {
	icon = "judge"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		has_unlocked_government_reform = {
			government_reform = administration_of_the_parliament_reform
		}
	}
	trigger = {
		has_parliament = yes
	}
	modifiers = {
		improve_relation_modifier = 0.2
		monthly_favor_modifier = 0.33
	}
	custom_attributes = {
		parliament_seat_bonus = yes
	}
	effect = {
		hidden_effect = {
			every_owned_province = {
				limit = {
					has_seat_in_parliament = yes
				}
				add_province_modifier = {
					name = gov_buffed_parliament_seat
					duration = -1
				}
			}
		}
	}
	removed_effect = {
		hidden_effect = {
			every_owned_province = {
				limit = {
					has_province_modifier = gov_buffed_parliament_seat
				}
				remove_province_modifier = gov_buffed_parliament_seat
			}
		}
	}
	ai = {
		factor = 2
	}
}

legacy_of_eranshahr_reform = {
	icon = "legacy_of_eranshahr_reform"
	allow_normal_conversion = yes
	potential = {
		has_unlocked_government_reform = {
			government_reform = legacy_of_eranshahr_reform
		}
	}
	modifiers = {
		same_religion_advisor_cost = -0.2
		free_policy = 1
	}
	custom_attributes = {
		reform_progress_from_advisors = yes
	}
	ai = {
		factor = 2
	}
}

court_of_art_and_culture_reform = {
	icon = "court_of_art_and_culture_reform"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "King of Kings"
		has_unlocked_government_reform = {
			government_reform = court_of_art_and_culture_reform
		}
	}
	modifiers = {
		advisor_pool = 1
		culture_conversion_cost = -0.1
		prestige_decay = -0.005
	}
	conditional = {
		allow = { has_dlc = "King of Kings" }
		government_abilities = {
			persian_influence_mechanic
		}
	}
	custom_attributes = {
		can_enforce_primary_culture = yes
	}
	removed_effect = {
		country_event = {
			id = persian_influence_events.3000
		}
	}
	ai = {
		factor = 5
	}
}

#deliberative_assembly

# parliamentary_reform defined in common file

royal_decree_reform = {
	icon = "king"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = no
	}
	modifiers = {
		max_absolutism = 5
		yearly_absolutism = 0.5
	}
	ai = {
		factor = 1
	}
}

aristocratic_court_reform = {
	icon = "soldiers_2"
	allow_normal_conversion = yes
	modifiers = {
		diplomatic_reputation = 1
		monthly_favor_modifier = 0.25
		improve_relation_modifier = 0.15
	}
	ai = {
		factor = 1
	}
}

states_general_reform = {
	icon = "states_general"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = no
	}
	trigger = {
		NOT = { is_lesser_in_union = yes }
		is_emperor = no
	}

	modifiers = {
		stability_cost_modifier = -0.1
		no_stability_loss_on_monarch_death = yes
	}

	ai = {
		factor = 0 # AI should never pick this
	}

	removed_effect = {
		country_event = { id = dutch_republic.33 }
	}

	conditional = {
		allow = { has_dlc = "Res Publica" }
		queen = no
		heir = no
		duration = 4
		has_term_election = yes
		is_eligible_for_hre_emperor = no
		states_general_mechanic = {
			statists = {
				diplomatic_reputation = 1
				global_unrest = -1
				legitimacy = -0.5
			}

			monarchists = {
				prestige = 0.5
				manpower_recovery_speed = 0.1
				legitimacy = 0.5
			}
		}
	}
}

general_estates_reform = {
	icon = "power_across_cities"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = no
	}
	modifiers = {
		monthly_reform_progress_modifier = 0.1
		all_estate_influence_modifier = 0.05
		all_estate_loyalty_equilibrium = 0.1
	}
	custom_attributes = {
		diet_increases_not_influence = yes
	}
	ai = {
		factor = 1
	}
}

ottoman_siyasah_tax_reform = {
	icon = "government_for_people_reform"
	allow_normal_conversion = yes
	potential = {
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
		OR = {
			has_unlocked_government_reform = {
				government_reform = ottoman_siyasah_tax_reform
			}
			have_had_reform = ottoman_siyasah_tax_reform
		}
	}
	trigger = {
		religion_group = muslim
	}
	effect = {
		hidden_effect = {
			every_owned_province = {
				limit = {
					religion = ROOT
				}
				add_province_modifier = {
					name = ottoman_siyasah_tax_reform_tax
					duration = -1
				}
			}
			every_owned_province = {
				limit = {
					NOT = { religion_group = ROOT }
				}
				add_province_modifier = {
					name = ottoman_siyasah_tax_reform_manpower
					duration = -1
				}
			}
		}
	}
	removed_effect = {
		hidden_effect = {
			every_owned_province = {
				limit = {
					OR = {
						has_province_modifier = ottoman_siyasah_tax_reform_tax
						has_province_modifier = ottoman_siyasah_tax_reform_manpower
					}
				}
				remove_province_modifier = ottoman_siyasah_tax_reform_tax
				remove_province_modifier = ottoman_siyasah_tax_reform_manpower
			}
		}
	}
	modifiers = {
		global_autonomy = -0.05
		autonomy_change_time = -0.25
		num_accepted_cultures = 2
		all_estate_loyalty_equilibrium = 0.05
	}
	custom_attributes = {
		more_25_tax_in_true_faith_provinces = yes
		more_15_manpower_in_heathen_provinces = yes
		no_crownland_money_loss_to_age = yes
	}
}

legislative_sejm = {
	icon = "legislative_sejm_reform"
	allow_normal_conversion = yes
	
	potential = {
		OR = {
			has_reform = polish_elective_monarchy
			has_reform = elective_monarchy
		}
		has_dlc = "Res Publica"
	}
	
	trigger = {
		OR = {
			has_reform = polish_elective_monarchy
			has_reform = elective_monarchy
		}
	}
	
	modifiers = {
		local_heir_adm = 1
		local_heir_dip = 1
		local_heir_mil = 1
	}
	
	ai = {
		factor = 1
	}
}

integrated_sejmiks = {
	icon = "integrated_sejmiks_reform"
	allow_normal_conversion = yes
	
	potential = {
		OR = {
			has_reform = polish_elective_monarchy
			has_reform = elective_monarchy
		}
		has_dlc = "Res Publica"
	}
	
	trigger = {
		OR = {
			has_reform = polish_elective_monarchy
			has_reform = elective_monarchy
		}
	}
	
	modifiers = {
		years_of_nationalism = -5
	}
	
	ai = {
		factor = 1
	}
}

imperial_decree_reform = {
	icon = "king"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = yes
	}
	modifiers = {
		max_revolutionary_zeal = 20
	}
	ai = {
		factor = 2.5
	}
}

justicia_de_aragon_reform = {
	icon = "justicia_de_aragon"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		OR = {
			primary_culture = catalan
			primary_culture = aragonese
		}
	}
	modifiers = {
		adm_advisor_cost = -0.33
		country_admin_power = 1 
	}
}

catalan_cortes_reform = {
	icon = "catalan_cortes"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		primary_culture = catalan
	}
	modifiers = {
		all_estate_loyalty_equilibrium = 0.1
		global_autonomy = -0.025
		production_efficiency = 0.1
	}
}

great_council_of_mechelen_reform = {
	icon = "castle"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		OR = {
			primary_culture = burgundian
			has_country_flag = council_of_mechelen_flag
		}
	}
	modifiers = {
		diplomatic_annexation_cost = -0.1
		reduced_liberty_desire = 10
		governing_capacity = 150
	}
	custom_attributes = {
		no_more_dutch_revolt = yes
	}
}

strengthened_parliament_reform = {
	icon = "parliament_hall"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		has_parliament = yes
	}
	trigger = {
		has_parliament = yes
	}
	modifiers = {
		max_absolutism = -20
		development_cost_in_primary_culture = -0.1
		parliament_backing_chance = 0.05
	}
	ai = {
		factor = 10
	}
}

parliament_vs_monarchy_reform = {
	icon = "judge"
	allow_normal_conversion = no
	lock_level_when_selected = yes
	potential = {
		has_dlc = "Domination"
		has_reform = parliament_vs_monarchy_reform
	}
	
	trigger = {
		has_parliament = yes
	}

	modifiers = {
		parliament_backing_chance = -0.33
		parliament_effect_duration = -5
		parliament_debate_duration = -5
		parliament_chance_of_decision = 1
		can_revoke_parliament_seats = yes
	}

	conditional = {
		allow = { has_dlc = "Domination" }
		government_abilities = {
			parliament_vs_monarchy_mechanic
		}
	}
	ai = {
		factor = 1
	}
}

#Legitimation of Power
machiavellianistic_rule_reform = {
	icon = "machiavellianism"
	allow_normal_conversion = yes
	#potential = {
	#	OR = {
	#		is_revolutionary = no
	#		NOT = { has_dlc = "Emperor" }
	#	}
	#}
	modifiers = {
		stability_cost_to_declare_war = -1
		ae_impact = 0.15
		max_absolutism = 10
	}
	ai = {
		factor = 1
	}
}

six_livres_reform = {
	icon = "six_livres"
	allow_normal_conversion = yes
	#potential = {
	#	OR = {
	#		is_revolutionary = no
	#		NOT = { has_dlc = "Emperor" }
	#	}
	#}
	modifiers = {
		all_estate_influence_modifier = -0.05
		years_of_nationalism = -5
		global_unrest = -1
	}
	ai = {
		factor = 1
	}
}

two_treatises_reform = {
	icon = "two_treaties"
	allow_normal_conversion = yes
	#potential = {
	#	OR = {
	#		is_revolutionary = no
	#		NOT = { has_dlc = "Emperor" }
	#	}
	#}
	modifiers = {
		expand_administration_cost = -1
		can_revoke_parliament_seats = yes
		num_accepted_cultures = 1
	}
	conditional = {
		allow = { has_dlc = "Common Sense" }
		custom_attributes = {
			halved_parliament_bribes = yes
		}
	}
	ai = {
		factor = 1
	}
}

the_leviathan_reform = {
	icon = "leviathan"
	allow_normal_conversion = yes
	#potential = {
	#	OR = {
	#		is_revolutionary = no
	#		NOT = { has_dlc = "Emperor" }
	#	}
	#}
	modifiers = {
		harsh_treatment_cost = -0.33
		global_rebel_suppression_efficiency = 0.5
		reduced_liberty_desire = 10
	}
	ai = {
		factor = 1
	}
}

the_social_contract_reform = {
	icon = "the_social_contract"
	allow_normal_conversion = yes
	#potential = {
	#	OR = {
	#		is_revolutionary = no
	#		NOT = { has_dlc = "Emperor" }
	#	}
	#}
	modifiers = {
		no_religion_penalty = yes
		global_unrest = -1
	}
	custom_attributes = {
		enforced_interfaith_dialogue_buff = yes
	}
	ai = {
		factor = 1
	}
}

#absolute_rule_vs_constitutional

letat_cest_moi_reform = {
	icon = "letat_cest_moi"
	allow_normal_conversion = yes
	modifiers = {
		governing_capacity = 250
	}
	ai = {
		factor = 1.5
		modifier = {
			factor = 2
			tag = FRA
		}
	}
}

regional_representation_reform = {
	icon = "assembly_hall"
	allow_normal_conversion = yes
	modifiers = {
		min_autonomy_in_territories = -0.05
		core_creation = -0.05
	}
}

peoples_kingdom_reform = {
	icon = "peasant_republic"
	allow_normal_conversion = yes
	modifiers = {
		possible_policy = 1
	}
	ai = {
		factor = 1
	}
}

deified_monarchy_reform = {
	icon = "divine_guidance_reform"
	allow_normal_conversion = yes
	modifiers = {
		warscore_cost_vs_other_religion = -0.05
		tolerance_own = 1
	}
	ai = {
		factor = 1
	}
}

consulate_reform = {
	icon = "revolutionary_republic"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = yes
	}
	modifiers = {
		global_autonomy = -0.05
		governing_capacity = 150
	}
	ai = {
		factor = 2.5
	}
}

#separation_of_power

political_absolutism_reform = {
	icon = "judge"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = no
	}
	modifiers = {
		administrative_efficiency = 0.025
		max_absolutism = 10
	}
	ai = {
		factor = 1.5
		modifier = {
			factor = 2
			tag = FRA
		}
	}
}

legislative_houses_reform = {
	icon = "parliament_hall"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = no
	}
	modifiers = {
		free_policy = 1
	}
}

presidential_monarchy_reform = {
	icon = "queen"
	allow_normal_conversion = yes
	modifiers = {
		national_focus_years = -5
		no_stability_loss_on_monarch_death = yes
		monarch_diplomatic_power = 1
	}
}

become_a_republic_reform = {
	icon = "parliament_highlighted"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = no
	}
	trigger = {
		NOT = { has_government_attribute_short_desc = locked_government_type }
		is_emperor = no
		NOT = { is_lesser_in_union = yes }
		stability = 2
	}
	effect = {
		set_country_flag = populists_in_government
		add_stability = -3
		change_government = republic
		if = {
			limit = {
				tag = AVE
			}
			hidden_effect = {
				country_event = {
					id = flavor_gbr.20
				}
			}
		}
	}
	ai = {
		factor = 0
	}
}

install_theocratic_government_reform = {
	icon = "pope_highlighted"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = no
	}
	trigger = {
		NOT = { has_government_attribute_short_desc = locked_government_type }
		is_emperor = no
		NOT = { is_lesser_in_union = yes }
		if = {
			limit = { NOT = { has_government_attribute = theocratic_monarchy_mechanic } }
			stability = 2
		}
	}
	effect = {
		set_country_flag = populists_in_government
		if = {
			limit = { NOT = { has_government_attribute = theocratic_monarchy_mechanic } }
			add_stability = -3
		}
		change_government = theocracy
		if = {
			limit = {
				tag = AVE
			}
			hidden_effect = {
				country_event = {
					id = flavor_gbr.20
				}
			}
		}
	}
	ai = {
		factor = 0
	}
}

emperor_of_the_revolution_reform = {
	icon = "emperor_of_the_revolution_reform"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Emperor"
		is_revolutionary = yes
	}
	modifiers = {
		yearly_revolutionary_zeal = 1.5
		max_revolutionary_zeal = 10
	}
	ai = {
		factor = 2.5
	}
}

enlightened_monarchy_reform = {
	icon = "enlightened_monarchy_reform"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = yes
	}
	modifiers = {
		global_unrest = -2
		num_accepted_cultures = 2
	}
	ai = {
		factor = 2.5
	}
}

become_rev_republic_reform = {
	icon = "become_rev_republic_reform"
	allow_normal_conversion = yes

	potential = { 
		is_revolutionary = yes
	}
	
	trigger = {
		has_reform = revolutionary_empire_reform
		if = {
			limit = {
				has_dlc = "Rights of Man"
			}
			faction_influence = {
				faction = rr_girondists
				influence = 75
			}
		}
		else = {
			NOT = { stability = 2 }
		}
	}

	modifiers = {
	}
	effect = {
		if = {
			limit = { has_government_attribute = states_general_mechanic }
			set_country_flag = had_states_general_mechanic
		}
		set_country_flag = populists_in_government
		hidden_effect = {
			change_government = republic
			if = {
				limit = {
					tag = AVE
				}
				hidden_effect = {
					country_event = {
						id = flavor_gbr.20
					}
				}
			}
		}
		add_government_reform = revolutionary_republic_reform
		if = {
			limit = { has_country_flag = had_states_general_mechanic }
			country_event = { id = dutch_republic.33 }
			clr_country_flag = had_states_general_mechanic
		}
	}
	ai = {
		factor = 0
	}
}

nizam_i_cedid_reform = {
	icon = "nizam_i_cedid"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		OR = {
			tag = TUR
			tag = RUM
			has_reform = nizam_i_cedid_reform
		}
	}
	modifiers = {
		drill_gain_modifier = 0.25
		movement_speed = 0.05
		reinforce_speed = 0.15
		recover_army_morale_speed = 0.1
	}
	ai = {
		factor = 10
	}
}

mng_seal_of_the_emperor_reform = {
	icon = "mng_seal_of_the_emperor_reform"
	allow_normal_conversion = yes
	potential = {
		OR = { 
			has_reform = mng_seal_of_the_emperor_reform
			mission_completed = mng_crisis_ming_dynasty
		}
	}
	trigger = {
		OR = { 
			has_reform = mng_seal_of_the_emperor_reform
			mission_completed = mng_crisis_ming_dynasty
		}
	}
	modifiers = {
		allow_free_estate_privilege_revocation = yes 
		governing_capacity = 200 
		max_absolutism = 10 
	}
	ai = {
		factor = 10
	}
}

qng_grand_council_reform = {
	icon = "royal_court"
	allow_normal_conversion = no
	potential = {
		OR = { 
			mission_completed = qng_junji_chu
			has_reform = qng_grand_council_reform
		}
	}
	
	modifiers = {
		all_estate_loyalty_equilibrium = 0.1
		governing_capacity_modifier = 0.1
		meritocracy = 0.25	
	}
}

absolute_shogunate_reform = {
	icon = "absolute_shogunate_reform"
	allow_normal_conversion = no
	lock_level_when_selected = yes
	potential = {
		OR = {
			AND = {
				is_playing_custom_nation = yes
				has_reform = absolute_shogunate_reform
			}
			have_had_reform = absolute_shogunate_reform
			mission_completed = jap_restoration
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 100
	nation_designer_trigger = {
		capital_scope = { region = japan_region } 
	}
	fixed_rank = 3
	maintain_dynasty = yes
	modifiers = {
		can_transfer_vassal_wargoal = yes
		administrative_efficiency = 0.05
		monarch_military_power = 1
		allowed_samurai_fraction = 0.1
	}
}

japanese_divine_empire = {
	icon = "japanese_divine_empire"
	allow_normal_conversion = no
	lock_level_when_selected = yes
	potential = {
		OR = { 
			AND = {
				is_playing_custom_nation = yes
				has_reform = japanese_divine_empire
			}
			has_country_flag = JPE_gov_flag
			have_had_reform = japanese_divine_empire
			mission_completed = jap_restoration
		}
		NOT = { has_reform = absolute_shogunate_reform }
	}
	#trigger = {
	#	if = { 
	#		limit = { has_estate = estate_nobles }
	#		num_of_estate_privileges = {
	#			estate = estate_nobles 
	#			value = 6 
	#		}
	#	}
	#	if = { 
	#		limit = { has_estate = estate_burghers }
	#		num_of_estate_privileges = {
	#			estate = estate_burghers 
	#			value = 6 
	#		}
	#	}
	#	if = { 
	#		limit = { has_estate = estate_church }
	#		num_of_estate_privileges = {
	#			estate = estate_church 
	#			value = 6 
	#		}
	#	}
	#}
	valid_for_nation_designer = yes
	nation_designer_cost = 100
	nation_designer_trigger = {
		capital_scope = { region = japan_region } 
	}
	fixed_rank = 3
	maintain_dynasty = yes
	modifiers = {
		all_estate_possible_privileges = 1
		no_stability_loss_on_monarch_death = yes 
		all_estate_loyalty_equilibrium = 0.1
		tolerance_own = 3 
		allowed_samurai_fraction = 0.1
	}
}

land_christian_sun_reform = {
	icon = "land_christian_sun_reform"
	allow_normal_conversion = no
	potential = {
		OR = { 
			AND = {
				has_reform = land_christian_sun_reform
				is_playing_custom_nation = yes
			}
			have_had_reform = land_christian_sun_reform
			mission_completed = jap_spread_the_christian_faith
			has_reform = land_christian_sun_reform
		}
	}
	# trigger = {
		# OR = {
			# have_had_reform = land_christian_sun_reform
			# mission_completed = jap_spread_the_christian_faith
			# AND = {
				# have_had_reform = land_christian_sun_reform
				# is_playing_custom_nation = yes
			# }
		# }
	# }
	valid_for_nation_designer = yes
	nation_designer_cost = 150
	nation_designer_trigger = {
		capital_scope = { region = japan_region } 
	}
	heir = no
	fixed_rank = 3
	modifiers = {
		manpower_recovery_speed = 0.15
		cb_on_religious_enemies = yes 
		army_tradition = 1 
		allowed_samurai_fraction = 0.1
	}
	
	custom_attributes = {
		generals_become_rulers = yes 
	}
	
	government_abilities = {
		land_of_the_christian_sun_mechanic
	}
}

strengthen_bakuhan_system_reform = {
	icon = "strengthen_bakuhan_system_reform"
	allow_normal_conversion = no
	potential = {
		OR = { 
			have_had_reform = strengthen_bakuhan_system_reform
			mission_completed = jap_strengthen_bakuhan_system
		}
	}
	trigger = {
		OR = {
			have_had_reform = strengthen_bakuhan_system_reform
			mission_completed = jap_strengthen_bakuhan_system
		}
	}
	modifiers = {
		max_absolutism_effect = 0.2
		max_absolutism = 5
	}
}

system_of_councils_reform = {
	icon = "hispanic_monarchy"
	allow_normal_conversion = no
	potential = {
		OR = { 
			has_reform = system_of_councils_reform
			mission_completed = spa_system_councils
			AND = { 
				religion_group = christian 
				culture_group = iberian 
			}
		}
	}
	trigger = {
		OR = { 
			has_reform = system_of_councils_reform
			mission_completed = spa_system_councils
		}
	}
	government_abilities = {
		system_of_councils_mechanic
	}
	modifiers = {
		allow_free_estate_privilege_revocation = yes 
		diplomatic_upkeep = 2
		monarch_admin_power = 1 
	}
}

courts_of_navarra = {
	icon = "parliament_hall"
	allow_normal_conversion = yes
	potential = {
		OR = { 
			primary_culture = basque 
			tag = NAV 
		}
	}
	modifiers = {
		same_culture_advisor_cost = -0.2
		diplomats = 1
		global_unrest = -2
		max_absolutism = -30
		nobles_influence_modifier = -0.1
	}

	conditional = {
		allow = {
			OR = {
				has_dlc = "Domination"
				has_dlc = "Common Sense"
			}
		}
		has_parliament = yes
	}
}

cawa_auxiliary_forces = {
	icon = "cawa_auxiliary_forces"
	allow_normal_conversion = yes
	potential = {
		OR = {
			have_had_reform = cawa_auxiliary_forces
			has_country_flag = allow_cawa_auxiliary_forces_flag
		}
	}

	modifiers = {
		manpower_in_accepted_culture_provinces = 0.10
		may_return_manpower_on_disband = yes
	}

	conditional = {
		allow = {
			has_dlc = "Origins"
		}
		allow_cawa = yes
	}
}

egyptian_government_reform = {
	icon = "egyptian_government_reform"
	allow_normal_conversion = yes
	potential = {
		OR = {
			have_had_reform = egyptian_government_reform
			has_country_flag = egyptian_government_reform_flag
		}
	}
	lock_level_when_selected = yes
	valid_for_nation_designer = yes
	nation_designer_cost = 80

	nation_designer_trigger = {
		religion_group = muslim
	}

	modifiers = {
		yearly_innovativeness = 0.1
		yearly_government_power = 0.5
		
	}

	government_abilities = {
		egyptian_westernization
	}
}

gothic_monarchy_reform = {
	icon = gothic_monarchy_reform
	allow_normal_conversion = no
	potential = {
		OR = {
			has_reform = gothic_monarchy_reform
			have_had_reform = gothic_monarchy_reform
		}
	}
	trigger = {
		OR = {
			has_reform = gothic_monarchy_reform
			have_had_reform = gothic_monarchy_reform
		}
	} 
	nation_designer_trigger = {
		OR = {
			primary_culture = goths
			primary_culture = gothic_ger 
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 20

	custom_attributes = {
		enables_recruit_foreign_generals = yes
	}

	modifiers = {
		merc_maintenance_modifier = -0.15
		mercenary_manpower = 0.25
	}

	ai = {
		factor = 0
	}
}

empire_of_trebizond = {
	icon = "pronoiar_monarchy_reform"
	allow_normal_conversion = yes
	potential = {
		government = monarchy
		religion_group = christian
		tag = TRE
	}
	legacy_equivalent = feudal_monarchy
	valid_for_nation_designer = no

	modifiers = {
		unjustified_demands = -0.25
		tolerance_heathen = 1
		reverse_relation_with_heathen_religion = 10
	}

	conditional = {
		allow = {
			has_dlc = "Winds of Change"
		}
		custom_attributes = {
			can_royal_marry_heathens = yes
		}
	}
}

crusader_nobility_reform = {
	icon = "holy_state_reform"
	allow_normal_conversion = yes
	potential = {
		has_unlocked_government_reform = {
			government_reform = crusader_nobility_reform
		}
	}
	valid_for_nation_designer = no

	modifiers = {
		reverse_relation_with_heretic_religion = 10
		warscore_cost_vs_other_religion = -0.1
		nobles_loyalty_modifier = 0.1
		nobles_influence_modifier = 0.1
	}

	custom_attributes = {
		pp_on_heathen_wars = yes
	}

}