##########################
# MACHINE AGE GOVERNMENTS
##########################
# Documentation: common\governments\99_README_GOVERNMENT.txt
#
# All governments in this file have base weight: @gov_authority_swap_weight
#
# They replace the standard government if the authority is swapped into
# an ascended variant.
#
# If the empire fulfills the requirements for multiple governments, it will
# select the first one listed in this file.
#
# The weight categories to select a government are (highest selected first):
# 1. AI governments
# 2. Authority swap governments
# 3. Civic governments
# 4. Ethic governments
# 5. Authority governments
# 6. Fallback government

### Cyber Governments

# Cyber Democracy Individualist
gov_cyber_democracy_individualist = {
	ruler_title = RT_PRESIDENT
	ruler_title_female = RT_PRESIDENT_FEMALE

	possible = {
		is_democratic_authority = yes
		has_country_flag = cyber_individualist
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}

# Cyber Democracy Collectivist
gov_cyber_democracy_collectivist = {
	ruler_title = RT_PRESIDENT
	ruler_title_female = RT_PRESIDENT_FEMALE

	possible = {
		is_democratic_authority = yes
		has_country_flag = cyber_collectivist
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}

# Cyber Oligarchy Individualist
gov_cyber_oligarchy_individualist = {
	ruler_title = RT_CHIEF_PRECENTOR
	ruler_title_female = RT_CHIEF_PRECENTOR_FEMALE

	possible = {
		is_oligarchic_authority = yes
		has_country_flag = cyber_individualist
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}

# Cyber Oligarchy Collectivist
gov_cyber_oligarchy_collectivist = {
	ruler_title = RT_CHIEF_PRECENTOR
	ruler_title_female = RT_CHIEF_PRECENTOR_FEMALE

	possible = {
		is_oligarchic_authority = yes
		has_country_flag = cyber_collectivist
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}

# Cyber Dictatorship Individualist
gov_cyber_dictatorial_individualist = {
	ruler_title = RT_EXECUTOR
	ruler_title_female = RT_EXECUTOR_FEMALE

	possible = {
		is_dictatorial_authority = yes
		has_country_flag = cyber_individualist
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}

# Cyber Dictatorship Collectivist
gov_cyber_dictatorial_collectivist = {
	ruler_title = RT_EXECUTOR
	ruler_title_female = RT_EXECUTOR_FEMALE

	possible = {
		is_dictatorial_authority = yes
		has_country_flag = cyber_collectivist
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}

# Cyber Imperial Individualist
gov_cyber_imperial_individualist = {
	ruler_title = RT_EMPEROR
	ruler_title_female = RT_EMPRESS
	heir_title = HT_CROWN_PRINCE
	heir_title_female = HT_CROWN_PRINCESS

	use_regnal_names = yes
	dynastic_last_names = yes

	possible = {
		is_imperial_authority = yes
		has_country_flag = cyber_individualist
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}

# Cyber Imperial Collectivist
gov_cyber_imperial_collectivist = {
	ruler_title = RT_EMPEROR
	ruler_title_female = RT_EMPRESS
	heir_title = HT_CROWN_PRINCE
	heir_title_female = HT_CROWN_PRINCESS

	use_regnal_names = yes
	dynastic_last_names = yes

	possible = {
		is_imperial_authority = yes
		has_country_flag = cyber_collectivist
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}

# Cyber Corporate Individualist
gov_cyber_corporate_individualist = {
	ruler_title = RT_EXECUTOR
	ruler_title_female = RT_EXECUTOR_FEMALE

	possible = {
		is_megacorp = yes
		has_country_flag = cyber_individualist
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}

# Cyber Corporate Collectivist
gov_cyber_corporate_collectivist = {
	ruler_title = RT_EXECUTOR
	ruler_title_female = RT_EXECUTOR_FEMALE

	possible = {
		is_megacorp = yes
		has_country_flag = cyber_collectivist
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}

# Cyber Volitional Hive
gov_cyber_hive_volitional = {
	ruler_title = RT_HIVE_MIND
	ruler_title_female = RT_HIVE_MIND_FEMALE

	should_force_rename = yes

	possible = {
		is_hive_empire = yes
		has_country_flag = cyber_hive_volitional
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}

# Cyber Integrated Hive
gov_cyber_hive_integrated = {
	ruler_title = RT_HIVE_MIND
	ruler_title_female = RT_HIVE_MIND_FEMALE

	should_force_rename = yes

	possible = {
		is_hive_empire = yes
		has_country_flag = cyber_hive_integrated
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}


### Cyber Creed Governments

# Advanced Cybernetic Creed Monarchy
gov_cyber_creed_monarchy = {
	ruler_title = RT_ARCHPROPHET
	ruler_title_female = RT_ARCHPROPHETESS
	heir_title = HT_PRIEST
	heir_title_female = HT_PRIESTESS

	use_regnal_names = yes
	dynastic_last_names = yes

	possible = {
		is_cyber_creed_advanced_government = yes
		is_imperial_authority = yes
		is_spiritualist = yes
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}

# Advanced Cybernetic Creed Dictatorship
gov_cyber_creed_dictatorship = {
	ruler_title = RT_PATRIARCH
	ruler_title_female = RT_MATRIARCH

	possible = {
		is_cyber_creed_advanced_government = yes
		is_dictatorial_authority = yes
		is_spiritualist = yes
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}

# Advanced Cybernetic Creed Oligarchy
gov_cyber_creed_oligarchy = {
	ruler_title = RT_CHIEF_PRECENTOR
	ruler_title_female = RT_CHIEF_PRECENTOR_FEMALE

	possible = {
		is_cyber_creed_advanced_government = yes
		is_oligarchic_authority = yes
		is_spiritualist = yes
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}

# Advanced Cybernetic Creed Democracy
gov_cyber_creed_democracy = {
	ruler_title = RT_REVERED_ELDER
	ruler_title_female = RT_REVERED_ELDER_FEMALE

	possible = {
		is_cyber_creed_advanced_government = yes
		is_democratic_authority = yes
		is_spiritualist = yes
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}

# Advanced Cybernetic Creed Divine Empire
gov_cyber_creed_divine_empire = {
	ruler_title = RT_GOD_EMPEROR
	ruler_title_female = RT_GOD_EMPRESS
	heir_title = HT_SAINT
	heir_title_female = HT_SAINT_FEMALE

	use_regnal_names = yes
	dynastic_last_names = yes

	should_force_rename = yes

	possible = {
		is_cyber_creed_advanced_government = yes
		is_imperial_authority = yes
		has_valid_civic = civic_imperial_cult
	}

	weight = {
		base = @gov_authority_swap_weight
		modifier = {
			factor = 2
			has_valid_civic = civic_imperial_cult
		}
	}
}

# Advanced Cybernetic Creed Megachurch
gov_cyber_creed_megachurch = {
	ruler_title = RT_HALLOWED_COMPTROLLER
	ruler_title_female = RT_HALLOWED_COMPTROLLER_FEMALE

	should_force_rename = yes

	possible = {
		is_cyber_creed_advanced_government = yes
		OR = {
			AND = {
				has_valid_civic = civic_corporate_dominion
				has_valid_civic = civic_exalted_priesthood
			}
			AND = {
				is_megacorp = yes
				has_valid_civic = civic_gospel_of_the_masses
			}
		}
	}

	weight = {
		base = @gov_authority_swap_weight
		modifier = {
			factor = 2
			has_valid_civic = civic_corporate_dominion
			has_valid_civic = civic_exalted_priesthood
		}
		modifier = {
			factor = 2
			has_valid_civic = civic_gospel_of_the_masses
		}
	}
}

# Advanced Cybernetic Creed Holy Tribunal
gov_cyber_creed_holy_tribunal = {
	ruler_title = RT_HIGH_INQUISITOR
	ruler_title_female = RT_HIGH_INQUISITOR_FEMALE

	should_force_rename = yes

	possible = {
		is_cyber_creed_advanced_government = yes
		is_oligarchic_authority = yes
		has_valid_civic = civic_exalted_priesthood
		NOR = {
			has_valid_civic = civic_corporate_dominion
			has_valid_civic = civic_death_cult
		}
	}

	weight = {
		base = @gov_authority_swap_weight
		modifier = {
			factor = 2
			has_valid_civic = civic_exalted_priesthood
		}
	}
}

# Cyber Creed Subversive Cult
gov_cyber_creed_subversive_cult = {
	ruler_title = RT_ORACLE

	should_force_rename = yes

	possible = {
		is_cyber_creed_advanced_government = yes
		is_megacorp = yes
		has_valid_civic = civic_criminal_heritage
		has_valid_civic = civic_gospel_of_the_masses
	}

	weight = {
		base = @gov_authority_swap_weight
		add = @gov_civic_override_weight # Criminals get boosted and this makes the auth swap win out
		modifier = {
			factor = 2
			has_valid_civic = civic_criminal_heritage
		}
		modifier = {
			factor = 2
			has_valid_civic = civic_gospel_of_the_masses
		}
	}
}


### Synth Governments

# Synth Democracy Physical
gov_synth_democracy_physical = {
	ruler_title = RT_PRESIDENT
	ruler_title_female = RT_PRESIDENT_FEMALE

	possible = {
		is_democratic_authority = yes
		has_country_flag = synth_physical
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}

# Synth Democracy Virtual
gov_synth_democracy_virtual = {
	ruler_title = RT_PRESIDENT
	ruler_title_female = RT_PRESIDENT_FEMALE

	possible = {
		is_democratic_authority = yes
		has_country_flag = synth_virtual
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}

# Synth Oligarchy Physical
gov_synth_oligarchy_physical = {
	ruler_title = RT_CHIEF_PRECENTOR
	ruler_title_female = RT_CHIEF_PRECENTOR_FEMALE

	possible = {
		is_oligarchic_authority = yes
		has_country_flag = synth_physical
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}

# Synth Oligarchy Virtual
gov_synth_oligarchy_virtual = {
	ruler_title = RT_CHIEF_PRECENTOR
	ruler_title_female = RT_CHIEF_PRECENTOR_FEMALE

	possible = {
		is_oligarchic_authority = yes
		has_country_flag = synth_virtual
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}

# Synth Dictatorship Physical
gov_synth_dictatorship_physical = {
	ruler_title = RT_EXECUTOR
	ruler_title_female = RT_EXECUTOR_FEMALE

	possible = {
		is_dictatorial_authority = yes
		has_country_flag = synth_physical
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}

# Synth Dictatorship Virtual
gov_synth_dictatorship_virtual = {
	ruler_title = RT_EXECUTOR
	ruler_title_female = RT_EXECUTOR_FEMALE

	possible = {
		is_dictatorial_authority = yes
		has_country_flag = synth_virtual
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}

# Synth Imperial Physical
gov_synth_imperial_physical = {
	ruler_title = RT_EMPEROR
	ruler_title_female = RT_EMPRESS
	heir_title = HT_CROWN_PRINCE
	heir_title_female = HT_CROWN_PRINCESS

	use_regnal_names = yes
	dynastic_last_names = yes

	possible = {
		is_imperial_authority = yes
		has_country_flag = synth_physical
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}

# Synth Imperial Virtual
gov_synth_imperial_virtual = {
	ruler_title = RT_EMPEROR
	ruler_title_female = RT_EMPRESS
	heir_title = HT_CROWN_PRINCE
	heir_title_female = HT_CROWN_PRINCESS

	use_regnal_names = yes
	dynastic_last_names = yes

	possible = {
		is_imperial_authority = yes
		has_country_flag = synth_virtual
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}

# Synth Corporate Physical
gov_synth_corporate_physical = {
	ruler_title = RT_EXECUTOR
	ruler_title_female = RT_EXECUTOR_FEMALE

	possible = {
		is_megacorp = yes
		has_country_flag = synth_physical
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}

# Synth Corporate Virtual
gov_synth_corporate_virtual = {
	ruler_title = RT_EXECUTOR
	ruler_title_female = RT_EXECUTOR_FEMALE

	possible = {
		is_megacorp = yes
		has_country_flag = synth_virtual
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}

# Advanced Assimilator - Memory Aggregator
gov_memory_aggregator = {
	ruler_title = RT_CENTRAL_AGGREGATOR

	should_force_rename = yes

	possible = {
		is_machine_empire = yes
		has_country_flag = driven_memory_aggregator
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}

# Advanced Assimilator - Neural Chorus
gov_neural_chorus = {
	ruler_title = RT_NEURAL_CHORUS

	should_force_rename = yes

	possible = {
		is_machine_empire = yes
		has_country_flag = driven_neural_chorus
	}

	weight = {
		base = @gov_authority_swap_weight
	}
}
