decisions = {
	feudal_to_republic = {
		only_playable = yes
		ai = no
		potential = {
			is_playable = yes
			government = feudal_government
			NOT = { has_character_modifier = national_instability }
		}
		allow = {
			is_playable = yes
			war = no
			prestige = 5000
			piety = 1000
			wealth = 1000
			ruled_years = 10
			custom_tooltip = {
				text = no_negative_vassal_opinion_tt
				hidden_tooltip = {
					NOT = {
						any_realm_character = {
							limit = { vassal_of = ROOT }
							opinion = { who = ROOT value = -1 }
						}
					}
				}
			}
		}
		effect = {
			prestige = -5000
			piety = -1000
			wealth = -1000
			create_family_palace = yes
			set_government_type = merchant_republic_government
			add_character_modifier = {
				name = national_instability
				years = 5
			}
			any_realm_character = {
				limit = { vassal_of = ROOT }
				if = {
					limit = {
						OR = {
							government = merchant_republic_government
							government = republic_government
						}
					}
					opinion = {
						modifier = opinion_dissolved_the_monarchy_republic
						who = ROOT
						years = 10
					}
				}
				if = {
					limit = {
						NOT = {
							OR = {
								government = merchant_republic_government
								government = republic_government
							}
						}
					}
					opinion = {
						modifier = opinion_dissolved_the_monarchy_feudal
						who = ROOT
						years = 10
					}
				}
			}
		}
		ai_will_do = {
			factor = 0
		}
	}
	republic_to_feudal = {
		only_playable = yes
		ai = no
		potential = {
			is_playable = yes
			government = merchant_republic_government
			NOT = { has_character_modifier = national_instability }
		}
		allow = {
			is_playable = yes
			war = no
			prestige = 5000
			piety = 1000
			wealth = 1000
			ruled_years = 10
			custom_tooltip = {
				text = no_negative_vassal_opinion_tt
				hidden_tooltip = {
					NOT = {
						any_realm_character = {
							limit = { vassal_of = ROOT }
							opinion = { who = ROOT value = -1 }
						}
					}
				}
			}
		}
		effect = {
			prestige = -5000
			piety = -1000
			wealth = -1000
			any_demesne_title = {
				limit = { tier = BARON holding_type = family_palace }
				create_character = { random_traits = no dynasty = random age = 99 }
				grant_title = new_character
				new_character = { death = { death_reason = death_old_age } }
			}
			set_government_type = feudal_government
			add_character_modifier = {
				name = national_instability
				years = 5
			}
			any_realm_character = {
				limit = { vassal_of = ROOT }
				if = {
					limit = {
						OR = {
							government = merchant_republic_government
							government = republic_government
						}
					}
					opinion = {
						modifier = opinion_destroyed_the_republic_republic
						who = ROOT
						years = 10
					}
				}
				if = {
					limit = {
						NOT = {
							OR = {
								government = merchant_republic_government
								government = republic_government
							}
						}
					}
					opinion = {
						modifier = opinion_destroyed_the_republic_feudal
						who = ROOT
						years = 10
					}
				}
			}
		}
		ai_will_do = {
			factor = 0
		}
	}
}
