republic_governments = {

	merchant_republic_government = {
		preferred_holdings = { CITY }
		allowed_holdings = { 
			TRADE_POST
			CITY
			FAMILY_PALACE
			FORT
		}
		accepts_liege_governments = {
			corporate_republic
			corporate_monarchy
			corporate_directorate
			military_republic
			administrative_republic
		}
		free_revoke_on_governments = {
			hivemind_government
			pirate_kingdom
			pirate_republic
			colonial_government
		}
		frame_suffix = "_merchantrepublic"
		potential = {
			NOT = { trait = hiver_implant }
			NOT = { religion_group = outlaw_group }
			OR = {
				AND = {
					is_patrician = yes
					OR = {
						liege_before_war = {
							NOT = { character = PREV }
							is_merchant_republic = yes
							NOT = {
								liege_before_war = {
									NOT = { character = PREV }
									is_merchant_republic = yes
								}
							}
						}
						has_game_started = no
					}
				}
				AND = {
					higher_real_tier_than = count
					any_demesne_province = {
						always = yes
					}
					NOT = {
						liege_before_war = {
							NOT = { character = PREV }
							is_merchant_republic = yes
						}
					}
				}
			}
		}
		
		color = { 0 0 192 }
		
		merchant_republic = yes
		
		dukes_called_kings = yes
		barons_need_dynasty = yes
		
		can_imprison_without_reason = no
		can_revoke_without_reason = no
		can_grant_kingdoms_and_empires_to_other_government = yes
		#can_usurp_kingdoms_and_empires = no
		#have_gender_laws = no
		#allows_matrilineal_marriage = no

		can_build_tribal = no
		
		ignore_in_vassal_limit_calculation = {
			colonial_government
		}
	}

	pirate_republic = {
		preferred_holdings = { CITY }
		allowed_holdings = { 
			TRADE_POST
			CITY
			FAMILY_PALACE
			FORT
		}
		builds_with_prestige = {
			TRADE_POST
			FORT
		}
		accepts_liege_governments = {
			pirate_kingdom
		}
		frame_suffix = "_merchantrepublic"
		title_prefix = "pirate_republic_"
		potential = {
			NOT = { trait = hiver_implant }
			religion_group = outlaw_group
			OR = {
				AND = {
					is_patrician = yes
					OR = {
						liege_before_war = {
							NOT = { character = PREV }
							is_merchant_republic = yes
							NOT = {
								liege_before_war = {
									NOT = { character = PREV }
									is_merchant_republic = yes
								}
							}
						}
						has_game_started = no
					}
				}
				AND = {
					higher_real_tier_than = count
					any_demesne_province = {
						always = yes
					}
					NOT = {
						liege_before_war = {
							NOT = { character = PREV }
							is_merchant_republic = yes
						}
					}
				}
			}
		}
		
		color = { 32 32 64 }
		
		merchant_republic = yes
		
		dukes_called_kings = yes
		barons_need_dynasty = yes
			
		can_imprison_without_reason = yes
		can_revoke_without_reason = yes
		can_grant_kingdoms_and_empires_to_other_government = yes
		#can_usurp_kingdoms_and_empires = no
		#have_gender_laws = no
		#allows_matrilineal_marriage = no
		
		allow_looting = yes
		ignores_de_jure_laws = yes
		
		can_build_castle = no
		can_build_temple = no
		
		can_build_tribal = no
		
		ignore_in_vassal_limit_calculation = {
			colonial_government
		}
	}
}