feudal_governments = {

	feudal_government = {
		preferred_holdings = { CASTLE }
		allowed_holdings = { 
			CASTLE 
			FORT
			HOSPITAL
		}
		allowed_holdings_culture = { # Will not get the wrong government type penalty for tribes of the same culture
			TRIBAL
		}
		accepts_liege_governments = { # Gets the wrong religion modifier instead
			muslim_government
			mane_government
			theocratic_feudal_government
		}
		free_revoke_on_governments_religion = { # Tribal vassals of other religions can have their titles revoked for free
			#tribal_government
		}
		potential = {
			NAND = {
				controls_religion = yes
				NOT = { religion = pyandoneaic } #"Caliphate"
			}
			NOT = {
				primary_title = {
					OR = {
						title = e_cyrodiil
						title = e_tamriel
					}
				}
			}
			NOT = { is_government_potential = roman_imperial_government }
			NOT = { is_government_potential = order_government }
			NOT = { is_government_potential = technocratic_feudal }
			is_patrician = no
			NAND = {
				culture = orsimer
				religion = daedra_malacath
			}
			NAND = {
				culture = tsaesci
				religion = five_courts
				mercenary = no
				holy_order = no
			}
			OR = {
				is_save_game = yes
				NOT = { any_demesne_title = { title = k_colovia } }
			}
			OR = {
				is_save_game = yes
				NOT = {
					any_demesne_title = { title = k_heartlands }
				}
			}
			#NAND = {
			#	primary_title = {
			#		title = e_tamriel
			#	}
			#}
			NOT = { is_government_potential = undead_government }
		}
		
		color = { 91 133 207 }
		vassal_call_to_arms = {
			tribal_government
		}
		
		dukes_called_kings = yes
		barons_need_dynasty = yes

		can_build_tribal = no
		
		ignore_in_vassal_limit_calculation = {
			tribal_government
		}
		capital_move_delay = 600
	}
	
	muslim_government = {
		preferred_holdings = { CASTLE }
		allowed_holdings = { 
			CASTLE
			TEMPLE
			FORT
			HOSPITAL
		}
		allowed_holdings_culture = { # Will not get the wrong government type penalty for tribes of the same culture
			TRIBAL
		}
		accepts_liege_governments = { # Gets the wrong religion modifier instead
			feudal_government
			theocratic_feudal_government
		}
		free_revoke_on_tiers = {
			duke
		}
		free_revoke_on_governments_religion = { # Tribal vassals of other religions can have their titles revoked for free
			tribal_government
		}
		frame_suffix = "_iqta"
		potential = {
			NAND = {
				controls_religion = yes
				#NOT = { religion_group = muslim }
				#NOT = { religion = norse_pagan_reformed }
			}
			NOT = { is_government_potential = roman_imperial_government }
			NOT = { is_government_potential = order_government }
			always = no
			is_patrician = no
		}
		
		color = { 10 138 57 }
		
		uses_decadence = yes
		uses_piety_for_law_change = yes
		
		dukes_called_kings = yes
		barons_need_dynasty = yes
		have_gender_laws = no
		allows_matrilineal_marriage = no
		free_retract_vassalage = yes

		free_levies_in_offensive_war = yes # Took away the hardcoded stuff for muslims where they could raise levies without pissing off vassals if in an offensive war.

		can_build_tribal = no
		
		ignore_in_vassal_limit_calculation = {
			tribal_government
		}
		capital_move_delay = 600
	}
	
	theocratic_feudal_government = {
		preferred_holdings = { CASTLE TEMPLE }
		allowed_holdings = { 
			CASTLE 
			TEMPLE
			FORT
			HOSPITAL
		}
		allowed_holdings_culture = { # Will not get the wrong government type penalty for tribes of the same culture
			TRIBAL
		}
		accepts_liege_governments = { # Gets the wrong religion modifier instead
			muslim_government
			theocracy_government
			feudal_government
		}
		free_revoke_on_governments_religion = { # Tribal vassals of other religions can have their titles revoked for free
			tribal_government
		}
		frame_suffix = "_theocraticfeudal"
		potential = {
			controls_religion = yes
			higher_tier_than = BARON
			NOT = { is_government_potential = roman_imperial_government }
			NOT = { is_government_potential = order_government }
			is_patrician = no
			religion = pyandoneaic
		}
		
		color = { 207 145 90 }
		
		uses_piety_for_law_change = yes
		dukes_called_kings = yes
		barons_need_dynasty = yes

		can_build_tribal = no
		
		ignore_in_vassal_limit_calculation = {
			tribal_government
		}
		capital_move_delay = 600
	}
	
	chinese_imperial_government = {
		preferred_holdings = { CASTLE CITY }
		allowed_holdings = {
			CASTLE
			CITY
			FORT
			HOSPITAL
		}
		allowed_holdings_culture = { # Will not get the wrong government type penalty for tribes of the same culture
			TRIBAL
		}
		accepts_liege_governments = { # Gets the wrong religion modifier instead
			feudal_government
			muslim_government
			theocratic_feudal_government
		}
		free_revoke_on_tiers = {
			duke
		}
		free_revoke_on_governments_religion = { # Tribal vassals of other religions can have their titles revoked for free
			tribal_government
		}
		frame_suffix = "_chineseimperial"
		potential = {
			always = no
		}
		
		color = { 118 255 163 }

		barons_need_dynasty = yes

		can_build_tribal = no
		
		ignore_in_vassal_limit_calculation = {
			tribal_government
		}
		capital_move_delay = 200
		
		can_usurp_kingdoms_and_empires = no
		can_create_empires = no
		can_demand_religious_conversion = no
		gets_religion_opinion_penalties = no
		gives_religion_opinion_penalties = no
		vassal_government_opinion_penalties = no
		can_grant_kingdoms_and_empires_to_other_government_group = yes
		free_retract_vassalage = yes
		
		vassal_limit = 10
		
		character_modifier = {
			monthly_character_piety = 1
		}
	}

	order_government = {
		preferred_holdings = { CASTLE }
		allowed_holdings = {
			CASTLE
			TRIBAL
			FORT
			HOSPITAL
			TEMPLE
		}
		accepts_liege_governments = {
			feudal_government
			muslim_government
			theocracy_government
			theocratic_feudal_government
			imperial_commune_government
			reformed_imperial_commune_government
		}
		free_revoke_on_governments = {
			order_government
		}
		free_revoke_on_tiers = {
			BARON
		}

		forced_contract = {
			order_government
		}

		frame_suffix = "_order"
		title_prefix = "order_"

		potential = {
			OR = {
				holy_order = yes
				AND = {
					any_liege = {
						holy_order = yes
						religion = ROOT
					}
					ai = yes
					NAND = { 
						is_government_potential = merchant_republic_government 
						OR = {
							tier = DUKE
							is_patrician = yes
						}
						any_demesne_province = {
							any_province_holding = {
								OR = {
									AND = {
										tier = BARON
										holding_type = family_palace
									}
									AND = {
										NOT = {
											tier = BARON
										}
										holding_type = city
									}
								}
							}
						}
					}
				}
			}
			NOT = { is_government_potential = undead_government }
		}

		color = { 169 169 169 }

		#have_gender_laws = no
		can_create_kingdoms = no
		can_create_empires = no
		can_imprison_without_reason = no
		can_revoke_without_reason = no
		dukes_called_kings = yes
		barons_need_dynasty = yes
		can_usurp_kingdoms_and_empires = no
		can_grant_kingdoms_and_empires_to_other_government = no
		can_be_granted_kingdoms_and_empires_by_other_government = no
		can_inherit = no
		free_retract_vassalage = yes
	}
	roman_imperial_government = {
		preferred_holdings = { CASTLE }
		allowed_holdings = {
			CASTLE
			CITY
			FORT
			HOSPITAL
		}
		allowed_holdings_culture = { # Will not get the wrong government type penalty for tribes of the same culture
			TRIBAL
		}
		accepts_liege_governments = { # Gets the wrong religion modifier instead
			feudal_government
			republic_government
			merchant_republic_government
			confederacy_government
			mane_government
		}
		free_revoke_on_governments_religion = { # Tribal vassals of other religions can have their titles revoked for free
			tribal_government
		}
		frame_suffix = "_tamriel"
		potential = {
			OR = { 
				AND = { 
					is_save_game = no
					has_game_started = no
					primary_title = { 
						OR = { 
							title = e_cyrodiil
							title = e_tamriel
						}
					}
				}
				primary_title = {
					OR = { 
						title = e_cyrodiil
						title = e_tamriel
					}
					#has_law = succ_imperial_elder_council
				}
			}
			is_patrician = no
			NOT = { is_government_potential = undead_government }
		}
		
		color = { 150 0 0 }

		barons_need_dynasty = yes

		can_build_tribal = no
		
		ignore_in_vassal_limit_calculation = {
			tribal_government
		}
		capital_move_delay = 200
		
		can_usurp_kingdoms_and_empires = no
		can_imprison_without_reason = no
		can_create_empires = no
		vassal_government_opinion_penalties = no
		can_grant_kingdoms_and_empires_to_other_government_group = yes
		can_be_granted_kingdoms_and_empires_by_other_government = no
		free_retract_vassalage = yes
	}
	
	hagraven_coven_government = {
		preferred_holdings = { CASTLE TEMPLE }
		allowed_holdings = { 
			CASTLE 
			FORT
			HOSPITAL
			TEMPLE
		}
		allowed_holdings_culture = { # Will not get the wrong government type penalty for tribes of the same culture
			TRIBAL
		}
		accepts_liege_governments = { # Gets the wrong religion modifier instead
			muslim_government
			mane_government
			theocratic_feudal_government
		}
		free_revoke_on_governments_religion = { # Tribal vassals of other religions can have their titles revoked for free
			#tribal_government
		}
		potential = {
			always = no
			trait = hagraven
			OR = {
				tier = KING
				has_landed_title = d_hagraven
			}
			NOT = {
				primary_title = {
					OR = {
						title = e_cyrodiil
						title = e_tamriel
					}
				}
			}
			NOT = { is_government_potential = roman_imperial_government }
			NOT = { is_government_potential = order_government }
			is_patrician = no
			# Cult of Malacath
			NAND = {
				culture = orsimer
				religion = daedra_malacath
			}
			# Tsaesci Theocracy
			NAND = {
				culture = tsaesci
				religion = five_courts
				mercenary = no
				holy_order = no
			}
			# Confederacy
			OR = {
				is_save_game = yes
				NOT = { any_demesne_title = { title = k_colovia } }
			}
			# Imperial Commune
			OR = {
				is_save_game = yes
				NOT = {
					any_demesne_title = { title = k_heartlands }
				}
			}
			#NAND = {
			#	primary_title = {
			#		title = e_tamriel
			#	}
			#}
			NOT = { is_government_potential = undead_government }
		}
		
		color = { 10 50 70 }
		
		vassal_call_to_arms = {
			tribal_government
		}
		
		dukes_called_kings = yes
		barons_need_dynasty = yes

		can_build_tribal = no
		
		ignore_in_vassal_limit_calculation = {
			tribal_government
		}
		capital_move_delay = 600
	}
}