###############################################
# === xenomorph_hive_lv_jobs.txt ===
###############################################
###############################################
# XENOMORPH HIVE — LV-INSPIRED NATIVE JOBS
#
# Self-contained jobs in the Lustful-Void vein (nurture / milk / pleasure)
# but producing the hive's OWN resources, so they work with no LV dependency.
# All are gestalt drone jobs worked by Xenomorph pops in the hive.
#
# Descriptions are in a biological / hive register.
###############################################

# --- Brood Nectar Drone: a "milk" analogue producing Royal Jelly + food ---
xenomorph_brood_nectar_drone = {
	category = simple_drone
	swappable_data = {
		default = {
			building_icon = building_hatchery
			icon = lv_milk_drone
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
	}
	possible = {
		hidden_trigger = { exists = owner }
		owner = { is_gestalt = yes }
		is_xenomorph = yes
	}
	resources = {
		category = planet_farmers
		produces = {
			food = 6
			xenomorph_eggs = 1
		}
		upkeep = {
			minerals = 1
		}
	}
	weight = { weight = 5000 }
}

# --- Nurture Drone: tends the brood, producing amenities + offspring ---
xenomorph_nurture_drone = {
	category = simple_drone
	swappable_data = {
		default = {
			building_icon = building_hatchery
			icon = lv_nurture_drone
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
	}
	possible = {
		hidden_trigger = { exists = owner }
		owner = { is_gestalt = yes }
		is_xenomorph = yes
	}
	planet_modifier = {
		planet_amenities_add = 5
	}
	resources = {
		category = planet_technician
		produces = {
			xenomorph_offspring = 1
		}
		upkeep = {
			food = 2
		}
	}
	weight = { weight = 5000 }
}

# --- Pheromone Pleasure Drone: a "comfort" analogue, amenities + unity ---

###############################################
# === xenomorph_jobs_updated.txt ===
###############################################
###############################################
# XENOMORPH JOBS
# All jobs have gestalt and non-gestalt variants.
###############################################

@standard_promotion_time = 360

#############################################
# EMPRESS — Ruler tier, capital only, 1 per empire
#############################################

xenomorph_empress = {
	category = ruler
	swappable_data = {
		default = {
			building_icon = building_capital
			icon = xenomorph_empress
		}
	}

	tags = { unity amenities pop_growth xenomorph_eggs strategic_resource }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_enslaved = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		job_xenomorph_brood_queen_xenomorph_eggs_produces_mult = 0.20
		job_xenomorph_brood_queen_gestalt_xenomorph_eggs_produces_mult = 0.20
		job_xenomorph_broodmother_slave_xenomorph_offspring_produces_mult = 0.20
		job_xenomorph_broodmare_thrall_xenomorph_offspring_produces_mult = 0.20
		planet_stability_add = 10
		logistic_growth_mult = 0.15
		planet_amenities_add = 20
	}

	pop_modifier = {
		pop_defense_armies_add = 1000
	}

	country_modifier = {
		country_unity_produces_mult = 0.15
		country_naval_cap_add = 20
	}

	resources = {
		category = planet_xenomorph_royal_egg_layers
		produces = {
			unity = 20
			xenomorph_eggs = 4
		}
		upkeep = {
			food = 15
		}
	}

	weight = {
		weight = 999999
	}
	inline_script = "jobs/automodding_priority_unity"
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = ruler
				AMOUNT = local_pop_amount
			}
		}
	}
}


xenomorph_empress_gestalt = {
	category = complex_drone
	swappable_data = {
		default = {
			building_icon = building_capital
			icon = xenomorph_empress
		}
	}

	tags = { unity amenities pop_growth xenomorph_eggs strategic_resource }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_enslaved = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		job_xenomorph_brood_queen_xenomorph_eggs_produces_mult = 0.20
		job_xenomorph_brood_queen_gestalt_xenomorph_eggs_produces_mult = 0.20
		job_xenomorph_broodmother_slave_xenomorph_offspring_produces_mult = 0.20
		job_xenomorph_broodmare_thrall_xenomorph_offspring_produces_mult = 0.20
		planet_stability_add = 10
		logistic_growth_mult = 0.15
		planet_amenities_add = 20
	}

	pop_modifier = {
		pop_defense_armies_add = 1000
	}

	country_modifier = {
		country_unity_produces_mult = 0.15
		country_naval_cap_add = 20
	}

	resources = {
		category = planet_xenomorph_royal_egg_layers
		produces = {
			unity = 20
			xenomorph_eggs = 4
		}
		upkeep = {
			food = 20
		}
	}

	weight = {
		weight = 999999
	}
	inline_script = "jobs/automodding_priority_unity"
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = complex_drone
				AMOUNT = local_pop_amount
			}
		}
	}
}


#############################################
# PALADIN — Elite guard of the Empress, defensive only
#############################################

xenomorph_paladin = {
	category = specialist
	swappable_data = {
		default = {
			building_icon = building_stronghold
			icon = xenomorph_paladin
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}
	pop_modifier = {
		pop_defense_armies_add = 500
	}
	planet_modifier = {
		planet_amenities_add = 3
		planet_crime_add = -15
	}
	country_modifier = {
		country_naval_cap_add = 4
	}
	resources = {
		category = planet_enforcers
		produces = {
			unity = 5
		}
		upkeep = {
			food = 2
		}
	}
	weight = {
		weight = 50000
	}
	inline_script = "jobs/automodding_priority_unity"
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = specialist
				AMOUNT = local_pop_amount
			}
		}
	}
}

xenomorph_paladin_gestalt = {
	category = complex_drone
	swappable_data = {
		default = {
			building_icon = building_stronghold
			icon = xenomorph_paladin
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_enslaved = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}
	pop_modifier = {
		pop_defense_armies_add = 500
	}
	planet_modifier = {
		planet_amenities_add = 3
		planet_crime_add = -15
	}
	country_modifier = {
		country_naval_cap_add = 4
	}
	resources = {
		category = planet_enforcers
		produces = {
			unity = 5
		}
		upkeep = {
			food = 2
		}
	}
	weight = {
		weight = 50000
	}
	inline_script = "jobs/automodding_priority_unity"
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = complex_drone
				AMOUNT = local_pop_amount
			}
		}
	}
}

#############################################
# QUEEN — Ruler tier
#############################################

xenomorph_queen = {
	category = ruler
	swappable_data = {
		default = {
			building_icon = building_capital
			icon = xenomorph_queen
		}
	}

	tags = { unity amenities pop_growth xenomorph_eggs strategic_resource }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_enslaved = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		job_xenomorph_brood_queen_xenomorph_eggs_produces_mult = 0.10
		job_xenomorph_brood_queen_gestalt_xenomorph_eggs_produces_mult = 0.10
		job_xenomorph_broodmother_slave_xenomorph_offspring_produces_mult = 0.10
		job_xenomorph_broodmare_thrall_xenomorph_offspring_produces_mult = 0.10
		planet_stability_add = 3
		logistic_growth_mult = 0.1
		planet_amenities_add = 10
	}

	pop_modifier = {
		pop_defense_armies_add = 500
	}

	resources = {
		category = planet_xenomorph_royal_egg_layers
		produces = {
			unity = 10
			xenomorph_eggs = 3
		}
		upkeep = {
			food = 5
		}
	}

	weight = {
		weight = 100000
	}
	inline_script = "jobs/automodding_priority_unity"
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = ruler
				AMOUNT = local_pop_amount
			}
		}
	}
}


xenomorph_queen_gestalt = {
	category = complex_drone
	swappable_data = {
		default = {
			building_icon = building_capital
			icon = xenomorph_queen_gestalt
		}
	}

	tags = { unity amenities pop_growth xenomorph_eggs strategic_resource }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_enslaved = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		job_xenomorph_brood_queen_xenomorph_eggs_produces_mult = 0.10
		job_xenomorph_brood_queen_gestalt_xenomorph_eggs_produces_mult = 0.10
		job_xenomorph_broodmother_slave_xenomorph_offspring_produces_mult = 0.10
		job_xenomorph_broodmare_thrall_xenomorph_offspring_produces_mult = 0.10
		planet_stability_add = 3
		logistic_growth_mult = 0.1
		planet_amenities_add = 10
	}

	pop_modifier = {
		pop_defense_armies_add = 500
	}

	resources = {
		category = planet_xenomorph_royal_egg_layers
		produces = {
			unity = 10
			xenomorph_eggs = 3
		}
		upkeep = {
			food = 10
		}
	}

	weight = {
		weight = 100000
	}
	inline_script = "jobs/automodding_priority_unity"
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = complex_drone
				AMOUNT = local_pop_amount
			}
		}
	}
}


#############################################
# KING — Patriarch's Dominion replacement for Queen jobs
#############################################





#############################################
# PRAETORIAN — Specialist tier, defensive army spawner
#############################################

xenomorph_praetorian = {
	category = specialist
	swappable_data = {
		default = {
			building_icon = building_stronghold
			icon = xenomorph_praetorian
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}
	pop_modifier = {
		pop_defense_armies_add = 200
	}
	planet_modifier = {
		planet_amenities_add = 5
		planet_crime_add = -10
	}
	country_modifier = {
		country_naval_cap_add = 6
	}
	resources = {
		category = planet_enforcers
		produces = {
			unity = 3
		}
		upkeep = {
			food = 1
		}
	}
	weight = {
		weight = 10000
	}
	inline_script = "jobs/automodding_priority_unity"
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = specialist
				AMOUNT = local_pop_amount
			}
		}
	}
}

xenomorph_praetorian_gestalt = {
	category = complex_drone
	swappable_data = {
		default = {
			building_icon = building_stronghold
			icon = xenomorph_praetorian_gestalt
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_enslaved = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}
	pop_modifier = {
		pop_defense_armies_add = 200
	}
	planet_modifier = {
		planet_amenities_add = 5
		planet_crime_add = -10
	}
	country_modifier = {
		country_naval_cap_add = 6
	}
	resources = {
		category = planet_enforcers
		produces = {
			unity = 3
		}
		upkeep = {
			food = 1
		}
	}
	weight = {
		weight = 10000
	}
	inline_script = "jobs/automodding_priority_unity"
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = complex_drone
				AMOUNT = local_pop_amount
			}
		}
	}
}

#############################################
# RECYCLER — Worker tier
#############################################



#############################################
# EGG CARETAKER — Worker tier, growth support
#############################################

xenomorph_egg_caretaker = {
	category = worker
	swappable_data = {
		default = {
			building_icon = building_xenomorph_egg_chamber
			icon = xenomorph_egg_caretaker
		}
	}

	tags = { amenities pop_growth xenomorph_eggs }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		planet_resource_xenomorph_eggs_add = 25
		pop_decline_speed = 0.02
		logistic_growth_mult = 0.03
	}

	resources = {
		category = planet_xenomorph_egg_storage_jobs
		produces = {
			amenities = 1
		}
		upkeep = {
			food = 3
		}
	}

	weight = {
		weight = 1000
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = worker
				AMOUNT = local_pop_amount
			}
		}
	}
}


xenomorph_egg_caretaker_gestalt = {
	category = simple_drone
	swappable_data = {
		default = {
			building_icon = building_xenomorph_egg_chamber
			icon = xenomorph_egg_caretaker_gestalt
		}
	}

	tags = { amenities pop_growth xenomorph_eggs }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		planet_resource_xenomorph_eggs_add = 25
		pop_decline_speed = 0.02
		logistic_growth_mult = 0.03
	}

	resources = {
		category = planet_xenomorph_egg_storage_jobs
		produces = {
			amenities = 1
		}
		upkeep = {
			food = 3
		}
	}

	weight = {
		weight = 1000
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = simple_drone
				AMOUNT = local_pop_amount
			}
		}
	}
}


#############################################
# BROOD LAYER — Worker tier, stacking growth
#############################################





#############################################
# ACID PROCESSOR — Worker tier, energy production
#############################################

xenomorph_acid_processor = {
	category = worker
	swappable_data = {
		default = {
			building_icon = building_stronghold
			icon = xenomorph_acid_processor
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}
	resources = {
		category = planet_technician
		produces = {
			energy = 4
			exotic_gases = 0.5
		}
		upkeep = {
			food = 5
		}
	}
	weight = {
		weight = 1000
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = worker
				AMOUNT = local_pop_amount
			}
		}
	}
}

xenomorph_acid_processor_gestalt = {
	category = simple_drone
	swappable_data = {
		default = {
			building_icon = building_stronghold
			icon = xenomorph_acid_processor
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}
	resources = {
		category = planet_technician
		produces = {
			energy = 4
			exotic_gases = 0.5
		}
		upkeep = {
			food = 5
		}
	}
	weight = {
		weight = 1000
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = simple_drone
				AMOUNT = local_pop_amount
			}
		}
	}
}

#############################################
# TUNNEL DRONE — Worker tier, housing support
#############################################

xenomorph_tunnel_drone = {
	category = worker
	swappable_data = {
		default = {
			building_icon = building_stronghold
			icon = xenomorph_tunnel_drone
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}
	resources = {
		category = planet_farmers
		produces = {
			minerals = 1
			food = 1
		}
		upkeep = {
			food = 2
		}
	}
	weight = {
		weight = 800
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = worker
				AMOUNT = local_pop_amount
			}
		}
	}
}

xenomorph_tunnel_drone_gestalt = {
	category = simple_drone
	swappable_data = {
		default = {
			building_icon = building_stronghold
			icon = xenomorph_tunnel_drone
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}
	resources = {
		category = planet_farmers
		produces = {
			minerals = 1
			food = 1
		}
		upkeep = {
			food = 2
		}
	}
	weight = {
		weight = 800
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = simple_drone
				AMOUNT = local_pop_amount
			}
		}
	}
}

#############################################
# SIGNAL DRONE — Specialist tier, unity + empire size
#############################################



#############################################
# CARAPACE WEAVER — Specialist tier, alloy production
#############################################

xenomorph_carapace_weaver = {
	category = specialist
	swappable_data = {
		default = {
			building_icon = building_stronghold
			icon = xenomorph_carapace_weaver
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}
	resources = {
		category = planet_metallurgists
		produces = {
			alloys = 4
		}
		upkeep = {
			food = 1
		}
	}
	weight = {
		weight = 2000
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = specialist
				AMOUNT = local_pop_amount
			}
		}
	}
}

xenomorph_carapace_weaver_gestalt = {
	category = complex_drone
	swappable_data = {
		default = {
			building_icon = building_stronghold
			icon = xenomorph_carapace_weaver
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_enslaved = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}
	resources = {
		category = planet_metallurgists
		produces = {
			alloys = 4
		}
		upkeep = {
			food = 1
		}
	}
	weight = {
		weight = 2000
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = complex_drone
				AMOUNT = local_pop_amount
			}
		}
	}
}

#############################################
# IMPLANTATION DRONE — Worker tier, conversion support
#############################################

xenomorph_implantation_drone = {
	category = worker
	swappable_data = {
		default = {
			building_icon = building_stronghold
			icon = xenomorph_implantation_drone
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}
	resources = {
		category = planet_farmers
		produces = {
			food = 3
			unity = 2
		}
		upkeep = {
			food = 2
		}
	}
	weight = {
		weight = 1000
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = worker
				AMOUNT = local_pop_amount
			}
		}
	}
}

xenomorph_implantation_drone_gestalt = {
	category = simple_drone
	swappable_data = {
		default = {
			building_icon = building_stronghold
			icon = xenomorph_implantation_drone
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}
	resources = {
		category = planet_farmers
		produces = {
			food = 3
			unity = 2
		}
		upkeep = {
			food = 2
		}
	}
	weight = {
		weight = 1000
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = simple_drone
				AMOUNT = local_pop_amount
			}
		}
	}
}

#############################################
# PIT WARDEN — Specialist tier, Breeding Pit
#############################################

xenomorph_pit_warden = {
	category = specialist
	swappable_data = {
		default = {
			building_icon = building_stronghold
			icon = xenomorph_pit_warden
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}
	resources = {
		category = planet_farmers
		produces = {
			food = 4
			unity = 3
		}
		upkeep = {
			food = 3
		}
	}
	planet_modifier = {
		logistic_growth_mult = 0.05
	}
	weight = {
		weight = 2000
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = specialist
				AMOUNT = local_pop_amount
			}
		}
	}
}

xenomorph_pit_warden_gestalt = {
	category = complex_drone
	swappable_data = {
		default = {
			building_icon = building_stronghold
			icon = xenomorph_pit_warden
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_enslaved = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}
	resources = {
		category = planet_farmers
		produces = {
			food = 4
			unity = 3
		}
		upkeep = {
			food = 3
		}
	}
	planet_modifier = {
		logistic_growth_mult = 0.05
	}
	weight = {
		weight = 2000
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = complex_drone
				AMOUNT = local_pop_amount
			}
		}
	}
}

#############################################
# PHEROMONE DRONE — Specialist tier, stability + compliance
#############################################

xenomorph_pheromone_drone = {
	category = specialist
	swappable_data = {
		default = {
			building_icon = building_stronghold
			icon = xenomorph_pheromone_drone
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}
	planet_modifier = {
		planet_stability_add = 2
		planet_crime_add = -8
	}
	resources = {
		category = planet_enforcers
		produces = {
			unity = 3
		}
		upkeep = {
			food = 2
		}
	}
	weight = {
		weight = 2000
	}
	inline_script = "jobs/automodding_priority_unity"
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = specialist
				AMOUNT = local_pop_amount
			}
		}
	}
}

xenomorph_pheromone_drone_gestalt = {
	category = complex_drone
	swappable_data = {
		default = {
			building_icon = building_stronghold
			icon = xenomorph_pheromone_drone
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_enslaved = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}
	planet_modifier = {
		planet_stability_add = 2
		planet_crime_add = -8
	}
	resources = {
		category = planet_enforcers
		produces = {
			unity = 3
		}
		upkeep = {
			food = 2
		}
	}
	weight = {
		weight = 2000
	}
	inline_script = "jobs/automodding_priority_unity"
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = complex_drone
				AMOUNT = local_pop_amount
			}
		}
	}
}

#############################################
# EXTRACTION DRONE — Worker tier, food from captives
#############################################

xenomorph_extraction_drone = {
	category = worker
	swappable_data = {
		default = {
			building_icon = building_stronghold
			icon = xenomorph_extraction_drone
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}
	resources = {
		category = planet_farmers
		produces = {
			food = 6
		}
	}
	weight = {
		weight = 1000
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = worker
				AMOUNT = local_pop_amount
			}
		}
	}
}

xenomorph_extraction_drone_gestalt = {
	category = simple_drone
	swappable_data = {
		default = {
			building_icon = building_stronghold
			icon = xenomorph_extraction_drone
		}
	}
	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}
	resources = {
		category = planet_farmers
		produces = {
			food = 6
		}
	}
	weight = {
		weight = 1000
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = simple_drone
				AMOUNT = local_pop_amount
			}
		}
	}
}

#############################################
# PRESERVATION WARDEN — Specialist tier, research
#############################################



###############################################
# HIVE INTERPRETER — Alias job for Specimen Preservation Vault
# Produces society research from studying specimens.
###############################################



#############################################
# BROOD QUEEN — Worker reproductive caste, Egg production
# Not the same as the royal Queen job.
#############################################

xenomorph_brood_queen = {
	category = worker
	swappable_data = {
		default = {
			building_icon = building_xenomorph_oviposition_chamber
			icon = xenomorph_brood_queen
		}
	}

	tags = { pop_growth xenomorph_eggs strategic_resource }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		logistic_growth_mult = 0.10
	}

	resources = {
		category = planet_xenomorph_brood_egg_layers
		produces = {
			xenomorph_eggs = 6
			food = 2
		}
		upkeep = {
			food = 10
		}
	}

	weight = {
		weight = 1000
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = worker
				AMOUNT = local_pop_amount
			}
		}
	}
}


xenomorph_brood_queen_gestalt = {
	category = simple_drone
	swappable_data = {
		default = {
			building_icon = building_xenomorph_oviposition_chamber
			icon = xenomorph_brood_queen
		}
	}

	tags = { pop_growth xenomorph_eggs strategic_resource }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		logistic_growth_mult = 0.10
	}

	resources = {
		category = planet_xenomorph_brood_egg_layers
		produces = {
			xenomorph_eggs = 6
			food = 2
		}
		upkeep = {
			food = 10
		}
	}

	weight = {
		weight = 1000
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = simple_drone
				AMOUNT = local_pop_amount
			}
		}
	}
}



#############################################
# QUEEN MOTHER — Origin ruler job
# Boosts Egg/Offspring-producing jobs, but does not directly produce Eggs.
#############################################

xenomorph_queen_mother = {
	category = ruler
	swappable_data = {
		default = {
			building_icon = building_xenomorph_queen_mother_hive
			icon = xenomorph_queen_mother
		}
	}

	tags = { unity amenities pop_growth xenomorph_eggs strategic_resource }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_enslaved = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		job_xenomorph_brood_queen_xenomorph_eggs_produces_mult = 0.25
		job_xenomorph_brood_queen_gestalt_xenomorph_eggs_produces_mult = 0.25
		job_xenomorph_broodmother_slave_xenomorph_offspring_produces_mult = 0.25
		job_xenomorph_broodmare_thrall_xenomorph_offspring_produces_mult = 0.25
		planet_stability_add = 15
		logistic_growth_mult = 0.2
		planet_amenities_add = 25
	}

	pop_modifier = {
		pop_defense_armies_add = 1500
	}

	country_modifier = {
		country_unity_produces_mult = 0.20
		country_naval_cap_add = 30
	}

	resources = {
		category = planet_xenomorph_royal_egg_layers
		produces = {
			unity = 30
			xenomorph_eggs = 5
		}
		upkeep = {
			food = 25
		}
	}

	weight = {
		weight = 999999
	}
	inline_script = "jobs/automodding_priority_unity"
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = ruler
				AMOUNT = local_pop_amount
			}
		}
	}
}


xenomorph_queen_mother_gestalt = {
	category = complex_drone
	swappable_data = {
		default = {
			building_icon = building_xenomorph_queen_mother_hive
			icon = xenomorph_queen_mother
		}
	}

	tags = { unity amenities pop_growth xenomorph_eggs strategic_resource }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_enslaved = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		job_xenomorph_brood_queen_xenomorph_eggs_produces_mult = 0.25
		job_xenomorph_brood_queen_gestalt_xenomorph_eggs_produces_mult = 0.25
		job_xenomorph_broodmother_slave_xenomorph_offspring_produces_mult = 0.25
		job_xenomorph_broodmare_thrall_xenomorph_offspring_produces_mult = 0.25
		planet_stability_add = 15
		logistic_growth_mult = 0.2
		planet_amenities_add = 25
	}

	pop_modifier = {
		pop_defense_armies_add = 1500
	}

	country_modifier = {
		country_unity_produces_mult = 0.20
		country_naval_cap_add = 30
	}

	resources = {
		category = planet_xenomorph_royal_egg_layers
		produces = {
			unity = 30
			xenomorph_eggs = 5
		}
		upkeep = {
			food = 30
		}
	}

	weight = {
		weight = 999999
	}
	inline_script = "jobs/automodding_priority_unity"
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = complex_drone
				AMOUNT = local_pop_amount
			}
		}
	}
}



#############################################
# HOST / SLAVE EMBRYO JOBS
#############################################


###############################################
# MATRIARCH — T3 capital ruler job
# Egg hierarchy rank: above Queen, below Empress
# Reproductive/leadership; bridges Queen to Empress/Brood Queen tiers
###############################################

xenomorph_matriarch = {
	category = ruler
	swappable_data = {
		default = {
			building_icon = building_xenomorph_matriarch_hive
			icon = xenomorph_matriarch
		}
	}

	tags = { unity amenities pop_growth xenomorph_eggs strategic_resource }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_enslaved = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		job_xenomorph_queen_xenomorph_eggs_produces_mult = 0.10
		job_xenomorph_queen_gestalt_xenomorph_eggs_produces_mult = 0.10
		job_xenomorph_egg_caretaker_xenomorph_eggs_produces_mult = 0.10
		job_xenomorph_egg_caretaker_gestalt_xenomorph_eggs_produces_mult = 0.10
		planet_stability_add = 5
		logistic_growth_mult = 0.08
		planet_amenities_add = 10
	}

	pop_modifier = {
		pop_defense_armies_add = 500
	}

	country_modifier = {
		country_unity_produces_mult = 0.05
	}

	resources = {
		category = planet_xenomorph_royal_egg_layers
		produces = {
			unity = 12
			xenomorph_eggs = 2
		}
		upkeep = {
			food = 10
		}
	}

	weight = {
		weight = 999999
	}
	inline_script = "jobs/automodding_priority_unity"
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = ruler
				AMOUNT = local_pop_amount
			}
		}
	}
}


xenomorph_matriarch_gestalt = {
	category = complex_drone
	swappable_data = {
		default = {
			building_icon = building_xenomorph_matriarch_hive
			icon = xenomorph_matriarch
		}
	}

	tags = { unity amenities pop_growth xenomorph_eggs strategic_resource }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_enslaved = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		job_xenomorph_queen_xenomorph_eggs_produces_mult = 0.10
		job_xenomorph_queen_gestalt_xenomorph_eggs_produces_mult = 0.10
		job_xenomorph_egg_caretaker_xenomorph_eggs_produces_mult = 0.10
		job_xenomorph_egg_caretaker_gestalt_xenomorph_eggs_produces_mult = 0.10
		planet_stability_add = 5
		logistic_growth_mult = 0.08
		planet_amenities_add = 10
	}

	pop_modifier = {
		pop_defense_armies_add = 500
	}

	country_modifier = {
		country_unity_produces_mult = 0.05
	}

	resources = {
		category = planet_xenomorph_royal_egg_layers
		produces = {
			unity = 12
			xenomorph_eggs = 2
		}
		upkeep = {
			food = 10
		}
	}

	weight = {
		weight = 999999
	}
	inline_script = "jobs/automodding_priority_unity"
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = complex_drone
				AMOUNT = local_pop_amount
			}
		}
	}
}


###############################################
# WAR MATRIARCH — T4-C capital ruler job
# Egg hierarchy rank: above Queen, below Matriarch
# Military command and ground/space warfare focus
###############################################

xenomorph_war_matriarch = {
	category = ruler
	swappable_data = {
		default = {
			building_icon = building_xenomorph_war_matriarch_hive
			icon = xenomorph_war_matriarch
		}
	}

	tags = { unity amenities xenomorph_eggs strategic_resource }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_enslaved = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		planet_stability_add = 8
		planet_defense_armies_add = 1500
		army_defense_damage_mult = 0.25
		army_defense_health_mult = 0.25
	}

	pop_modifier = {
		pop_defense_armies_add = 1500
	}

	country_modifier = {
		country_naval_cap_add = 25
		armies_upkeep_mult = -0.10
		army_damage_mult = 0.10
		army_health = 0.10
		ship_fire_rate_mult = 0.05
	}

	resources = {
		category = planet_xenomorph_royal_egg_layers
		produces = {
			unity = 15
			xenomorph_eggs = 1
		}
		upkeep = {
			food = 12
			alloys = 2
		}
	}

	weight = {
		weight = 999999
	}
	inline_script = "jobs/automodding_priority_unity"
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = ruler
				AMOUNT = local_pop_amount
			}
		}
	}
}


xenomorph_war_matriarch_gestalt = {
	category = complex_drone
	swappable_data = {
		default = {
			building_icon = building_xenomorph_war_matriarch_hive
			icon = xenomorph_war_matriarch
		}
	}

	tags = { unity amenities xenomorph_eggs strategic_resource }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_enslaved = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		planet_stability_add = 8
		planet_defense_armies_add = 1500
		army_defense_damage_mult = 0.25
		army_defense_health_mult = 0.25
	}

	pop_modifier = {
		pop_defense_armies_add = 1500
	}

	country_modifier = {
		country_naval_cap_add = 25
		armies_upkeep_mult = -0.10
		army_damage_mult = 0.10
		army_health = 0.10
		ship_fire_rate_mult = 0.05
	}

	resources = {
		category = planet_xenomorph_royal_egg_layers
		produces = {
			unity = 15
			xenomorph_eggs = 1
		}
		upkeep = {
			food = 12
			alloys = 2
		}
	}

	weight = {
		weight = 999999
	}
	inline_script = "jobs/automodding_priority_unity"
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = complex_drone
				AMOUNT = local_pop_amount
			}
		}
	}
}


###############################################
# ROYAL JELLY TENDER
# Specialist-tier reproductive support job for the Royal Jelly chain buildings.
# Produces a small amount of xenomorph_eggs and amenities; consumes food.
# Boosts surrounding Queen, Brood Layer, and Egg Caretaker egg output.
###############################################

xenomorph_royal_jelly_tender = {
	category = specialist
	swappable_data = {
		default = {
			building_icon = building_xenomorph_royal_jelly_pools
			icon = xenomorph_royal_jelly_tender
		}
	}

	tags = { amenities pop_growth xenomorph_eggs strategic_resource }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		job_xenomorph_queen_xenomorph_eggs_produces_mult = 0.05
		job_xenomorph_queen_gestalt_xenomorph_eggs_produces_mult = 0.05
		job_xenomorph_egg_caretaker_xenomorph_eggs_produces_mult = 0.05
		job_xenomorph_egg_caretaker_gestalt_xenomorph_eggs_produces_mult = 0.05
		planet_amenities_add = 3
	}

	resources = {
		category = planet_xenomorph_egg_storage_jobs
		produces = {
			xenomorph_eggs = 1
		}
		upkeep = {
			food = 5
		}
	}

	weight = {
		weight = 1000
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = specialist
				AMOUNT = local_pop_amount
			}
		}
	}
}


xenomorph_royal_jelly_tender_gestalt = {
	category = complex_drone
	swappable_data = {
		default = {
			building_icon = building_xenomorph_royal_jelly_pools
			icon = xenomorph_royal_jelly_tender
		}
	}

	tags = { amenities pop_growth xenomorph_eggs strategic_resource }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		job_xenomorph_queen_xenomorph_eggs_produces_mult = 0.05
		job_xenomorph_queen_gestalt_xenomorph_eggs_produces_mult = 0.05
		job_xenomorph_egg_caretaker_xenomorph_eggs_produces_mult = 0.05
		job_xenomorph_egg_caretaker_gestalt_xenomorph_eggs_produces_mult = 0.05
		planet_amenities_add = 3
	}

	resources = {
		category = planet_xenomorph_egg_storage_jobs
		produces = {
			xenomorph_eggs = 1
		}
		upkeep = {
			food = 5
		}
	}

	weight = {
		weight = 1000
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = complex_drone
				AMOUNT = local_pop_amount
			}
		}
	}
}


###############################################
# TRIBUTE OVERSEER — specialist who manages tribute slaves and converts
# their compliance into empire unity and amenities.
###############################################

xenomorph_tribute_overseer = {
	category = specialist
	swappable_data = {
		default = {
			building_icon = building_xenomorph_tribute_pens
			icon = xenomorph_tribute_overseer
		}
	}

	tags = { unity amenities }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		planet_crime_add = -5
		planet_amenities_add = 5
		job_xenomorph_tribute_thrall_unity_produces_mult = 0.10
	}

	resources = {
		category = planet_enforcers
		produces = {
			unity = 4
		}
		upkeep = {
			food = 2
		}
	}

	weight = {
		weight = 1500
	}
	inline_script = "jobs/automodding_priority_unity"
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = specialist
				AMOUNT = local_pop_amount
			}
		}
	}
}


xenomorph_tribute_overseer_gestalt = {
	category = complex_drone
	swappable_data = {
		default = {
			building_icon = building_xenomorph_tribute_pens
			icon = xenomorph_tribute_overseer
		}
	}

	tags = { unity amenities }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		planet_crime_add = -5
		planet_amenities_add = 5
		job_xenomorph_tribute_thrall_unity_produces_mult = 0.10
	}

	resources = {
		category = planet_enforcers
		produces = {
			unity = 4
		}
		upkeep = {
			food = 2
		}
	}

	weight = {
		weight = 1500
	}
	inline_script = "jobs/automodding_priority_unity"
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = complex_drone
				AMOUNT = local_pop_amount
			}
		}
	}
}


###############################################
# TRIBUTE THRALL — slave job. Tribute slaves produce unity through their
# compliance under overseer management.
###############################################

xenomorph_tribute_thrall = {
	category = slave
	swappable_data = {
		default = {
			building_icon = building_xenomorph_tribute_pens
			icon = xenomorph_tribute_thrall
		}
	}

	tags = { unity }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_enslaved = yes
	}
	possible = {
		NOT = { is_xenomorph = yes }
	}

	resources = {
		category = planet_xenomorph_breeding_toys
		produces = {
			unity = 2
		}
		upkeep = {
			food = 1
		}
	}

	weight = {
		weight = 1000
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = slave
				AMOUNT = local_pop_amount
			}
		}
	}
}


###############################################
# ROYAL TRIBUTE KEEPER — ruler job. Manages the apex tribute system
# in the Royal Pens, producing significant unity + influence.
###############################################

xenomorph_royal_tribute_keeper = {
	category = ruler
	swappable_data = {
		default = {
			building_icon = building_xenomorph_royal_pens
			icon = xenomorph_royal_tribute_keeper
		}
	}

	tags = { unity influence }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_enslaved = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		planet_stability_add = 3
		planet_crime_add = -10
		job_xenomorph_tribute_thrall_unity_produces_mult = 0.20
		job_xenomorph_tribute_overseer_unity_produces_mult = 0.15
		job_xenomorph_tribute_overseer_gestalt_unity_produces_mult = 0.15
	}

	country_modifier = {
		country_unity_produces_mult = 0.05
	}

	resources = {
		category = planet_xenomorph_royal_egg_layers
		produces = {
			unity = 10
			influence = 1
		}
		upkeep = {
			food = 8
		}
	}

	weight = {
		weight = 999999
	}
	inline_script = "jobs/automodding_priority_unity"
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = ruler
				AMOUNT = local_pop_amount
			}
		}
	}
}


xenomorph_royal_tribute_keeper_gestalt = {
	category = complex_drone
	swappable_data = {
		default = {
			building_icon = building_xenomorph_royal_pens
			icon = xenomorph_royal_tribute_keeper
		}
	}

	tags = { unity influence }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_enslaved = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		planet_stability_add = 3
		planet_crime_add = -10
		job_xenomorph_tribute_thrall_unity_produces_mult = 0.20
		job_xenomorph_tribute_overseer_unity_produces_mult = 0.15
		job_xenomorph_tribute_overseer_gestalt_unity_produces_mult = 0.15
	}

	country_modifier = {
		country_unity_produces_mult = 0.05
	}

	resources = {
		category = planet_xenomorph_royal_egg_layers
		produces = {
			unity = 10
			influence = 1
		}
		upkeep = {
			food = 8
		}
	}

	weight = {
		weight = 999999
	}
	inline_script = "jobs/automodding_priority_unity"
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = complex_drone
				AMOUNT = local_pop_amount
			}
		}
	}
}


###############################################
# DEFENSE CASTE JOBS
# Worker-tier military combat jobs that staff the Defense chain buildings.
# Each produces nothing directly; they provide planet_defense_armies and
# pop_defense_armies (via pop_modifier) plus army strength bonuses.
###############################################

xenomorph_hunter_drone = {
	category = worker
	swappable_data = {
		default = {
			building_icon = building_xenomorph_drones_nest
			icon = xenomorph_hunter_drone
		}
	}

	tags = { army }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	pop_modifier = {
		pop_defense_armies_add = 200
	}

	resources = {
		category = planet_soldiers
		upkeep = {
			food = 2
		}
	}

	weight = {
		weight = 1000
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = worker
				AMOUNT = local_pop_amount
			}
		}
	}
}

xenomorph_hunter_drone_gestalt = {
	category = simple_drone
	swappable_data = {
		default = {
			building_icon = building_xenomorph_drones_nest
			icon = xenomorph_hunter_drone
		}
	}

	tags = { army }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	pop_modifier = {
		pop_defense_armies_add = 200
	}

	resources = {
		category = planet_soldiers
		upkeep = {
			food = 2
		}
	}

	weight = {
		weight = 1000
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = simple_drone
				AMOUNT = local_pop_amount
			}
		}
	}
}

xenomorph_warrior_drone = {
	category = worker
	swappable_data = {
		default = {
			building_icon = building_xenomorph_warriors_nest
			icon = xenomorph_warrior_drone
		}
	}

	tags = { army }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		army_defense_damage_mult = 0.05
	}

	pop_modifier = {
		pop_defense_armies_add = 300
	}

	resources = {
		category = planet_soldiers
		upkeep = {
			food = 3
		}
	}

	weight = {
		weight = 1200
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = worker
				AMOUNT = local_pop_amount
			}
		}
	}
}

xenomorph_warrior_drone_gestalt = {
	category = simple_drone
	swappable_data = {
		default = {
			building_icon = building_xenomorph_warriors_nest
			icon = xenomorph_warrior_drone
		}
	}

	tags = { army }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		army_defense_damage_mult = 0.05
	}

	pop_modifier = {
		pop_defense_armies_add = 300
	}

	resources = {
		category = planet_soldiers
		upkeep = {
			food = 3
		}
	}

	weight = {
		weight = 1200
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = simple_drone
				AMOUNT = local_pop_amount
			}
		}
	}
}

xenomorph_sentry_drone = {
	category = worker
	swappable_data = {
		default = {
			building_icon = building_xenomorph_sentrys_nest
			icon = xenomorph_sentry_drone
		}
	}

	tags = { army }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		planet_crime_add = -5
		planet_orbital_bombardment_damage = -0.02
	}

	pop_modifier = {
		pop_defense_armies_add = 250
	}

	resources = {
		category = planet_soldiers
		upkeep = {
			food = 3
		}
	}

	weight = {
		weight = 1200
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = worker
				AMOUNT = local_pop_amount
			}
		}
	}
}

xenomorph_sentry_drone_gestalt = {
	category = simple_drone
	swappable_data = {
		default = {
			building_icon = building_xenomorph_sentrys_nest
			icon = xenomorph_sentry_drone
		}
	}

	tags = { army }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		planet_crime_add = -5
		planet_orbital_bombardment_damage = -0.02
	}

	pop_modifier = {
		pop_defense_armies_add = 250
	}

	resources = {
		category = planet_soldiers
		upkeep = {
			food = 3
		}
	}

	weight = {
		weight = 1200
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = simple_drone
				AMOUNT = local_pop_amount
			}
		}
	}
}

xenomorph_heavy_caste = {
	category = worker
	swappable_data = {
		default = {
			building_icon = building_xenomorph_heavy_caste_warren
			icon = xenomorph_heavy_caste
		}
	}

	tags = { army }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		army_defense_damage_mult = 0.10
		army_defense_health_mult = 0.10
	}

	pop_modifier = {
		pop_defense_armies_add = 500
	}

	resources = {
		category = planet_soldiers
		upkeep = {
			food = 5
			alloys = 1
		}
	}

	weight = {
		weight = 1500
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = worker
				AMOUNT = local_pop_amount
			}
		}
	}
}

xenomorph_heavy_caste_gestalt = {
	category = simple_drone
	swappable_data = {
		default = {
			building_icon = building_xenomorph_heavy_caste_warren
			icon = xenomorph_heavy_caste
		}
	}

	tags = { army }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		army_defense_damage_mult = 0.10
		army_defense_health_mult = 0.10
	}

	pop_modifier = {
		pop_defense_armies_add = 500
	}

	resources = {
		category = planet_soldiers
		upkeep = {
			food = 5
			alloys = 1
		}
	}

	weight = {
		weight = 1500
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = simple_drone
				AMOUNT = local_pop_amount
			}
		}
	}
}

xenomorph_apex_predator = {
	category = specialist
	swappable_data = {
		default = {
			building_icon = building_xenomorph_apex_caste_warren
			icon = xenomorph_apex_predator
		}
	}

	tags = { army }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		army_defense_damage_mult = 0.25
		army_defense_health_mult = 0.20
		planet_orbital_bombardment_damage = -0.05
	}

	pop_modifier = {
		pop_defense_armies_add = 1000
	}

	country_modifier = {
		army_damage_mult = 0.02
	}

	resources = {
		category = planet_soldiers
		upkeep = {
			food = 8
			alloys = 2
		}
	}

	weight = {
		weight = 2000
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = specialist
				AMOUNT = local_pop_amount
			}
		}
	}
}

xenomorph_apex_predator_gestalt = {
	category = complex_drone
	swappable_data = {
		default = {
			building_icon = building_xenomorph_apex_caste_warren
			icon = xenomorph_apex_predator
		}
	}

	tags = { army }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		army_defense_damage_mult = 0.25
		army_defense_health_mult = 0.20
		planet_orbital_bombardment_damage = -0.05
	}

	pop_modifier = {
		pop_defense_armies_add = 1000
	}

	country_modifier = {
		army_damage_mult = 0.02
	}

	resources = {
		category = planet_soldiers
		upkeep = {
			food = 8
			alloys = 2
		}
	}

	weight = {
		weight = 2000
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = complex_drone
				AMOUNT = local_pop_amount
			}
		}
	}
}


###############################################
# HOSTLINE HYBRID WARRIOR
# Combat caste job ONLY fillable by pops with sub-species hostline traits.
# Building strength scales with the empire's count of hostline-hybrid pops.
###############################################

xenomorph_hostline_hybrid_warrior = {
	category = worker
	swappable_data = {
		default = {
			building_icon = building_xenomorph_hybrid_caste_warren
			icon = xenomorph_hostline_hybrid_warrior
		}
	}

	tags = { army }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph_hostline_hybrid_pop = yes
	}

	planet_modifier = {
		army_defense_damage_mult = 0.05
		army_defense_health_mult = 0.05
	}

	pop_modifier = {
		pop_defense_armies_add = 400
	}

	resources = {
		category = planet_soldiers
		upkeep = {
			food = 3
		}
	}

	weight = {
		weight = 1500
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = worker
				AMOUNT = local_pop_amount
			}
		}
	}
}

xenomorph_hostline_hybrid_warrior_gestalt = {
	category = simple_drone
	swappable_data = {
		default = {
			building_icon = building_xenomorph_hybrid_caste_warren
			icon = xenomorph_hostline_hybrid_warrior
		}
	}

	tags = { army }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph_hostline_hybrid_pop = yes
	}

	planet_modifier = {
		army_defense_damage_mult = 0.05
		army_defense_health_mult = 0.05
	}

	pop_modifier = {
		pop_defense_armies_add = 400
	}

	resources = {
		category = planet_soldiers
		upkeep = {
			food = 3
		}
	}

	weight = {
		weight = 1500
	}
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = simple_drone
				AMOUNT = local_pop_amount
			}
		}
	}
}


###############################################
# XENODRAGON
# Combat ruler — single elite caste per Xenodragon Nest.
# Strongest individual combat asset, with significant empire-wide army bonuses.
###############################################

xenomorph_xenodragon = {
	category = ruler
	swappable_data = {
		default = {
			building_icon = building_xenomorph_xenodragon_nest
			icon = xenomorph_xenodragon
		}
	}

	tags = { army unity }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_enslaved = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		planet_stability_add = 5
		army_defense_damage_mult = 0.40
		army_defense_health_mult = 0.30
		planet_orbital_bombardment_damage = -0.10
	}

	pop_modifier = {
		pop_defense_armies_add = 2500
	}

	country_modifier = {
		army_damage_mult = 0.20
		army_health = 0.20
		armies_upkeep_mult = -0.10
		ship_weapon_damage = 0.10
		ship_fire_rate_mult = 0.05
	}

	resources = {
		category = planet_xenomorph_royal_egg_layers
		produces = {
			unity = 10
			influence = 1
		}
		upkeep = {
			food = 15
			alloys = 4
		}
	}

	weight = {
		weight = 999999
	}
	inline_script = "jobs/automodding_priority_unity"
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = ruler
				AMOUNT = local_pop_amount
			}
		}
	}
}

xenomorph_xenodragon_gestalt = {
	category = complex_drone
	swappable_data = {
		default = {
			building_icon = building_xenomorph_xenodragon_nest
			icon = xenomorph_xenodragon
		}
	}

	tags = { army unity }

	possible_pre_triggers = {
		has_owner = yes
		is_being_purged = no
		is_enslaved = no
		is_sapient = yes
	}
	possible = {
		is_xenomorph = yes
	}

	planet_modifier = {
		planet_stability_add = 5
		army_defense_damage_mult = 0.40
		army_defense_health_mult = 0.30
		planet_orbital_bombardment_damage = -0.10
	}

	pop_modifier = {
		pop_defense_armies_add = 2500
	}

	country_modifier = {
		army_damage_mult = 0.20
		army_health = 0.20
		armies_upkeep_mult = -0.10
		ship_weapon_damage = 0.10
		ship_fire_rate_mult = 0.05
	}

	resources = {
		category = planet_xenomorph_royal_egg_layers
		produces = {
			unity = 10
			influence = 1
		}
		upkeep = {
			food = 15
			alloys = 4
		}
	}

	weight = {
		weight = 999999
	}
	inline_script = "jobs/automodding_priority_unity"
	promotion = {
		time = @standard_promotion_time
		effect = {
			pop_amount_change_category = {
				CATEGORY = complex_drone
				AMOUNT = local_pop_amount
			}
		}
	}
}

# --- Offspring-chain brood layer (Xeno-only reproduction) ---

xenomorph_self_seeding_brood_layer = {
	category = worker
	swappable_data = {
		default = {
			building_icon = building_xenomorph_egg_chamber
			icon = xenomorph_egg_caretaker
		}
	}
	possible_pre_triggers = { has_owner = yes  is_being_purged = no }
	possible = {
		hidden_trigger = { exists = owner }
		owner = { is_gestalt = no }
		is_xenomorph = yes
	}
	resources = {
		category = planet_farmers
		produces = {
			amenities = 6
			xenomorph_offspring = 1
		}
		upkeep = { food = 2 }
	}
	weight = { weight = 5000 }
}

xenomorph_self_seeding_brood_layer_gestalt = {
	category = simple_drone
	swappable_data = {
		default = {
			building_icon = building_xenomorph_egg_chamber
			icon = xenomorph_egg_caretaker
		}
	}
	possible_pre_triggers = { has_owner = yes  is_being_purged = no }
	possible = {
		hidden_trigger = { exists = owner }
		owner = { is_gestalt = yes }
		is_xenomorph = yes
	}
	resources = {
		category = planet_farmers
		produces = {
			amenities = 6
			xenomorph_offspring = 1
		}
		upkeep = { food = 2 }
	}
	weight = { weight = 5000 }
}
