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
			theocratic_feudal_government
			imperial_government
			muslim_imperial_government
			imperial_bogomilist_government
			chinese_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 }
				is_pagan_religion = no
				NOT = { religion = paulician }
			}
			NOT = { religion = bogomilist }
			NOT = {	religion_group = muslim	}
			NAND = { 
				culture_group = tibetan_group
				OR = {
					religion = bon
					religion = buddhist
					religion = tibetan_pagan
				}
				higher_tier_than = BARON
			}
			NAND = { 
				tier = EMPEROR
				primary_title = { has_title_flag = pretender_chinese_empire }
				OR = {
					culture_group = chinese_group
					culture = khitan
					culture = tangut
					culture = jurchen
					has_character_flag = chinese_imperial_government_preserve
				}
			}
			is_patrician = no
			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
		}
		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
			bogomilist_government
			theocratic_feudal_government
			imperial_government
			muslim_imperial_government
			imperial_bogomilist_government
			chinese_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 }
				is_pagan_religion = no
				NOT = { religion = paulician }
			}
			NOT = { religion = bogomilist }
			religion_group = muslim
			NAND = { 
				tier = EMPEROR
				primary_title = { has_title_flag = pretender_chinese_empire }
				OR = {
					culture_group = chinese_group
					culture = khitan
					culture = tangut
					culture = jurchen
					has_character_flag = chinese_imperial_government_preserve
				}
			}
			is_patrician = no
			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
		}
		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
			imperial_government
			muslim_imperial_government
			imperial_bogomilist_government
			bogomilist_government
		}
		free_revoke_on_governments_religion = { # Tribal vassals of other religions can have their titles revoked for free
			tribal_government
		}
		frame_suffix = "_theocraticfeudal"
		potential = {
			NAND = {
				controls_religion = yes
				NOT = { religion_group = muslim }
				NOT = { religion = norse_pagan_reformed }
			}
			NOT = {	religion_group = muslim	}
			AND = { 
				culture_group = tibetan_group
				OR = {
					religion = bon
					religion = buddhist
					religion = tibetan_pagan
				}
				higher_tier_than = BARON
			}
			is_patrician = no
		}
		
		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
	}
	
	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
			imperial_bogomilist_government
			theocratic_feudal_government
			chinese_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 }
				is_pagan_religion = no
				NOT = { religion = paulician }
			}
			religion = bogomilist
			NAND = { 
				tier = EMPEROR
				primary_title = { has_title_flag = pretender_chinese_empire }
				OR = {
					culture_group = chinese_group
					culture = khitan
					culture = tangut
					culture = jurchen
					has_character_flag = chinese_imperial_government_preserve
				}
			}
			is_patrician = no
			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
		}
	}
	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
			imperial_government
			muslim_imperial_government
			imperial_bogomilist_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 = {
			tier = EMPEROR
			primary_title = { has_title_flag = pretender_chinese_empire }
			OR = {
				culture_group = chinese_group
				culture = khitan
				culture = tangut
				culture = jurchen
				has_character_flag = chinese_imperial_government_preserve #keeps government when player is given culture change opton
			}
			is_patrician = 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
		}
	}
	
	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
			imperial_bogomilist_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 }
				is_pagan_religion = no
				NOT = { religion = paulician }
			}
			NOT = { religion = bogomilist }
			NOT = { religion_group = muslim }
			is_patrician = no
			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
		}
	}
	
	imperial_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
			imperial_bogomilist_government
			theocratic_feudal_government
		}
		free_revoke_on_governments_religion = { # vassals of other religions can have their titles revoked for free
			tribal_government
			theocracy_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 }
			}
			religion = bogomilist
			NOT = {	religion_group = muslim	}
			is_patrician = no
			OR = {
				in_revolt = yes
				primary_title = { has_title_flag = has_imperial_administration }
				top_liege = { government = imperial_government }
			}
		}
		
		color = { 151 133 107 }
		
		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
			imperial_bogomilist_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 }
				is_pagan_religion = no
				NOT = { religion = paulician }
			}
			religion_group = muslim
			is_patrician = no
			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
		}
	}
}