
# Country types specify the rules by which a country plays the game.
# Example:
#name_of_country_type = {
#	can_own_empty_planets					#no by default, decides if empty planets belonging to country are automatically removed from the country.
#	playable = yes							#if this type is available for players. used when listing countries for hot-joining players
#	has_pulse_events = no					#if this type gets checked for country-specific pulse events from on_action
#	has_deficits = yes						#if this type suffers from resource deficits
#	randomize_ethos = no					#does this empire have a randomly generated ethos?
#	shuffle_pop_ethos = no					#if pops belonging to this country type should mutate their ethos every now and then
#	sub_title = "EXAMPLE_COUNTRY"			#sub title that will be shown for this empire. Like "Example Federation - Fallen Empire"
#	sub_title_desc = "EXAMPLE_COUNTRY_DESC" #description for the sub title. used in tooltips
#	needs_survey = no						#default no, if yes then planets must be surveyed before they can be colonized, also if yes a science ship is needed for exploration.
#	has_complete_sensor = no				#default no, if yes then empire has complete sensor of the galaxy
#	has_capital = yes						#default is yes, capital always exists but toggling this no hides any mention of the capital planet being a capital.
#	enforces_borders = yes					#default is yes, if the country doesn't enforce it's borders people are always free to enter.
#	can_planets_be_attacked = yes			#default yes, if no then planets owned by this country type can not be attacked
#	colonizing_title = "COLONIZING_PLANET_DEFAULT"		#localization key for colonization view title
#	colonizing_desc = "PLANET_VIEW_UNDER_COLONIZATION_DEFAULT_DESC"	#localization key for colonization view desc
#	orbital_bombardment = yes				#default yes, does orbital bombardment
#	diplomatic_wars = no					#default no, decides if the country needs to declare war to be hostile, only works against countries who also have diplomatic wars toggled on
#	attack_unarmed_orbital_stations = no	#default no, decides if the country should attack unarmed orbital (mining, research & observation stations) without explicit orders to do so
#	ship_disengagement = no					#default no, decides if the country's ships can flee from battle instead of fighting to the death
#	army_disengagement = no					#default no, decides if the country's armies can flee from battle instead of fighting to the death
#	min_assault_armies_for_wars = 1			#default 1, deciades how many assault armies the country wants before declaring any wars
#	share_communications = no				#default yes, decides if they share communciations with anyone you have contact with
#	relations = no							#default no, this controls whether the country makes us of opinion
#	fallen_empire = no						#default no, this controls whether the empire uses the special Fallen Empire AI
#	awakened_fallen_empire = no				#default no, this controls whether the empire uses the special Awakened Fallen Empire AI
#	piracy_risk	= no						#default no, this controls whether the empire has piracy risk
#	uses_special_buildables = no			#default no, this controls whether this empire builds global ship designs that are defined as special buildables instead of normal designable ships
#	show_in_contacts_list = yes				#default yes, whether to show an entry in the contacts list
#	minimalist_contacts_list_profile = no	#default no, whether to show only empire name and flag in diplomacy panel in the contacts list
#	government = no							#default yes, if yes then the country has a government
#	custom_starbase = x						#if this is set, country will defined ship size for constructed starbases instead of building outposts
#	destroys_starbases = no					#if this is set to yes, country will destroy starbases instead of disabling them
#	can_have_their_comms_shared				#if this is set to yes, other countries in contact with this one will be able to share that contact (for countries that use custom_diplomacy)
#	observable = no							#Fairly self explanatory. Will not show up in list of observable countries, and cannot be tagged to as observer.
#	can_use_invalid_technology = yes		#this this is set to no, there will be a hardcoded block on assigning tech whose potential trigger does not evaluate to the country
#	ignore_ftl_inhibitors = yes				#Setting would to true, would enable the country to ignore FTL Inhibitors.
#   prevent_automatic_genocidal_hostilities = yes #default no, if this is set then genocidal empires do not automatically attack the country before communications are established
#
#	faction = {							#these values are copied to the country and can be changed during the game
#		neutral = no						#if yes, fleets will never attack anything and will never be attacked
#		hostile = no						#if yes, fleets will attack everything on sight ( except neutral fleets )
#		follow = no							#if yes, fleets will follow the fleets of allies
#		auto_delete = yes					#if yes, country will be automatically deleted when considered dead ( usually when out of colonies and colony ships ). Should be yes in most cases but can be useful to turn off for some countries that are created by events.
#		needs_border_access = yes			#decides if a country needs to have explicit border access from another country to enter its borders.
#		generate_borders = yes				#decides if a country generates borders or not
#		needs_colony = yes					#decides if a country needs a colony ( or a colony ship ) to be considered alive.
#		primitive = no						#primitive countries can have observation stations build by others in orbit of their planets
#		primitive_age = "STONE_AGE"			#if primitive = yes, localization string. Remember that these values are dynamic and this value will most likely be overwritten instantly by the same event that created the country. This field can probably be left empty
#		hostile_when_attacked = yes			#toggles if country turns hostile against attacker.
#		show_borders_in_us = yes			#if no, borders for countries of this type will not be shown if in uncharted space
#		intel_effects_surveyed = yes			# toggle if the intel system is allowed to change any surveyed planets to unsurveyed depending on intel level with this country
#	}
#
#	ai = {								#block of AI settings
#		enabled = yes						#run ai for this country type? default no
#		declare_war = yes					#should AI declare wars? default yes
#		colonizer = yes						#should AI colonize? default yes
#		internal_policies = yes				#should AI update internal policies? such as edicts, changing government types etc. default yes
#		modification = yes					#should AI genemod & terraform? default yes
#		construction = yes					#should AI build ships and buildings? default yes
#		tech = yes							#should AI advance its technology? default yes
#		espionage = yes					#should AI use espionage? default yes
#
#		modules = {							#List of diferent ai modules this country type should have
#			military_minister_module
#			foreign_minister_module
#			interior_minister_module
#		}
#	}
#
# 							#Note: these effects are also covered by on_actions on_fleet_contract_started, on_fleet_contract_expired, on_fleet_contract_cancelled and on_fleet_contract_broken
#	fleet_manager = {								#block of Country Fleet Manager settings
#		on_contract_started = {						#effect fired when fleet owned by country is hired
#		}											#Scope - Fleet, From - Country that hired the fleet, FromFrom - Country that owns fleet, FromFromFrom - Country that initiated the ending of the contract
#		on_contract_expired = {						#effect fired when hire contract of a fleet owned by country is expired
#		}											#Scope - Fleet, From - Country that hired the fleet, FromFrom - Country that owns fleet, FromFromFrom - Country that initiated the ending of the contract
#		on_contract_cancelled = {					#effect fired when hire contract of a fleet owned by country is cancelled (when controller prematurely finishes the contract or when the contract cancellation is a part of trade deal)
#		}											#Scope - Fleet, From - Country that hired the fleet, FromFrom - Country that owns fleet, FromFromFrom - Country that initiated the ending of the contract (trade deal actor when the contract cancellation is a part of trade deal)
#		on_contract_broken = {						#effect fired when hire contract of a fleet owned by country is broken (when country is attacked by someone of when a war is started)
#		}											#Scope - Fleet, From - Country that hired the fleet, FromFrom - Country that owns fleet, FromFromFrom - Country that initiated the ending of the contract (main attacker in a case of war)
#	}
#
#	modules = {							#List of modules countries of this should have.
#										#A module controls what code a country will use for a specific system, for instance we can decide to run a completely different economy module that uses cats as main currency ( if such a module exists, that is )
#										#Only one module per module type is allowed
#		standard_event_module = {}
#		standard_economy_module = {}
#		standard_leader_module = {}
#		standard_diplomacy_module = {}
#				#contact_rule: auto (default: has first contact sites formed upon); does_first_contact_sites (uses first contact sites on others); on_action_only (no first contact site on this country, only on_first_contact event); never; always (fires on_first_contact immediately, but no site formed)
#		standard_technology_module = {}
#		standard_trade_routes_module = {}
#		standard_pop_factions_module = {}
#		standard_expansion_module = {}
#	}
#}

default = {
	has_difficulty_bonuses = yes
	counts_for_victory = yes
	pop_growth = yes
	playable = yes
	has_pulse_events = yes
	has_deficits = yes
	piracy_risk = yes
	randomize_ethos = yes
	shuffle_pop_ethos = yes
	needs_survey = yes
	diplomatic_wars = yes
	ship_disengagement = yes
	army_disengagement = yes
	relations = yes
	observable = yes
	can_use_invalid_technology = no
	can_receive_envoys = yes
	ownership_limits = default
	do_critters_age = yes

	ai = {
		enabled = yes
		declare_war = yes
		min_assault_armies_for_wars = @armies_for_declaring_war
		colonizer = yes
		internal_policies = yes
		modification = yes
		government = yes
		traditions = yes
		ascension_perks = yes
		construction = yes
		follow = yes
		can_use_market = yes
		modules = {
			military_minister_module
			foreign_minister_module
			interior_minister_module
			mercenary_buyer_minister_module
			enclave_founder_minister_module
		}
	}

	trade_routes_available = {
		is_gestalt = no
	}

	modules = {
		standard_event_module = {}
		standard_economy_module = {}
		standard_leader_module = {}
		standard_diplomacy_module = { contact_rule = does_first_contact_sites }
		standard_technology_module = {}
		standard_pop_factions_module = {}
		standard_expansion_module = {}
		standard_species_rights_module = {}
		standard_grand_archive_module = {}
		standard_shroud_module = {}
	}

	resources = {
		category = country_base
		produces = {
			trigger = {
				NOT = { has_origin = origin_nomadic_purger }
			}
			energy = 20
			physics_research = 10
			society_research = 10
			engineering_research = 10
			influence = 3
			unity = 10
			alloys = 5
		}
		produces = {
			trigger = {
				is_nomadic = no
				NOT = { has_origin = origin_nomadic_purger }
			}
			minerals = 20
		}
		produces = {
			trigger = {
				NOT = { has_origin = origin_nomadic_purger }
				OR = {
					is_gestalt = no
					has_valid_civic = civic_machine_servitor
				}
			}
			consumer_goods = 15
		}
		produces = {
			trigger = {
				NOT = { has_origin = origin_nomadic_purger }
				OR = { #Either
					# You're a non-lithoid non-individual machine, regular empire or hive mind
					AND = {
						is_individual_machine = no
						is_lithoid_empire = no
						is_infernal_empire = no
						OR = {
							is_regular_empire = yes
							is_hive_empire = yes
						}
					}
					# You are a lithoid empire with a non-lithoid subspecies
					AND = {
						is_lithoid_empire = yes
						has_country_flag = non_lithoid_subspecies
					}
					# Or a machine empire with a non-lithoid secondary species
					AND = {
						has_country_flag = non_lithoid_subspecies
						is_machine_empire = yes
					}
					# Or an individual machine with a non-lithoid species
					AND = {
						is_individual_machine = yes
						has_country_flag = non_lithoid_subspecies
					}
					# Or have bioships
					country_uses_bio_ships = yes
				}
			}
			food = 20
		}
		produces = {
			trigger = {
				NOT = { has_origin = origin_nomadic_purger }
				# Either
				OR = {
					# You're a lithoid regular empire or hive mind
					AND = {
						is_lithoid_empire = yes
						OR = {
							is_regular_empire = yes
							is_hive_empire = yes
						}
					}
					# Or a machine empire with a lithoid secondary species
					AND = {
						has_country_flag = lithoid_subspecies
						is_machine_empire = yes
					}
					# Or a machine empire with no secondary species
					AND = {
						is_machine_empire = yes
						NOR = {
							has_country_flag = lithoid_subspecies
							has_country_flag = non_lithoid_subspecies
						}
					}
				}
			}
			minerals = 20
		}
		produces = {
			trigger = {
				NOT = { has_origin = origin_nomadic_purger }
				is_machine_empire = yes
			}
			energy = 20
		}
		produces = {
			trigger = {
				NOT = { has_origin = origin_nomadic_purger }
				is_lithoid_empire = yes
				has_valid_civic = civic_hive_cordyceptic_drones
			}
			food = 10
			minerals = -10
		}
		produces = {
			trigger = {
				NOT = { has_origin = origin_nomadic_purger }
				OR = {
					is_infernal_empire = yes
					# Or a machine with an infernal species
					AND = {
						has_country_flag = infernal_subspecies
						is_machine_empire = yes
					}
				}
			}
			alloys = 10
		}
	}

	# planet scope
	branch_office_resources = {
		category = planet_branch_offices
		cost = {
			trade = 1000
		}
	}
}

# Global Event Country - Do Not Remove
global_event = {
	share_communications = no
	default_ships = no
	government = no
	observable = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = no
		needs_border_access = no
		generate_borders = no
		needs_colony = no
		auto_delete = no
	}
	modules = {
		standard_event_module = {} # Needed for events
		exclusive_diplomacy_module = {
			contact_rule = on_action_only
		}
	}
}

faction = {
	government = no
	observable = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = yes
		needs_border_access = no
		generate_borders = no
		needs_colony = no
	}
	modules = {
		exclusive_diplomacy_module = { # Nothing is allowed, but we need this for relationships.
			contact_rule = on_action_only
		}
		basic_technology_module = {}
	}
}

asteroid_faction = {
	government = no
	observable = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = yes
		needs_border_access = no
		generate_borders = no
		needs_colony = no
	}
	modules = {
		exclusive_diplomacy_module = {}
		basic_technology_module = {}
	}
}

nice_faction = {
	government = no
	observable = no
	ai = {
		enabled = no
	}
	faction = {
		neutral = yes
		hostile = no
		needs_border_access = no
		generate_borders = no
		needs_colony = no
	}
	modules = {
		exclusive_diplomacy_module = { # Nothing is allowed, but we need this for relationships.
			contact_rule = on_action_only
		}
		basic_technology_module = {}
	}
}

origin_dragon = { #origin_here_be_dragons dragon. Settings copied from a leviathan, for now
	scaled_difficulty_bonuses = 0.5	# scales to setting
	is_space_critter = yes
	government = no
	blocks_piracy = yes
	destroys_starbases = yes
	observable = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = yes
		needs_border_access = no
		generate_borders = no
		needs_colony = no
	}
	modules = {
		exclusive_diplomacy_module = { contact_rule = on_action_only } # Nothing is allowed, but we need this for relationships.
		basic_technology_module = {}
		standard_event_module = {} # For bouncing events
	}
}

dragon_dummy = { #This country type is only needed for the origin_here_be_dragons first contact story. It should never be used for anything else.
	government = no
	observable = no
	share_communications = no
	ai = {
		enabled = no
	}
	faction = {
		needs_border_access = no
		generate_borders = no
		needs_colony = no
		auto_delete = no
	}
	modules = {
		exclusive_diplomacy_module = { # Nothing is allowed, but we need this for relationships.
		}
		basic_technology_module = {}
	}
}

clutch_of_whelps = { #Whelp nation spawned from killing origin_dragon
	scaled_difficulty_bonuses = 0.5	# scales to setting
	is_space_critter = yes
	government = no
	blocks_piracy = yes
	destroys_starbases = yes
	observable = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = no
		needs_border_access = no
		generate_borders = no
		needs_colony = no
	}
	modules = {
		exclusive_diplomacy_module = {
			contact_rule = on_action_only
		}
		basic_technology_module = {}
	}
}

adversary = {
	show_in_contacts_list = no
	government = no
	observable = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = yes
		needs_border_access = no
		generate_borders = no
		needs_colony = no
	}
	modules = {
		basic_technology_module = {}
		standard_event_module = {}
		exclusive_diplomacy_module = {
			contact_rule = on_action_only
			can_receive = {
				action_declare_war
				action_offer_peace
			}
		}
	}
}

neutral_faction = {
	is_space_critter = yes
	government = no
	observable = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = no
		needs_border_access = no
		generate_borders = no
		needs_colony = no
	}
	modules = {
		exclusive_diplomacy_module = {} # Nothing is allowed, but we need this for relationships.
		basic_technology_module = {}
	}
}

nomad = {
	show_in_contacts_list = yes
	observable = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = no
		needs_border_access = no
		generate_borders = no
		needs_colony = no
	}

	custom_diplomacy = yes

	modules = {
		basic_technology_module = {}
		standard_event_module = {}
		exclusive_diplomacy_module = {}
	}
}

pirate = {
	attack_unarmed_orbital_stations = yes
	government = no
	observable = no
	uses_origins = no
	ai = {
		enabled = no
	}

	faction = {
		hostile = yes
		pirate = yes
		needs_border_access = no
		generate_borders = no
		needs_colony = no
	}
	modules = {
		exclusive_diplomacy_module = {} # Nothing is allowed, but we need this for relationships.
		all_technology_module = {}
		standard_event_module = {}
	}
}

dormant_marauders = {
	attack_unarmed_orbital_stations = yes
	scaled_difficulty_bonuses = 1.0	# scales to setting
	show_in_contacts_list = yes
	custom_diplomacy = yes
	share_survey_data = no
	enforces_borders = no
	needs_survey = no
	government = yes
	has_complete_sensor = yes
	can_have_their_comms_shared = yes
	custom_starbase = starbase_marauder
	observable = no
	ai = {
		enabled = no
	}

	faction = {
		hostile = yes
		pirate = yes
		needs_border_access = no
		generate_borders = yes
		needs_colony = no
		auto_delete = no
	}
	modules = {
		exclusive_diplomacy_module = {} # Nothing is allowed, but we need this for relationships.
		tiered_technology_module = {
			tier = 3
			rare = no
		}
		standard_event_module = {}
	}
}

ruined_marauders = { # Diplomacy no longer possible
	government = no
	observable = no

	ai = {
		enabled = no
	}

	faction = {
		hostile = yes
		pirate = yes
		needs_border_access = no
		generate_borders = no
		needs_colony = no
		auto_delete = no
	}
	modules = {
		exclusive_diplomacy_module = { contact_rule = on_action_only } # Nothing is allowed, but we need this for relationships.
		tiered_technology_module = {
			tier = 3
			rare = no
		}
		standard_event_module = {}
	}
}

awakened_marauders = {
	attack_unarmed_orbital_stations = yes
	scaled_difficulty_bonuses = 2.0	# scales to setting
	destroys_starbases = yes
	show_in_contacts_list = yes
	counts_for_victory = yes
	share_survey_data = no
	custom_diplomacy = yes
	mid_game_crisis = yes
	enforces_borders = no
	needs_survey = no
	has_complete_sensor = yes
	can_have_their_comms_shared = yes
	custom_starbase = starbase_marauder
	observable = yes
	ai = {
		enabled = yes
		modules = {
			horde_interior_minister_module
			horde_military_minister_module
		}
	}

	faction = {
		hostile = yes
		needs_border_access = no
		generate_borders = yes
		needs_colony = no
	}
	modules = {
		exclusive_diplomacy_module = { # Nothing is allowed, but we need this for relationships.
			contact_rule = always
		}
		tiered_technology_module = {
			tier = 3
			rare = no
		}
		standard_event_module = {}
	}
}

fallen_empire = {
	scaled_difficulty_bonuses = 1.0	# scales to setting
	counts_for_victory = yes
	sub_title = "COUNTRY_FALLEN_EMPIRE"
	sub_title_desc = "COUNTRY_FALLEN_EMPIRE_DESC"

	share_survey_data = no
	relations = yes
	fallen_empire = yes
	needs_survey = no
	diplomatic_wars = yes
	ship_disengagement = yes
	army_disengagement = yes
	uses_special_buildables = yes
	observable = yes

	faction = {
		needs_border_access = no
	}

	ai = {
		enabled = yes
		declare_war = yes
		min_assault_armies_for_wars = @armies_for_declaring_war
		colonizer = no
		internal_policies = no
		modification = no
		construction = no
		starbase_upgrade = no
		limited_construction = yes
		tech = no
		modules = {
			military_minister_module
			foreign_minister_module
			interior_minister_module
		}
	}
	modules = {
		all_technology_module = {}
		standard_event_module = {}
		standard_leader_module = {}
		standard_economy_module = {}
		standard_species_rights_module = {}
		exclusive_diplomacy_module = {
			contact_rule = on_action_only
			can_receive = {
				action_declare_war
				action_offer_peace
				action_make_rival
				action_end_rivalry
				action_offer_trade_deal
				action_cancel_trade_deal
				action_insult
				action_make_claims_diplomacy_view
			}
			can_send = {
				action_declare_war
				action_make_rival
				action_end_rivalry
				action_offer_peace
				action_offer_trade_deal
				action_cancel_trade_deal
				action_open_borders
				action_close_borders
			}
		}
	}

	resources = {
		category = country_base
		produces = {
			energy = 1000
			minerals = 250
			food = 100
			alloys = 100
			consumer_goods = 200
			rare_crystals = 10
			exotic_gases = 10
			volatile_motes = 10
			sr_dark_matter = 2
			sr_living_metal = 2
			sr_zro = 2
			influence = 3
		}
	}
}

awakened_fallen_empire = {
	scaled_difficulty_bonuses = 1.0	# scales to setting
	counts_for_victory = yes
	sub_title = "COUNTRY_AWAKENED_FALLEN_EMPIRE"
	sub_title_desc = "COUNTRY_AWAKENED_FALLEN_EMPIRE_DESC"

	share_survey_data = no
	relations = yes
	fallen_empire = yes
	awakened_fallen_empire = yes
	needs_survey = no
	diplomatic_wars = yes
	ship_disengagement = yes
	army_disengagement = yes
	pop_growth = yes
	uses_special_buildables = yes
	observable = yes

	faction = {
		needs_border_access = no
	}

	ai = {
		enabled = yes
		declare_war = yes
		min_assault_armies_for_wars = @armies_for_declaring_war
		colonizer = yes
		internal_policies = yes
		modification = no
		government = no
		construction = yes
		tech = yes
		traditions = yes #but no ascension perks!
		modules = {
			military_minister_module
			foreign_minister_module
			interior_minister_module
		}
	}
	modules = {
		all_technology_module = {}
		standard_event_module = {}
		standard_leader_module = {}
		standard_economy_module = {}
		standard_expansion_module = {}
		standard_species_rights_module = {}
		exclusive_diplomacy_module = {
			contact_rule = always
			can_receive = {
				action_declare_war
				action_offer_peace
				action_make_rival
				action_end_rivalry
				action_offer_trade_deal
				action_cancel_trade_deal
				action_insult
				action_ask_to_become_thrall
				action_ask_to_become_dominion
				action_ask_to_become_satellite
				action_ask_to_become_signatory
				action_ask_to_be_released_subject
				action_ask_to_join_federation
				action_invite_to_federation
				action_leave_federation
				action_kick_from_federation
				action_build_spy_network
				action_manage_spy_network
			}
			can_send = {
				action_declare_war
				action_make_rival
				action_end_rivalry
				action_offer_peace
				action_offer_trade_deal
				action_cancel_trade_deal
				action_demand_thrall
				action_demand_dominion
				action_demand_satellite
				action_demand_signatory
				action_release_subject
				action_invite_to_federation
				action_leave_federation
				action_kick_from_federation
				action_open_borders
				action_close_borders
			}
		}
	}

	resources = {
		category = country_base
		produces = {
			energy = 1000
			minerals = 250
			food = 100
			alloys = 100
			consumer_goods = 100
			rare_crystals = 10
			exotic_gases = 10
			volatile_motes = 10
			sr_dark_matter = 2
			sr_living_metal = 2
			sr_zro = 2
			influence = 3
		}
	}
}


primal_mind = {
	government = no
	observable = no
	is_space_critter = yes
	blocks_piracy = yes
	ai = {
		enabled = no
	}
	faction = {
		neutral = yes
		hostile = no
		needs_border_access = no
		generate_borders = no
		needs_colony = no
		space_creatures = yes
	}
	modules = {
		exclusive_diplomacy_module = { # Nothing is allowed, but we need this for relationships.
			contact_rule = on_action_only
		}
		basic_technology_module = {}
	}
}

primitive = {
	randomize_ethos = yes
	shuffle_pop_ethos = yes
	observable = no
	relations = yes

	ai = {
		enabled = yes
		declare_war = no		#should AI declare wars? default yes
		colonizer = no			#should AI colonize? default yes
		internal_policies = no	#should AI update internal policies? such as edicts, changing government types etc. default yes
		modification = no		#should AI genemod & terraform? default yes
		construction = no		#should AI build ships and buildings? default yes
		tech = no				#should AI advance its technology? default yes
		espionage = no			#should AI use espionage? default yes

		modules = {
			foreign_minister_module
		}
	}
	faction = {
		hostile = no
		primitive = yes
		needs_border_access = no
		generate_borders = no
		needs_colony = yes
		intel_effects_surveyed = no
	}

	hide_names_if_no_communication = no
	show_in_contacts_list = yes
	#custom_diplomacy = yes # This makes primitives show up in the galaxy empire view.

	modules = {
		standard_event_module = {}
		basic_technology_module = {}
		exclusive_diplomacy_module = {
			contact_rule = on_action_only
			can_receive = {
				action_improve_relation
				action_harm_relation
				action_reveal_presence
				action_build_spy_network
				action_manage_spy_network
				action_societal_enlightenment
				action_stop_societal_enlightenment
				action_open_technological_enlightenment
				action_stop_open_technological_enlightenment
				action_stratified_technological_enlightenment
				action_stop_stratified_technological_enlightenment
				action_pre_ftl_trade
				action_stop_pre_ftl_trade
				action_open_pre_ftl_homeworld
			}
		}
	}
}

rebel = {
	observable = no
	randomize_ethos = yes
	ai = {
		#enabled = no
		enabled = yes
		declare_war = yes
		colonizer = yes
		internal_policies = yes
		modification = no
		government = no
		construction = yes
		#modules = {
		#	military_minister_module
		#	foreign_minister_module
		#	interior_minister_module
		#}
	}
	modules = {
		standard_event_module = {}
		#standard_economy_module = {}
		standard_leader_module = {}
		#standard_diplomacy_module = {}
		exclusive_diplomacy_module = {
			contact_rule = on_action_only
		}
		standard_technology_module = {}
		#standard_species_rights_module = {}
	}
}

# ambient object country type for moving props around
ambient = {
	show_in_contacts_list = no
	government = no
	observable = no
	uses_origins = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = no
		needs_border_access = no
		generate_borders = no
		needs_colony = no
	}
	modules = {
		exclusive_diplomacy_module = {
			contact_rule = on_action_only
		} # Nothing is allowed, but we need this for relationships.
		#basic_technology_module = {}
	}
}

enclave = {
	blocks_piracy = yes
	show_in_contacts_list = yes
	can_have_their_comms_shared = yes
	government = yes
	is_enclave = yes
	prevent_automatic_genocidal_hostilities = yes
	observable = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = no
		needs_border_access = no
		generate_borders = no
		needs_colony = no
	}
	custom_diplomacy = yes
	custom_opinion = yes
	modules = {
		basic_technology_module = {}
		standard_event_module = {}
		exclusive_diplomacy_module = { } # Nothing is allowed, but we need this for relationships.
		#basic_technology_module = {}
	}
}

mindwarden_enclave = {
	blocks_piracy = yes
	show_in_contacts_list = yes
	can_have_their_comms_shared = yes
	government = yes
	is_enclave = yes
	prevent_automatic_genocidal_hostilities = yes
	observable = no
	ai = {
		enabled = yes
		modules = {
			enclave_mercenary_military_minister_module
			interior_minister_module
			standard_species_rights_module
			enclave_mercenary_seller_minister_module
		}

		declare_war = no
		colonizer = no
		internal_policies = no
		modification = no
		construction = no
		limited_military_construction = yes
		limited_leaders = yes
		tech = yes
		espionage = no
	}
	faction = {
		hostile = no
		needs_border_access = no
		generate_borders = no
		needs_colony = no
		auto_delete = no
	}
	custom_diplomacy = yes
	custom_opinion = yes
	modules = {
		standard_technology_module = {}
		standard_event_module = {}
		standard_leader_module = {}
		standard_economy_module = {}
		exclusive_diplomacy_module = {} # Nothing is allowed, but we need this for relationships.
	}

	resources = {
		category = country_base
		produces = {
			energy = 500
			minerals = 500
			food = 500
			alloys = 250
			consumer_goods = 100
			rare_crystals = 1
			exotic_gases = 1
			volatile_motes = 1
			sr_dark_matter = 1
			sr_living_metal = 1
			sr_zro = 1

			physics_research = 100
			engineering_research = 100
			society_research = 100

			unity = 50
		}

		produces = {
			trigger = {
				mid_game_years_passed > 0
			}
			energy = 500
			minerals = 500
			food = 500
			alloys = 250
			rare_crystals = 10
			exotic_gases = 10
			volatile_motes = 10

			physics_research = 250
			engineering_research = 250
			society_research = 250
		}

		produces = {
			trigger = {
				end_game_years_passed > 0
			}
			energy = 500
			minerals = 500
			food = 500
			alloys = 250
			sr_dark_matter = 5
			sr_living_metal = 5
			sr_zro = 5

			physics_research = 400
			engineering_research = 400
			society_research = 400
		}

		produces = {
			trigger = {
				has_technology = tech_rare_crystals
			}
			rare_crystals = 10
		}

		produces = {
			trigger = {
				has_technology = tech_exotic_gases
			}
			exotic_gases = 10
		}

		produces = {
			trigger = {
				has_technology = tech_volatile_motes
			}
			volatile_motes = 10
		}

		produces = {
			trigger = {
				has_technology = tech_mine_dark_matter
			}
			sr_dark_matter = 5
		}

		produces = {
			trigger = {
				has_technology = tech_mine_living_metal
			}
			sr_living_metal = 5
		}
	}
}

enclave_mercenary = {
	blocks_piracy = yes
	show_in_contacts_list = yes
	can_have_their_comms_shared = yes
	government = yes
	is_enclave = yes
	prevent_automatic_genocidal_hostilities = yes
	observable = yes # no
	playable = no
	needs_survey = no
	ship_disengagement = yes
	has_complete_sensor = no
	orbital_bombardment = yes
	attack_unarmed_orbital_stations = yes
	destroys_starbases = yes

	ai = {
		enabled = yes
		modules = {
			enclave_mercenary_military_minister_module
			interior_minister_module
			standard_species_rights_module
			enclave_mercenary_seller_minister_module
		}

		declare_war = no
		colonizer = no
		internal_policies = no
		modification = no
		construction = no
		limited_military_construction = yes
		limited_leaders = yes
		tech = yes
		espionage = no
	}
	fleet_manager = {
		on_contract_started = {
			if = {
				limit = {
					is_active_resolution = resolution_defenseprivatization_corporate_warlords
				}
				add_modifier = {
					modifier = hired_mercenary_fleet_naval_cap_usage_galcom_5
				}
			}
			else_if = {
				limit = {
					is_active_resolution = resolution_defenseprivatization_security_business
				}
				add_modifier = {
					modifier = hired_mercenary_fleet_naval_cap_usage_galcom_4
				}
			}
			else_if = {
				limit = {
					is_active_resolution = resolution_defenseprivatization_condottieri
				}
				add_modifier = {
					modifier = hired_mercenary_fleet_naval_cap_usage_galcom_3
				}
			}
			else_if = {
				limit = {
					is_active_resolution = resolution_defenseprivatization_private_support_troops
				}
				add_modifier = {
					modifier = hired_mercenary_fleet_naval_cap_usage_galcom_2
				}
			}
			else_if = {
				limit = {
					is_active_resolution = resolution_defenseprivatization_defense_contracts
				}
				add_modifier = {
					modifier = hired_mercenary_fleet_naval_cap_usage_galcom_1
				}
			}
			else = {
				add_modifier = {
					modifier = hired_mercenary_fleet_naval_cap_usage_no_galcom
				}
			}
		}
		on_contract_expired = {
			remove_fleet_contract_modifiers = yes
		}
		on_contract_cancelled = {
			remove_fleet_contract_modifiers = yes
		}
		on_contract_broken = {
			remove_fleet_contract_modifiers = yes
		}
	}
	faction = {
		hostile = no
		needs_border_access = no
		generate_borders = no
		needs_colony = no
	}
	custom_diplomacy = yes
	custom_opinion = yes
	modules = {
		standard_technology_module = {}
		standard_event_module = {}
		standard_leader_module = {}
		standard_economy_module = {}
		exclusive_diplomacy_module = { contact_rule = on_action_only } # Nothing is allowed, but we need this for relationships.
	}

	resources = {
		category = country_base
		produces = {
			energy = 500
			minerals = 500
			food = 500
			alloys = 250
			consumer_goods = 100
			rare_crystals = 1
			exotic_gases = 1
			volatile_motes = 1
			sr_dark_matter = 1
			sr_living_metal = 1
			sr_zro = 1

			physics_research = 100
			engineering_research = 100
			society_research = 100

			unity = 50
		}

		produces = {
			trigger = {
				mid_game_years_passed > 0
			}
			energy = 500
			minerals = 500
			food = 500
			alloys = 250
			rare_crystals = 10
			exotic_gases = 10
			volatile_motes = 10

			physics_research = 250
			engineering_research = 250
			society_research = 250
		}

		produces = {
			trigger = {
				end_game_years_passed > 0
			}
			energy = 500
			minerals = 500
			food = 500
			alloys = 250
			sr_dark_matter = 5
			sr_living_metal = 5
			sr_zro = 5

			physics_research = 400
			engineering_research = 400
			society_research = 400
		}

		produces = {
			trigger = {
				has_technology = tech_rare_crystals
			}
			rare_crystals = 10
		}

		produces = {
			trigger = {
				has_technology = tech_exotic_gases
			}
			exotic_gases = 10
		}

		produces = {
			trigger = {
				has_technology = tech_volatile_motes
			}
			volatile_motes = 10
		}

		produces = {
			trigger = {
				has_technology = tech_mine_dark_matter
			}
			sr_dark_matter = 5
		}

		produces = {
			trigger = {
				has_technology = tech_mine_living_metal
			}
			sr_living_metal = 5
		}

		produces = {
			trigger = {
				has_technology = tech_mine_zro
			}
			sr_zro = 5
		}
	}
}

shroud = {
	is_the_shroud = yes
	show_in_contacts_list = yes
	minimalist_contacts_list_profile = yes
	share_communications = no
	default_ships = no
	government = no
	observable = no
	uses_origins = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = no
		needs_border_access = no
		generate_borders = no
		needs_colony = no
		auto_delete = no
	}
	custom_diplomacy = yes
	modules = {
		basic_technology_module = {}
		exclusive_diplomacy_module = {
			contact_rule = on_action_only
		}
	}
}

shroud_spirits = {
	is_space_critter = yes
	blocks_piracy = yes
	government = no
	observable = no
	uses_origins = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = yes
		needs_border_access = no
		generate_borders = no
		needs_colony = no
	}
	modules = {
		exclusive_diplomacy_module = {
			contact_rule = on_action_only
		}
		basic_technology_module = {}
		standard_event_module = {}
	}
}

gdf = {
	blocks_piracy = yes
	government = no
	observable = no
	uses_origins = no
	playable = no
	needs_survey = no
	ship_disengagement = yes
	has_complete_sensor = yes
	ai = {
		enabled = yes
		modules = {
			military_minister_module
			galactic_community_patrol_military_minister_module
		}
	}
	faction = {
		hostile = no
		needs_border_access = yes
		generate_borders = no
		needs_colony = no
	}
	modules = {
		exclusive_diplomacy_module = {
			contact_rule = always
		}
		all_technology_module = {}
		standard_event_module = {}
	}
}

#################
# CRISIS-RELATED
#################

swarm = {
	attack_unarmed_orbital_stations = yes
	scaled_difficulty_bonuses = 3.0	# scales to setting
	end_game_crisis = yes
	destroys_starbases = yes
	can_own_empty_planets = yes
	needs_survey = no
	has_complete_sensor = yes
	can_planets_be_attacked = no
	has_capital = no
	enforces_borders = no
	government = no
	colonizing_title = "COLONIZING_PLANET_SWARM"
	colonizing_desc = "PLANET_VIEW_UNDER_COLONIZATION_SWARM_DESC"
	home_system = swarm_invasion_target_1
	custom_starbase = starbase_swarm
	observable = yes
	uses_origins = no

	ai = {
		enabled = yes
		colonizer = yes
		construction = yes
		modules = {
			swarm_interior_minister_module
			swarm_military_minister_module
		}
	}
	faction = {
		needs_colony = no
		hostile = yes
		needs_border_access = no
	}

	custom_diplomacy = yes

	modules = {
		standard_event_module = {}
		standard_leader_module = {}
		all_technology_module = {}
		exclusive_diplomacy_module = {
			contact_rule = always
		}
	}
}

extradimensional = {
	attack_unarmed_orbital_stations = yes
	scaled_difficulty_bonuses = 3.0	# scales to setting
	end_game_crisis = yes
	destroys_starbases = yes
	needs_survey = no
	has_complete_sensor = yes
	can_planets_be_attacked = no
	has_capital = no
	enforces_borders = no
	home_system = extradimensional_origin_system
	custom_starbase = starbase_exd_0
	observable = yes
	uses_origins = no
	targets = {
		extradimensional_2
		extradimensional_3
	}
	government = no
	ai = {
		enabled = yes
		colonizer = yes
		construction = yes
		modules = {
			invaders_military_minister_module
			invaders_interior_minister_module
		}
	}
	faction = {
		needs_colony = no
		hostile = yes
		needs_border_access = no
	}

	custom_diplomacy = yes

	modules = {
		standard_event_module = {}
		standard_leader_module = {}
		all_technology_module = {}
		exclusive_diplomacy_module = {
			contact_rule = always
		}
	}
}

extradimensional_2 = {
	attack_unarmed_orbital_stations = yes
	scaled_difficulty_bonuses = 3.0	# scales to setting
	end_game_crisis = yes
	destroys_starbases = yes
	needs_survey = no
	has_complete_sensor = yes
	can_planets_be_attacked = no
	has_capital = no
	enforces_borders = no
	home_system = extradimensional_second_portal_system
	custom_starbase = starbase_exd
	observable = yes
	uses_origins = no
	targets = {
		extradimensional
		extradimensional_3
	}
	government = no
	ai = {
		enabled = yes
		colonizer = yes
		construction = yes
		modules = {
			invaders_military_minister_module
		}
	}
	faction = {
		needs_colony = no
		hostile = yes
		needs_border_access = no
	}

	custom_diplomacy = yes

	modules = {
		standard_event_module = {}
		standard_leader_module = {}
		all_technology_module = {}
		exclusive_diplomacy_module = {
			contact_rule = always
		}
	}
}

extradimensional_3 = {
	attack_unarmed_orbital_stations = yes
	scaled_difficulty_bonuses = 3.0	# scales to setting
	end_game_crisis = yes
	destroys_starbases = yes
	needs_survey = no
	has_complete_sensor = yes
	can_planets_be_attacked = no
	has_capital = no
	enforces_borders = no
	home_system = extradimensional_third_portal_system
	custom_starbase = starbase_exd
	observable = yes
	uses_origins = no
	targets = {
		extradimensional
		extradimensional_2
	}
	government = no
	ai = {
		enabled = yes
		colonizer = yes
		construction = yes
		modules = {
			invaders_military_minister_module
		}
	}
	faction = {
		needs_colony = no
		hostile = yes
		needs_border_access = no
	}

	custom_diplomacy = yes

	modules = {
		standard_event_module = {}
		standard_leader_module = {}
		all_technology_module = {}
		exclusive_diplomacy_module = {
			contact_rule = always
		}
	}
}

ai_empire = {
	attack_unarmed_orbital_stations = yes
	scaled_difficulty_bonuses = 3.0	# scales to setting
	end_game_crisis = yes
	destroys_starbases = yes
	can_own_empty_planets = yes
	needs_survey = no
	has_complete_sensor = yes
	can_planets_be_attacked = yes
	has_capital = no
	playable = no
	government = no
	enforces_borders = no
	minimalist_contacts_list_profile = yes
	home_system = AI_lair
	hub_system = AI_hub
	custom_starbase = starbase_ai
	observable = yes
	uses_origins = no
	ai = {
		enabled = yes
		colonizer = yes
		government = no
		construction = yes
		modules = {
			machine_interior_minister_module
			machine_military_minister_module
		}
	}

	faction = {
		needs_colony = no
		hostile = yes
		needs_border_access = no
	}

	custom_diplomacy = yes

	modules = {
		standard_event_module = {}
		standard_leader_module = {}
		all_technology_module = {}
		exclusive_diplomacy_module = {
			contact_rule = always
		}
	}
}

cybrex_empire = {
	scaled_difficulty_bonuses = 3.0
	can_own_empty_planets = yes
	can_planets_be_attacked = no
	needs_survey = no
	has_complete_sensor = yes
	government = no
	playable = no
	enforces_borders = no
	minimalist_contacts_list_profile = yes
	home_system = cybrex_beta
	anti_end_game_crisis = yes #fights Contingency
	observable = yes
	ai = {
		enabled = yes
		modules = {
			anti_crisis_military_minister_module
		}
	}
	faction = {
		hostile = no
		needs_border_access = no
		needs_colony = no
		generate_borders = yes
	}

	custom_diplomacy = yes

	modules = {
		exclusive_diplomacy_module = {
			contact_rule = always
		}
		all_technology_module = {}
		standard_event_module = {}
	}
}

sentinels = {
	scaled_difficulty_bonuses = 3.0
	home_system = sentinel_system
	custom_diplomacy = yes
	share_survey_data = no
	enforces_borders = no
	needs_survey = no
	has_complete_sensor = yes
	observable = yes
	anti_end_game_crisis = yes #fights Prethoryn
	ai = {
		enabled = yes
		modules = {
			anti_crisis_military_minister_module
		}
	}
	faction = {
		hostile = no
		needs_border_access = no
		needs_colony = no
		generate_borders = yes
	}

	modules = {
		exclusive_diplomacy_module = { contact_rule = on_action_only } # Nothing is allowed, but we need this for relationships.
		all_technology_module = {}
		standard_event_module = {}
	}
}

gate_builders = {
	scaled_difficulty_bonuses = 3.0
	custom_diplomacy = yes
	share_survey_data = no
	enforces_borders = no
	needs_survey = no
	has_complete_sensor = yes
	observable = yes
	custom_starbase = starbase_gatebuilders
	ai = {
		enabled = yes
		modules = {
			anti_crisis_military_minister_module
		}
	}
	faction = {
		hostile = no
		needs_border_access = no
		needs_colony = no
		generate_borders = yes
	}

	modules = {
		exclusive_diplomacy_module = { contact_rule = on_action_only } # Nothing is allowed, but we need this for relationships.
		all_technology_module = {}
		standard_event_module = {}
		standard_economy_module = {}
	}

	resources = {
		category = country_base
		produces = {
			energy = 100
			minerals = 10
			physics_research = 10
			society_research = 10
			engineering_research = 10
			influence = 3
			unity = 2
			alloys = 125
			volatile_motes = 20
			rare_crystals = 1
			exotic_gases = 1
		}
	}
}

gray = {
	show_in_contacts_list = yes
	minimalist_contacts_list_profile = yes
	share_communications = no
	default_ships = no
	government = no
	uses_origins = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = no
		needs_border_access = no
		generate_borders = no
		needs_colony = no
		auto_delete = no
	}
	custom_diplomacy = yes
	modules = {
		basic_technology_module = {}
		exclusive_diplomacy_module = {
			contact_rule = on_action_only
		}
	}
}

synth_queen_storm = {
	attack_unarmed_orbital_stations = no
	scaled_difficulty_bonuses = 3.0	# scales to setting
	end_game_crisis = yes
	destroys_starbases = no
	can_own_empty_planets = yes
	needs_survey = no
	has_complete_sensor = yes
	can_planets_be_attacked = yes
	#has_capital = yes
	playable = no
	government = no
	enforces_borders = no
	diplomatic_wars = yes
	#minimalist_contacts_list_profile = yes
	show_in_contacts_list = no
	home_system = synth_queen_capital
	custom_starbase = starbase_synth_queen
	observable = yes
	uses_origins = no
	ai = {
		enabled = yes
		colonizer = yes
		government = no
		construction = yes
		modules = {
			synth_queen_interior_minister_module
			synth_queen_military_minister_module
		}
	}

	faction = {
		needs_colony = no
		hostile = no
		needs_border_access = no
	}

	custom_diplomacy = yes

	modules = {
		standard_event_module = {}
		standard_leader_module = {}
		all_technology_module = {}
		exclusive_diplomacy_module = {
			contact_rule = always
			can_receive = {
				action_declare_war
				action_offer_peace
			}
			can_send = {
				action_declare_war
				action_offer_peace
			}
		}
	}
}

synth_queen = {
	attack_unarmed_orbital_stations = no
	scaled_difficulty_bonuses = 3.0	# scales to setting
	end_game_crisis = yes
	destroys_starbases = no
	can_own_empty_planets = yes
	needs_survey = no
	has_complete_sensor = yes
	can_planets_be_attacked = yes
	has_capital = yes
	playable = no
	government = no
	enforces_borders = yes
	diplomatic_wars = yes
	minimalist_contacts_list_profile = yes
	home_system = synth_queen_capital
	custom_starbase = starbase_synth_queen
	observable = yes
	uses_origins = no
	ai = {
		enabled = yes
		colonizer = yes
		government = no
		construction = yes
		modules = {
			synth_queen_interior_minister_module
			synth_queen_military_minister_module
		}
	}

	faction = {
		needs_colony = no
		hostile = no
		needs_border_access = no
	}

	custom_diplomacy = yes
	custom_opinion = yes

	modules = {
		standard_event_module = {}
		standard_leader_module = {}
		all_technology_module = {}
		exclusive_diplomacy_module = {
			contact_rule = always
			can_receive = {
				action_declare_war
				action_offer_peace
			}
			can_send = {
				action_declare_war
				action_offer_peace
			}
		}
	}
}

awakened_synth_queen = {
	attack_unarmed_orbital_stations = no
	ship_disengagement = no
	army_disengagement = no
	scaled_difficulty_bonuses = 3.0	# scales to setting
	end_game_crisis = yes
	destroys_starbases = yes
	can_own_empty_planets = yes
	needs_survey = no
	has_complete_sensor = yes
	can_planets_be_attacked = yes
	has_capital = yes
	playable = no
	government = no
	enforces_borders = no
	diplomatic_wars = no
	#minimalist_contacts_list_profile = yes
	home_system = synth_queen_capital
	custom_starbase = starbase_synth_queen
	observable = yes
	uses_origins = no
	ai = {
		enabled = yes
		colonizer = yes
		government = no
		construction = yes
		modules = {
			synth_queen_interior_minister_module
			synth_queen_military_minister_module
		}
	}

	faction = {
		needs_colony = no
		hostile = no
		needs_border_access = no
	}

	custom_diplomacy = yes

	modules = {
		standard_event_module = {}
		standard_leader_module = {}
		all_technology_module = {}
		exclusive_diplomacy_module = {
			contact_rule = always
		}
	}
}

synth_queen_convoys = {
	show_in_contacts_list = no
	government = no
	observable = yes
	ai = {
		enabled = no
	}
	faction = {
		hostile = no
		needs_border_access = no
		generate_borders = no
		needs_colony = no
	}

	custom_diplomacy = yes

	modules = {
		basic_technology_module = {}
		standard_event_module = {}
		exclusive_diplomacy_module = {}
	}
}

synth_queen_outposts = {
	show_in_contacts_list = no
	government = no
	observable = yes
	enforces_borders = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = no
		needs_border_access = no
		generate_borders = no
		needs_colony = no
	}

	custom_diplomacy = yes

	modules = {
		basic_technology_module = {}
		standard_event_module = {}
		exclusive_diplomacy_module = {}
	}
}

the_reckoning = {
	scaled_difficulty_bonuses = 3.0	# scales to setting
	destroys_starbases = yes
	end_game_crisis = yes
	is_space_critter = yes
	blocks_piracy = yes
	government = no
	observable = no
	uses_origins = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = yes
		needs_border_access = no
		generate_borders = no
		needs_colony = no
	}
	modules = {
		exclusive_diplomacy_module = {
			contact_rule = on_action_only
		}
		basic_technology_module = {}
		standard_event_module = {}
	}
}

#################
# SPACE MONSTERS
#################

tiyanki = {
	share_communications = no
	is_space_critter = yes
	government = no
	observable = no
	ai = {
		enabled = yes
		modules = {
			space_monsters_module
		}
		avoid_enemies = yes
	}
	faction = {
		hostile = no
		needs_border_access = no
		generate_borders = no
		needs_colony = no
		space_creatures = yes
		auto_delete = no
	}
	modules = {
		exclusive_diplomacy_module = {} # Nothing is allowed, but we need this for relationships.
		basic_technology_module = {}
		standard_event_module = {} # For bouncing events
	}
}

# Tiyanki Spawn System Garrison
tiyanki_garrison = {
	share_communications = no
	is_space_critter = yes
	government = no
	observable = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = no
		needs_border_access = no
		generate_borders = no
		needs_colony = no
		space_creatures = yes
	}
	modules = {
		exclusive_diplomacy_module = {} # Nothing is allowed, but we need this for relationships.
		basic_technology_module = {}
		standard_event_module = {} # For bouncing events
	}
}

amoeba = {
	share_communications = no
	is_space_critter = yes
	blocks_piracy = yes
	government = no
	observable = no
	ai = {
		enabled = yes
		modules = {
			space_monsters_module
		}
		avoid_enemies = yes
	}
	faction = {
		hostile = yes
		needs_border_access = no
		generate_borders = no
		needs_colony = no
		space_creatures = yes
		auto_delete = no
	}
	modules = {
		exclusive_diplomacy_module = {} # Nothing is allowed, but we need this for relationships.
		basic_technology_module = {}
	}
	pre_communications_fleet_name = "NO_COMMUNICATIONS_AMOEBA"
}

amoeba_borderless = { #same as above, but will cross borders
	share_communications = no
	is_space_critter = yes
	blocks_piracy = yes
	government = no
	observable = no
	ai = {
		enabled = yes
		modules = {
			space_monsters_module
		}
	}
	faction = {
		hostile = yes
		needs_border_access = no
		generate_borders = no
		needs_colony = no
		space_creatures = yes
	}
	modules = {
		exclusive_diplomacy_module = {} # Nothing is allowed, but we need this for relationships.
		basic_technology_module = {}
	}
	pre_communications_fleet_name = "NO_COMMUNICATIONS_AMOEBA"
}

amoeba_garrison = {
	share_communications = no
	is_space_critter = yes
	blocks_piracy = yes
	government = no
	observable = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = yes
		needs_border_access = no
		generate_borders = no
		needs_colony = no
		space_creatures = yes
	}
	modules = {
		exclusive_diplomacy_module = {} # Nothing is allowed, but we need this for relationships.
		basic_technology_module = {}
	}
	pre_communications_fleet_name = "NO_COMMUNICATIONS_AMOEBA"
}

amoeba_faction = { #same as "faction", but doesn't block first contact site from spawning
	government = no
	observable = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = yes
		needs_border_access = no
		generate_borders = no
		needs_colony = no
	}
	modules = {
		exclusive_diplomacy_module = {} # Nothing is allowed, but we need this for relationships.
		basic_technology_module = {}
	}
}

crystal = {
	share_communications = no
	is_space_critter = yes
	blocks_piracy = yes
	government = no
	observable = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = yes
		needs_border_access = no
		generate_borders = no
		needs_colony = no
		space_creatures = yes
		auto_delete = no
	}
	modules = {
		exclusive_diplomacy_module = {} # Nothing is allowed, but we need this for relationships.
		basic_technology_module = {}
	}
}

crystal_faction = { #same as "faction", but doesn't block first contact site from spawning
	government = no
	observable = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = yes
		needs_border_access = no
		generate_borders = no
		needs_colony = no
	}
	modules = {
		exclusive_diplomacy_module = {} # Nothing is allowed, but we need this for relationships.
		basic_technology_module = {}
	}
}

drone = {
	always_valid_target_aggressive = yes
	share_communications = no
	is_space_critter = yes
	blocks_piracy = yes
	government = no
	observable = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = yes
		needs_border_access = no
		generate_borders = no
		needs_colony = no
		space_creatures = yes
	}
	modules = {
		exclusive_diplomacy_module = {} # Nothing is allowed, but we need this for relationships.
		basic_technology_module = {}
	}
}

drone_faction = {
	government = no
	observable = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = yes
		needs_border_access = no
		generate_borders = no
		needs_colony = no
	}
	modules = {
		exclusive_diplomacy_module = {} # Nothing is allowed, but we need this for relationships.
		basic_technology_module = {}
	}
}

cloud = {
	share_communications = no
	is_space_critter = yes
	blocks_piracy = yes
	government = no
	observable = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = yes
		needs_border_access = no
		generate_borders = no
		needs_colony = no
		space_creatures = yes
	}
	modules = {
		exclusive_diplomacy_module = {} # Nothing is allowed, but we need this for relationships.
		basic_technology_module = {}
	}
}

portal_holder = {
	show_in_contacts_list = no
	is_space_critter = yes
	government = no
	observable = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = no
		needs_border_access = no
		generate_borders = no
		needs_colony = no
		auto_delete = no
	}
	modules = {
		exclusive_diplomacy_module = {} # Nothing is allowed, but we need this for relationships.
		basic_technology_module = {}
	}
}

feral_prethoryn = {
	is_space_critter = yes
	blocks_piracy = yes
	government = no
	enforces_borders = no
	observable = no
	ai = {
		enabled = yes
		modules = {
			space_monsters_module
		}
		avoid_enemies = yes
	}
	faction = {
		hostile = yes
		needs_border_access = no
		generate_borders = yes
		needs_colony = no
		space_creatures = yes
	}
	modules = {
		standard_event_module = {}
		exclusive_diplomacy_module = {}
		basic_technology_module = {}
	}
}

feral_prethoryn_infighting = {
	is_space_critter = yes
	blocks_piracy = yes
	government = no
	observable = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = yes
		needs_border_access = no
		generate_borders = no
		needs_colony = no
		space_creatures = yes
	}
	modules = {
		standard_event_module = {}
		exclusive_diplomacy_module = {}
		basic_technology_module = {}
	}
}

marauder_raiders = {
	attack_unarmed_orbital_stations = yes
	scaled_difficulty_bonuses = 1.0	# scales to setting
	government = no
	observable = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = no
		needs_border_access = no
		generate_borders = no
		needs_colony = no
	}
	#custom_diplomacy = yes
	modules = {
		standard_event_module = {}
		exclusive_diplomacy_module = {
			contact_rule = on_action_only
		}
		basic_technology_module = {}
	}
}

vol = {
	show_in_contacts_list = no
	observable = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = yes
		needs_border_access = no
		generate_borders = no
		needs_colony = no
		auto_delete = no
	}
	modules = {
		basic_technology_module = {}
		standard_event_module = {}
		exclusive_diplomacy_module = {
			contact_rule = on_action_only
			can_receive = {
				action_declare_war
				action_offer_peace
			}
		}
	}
}

ratlings = {
	share_communications = no
	observable = no
	ai = {
		enabled = no
		construction = no
	}
	faction = {
		hostile = no
		primitive = no
		needs_border_access = no
		generate_borders = no
		needs_colony = yes
		intel_effects_surveyed = no
	}
	hide_names_if_no_communication = yes

	modules = {
		standard_event_module = {}
		basic_technology_module = {}
		exclusive_diplomacy_module = {
			contact_rule = on_action_only
		}
		#exclusive_diplomacy_module = {} # Nothing is allowed, but we need this for relationships.
	}
}

enigmatic_cache = {
	is_space_critter = yes
	destroys_starbases = no
	#blocks_pirate = yes
	observable = no
	government = no
	ai = {
		enabled = no
	}
	faction = {
		neutral = yes
		needs_border_access = no
		generate_borders = no
		needs_colony = no
		auto_delete = no
	}
	modules = {
		exclusive_diplomacy_module = { contact_rule = on_action_only } # Nothing is allowed, but we need this for relationships.
		basic_technology_module = {}
		standard_event_module = {}
	}
}

gray_goo = {
	attack_unarmed_orbital_stations = yes
	scaled_difficulty_bonuses = 1.5	# scales to setting
	destroys_starbases = yes
	show_in_contacts_list = no
	share_survey_data = no
	custom_diplomacy = no
	mid_game_crisis = yes
	enforces_borders = no
	needs_survey = no
	has_complete_sensor = yes
	can_have_their_comms_shared = yes
	government = no
	observable = no
	ai = {
		enabled = yes
		modules = {
			berserk_military_minister_module
		}
	}

	faction = {
		hostile = yes
		needs_border_access = no
		generate_borders = yes
		needs_colony = no
	}
	modules = {
		exclusive_diplomacy_module = {
			contact_rule = on_action_only
		} # Nothing is allowed, but we need this for relationships.
		tiered_technology_module = {
			tier = 3
			rare = no
		}
		standard_event_module = {}
	}
}

mechanocalibrator = {
	share_communications = no
	observable = no
	government = no
	ai = {
		enabled = no
		construction = no
	}
	faction = {
		hostile = no
		primitive = no
		needs_border_access = no
		generate_borders = no
		needs_colony = no
	}
	hide_names_if_no_communication = yes

	modules = {
		standard_event_module = {}
		basic_technology_module = {}
		exclusive_diplomacy_module = {
			contact_rule = on_action_only
		}
		#exclusive_diplomacy_module = {} # Nothing is allowed, but we need this for relationships.
	}
}

vluur = {
	share_communications = no
	is_space_critter = yes
	government = no
	observable = no
	ai = {
		enabled = yes
		modules = {
			space_monsters_module
		}
		avoid_enemies = yes
	}
	faction = {
		hostile = no
		needs_border_access = no
		generate_borders = no
		needs_colony = no
		space_creatures = yes
	}
	modules = {
		exclusive_diplomacy_module = { contact_rule = on_action_only } # Nothing is allowed, but we need this for relationships.
		basic_technology_module = {}
		standard_event_module = {} # For bouncing events
	}
}

# Used for the Payback dig site security system
slavers_dummy = {
	attack_unarmed_orbital_stations = no
	scaled_difficulty_bonuses = 1.0	# scales to setting
	show_in_contacts_list = no
	government = no
	observable = no
	uses_origins = no
	ai = {
		enabled = no
	}

	faction = {
		hostile = yes
		needs_border_access = no
		generate_borders = no
		needs_colony = no
	}
	modules = {
		exclusive_diplomacy_module = {
			contact_rule = on_action_only
		} # Nothing is allowed, but we need this for relationships.
		all_technology_module = {}
		standard_event_module = {}
	}
}

debt_collectors = {
	attack_unarmed_orbital_stations = no
	scaled_difficulty_bonuses = 1.0	# scales to setting
	show_in_contacts_list = no
	government = no
	observable = no
	uses_origins = no
	ai = {
		enabled = no
	}

	faction = {
		hostile = yes
		needs_border_access = no
		generate_borders = no
		needs_colony = no
	}
	modules = {
		exclusive_diplomacy_module = {
			contact_rule = on_action_only
		} # Nothing is allowed, but we need this for relationships.
		all_technology_module = {}
		standard_event_module = {}
	}
}

jaunting_traveler_dummy = { #This country type is only needed for the Jaunting Traveler first contact story. It should never be used for anything else.
	government = no
	observable = no
	share_communications = no
	ai = {
		enabled = no
	}
	faction = {
		needs_border_access = no
		generate_borders = no
		needs_colony = no
		auto_delete = no
	}
	modules = {
		exclusive_diplomacy_module = { # Nothing is allowed, but we need this for relationships.
		}
		basic_technology_module = {}
	}
}

no_contact_neutral_faction = {
	is_space_critter = yes
	destroys_starbases = no
	#blocks_pirate = yes
	observable = no
	government = no
	ai = {
		enabled = no
	}
	faction = {
		neutral = yes
		needs_border_access = no
		generate_borders = no
		needs_colony = no
		auto_delete = no
	}
	modules = {
		exclusive_diplomacy_module = { contact_rule = on_action_only } # Nothing is allowed, but we need this for relationships.
		basic_technology_module = {}
		standard_event_module = {}
	}
}

abandoned_hatchery = {
	scaled_difficulty_bonuses = 1
	blocks_piracy = yes
	can_own_empty_planets = yes
	has_capital = yes
	government = no
	enforces_borders = no
	observable = no
	uses_origins = no
	home_system = starlit_sealed_1
	ai = {
		enabled = no
	}
	faction = {
		hostile = yes
		needs_border_access = no
		generate_borders = no
		needs_colony = no
	}
	modules = {
		exclusive_diplomacy_module = {
			contact_rule = on_action_only
		}
		basic_technology_module = {}
		standard_event_module = {}
	}
}

behemoth_hatchling = {
	scaled_difficulty_bonuses = 0.5	# scales to setting
	government = no
	attack_unarmed_orbital_stations = yes
	destroys_starbases = yes
	observable = yes
	orbital_bombardment = yes
	ai = {
		enabled = no
	}
	faction = {
		hostile = yes
		needs_border_access = no
		generate_borders = no
		needs_colony = no
		auto_delete = yes
	}
	modules = {
		exclusive_diplomacy_module = { contact_rule = always } # Nothing is allowed, but we need this for relationships.
		basic_technology_module = {}
		standard_event_module = {} # For bouncing events
	}
}

voidspawn_boss = {
	scaled_difficulty_bonuses = 2.5	# scales to setting
	is_space_critter = yes
	government = no
	destroys_starbases = yes
	observable = yes
	ai = {
		enabled = no
		modules = {
			swarm_military_minister_module
		}
	}
	faction = {
		needs_colony = no
		hostile = yes
		needs_border_access = no
	}

	modules = {
		standard_event_module = {}
		basic_technology_module = {}
		exclusive_diplomacy_module = {
			contact_rule = always
		}
	}
}

champions_forge_contestant = {
	attack_unarmed_orbital_stations = yes
	scaled_difficulty_bonuses = 1.0	# scales to setting
	government = no
	observable = yes
	can_own_empty_planets = yes
	needs_survey = yes
	ai = {
		enabled = no
	}
	faction = {
		hostile = no
		needs_border_access = no
		generate_borders = no
		needs_colony = no
	}
	#custom_diplomacy = yes
	modules = {
		standard_event_module = {}
		exclusive_diplomacy_module = {
			contact_rule = always
		}
		basic_technology_module = {}
	}
}

dummy_miners = { # This country type is only needed for the red_giant origin
	attack_unarmed_orbital_stations = no
	scaled_difficulty_bonuses = 1.0	# scales to setting
	show_in_contacts_list = no
	government = no
	observable = no
	share_communications = no
	uses_origins = no
	ai = {
		enabled = no
	}
	faction = {
		hostile = no
		neutral = yes
		needs_border_access = no
		generate_borders = no
		needs_colony = no
		auto_delete = no
	}
	modules = {
		exclusive_diplomacy_module = {
			contact_rule = on_action_only
		} # Nothing is allowed, but we need this for relationships.
		all_technology_module = {}
	}
}
