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
			bogomilist_government
			imperial_government
			muslim_imperial_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_group = muslim }
				NOT = { religion_group = pagan_group }
				NOT = { religion = paulician }
			}
			NOT = { religion = bogomilist }
			NOT = {	religion_group = muslim	}
			is_patrician = no
			OR = {
				primary_title = { has_title_flag = viceroy_exemption }
				NOR = {
					primary_title = { has_title_flag = has_imperial_administration }
					top_liege = { government = imperial_government }
				}
			}
		}
		
		color = { 91 133 207 }
		
		dukes_called_kings = yes
		barons_need_dynasty = yes

		can_build_tribal = no
		
		ignore_in_vassal_limit_calculation = {
			tribal_government
		}
	}
	
	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
			bogomilist_government
			imperial_government
			muslim_imperial_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_group = pagan_group }
				NOT = { religion = paulician }
			}
			NOT = { religion = bogomilist }
			religion_group = muslim
			is_patrician = no
			OR = {
				primary_title = { has_title_flag = viceroy_exemption }
				NOR = {
					primary_title = { has_title_flag = has_imperial_administration }
					top_liege = { government = imperial_government }
				}
			}
		}
		
		color = { 10 138 57 }
		
		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
		}
	}
	
	bogomilist_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
			feudal_government
			imperial_government
			muslim_imperial_government
		}
		free_revoke_on_governments_religion = { # vassals of other religions can have their titles revoked for free
			tribal_government
			theocracy_government
		}
		potential = {
			NAND = {
				controls_religion = yes
				NOT = { religion_group = muslim }
				NOT = { religion_group = pagan_group }
				NOT = { religion = paulician }
			}
			religion = bogomilist
			NOT = {	religion_group = muslim	}
			is_patrician = no
			OR = {
				primary_title = { has_title_flag = viceroy_exemption }
				NOR = {
					primary_title = { has_title_flag = has_imperial_administration }
					top_liege = { government = imperial_government }
				}
			}
		}
		
		color = { 121 103 77 }
		
		dukes_called_kings = yes
		barons_need_dynasty = yes

		can_build_tribal = no
		
		ignore_in_vassal_limit_calculation = {
			tribal_government
		}
	}
	
	imperial_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
			bogomilist_government
			feudal_government
			imperial_government
			muslim_imperial_government
		}
		free_revoke_on_governments_religion = { # Tribal vassals of other religions can have their titles revoked for free
			tribal_government
		}
		free_revoke_on_tiers = {
			duke
			king
		}
		frame_suffix = "_imperial"
		title_prefix = "imperial_"
		potential = {
			NAND = {
				controls_religion = yes
				NOT = { religion_group = muslim }
				NOT = { religion_group = pagan_group }
				NOT = { religion = paulician }
			}
			NOT = { religion_group = muslim }
			is_patrician = no
			NOT = { primary_title = { has_title_flag = viceroy_exemption } }
			OR = {
				in_revolt = yes
				primary_title = { has_title_flag = has_imperial_administration }
				top_liege = { government = imperial_government }
			}
		}
		
		color = { 176 52 253 }
		
		dukes_called_kings = yes
		barons_need_dynasty = yes

		can_build_tribal = no
		
		ignore_in_vassal_limit_calculation = {
			tribal_government
		}
	}
	
	muslim_imperial_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
			muslim_government
			bogomilist_government
			feudal_government
			imperial_government
			muslim_imperial_government
		}
		free_revoke_on_governments_religion = { # Tribal vassals of other religions can have their titles revoked for free
			tribal_government
		}
		free_revoke_on_tiers = {
			duke
			king
		}
		frame_suffix = "_imperial"
		title_prefix = "almulk_"
		potential = {
			NAND = {
				controls_religion = yes
				NOT = { religion_group = muslim }
				NOT = { religion_group = pagan_group }
				NOT = { religion = paulician }
			}
			religion_group = muslim
			is_patrician = no
			NOT = { primary_title = { has_title_flag = viceroy_exemption } }
			OR = {
				in_revolt = yes
				primary_title = { has_title_flag = has_imperial_administration }
				top_liege = { government = imperial_government }
			}
		}

		color = { 76 152 153 }
		
		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
		}
	}
}