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
			NW_government
			military_command_government
			military_command_government_city
			feudal_government_LP
			colony_government
			noble_oligarchy
			#muslim_government
		}
		free_revoke_on_governments_religion = { # Tribal vassals of other religions can have their titles revoked for free
			#tribal_government
		}
		free_revoke_on_governments = { 
			military_command_government
			military_command_government_city
			outlaw_government
			pirate_government
		}
		potential = {
			OR = {
				controls_religion = no
				has_landed_title = c_thenn_rel
				has_religion_feature = religion_temporal_head
				has_religion_feature = religion_god_king_head
			}	
			is_patrician = no
			NOR = { # Conditions for other governments
				trait = nightswatch
				trait = kingsguard
				culture = ruin
				is_government_potential = winter_government
				religion = pirate
				religion = corsair
				is_government_potential = alliance_government
				is_government_potential = military_command_government
				is_government_potential = military_command_government_city
				is_government_potential = feudal_government_LP
				is_government_potential = wildling_feudal_government
				is_government_potential = noble_oligarchy
				is_government_potential = outlaw_government
				is_government_potential = order_government
				is_government_potential = colony_government
			}
		}
		
		color = { 91 133 207 }
		
		#dukes_called_kings = yes
		barons_need_dynasty = yes

		can_build_tribal = no
		
		ignore_in_vassal_limit_calculation = {
			#tribal_government
			KG_government
		}
		capital_move_delay = 600
		
		court_size_modifier = 5
	}
	
	NW_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
		}
		free_revoke_on_governments_religion = { # Tribal vassals of other religions can have their titles revoked for free
			#tribal_government
		}
		free_revoke_on_governments = { 
			military_command_government
			military_command_government_city
			outlaw_government
			pirate_government
		}
		potential = {
			controls_religion = no
			is_patrician = no
			trait = nightswatch
		}
		
		color = { 20 20 20 }
		
		have_gender_laws = no
		barons_need_dynasty = no
		title_prefix = "NW_"
		frame_suffix = "_NW"

		can_build_city = no
		can_build_temple = no
		can_build_tribal = no
		free_levies_in_offensive_war = yes
		allow_looting = no
		can_create_kingdoms = no
		can_create_empires = no
		gives_religion_opinion_penalties = no
		gets_religion_opinion_penalties = no
		
		ignore_in_vassal_limit_calculation = {
			#tribal_government
		}
		capital_move_delay = 600
		
		court_size_modifier = 10
	}
	
	KG_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
			feudal_government
			feudal_government_LP
			colony_government
			noble_oligarchy
			alliance_government
			republic_government
			merchant_republic_government
			triarch_merchant_republic_government
			theocracy_government
			wildling_feudal_government
			nomadic_government
			#muslim_government
		}
		free_revoke_on_governments_religion = { # Tribal vassals of other religions can have their titles revoked for free
			#tribal_government
		}
		free_revoke_on_governments = { 
			military_command_government
			military_command_government_city
			outlaw_government
			pirate_government
		}
		potential = {
			controls_religion = no
			is_patrician = no
			trait = kingsguard
		}
		
		color = { 255 255 255 }
		
		have_gender_laws = no
		barons_need_dynasty = no
		title_prefix = "KG_"
		frame_suffix = "_KG"

		can_build_city = no
		can_build_temple = no
		can_build_tribal = no
		can_create_kingdoms = no
		can_create_empires = no
		can_imprison_without_reason = no
		can_be_granted_kingdoms_and_empires_by_other_government = no
		gives_religion_opinion_penalties = no
		
		ignore_in_vassal_limit_calculation = {
			#tribal_government
		}
		capital_move_delay = 600
		
		court_size_modifier = 5
	}
	
	ruin_government = {
		preferred_holdings = { 
			CASTLE
			CITY
			TEMPLE
			TRIBAL			
		}
		allowed_holdings = { 
			CASTLE 
			CITY
			TEMPLE
			TRIBAL
		}
		potential = {
			culture = ruin
		}
		
		color = { 120 120 120 }
		barons_need_dynasty = no
		have_gender_laws = no
		
		frame_suffix = "_tribal" #Brown

		can_build_castle = no
		can_build_tribal = no
		can_build_city = no
		can_build_temple = no
		can_build_forts = no
		can_imprison_without_reason = no
		can_revoke_without_reason = no
		can_create_kingdoms = no
		can_create_empires = no
		can_be_granted_kingdoms_and_empires_by_other_government = no
		can_inherit = no
		
		ignore_in_vassal_limit_calculation = {
			ruin_government
		}
		capital_move_delay = 10
	}
	
	pirate_government = {
		preferred_holdings = { CASTLE }
		allowed_holdings = { 
			CASTLE 
			FORT
			CITY
			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
			#feudal_government_LP
			#colony_government
			#merchant_republic_government
			#republic_government
			#triarch_merchant_republic_government
			#military_command_government
			#military_command_government_city
			#noble_oligarchy
			#theocracy_government
			#wildling_feudal_government
			#nomadic_government
		}
		free_revoke_on_governments_religion = { # Tribal vassals of other religions can have their titles revoked for free
			#tribal_government
		}
		free_revoke_on_governments = { 
			military_command_government
			military_command_government_city
		}
		potential = {
			OR = {
				controls_religion = no
				has_landed_title = c_thenn_rel
				has_religion_feature = religion_temporal_head
				has_religion_feature = religion_god_king_head
			}
			is_patrician = no	
			OR = {
				religion = pirate
				religion = corsair
			}
			NOT = { is_offmap_governor = yes }
		}
		
		color = { 57 174 119 }
		
		frame_suffix = "_iqta" #Green
		title_prefix = "pirate_"
		
		allow_looting = yes
		
		# allow_rivermovement = yes
		# defensive_attrition = yes
		# peace_prestige_loss = yes
		# raised_vassal_opinion_loss = no
		# independence_war_score_bonus = 30
		# aggression = 4.0		
		max_consorts = 20
		
		have_gender_laws = no
		barons_need_dynasty = yes
		free_levies_in_offensive_war = yes
		gets_religion_opinion_penalties = no 
		
		can_build_tribal = no
		
		ignore_in_vassal_limit_calculation = {
			#tribal_government
		}
		capital_move_delay = 600
	}
	
	alliance_government = {
		preferred_holdings = { CASTLE }
		allowed_holdings = { 
			CITY
			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
			noble_oligarchy
			republic_government
			merchant_republic_government
			triarch_merchant_republic_government
		}
		free_revoke_on_governments_religion = { # Tribal vassals of other religions can have their titles revoked for free
		}
		free_revoke_on_governments = { 
			military_command_government
			military_command_government_city
			outlaw_government
			pirate_government
		}
		potential = {
			OR = {
				controls_religion = no
				has_landed_title = c_thenn_rel
				has_religion_feature = religion_temporal_head
				has_religion_feature = religion_god_king_head
			}
			is_patrician = no
			tier = EMPEROR
			OR = {
				AND = {
					has_landed_title = e_three_daughters
					has_game_started = no
				}
				any_demesne_title = {
					tier = EMPEROR
					has_title_flag = alliance_government
				}
			}
			NOT = { is_offmap_governor = yes }
		}
		
		color = { 207 77 215 }
		
		title_prefix = "alliance_"
		frame_suffix = "_republic"
		
		#dukes_called_kings = yes
		barons_need_dynasty = yes

		can_build_tribal = no
		can_imprison_without_reason = no
		can_revoke_without_reason = no
		can_create_kingdoms = no
		
		ignore_in_vassal_limit_calculation = {
			#tribal_government
		}
		capital_move_delay = 600
		
		court_size_modifier = 5
	}
	
	military_command_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
			feudal_government
			feudal_government_LP
			colony_government
			noble_oligarchy
			alliance_government
			republic_government
			merchant_republic_government
			triarch_merchant_republic_government
			theocracy_government
			wildling_feudal_government
			nomadic_government
			#muslim_government
		}
		free_revoke_on_governments_religion = { # Tribal vassals of other religions can have their titles revoked for free
			#tribal_government
		}
		free_revoke_on_governments = { 
			military_command_government
			military_command_government_city
			outlaw_government
			pirate_government
		}
		potential = {
			OR = {
				controls_religion = no
				has_landed_title = c_thenn_rel
				has_religion_feature = religion_temporal_head
				has_religion_feature = religion_god_king_head
			}
			is_patrician = no
			NOT = { trait = nightswatch }
			primary_title = {
				has_title_flag = military_command
				OR = {
					holder_scope = { independent = no }
					check_variable = { which = "de_facto_empire" value = 1 }		
				}
			}
			NOT = { is_offmap_governor = yes }
		}
		
		color = { 101 79 109 }
		
		have_gender_laws = no
		barons_need_dynasty = no
		title_prefix = "command_"
		frame_suffix = "_NW"

		can_build_temple = no
		can_build_tribal = no
		
		ignore_in_vassal_limit_calculation = {
			#tribal_government
		}
		capital_move_delay = 600
	}
	
	feudal_government_LP = {
		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
			NW_government
			military_command_government
			military_command_government_city
			feudal_government
			noble_oligarchy
			colony_government
			#muslim_government
		}
		free_revoke_on_governments_religion = { # Tribal vassals of other religions can have their titles revoked for free
			#tribal_government
		}
		free_revoke_on_governments = { 
			military_command_government
			military_command_government_city
			outlaw_government
			pirate_government
		}
		potential = {
			OR = {
				controls_religion = no
				has_landed_title = c_thenn_rel
				has_religion_feature = religion_temporal_head
				has_religion_feature = religion_god_king_head
			}
			is_patrician = no
			NOT = { trait = nightswatch }
			OR = {
				is_offmap_governor = yes
				primary_title = {
					higher_tier_than = DUKE
					check_variable = { which = "lord_paramount_status" value = 0.9 } #1 = lord paramount, 2 = interregnum
				}
				AND = {
					has_game_started = no
					primary_title = {
						OR = {
							title = k_north
							title = k_riverlands
							title = k_vale
							title = k_westerlands
							title = k_reach
							title = k_stormlands
							AND = {
								title = k_dorne
								ROOT = { NOT = { dynasty = 1 } }
							}	
							title = k_iron_isles
							title = k_crownlands
						}
					}
				}
			}	
			NOT = { is_government_potential = noble_oligarchy }
			NOT = { is_government_potential = order_government }

		}
		
		color = { 91 133 207 }
		
		title_prefix = "LP_"
		#dukes_called_kings = yes
		barons_need_dynasty = yes

		can_build_tribal = no
		
		ignore_in_vassal_limit_calculation = {
			#tribal_government
			KG_government
		}
		capital_move_delay = 600
		
		court_size_modifier = 5
	}

	wildling_feudal_government = {
		preferred_holdings = { CASTLE }
		allowed_holdings = { 
			CASTLE 
			FORT
		}
		allowed_holdings_culture = { # Will not get the wrong government type penalty for tribes of the same culture
			#TRIBAL
		}
		accepts_liege_governments_culture = { # Tribals have no opinion penalty towards their liege if of the same culture
			feudal_government
			feudal_government_LP
			colony_government
			alliance_government
			republic_government
			merchant_republic_government
			triarch_merchant_republic_government
			theocracy_government
			noble_oligarchy
			#muslim_government
		}
		free_revoke_on_governments = { 
			military_command_government
			military_command_government_city
		}
		builds_with_prestige = {
			CASTLE
		}
		frame_suffix = "_tribal"
		#title_prefix = "tribal_"
		potential = {
			OR = {
				controls_religion = no
				has_landed_title = c_thenn_rel
				has_religion_feature = religion_temporal_head
				has_religion_feature = religion_god_king_head
			}
			is_patrician = no
			OR = {
				wildling_culture_trigger = yes
				#culture = skagosi
				culture = moon_clansman
				trait = wildling
				AND = {
					OR = {
						culture = dothraki
						culture = jogos_nhai
					}
					NOT = { demesne_size = 1 }
				}
				AND = {
					culture = shadowlander
					capital_scope = { culture = shadowlander }
				}
			}
			NOT = { is_offmap_governor = yes }
		}
		
		color = { 92 31 23 }
		
		allow_looting = yes
		can_build_castle = yes
		can_build_city = no
		can_build_temple = yes
		can_build_tribal = no
		can_build_hospitals = no
		capital_move_delay = 600
	}
	
	noble_oligarchy = { #Qarth
		preferred_holdings = { CASTLE }
		allowed_holdings = { 
			CASTLE 
			FORT
			HOSPITAL
			CITY
		}
		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
			#feudal_government_LP
			colony_government
			alliance_government
			republic_government
			merchant_republic_government
			triarch_merchant_republic_government
			#NW_government
			#military_command_government
			#military_command_government_city
		}
		free_revoke_on_governments_religion = { # Tribal vassals of other religions can have their titles revoked for free
			#tribal_government
		}
		free_revoke_on_governments = { 
			military_command_government
			military_command_government_city
			outlaw_government
			pirate_government
		}
		potential = {
			is_patrician = no
			NOT = { trait = nightswatch }
			OR = {
				primary_title = {
					has_law = republic_law_oligarchy
				}
				AND = {
					has_game_started = no				
					primary_title = { 
						OR = {
							title = k_qarth 
							AND = {
								title = k_ibben
								start_date = 7886.1.1
							}
							title = k_essaria
							title = k_skahazadhan
							has_title_flag = alt_start_oligarchy
							AND = {
								title = e_new_valyria
								NOT = { start_date = 7886.1.1 }
							}
						}	
					}
					is_nomadic = no
					is_tribal = no
				}
			}	
			NOT = { 
				primary_title = { 
					OR = {
						has_law = republic_law_0
						has_law = republic_law_1 
					}	
				}
			}
			NOT = { is_offmap_governor = yes }
			NOT = { is_government_potential = order_government }
		}
		
		color = { 17 10 166 }
		
		title_prefix = "oligarchy_"
		frame_suffix = "_oligarchy"
		#dukes_called_kings = yes
		barons_need_dynasty = yes

		can_build_tribal = no
		
		ignore_in_vassal_limit_calculation = {
			#tribal_government
			KG_government
		}
		capital_move_delay = 600
		
		court_size_modifier = 5
	}
	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
			theocracy_government
			NW_government
			military_command_government
			military_command_government_city
			feudal_government
			feudal_government_LP
			colony_government
			noble_oligarchy
		}
		free_revoke_on_governments_religion = { # Tribal vassals of other religions can have their titles revoked for free
			#tribal_government
		}
		free_revoke_on_governments = { 
			military_command_government
			military_command_government_city
			outlaw_government
			pirate_government
		}
		frame_suffix = "_theocracy"
		title_prefix = "temple_"
		potential = {
			religion = bearded_priests
			#controls_religion = yes
			is_patrician = no	
			NOT = { is_offmap_governor = yes }
		}
		
		color = { 207 145 90 }
		
		uses_piety_for_law_change = yes
		barons_need_dynasty = no
		have_gender_laws = no
		can_be_granted_kingdoms_and_empires_by_other_government = no
		
		can_build_tribal = no
		
		ignore_in_vassal_limit_calculation = {
			#tribal_government
			KG_government
		}
		capital_move_delay = 600
		
		court_size_modifier = 5
	}
	
	outlaw_government = {
		preferred_holdings = { CASTLE }
		allowed_holdings = { 
			CASTLE 
			FORT
		}
		allowed_holdings_culture = { # Will not get the wrong government type penalty for tribes of the same culture
			#TRIBAL
		}
		accepts_liege_governments_culture = { # Tribals have no opinion penalty towards their liege if of the same culture
			feudal_government
			feudal_government_LP
			colony_government
			alliance_government
			republic_government
			merchant_republic_government
			triarch_merchant_republic_government
			theocracy_government
			noble_oligarchy
			wildling_feudal_government
			#muslim_government
		}
		free_revoke_on_governments = { 
			military_command_government
			military_command_government_city
		}
		builds_with_prestige = {
			CASTLE
		}
		frame_suffix = "_tribal"
		#title_prefix = "tribal_"
		potential = {
			NOT = { demesne_size = 1 }
			primary_title = { has_title_flag = outlaw_title }
		}
		
		color = { 92 31 23 }
		
		allow_looting = yes
		can_build_castle = yes
		can_build_city = no
		can_build_temple = yes
		can_build_tribal = no
		can_build_hospitals = no
		capital_move_delay = 600
	}
	order_government = {
		preferred_holdings = { CASTLE }
		allowed_holdings = {
			CASTLE
			TEMPLE
			TRIBAL
			FORT
			HOSPITAL
		}
		accepts_liege_governments = {
			feudal_government
			NW_government
			military_command_government
			military_command_government_city
			feudal_government_LP
			colony_government
			noble_oligarchy
			theocracy_government
			theocratic_feudal_government
		}
		free_revoke_on_governments = {
			order_government
		}
		free_revoke_on_tiers = {
			BARON
		}

		forced_contract = {
			order_government
		}

		frame_suffix = "_order"
		title_prefix = "order_"

		potential = {
			NOT = { is_government_potential = theocratic_feudal_government }
			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
									}
								}
							}
						}
					}
				}
			}
		}

		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
	}
	
	colony_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
			NW_government
			military_command_government
			military_command_government_city
			feudal_government
			noble_oligarchy
			#muslim_government
		}
		free_revoke_on_governments_religion = { # Tribal vassals of other religions can have their titles revoked for free
			#tribal_government
		}
		free_revoke_on_governments = { 
			military_command_government
			military_command_government_city
			outlaw_government
			pirate_government
		}
		potential = {
			OR = {
				controls_religion = no
				has_landed_title = c_thenn_rel
				has_religion_feature = religion_temporal_head
				has_religion_feature = religion_god_king_head
			}
			is_patrician = no
			NOT = { trait = nightswatch }
			any_demesne_title = {
				NOT = { tier = BARON }
				has_title_flag = valyria_colony
			}
			OR = {
				government = colony_government
				top_liege = { is_valyrian_freehold_trigger = yes }
			}
			NOT = { is_government_potential = noble_oligarchy }
			NOT = { is_government_potential = order_government }

		}
		
		color = { 91 133 207 }
		
		title_prefix = "LP_"
		#dukes_called_kings = yes
		#barons_need_dynasty = yes

		can_build_tribal = no
		
		ignore_in_vassal_limit_calculation = {
			#tribal_government
			KG_government
		}
		capital_move_delay = 600
		
		character_modifier = {
			demesne_size = 1
		}
		
		court_size_modifier = 5
	}	

    winter_government = {
		preferred_holdings = { CASTLE }
		allowed_holdings = { 
			CASTLE 
			CITY
			TEMPLE
			TRIBAL
		}
		potential = {
			#controls_religion = no
			#is_patrician = no
			culture_group = winter_group
			NOT = { winter_group = { has_flag = no_winter_gov } }
		}
		
		color = { 128 255 255 }
		
		barons_need_dynasty = no
		have_gender_laws = no
		
		frame_suffix = "_winter"

		can_build_castle = no
		can_build_tribal = no
		can_build_city = no
		can_build_temple = no
		can_build_forts = no
		can_build_hospitals = no
		free_levies_in_offensive_war = yes
		
		ignore_in_vassal_limit_calculation = {
			winter_government
		}
		capital_move_delay = 10
	}
}