theocracy_governments = {

	theocracy_government = {
		preferred_holdings = {
			TEMPLE
		}
		allowed_holdings = {
			TEMPLE
			CASTLE
			FORT
			HOSPITAL
		}
		allowed_holdings_culture = { # Will not get the wrong government type penalty for tribes of the same culture
			TRIBAL
		}
		free_revoke_on_governments_religion = { # Tribal vassals of other religions can have their titles revoked for free
			tribal_government
		}
		accepts_liege_governments = {
			feudal_government
			muslim_government
			republic_government
			merchant_republic_government
			theocratic_feudal_government
			chinese_imperial_government
		}

		frame_suffix = "_theocracy"
		title_prefix = "temple_"
		color = { 220 220 220 }

		potential = {
			NOT = {	is_government_potential = muslim_government }

			trigger_if = {
				limit = { is_female = yes }
				religion_allows_female_temple_holders = yes
			}
			trigger_else = {
				religion_allows_male_temple_holders = yes
			}
		}

		allow = {
			trigger_if = {
				limit = { controls_religion = yes }

				NOR = {
					religion_group = muslim
					has_religion_feature = religion_temporal_head

					trigger_if = {
						limit = { religion = norse_pagan_reformed }
						has_religion_features = no # Old saves, and campaigns without HF, need the Fylkirate to continue working
					}
				}
			}
			trigger_else_if = { # Early christian head
				limit = {
					controls_religion = no
					OR = {
						has_landed_title = k_orthodox
						has_landed_title = d_miaphysite
						has_landed_title = d_nestorian
					}
				}
				
				is_save_game = no
				has_game_started = no
			}
			trigger_else = {
				# For game-start and new characters
				capital_holding = {
					holding_type = temple
				}

				# Characters who already have a different government should always keep it
				trigger_if = {
					limit = { has_game_started = yes }

					is_feudal = no
					is_tribal = no
					is_nomadic = no
					is_republic = no
				}
			}
		}

		can_be_granted_kingdoms_and_empires_by_other_government = no
		can_build_tribal = no
		can_create_kingdoms = no
		have_gender_laws = no

		capital_move_delay = 600
	}

}