#Leave at start of list
trait_auto_mod_robotic = {
	cost = {
		base = 3
		modifier = {
			add = -1
			has_origin = origin_mechanists
		}
	}
	auto_mod = yes
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	localized_tags = {
		SPECIES_TRAIT_ADAPTIVE_FRAMES
	}
	tags = { machine positive automod }

	species_possible_remove = {
		always = yes
	}
	species_possible_merge_remove = {
		always = yes
	}
	slave_cost = {
		energy = 1000
	}
	assembly_score = {
		base = 2
	}
	custom_tooltip_with_modifiers = automodding_trait_robotic_tooltip
}

trait_robot_power_drills = {
	cost = 2
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	localized_tags = {
		SPECIES_TRAIT_ADAPTIVE_FRAMES
	}
	tags = { machine positive pop_output mineral }

	modifier = {
		miner_jobs_bonus_workforce_mult = 0.15
	}
	slave_cost = {
		energy = 750
	}
	assembly_score = {
		modifier = {
			add = 1.5
			from = { has_mining_designation = yes }
		}
		modifier = {
			add = 0.5
			from = { has_rural_designation = yes }
		}
	}
}

trait_robot_harvesters = {
	cost = 2
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	localized_tags = {
		SPECIES_TRAIT_ADAPTIVE_FRAMES
	}
	tags = { machine positive pop_output food }

	modifier = {
		farmer_jobs_bonus_workforce_mult = 0.15
	}
	slave_cost = {
		energy = 750
	}
	assembly_score = {
		modifier = {
			add = 1.5
			from = { has_farming_designation = yes }
		}
		modifier = {
			add = 0.5
			from = { has_rural_designation = yes }
		}
	}

	ai_weight = {
		modifier = {
			factor = 0
			exists = from
			from = { country_uses_food = no }
		}
	}
}

trait_robot_superconductive = {
	cost = 2
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	localized_tags = {
		SPECIES_TRAIT_ADAPTIVE_FRAMES
	}
	tags = { machine positive pop_output energy }

	modifier = {
		technician_jobs_bonus_workforce_mult = 0.15
	}
	slave_cost = {
		energy = 750
	}
	assembly_score = {
		modifier = {
			add = 1.5
			from = { has_generator_designation = yes }
		}
		modifier = {
			add = 0.5
			from = { has_rural_designation = yes }
		}
	}
}

trait_robot_efficient_processors = {
	cost = 3
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive pop_output }

	modifier = {
		pop_bonus_workforce_mult = 0.05
	}

	slave_cost = {
		energy = 500
	}
	assembly_score = {
		modifier = {
			add = 0.5 #always good
		}
	}
}

trait_robot_logic_engines = {
	cost = 2
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	localized_tags = {
		SPECIES_TRAIT_ADAPTIVE_FRAMES
	}
	tags = { machine synthetic positive pop_output research }

	# Droids, Synths and Machines
	species_potential_add = {
		OR = {
			can_add_droid_traits = yes
			can_add_synth_traits = yes
			owner_is_machine_intelligence = yes
			owner_is_individual_machine = yes
		}
	}
	opposites = { trait_additrait_multithreading trait_additrait_slow_processors trait_additrait_erratic_processors }
	modifier = {
		researcher_jobs_bonus_workforce_mult = 0.10
	}
	slave_cost = {
		energy = 750
	}
	assembly_score = {
		modifier = {
			add = 1.5
			from = { has_research_designation = yes }
		}
	}
}

trait_robot_loyalty_circuits = {
	cost = 2
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine synthetic positive happiness individual }

	# Synth or Individualist Machine
	species_potential_add = {
		OR = {
			can_add_synth_traits = yes
			owner_is_individual_machine = yes
		}
	}
	forbidden_ethics = { ethic_gestalt_consciousness }
	modifier = {
		pop_happiness = 0.1
	}
	slave_cost = {
		energy = 500
	}
}

trait_robot_domestic_protocols = {
	cost = 2
	category = robotic

	initial = no
	randomized = no

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine synthetic positive pop_output amenities individual }

	# Droid, Synth or Individualist Machine
	species_potential_add = {
		OR = {
			can_add_droid_traits = yes
			can_add_synth_traits = yes
			owner_is_individual_machine = yes
		}
	}
	forbidden_ethics = { ethic_gestalt_consciousness }
	modifier = {
		influential_jobs_bonus_workforce_mult = 0.20
	}
	slave_cost = {
		energy = 750
	}

	custom_tooltip_with_modifiers = TRAIT_DOMESTIC_PROTOCOLS_EFFECT
}

trait_robot_double_jointed = {
	cost = 1
	category = robotic
	opposites = { "trait_robot_bulky" "trait_additrait_cumbersome_hulks" "trait_additrait_malleable_frame" }

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive housing }

	modifier = {
		pop_housing_usage_mult = -0.1
	}
	slave_cost = {
		energy = 750
	}
}

trait_robot_bulky = {
	cost = -1
	category = robotic
	opposites = { "trait_robot_double_jointed" "trait_additrait_cumbersome_hulks" "trait_additrait_malleable_frame" }

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine negative housing }

	modifier = {
		pop_housing_usage_mult = 0.1
	}
	ai_weight = {
		factor = 0
	}
	slave_cost = {
		energy = -150
	}
}

trait_robot_enhanced_memory = {
	cost = 2
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine synthetic positive leader }

	# Synth, Machine Intelligence or Individualist Machine
	species_potential_add = {
		OR = {
			can_add_synth_traits = yes
			owner_is_machine_intelligence = yes
			owner_is_individual_machine = yes
		}
	}
	modifier = {
		negative_leader_traits_species = -1
		leaders_upkeep_mult = -0.25
	}
	ai_weight = {
		factor = 0
	}
	slave_cost = {
		energy = 750
	}
}

trait_robot_emotion_emulators = {
	cost = 1
	category = robotic
	opposites = { "trait_robot_uncanny" }
	allowed_archetypes = { ROBOT MACHINE }
	localized_tags = {
		SPECIES_TRAIT_ADAPTIVE_FRAMES
	}
	tags = { machine positive pop_output amenities }
	modifier = {
		influential_jobs_bonus_workforce_mult = 0.20
	}
	slave_cost = {
		energy = 750
	}
}

trait_robot_uncanny = {
	cost = -1
	category = robotic
	opposites = { "trait_robot_emotion_emulators" }
	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine negative pop_output amenities }
	modifier = {
		influential_jobs_bonus_workforce_mult = -0.20
	}
	ai_weight = {
		factor = 0
	}
	slave_cost = {
		energy = -150
	}
}

trait_robot_durable = {
	cost = 1
	category = robotic
	opposites = { "trait_robot_high_maintenance" "trait_additrait_sturdy" "trait_additrait_brittle" }

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive upkeep }

	modifier = {
		planet_pops_robotics_upkeep_mult = -0.10
	}
	slave_cost = {
		energy = 750
	}
}

trait_robot_high_maintenance = {
	cost = -1
	category = robotic
	opposites = { "trait_robot_durable" "trait_additrait_sturdy" "trait_additrait_brittle" }

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine negative upkeep }

	modifier = {
		planet_pops_robotics_upkeep_mult = 0.10
	}
	ai_weight = {
		factor = 0
	}
	slave_cost = {
		energy = -150
	}
}

trait_robot_learning_algorithms = {
	cost = 1
	category = robotic
	opposites = { "trait_robot_repurposed_hardware" }

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine synthetic positive leader }

	# Synth, Machine Intelligence or Individualist Machine
	species_potential_add = {
		OR = {
			can_add_synth_traits = yes
			owner_is_machine_intelligence = yes
			owner_is_individual_machine = yes
		}
	}
	modifier = {
		species_leader_exp_gain = 0.10
	}
	slave_cost = {
		energy = 750
	}
}

trait_robot_repurposed_hardware = {
	cost = -1
	category = robotic
	opposites = { "trait_robot_learning_algorithms" }

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine synthetic negative leader }

	# Synth, Machine Intelligence or Individualist Machine
	species_potential_add = {
		OR = {
			can_add_synth_traits = yes
			owner_is_machine_intelligence = yes
			owner_is_individual_machine = yes
		}
	}
	modifier = {
		species_leader_exp_gain = -0.10
	}
	ai_weight = {
		weight = 1
		modifier = {
			factor = 0
			years_passed > 5
		}
	}
	slave_cost = {
		energy = -250
	}
}

trait_robot_mass_produced = {
	cost = 1
	category = robotic
	opposites = { "trait_robot_custom_made" "trait_additrait_swarm" "trait_additrait_standard_frame" "trait_additrait_hand_crafted" }

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive pop_growth }

	modifier = {
		planet_pop_assembly_mult = 0.15
	}
	slave_cost = {
		energy = 1500
	}
}

trait_robot_custom_made = {
	cost = -1
	category = robotic
	opposites = { "trait_robot_mass_produced" "trait_additrait_swarm" "trait_additrait_standard_frame" "trait_additrait_hand_crafted" }

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine negative pop_growth }

	modifier = {
		planet_pop_assembly_mult = -0.15
	}
	ai_weight = {
		factor = 0
	}
	slave_cost = {
		energy = -200
	}
}

trait_robot_recycled = {
	cost = 2
	category = robotic
	opposites = { "trait_robot_luxurious" }

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive upkeep pop_growth }

	modifier = {
		roboticist_jobs_bonus_workforce_mult = 0.20
	}
	slave_cost = {
		energy = 1500
	}
}

trait_robot_luxurious = {
	cost = -2
	category = robotic
	opposites = { "trait_robot_recycled" }

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine negative pop_growth }

	modifier = {
		roboticist_jobs_bonus_workforce_mult = -0.20
	}
	ai_weight = {
		weight = 1
		modifier = {
			factor = 0
			years_passed > 5
		}
	}
	slave_cost = {
		energy = -200
	}
}

trait_robot_propaganda_machines = {
	cost = 1
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine synthetic positive pop_output upkeep unity }

	# Droid, Synth, Machine Intelligence or Individualist Machine
	species_potential_add = {
		OR = {
			can_add_droid_traits = yes
			can_add_synth_traits = yes
			owner_is_machine_intelligence = yes
			owner_is_individual_machine = yes
		}
	}
	opposites = { "trait_robot_quarrelsome" }
	modifier = {
		bureaucrat_jobs_bonus_workforce_mult = 0.15
	}
	slave_cost = {
		energy = 750
	}
	custom_tooltip = TRAIT_CHARISMATIC_EFFECT
	assembly_score = {
		modifier = {
			add = 1.5
			from = { has_unity_designation = yes }
		}
	}
}

trait_robot_streamlined_protocols = {
	cost = 2
	category = robotic
	opposites = { "trait_robot_high_bandwidth" }
	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive empire_size }
	modifier = {
		species_empire_size_mult = -0.10
	}
	slave_cost = {
		energy = 750
	}
}

trait_robot_high_bandwidth = {
	cost = -2
	category = robotic
	opposites = { "trait_robot_streamlined_protocols" }
	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine negative empire_size }
	modifier = {
		species_empire_size_mult = 0.10
	}
	slave_cost = {
		energy = -150
	}
}

trait_robot_trading_algorithms = {
	cost = 2
	category = robotic
	allowed_archetypes = { ROBOT MACHINE }
	localized_tags = {
		SPECIES_TRAIT_ADAPTIVE_FRAMES
	}
	tags = { machine synthetic positive trade }
	opposites = { trait_robot_scarcity_algorithms }
	species_potential_add = {
		OR = {
			can_add_droid_traits = yes
			can_add_synth_traits = yes
			owner_is_individual_machine = yes
			owner_is_machine_intelligence = yes
		}
	}
	modifier = {
		trader_jobs_bonus_workforce_mult = 0.25
	}
	slave_cost = {
		energy = 500
	}
}

trait_robot_quarrelsome = {
	icon = "gfx/interface/icons/traits/trait_quarrelsome.dds"
	cost = -1
    category = robotic
	# Synths and Individualist Machines
	species_potential_add = {
		OR = {
			can_add_synth_traits = yes
			owner_is_individual_machine = yes
		}
	}
	opposites = { "trait_robot_propaganda_machines" }
	allowed_archetypes = { MACHINE ROBOT }
	localized_tags = {
		SPECIES_TRAIT_ADAPTIVE_FRAMES
	}
	tags = { machine synthetic negative pop_output unity individual }
	forbidden_ethics = { ethic_gestalt_consciousness }
	modifier = {
		bureaucrat_jobs_bonus_workforce_mult = -0.1
	}
	ai_weight = {
		weight = 1
		modifier = {
			factor = 0
			years_passed > 5
		}
	}
	slave_cost = {
		energy = -200
	}
}

trait_robot_deviants = {
	icon = "gfx/interface/icons/traits/trait_deviants.dds"
	cost = -1
    category = robotic
	# Synths and Individualist Machines
	species_potential_add = {
		OR = {
			can_add_synth_traits = yes
			owner_is_individual_machine = yes
		}
	}
	modifier = { pop_government_ethic_attraction = -0.15 }

	allowed_archetypes = { MACHINE ROBOT }
	tags = { machine synthetic negative ethic_attraction individual }
	forbidden_ethics = { ethic_gestalt_consciousness }
	ai_weight = {
		weight = 0
	}
	slave_cost = {
		energy = -200
	}
}

trait_robot_decadent = {
	icon = "gfx/interface/icons/traits/trait_decadent.dds"
	cost = -1
    category = robotic
	# Synths and Individualist Machines
	species_potential_add = {
		OR = {
			can_add_synth_traits = yes
			owner_is_individual_machine = yes
		}
	}
	allowed_archetypes = { MACHINE ROBOT }
	tags = { machine synthetic negative happiness individual }
	forbidden_ethics = { ethic_gestalt_consciousness }
	modifier = {
		pop_cat_worker_happiness = -0.1
		pop_cat_slave_happiness = -0.1
	}
	ai_weight = {
		weight = 0
	}
	slave_cost = {
		energy = -200
	}
}

trait_robot_wasteful = {
	icon = "gfx/interface/icons/traits/trait_wasteful.dds"
	cost = -1
    category = robotic
	# Synths and Individualist Machines
	species_potential_add = {
		OR = {
			can_add_synth_traits = yes
			owner_is_individual_machine = yes
		}
	}
	allowed_archetypes = { MACHINE ROBOT }
	tags = { machine synthetic negative consumer_goods upkeep individual }
	forbidden_ethics = { ethic_gestalt_consciousness }
	modifier = {
		planet_pops_consumer_goods_upkeep_mult = 0.10
	}
	ai_weight = {
		weight = 0
	}
	slave_cost = {
		energy = -200
	}
}

trait_robot_artificial_engineers = {
	host_has_dlc = "The Machine Age"
	cost = 1
	category = robotic
	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine synthetic positive pop_output research }
	opposites = {
		"trait_robot_artificial_physicists"
		"trait_robot_artificial_sociologists"
	}
	# Droid, Synth, Machine Intelligence or Individualist Machine
	species_potential_add = {
		OR = {
			can_add_droid_traits = yes
			can_add_synth_traits = yes
			owner_is_machine_intelligence = yes
			owner_is_individual_machine = yes
		}
	}
	modifier = {
		engineer_jobs_bonus_workforce_mult = 0.15
	}
	slave_cost = {
		energy = 750
	}
}

trait_robot_artificial_physicists = {
	host_has_dlc = "The Machine Age"
	cost = 1
	category = robotic
	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine synthetic positive pop_output research }
	opposites = {
		"trait_robot_artificial_sociologists"
		"trait_robot_artificial_engineers"
	}
	# Droid, Synth, Machine Intelligence or Individualist Machine
	species_potential_add = {
		OR = {
			can_add_droid_traits = yes
			can_add_synth_traits = yes
			owner_is_machine_intelligence = yes
			owner_is_individual_machine = yes
		}
	}
	modifier = {
		physicist_jobs_bonus_workforce_mult = 0.15
	}
	slave_cost = {
		energy = 750
	}
}

trait_robot_artificial_sociologists = {
	host_has_dlc = "The Machine Age"
	cost = 1
	category = robotic
	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine synthetic positive pop_output research }
	opposites = {
		"trait_robot_artificial_physicists"
		"trait_robot_artificial_engineers"
	}

	# Droid, Synth, Machine Intelligence or Individualist Machine
	species_potential_add = {
		OR = {
			can_add_droid_traits = yes
			can_add_synth_traits = yes
			owner_is_machine_intelligence = yes
			owner_is_individual_machine = yes
		}
	}
	modifier = {
		biologist_jobs_bonus_workforce_mult = 0.15
	}
	slave_cost = {
		energy = 750
	}
}

trait_robot_integrated_weaponry = {
	host_has_dlc = "The Machine Age"
	cost = 2
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine synthetic positive army }
	opposites = { "trait_robot_delicate_frames" }
	# Droid, Synth, Machine Intelligence or Individualist Machine
	species_potential_add = {
		OR = {
			can_add_droid_traits = yes
			can_add_synth_traits = yes
			owner_is_machine_intelligence = yes
			owner_is_individual_machine = yes
		}
	}
	randomized = no
	modifier = {
		army_damage_mult = 1.0
		enforcer_jobs_bonus_workforce_mult = 0.20
	}

	slave_cost = {
		energy = 1000
	}
}

trait_robot_delicate_frames = {
	host_has_dlc = "The Machine Age"
	cost = -1
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine synthetic negative research army pop_output }
	opposites = { "trait_robot_integrated_weaponry" }
	# Droid, Synth, Machine Intelligence or Individualist Machine
	species_potential_add = {
		OR = {
			can_add_droid_traits = yes
			can_add_synth_traits = yes
			owner_is_machine_intelligence = yes
			owner_is_individual_machine = yes
		}
	}
	randomized = no
	modifier = {
		army_damage_mult = -0.5
		worker_and_simple_drone_cat_bonus_workforce_mult = -0.05
	}

	slave_cost = {
		energy = -250
	}
}

trait_robot_scarcity_algorithms = {
	host_has_dlc = "The Machine Age"
	cost = -1
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine synthetic negative pop_output trade }
	opposites = { "trait_robot_trading_algorithms" "trait_robot_matrix_trading" }

	species_potential_add = {
		OR = {
			can_add_droid_traits = yes
			can_add_synth_traits = yes
			owner_is_individual_machine = yes
			owner_is_machine_intelligence = yes
		}
	}

	randomized = no
	modifier = {
		trader_jobs_bonus_workforce_mult = -0.25
	}
	slave_cost = {
		energy = -150
	}
}

#### Leviathan traits

trait_robot_ancient_dreadnought = {
	host_has_dlc = "The Machine Age"
	cost = 3
	category = robotic
	# Synth, Machine Intelligence or Individualist Machine
	species_potential_add = {
		OR = {
			can_add_synth_traits = yes
			owner_is_machine_intelligence = yes
			owner_is_individual_machine = yes
		}
		exists = from
		from = {
			has_technology = tech_leviathan_techgenesis
			has_country_flag = harvested_dreadnought_parts
		}
	}
	initial = no
	randomized = no
	opposites = {}
	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine synthetic positive leviathan army alloys pop_output }

	modifier = {
		army_damage_mult = 5
		foundry_jobs_bonus_workforce_mult = 0.15
	}

	slave_cost = {
		energy = 1500
	}
}

trait_robot_enigmatic_fortress = {
	host_has_dlc = "The Machine Age"
	cost = 3
	category = robotic
	# Synth, Machine Intelligence or Individualist Machine
	species_potential_add = {
		OR = {
			can_add_synth_traits = yes
			owner_is_machine_intelligence = yes
			owner_is_individual_machine = yes
		}
		exists = from
		from = {
			has_technology = tech_leviathan_techgenesis
			has_country_flag = harvested_fortress_parts
		}
	}
	initial = no
	randomized = no
	opposites = {}
	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine synthetic positive leviathan amenities }

	modifier = {
		pop_amenities_usage_mult = -0.5
	}

	slave_cost = {
		energy = 1500
	}
}

trait_robot_infinity_sphere = {
	host_has_dlc = "The Machine Age"
	cost = 3
	category = robotic
	# Synth, Machine Intelligence or Individualist Machine
	species_potential_add = {
		OR = {
			can_add_synth_traits = yes
			owner_is_machine_intelligence = yes
			owner_is_individual_machine = yes
		}
		exists = from
		from = {
			has_technology = tech_leviathan_techgenesis
			has_country_flag = harvested_sphere_parts
		}
	}
	initial = no
	randomized = no
	opposites = {}
	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine synthetic positive leviathan research upkeep }

	modifier = {
		planet_researchers_upkeep_mult = -0.5
	}

	slave_cost = {
		energy = 1500
	}
}

trait_robot_scavenger_bot = {
	host_has_dlc = "The Machine Age"
	cost = 3
	category = robotic
	# Synth, Machine Intelligence or Individualist Machine
	species_potential_add = {
		OR = {
			can_add_synth_traits = yes
			owner_is_machine_intelligence = yes
			owner_is_individual_machine = yes
		}
		exists = from
		from = {
			has_technology = tech_leviathan_techgenesis
			has_country_flag = harvested_scavenger_parts
		}
	}
	initial = no
	randomized = no
	opposites = {}
	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine synthetic positive leviathan pop_growth }

	modifier = {
		planet_pop_assembly_mult = 0.5
	}

	slave_cost = {
		energy = 1500
	}
}


### Background Traits

trait_robot_history_warbot = {
	host_has_dlc = "The Machine Age"
	cost = 0
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive background army }

	species_potential_add = {
		always = no
	}

	species_possible_remove = {
		always = no
	}

	opposites = { "trait_robot_history_artbot" "trait_robot_history_explorebot" "trait_robot_history_researchbot" "trait_robot_history_resourcebot" "trait_robot_history_chatbot"}

	modifier = {
		army_damage_mult = 0.05
	}
	slave_cost = {
		energy = 750
	}
}

trait_robot_history_artbot = {
	host_has_dlc = "The Machine Age"
	cost = 0
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive background pop_output amenities }

	species_potential_add = {
		always = no
	}

	species_possible_remove = {
		always = no
	}

	opposites = { "trait_robot_history_warbot" "trait_robot_history_explorebot" "trait_robot_history_researchbot" "trait_robot_history_resourcebot" "trait_robot_history_chatbot"}

	modifier = {
		influential_jobs_bonus_workforce_mult = 0.05
	}
	slave_cost = {
		energy = 750
	}
}

trait_robot_history_explorebot = {
	host_has_dlc = "The Machine Age"
	cost = 0
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive background pop_output unity }

	species_potential_add = {
		always = no
	}

	species_possible_remove = {
		always = no
	}

	opposites = { "trait_robot_history_warbot" "trait_robot_history_artbot" "trait_robot_history_researchbot" "trait_robot_history_resourcebot" "trait_robot_history_chatbot"}

	modifier = {
		bureaucrat_jobs_bonus_workforce_mult = 0.02
	}
	slave_cost = {
		energy = 750
	}
}

trait_robot_history_researchbot = {
	host_has_dlc = "The Machine Age"
	cost = 0
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive background pop_output research }

	species_potential_add = {
		always = no
	}

	species_possible_remove = {
		always = no
	}

	opposites = { "trait_robot_history_warbot" "trait_robot_history_artbot" "trait_robot_history_explorebot" "trait_robot_history_resourcebot" "trait_robot_history_chatbot"}

	modifier = {
		researcher_jobs_bonus_workforce_mult = 0.02
	}
	slave_cost = {
		energy = 750
	}
}

trait_robot_history_resourcebot = {
	host_has_dlc = "The Machine Age"
	cost = 0
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive background pop_output mineral }

	species_potential_add = {
		always = no
	}

	species_possible_remove = {
		always = no
	}

	opposites = { "trait_robot_history_warbot" "trait_robot_history_artbot" "trait_robot_history_explorebot" "trait_robot_history_researchbot" "trait_robot_history_chatbot"}

	modifier = {
		miner_jobs_bonus_workforce_mult = 0.05
	}
	slave_cost = {
		energy = 750
	}
}

trait_robot_history_chatbot = {
	host_has_dlc = "The Machine Age"
	cost = 0
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive background upkeep }

	species_potential_add = {
		always = no
	}

	species_possible_remove = {
		always = no
	}

	opposites = { "trait_robot_history_warbot" "trait_robot_history_artbot" "trait_robot_history_explorebot" "trait_robot_history_researchbot" "trait_robot_history_resourcebot"}

	modifier = {
		trader_jobs_bonus_workforce_mult = 0.05
	}
	slave_cost = {
		energy = 750
	}
}

trait_robot_survivor = {
	cost = 0
	category = robotic

	initial = no
	randomized = no

	species_potential_add = {
		always = no
	}

	allowed_archetypes = { MACHINE ROBOT }
	tags = { machine positive habitability leader special }

	modifier = {
		pc_nuked_habitability = 0.7
		leader_lifespan_add = 10
	}
	slave_cost = {
		energy = 500
	}
}

trait_robot_digital_1 = {
	cost = 0
	category = robotic
	initial = no
	randomized = no
	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive habitability housing special }
	opposites = { "trait_robot_latent_psionic" "trait_robot_psionic" }

	species_potential_add = {
		always = no
	}

	species_possible_remove = {
		always = no
	}

	modifier = {
		habitability_floor_add = 0.25
		pop_housing_usage_mult = -0.9
	}

	resources = {
		category = planet_pops
		# Energy Upkeep
		upkeep = {
			trigger = {
				exists = owner
				owner = {
					has_tradition = tr_virtuality_1
				}
				is_sapient = yes
			}
			energy = 1	# All the maths is done in the script value
			mult = value:virtuality_num_colonies
		}
	}

	custom_tooltip = trait_robot_digital_1_tt

	slave_cost = {
		energy = 750
	}
}

trait_robot_digital_2 = {
	icon = "gfx/interface/icons/traits/trait_robot_digital_1.dds"
	cost = 0
	category = robotic
	initial = no
	randomized = no
	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive pop_output habitability housing special }
	opposites = { "trait_robot_latent_psionic" "trait_robot_psionic" }

	species_potential_add = {
		always = no
	}

	species_possible_remove = {
		always = no
	}

	modifier = {
		habitability_floor_add = 0.25
		pop_housing_usage_mult = -0.9
	}

	triggered_pop_group_modifier = {
		potential = {
			exists = owner
			owner = {
				has_tradition = tr_virtuality_1
			}
		}
		pop_bonus_workforce_mult = 1
		mult = value:virtuality_concentrated_production_mult
	}

	resources = {
		category = planet_pops
		# Energy Upkeep
		upkeep = {
			trigger = {
				exists = owner
				owner = {
					has_tradition = tr_virtuality_1
				}
				is_sapient = yes
			}
			energy = 1	# All the maths is done in the script value
			mult = value:virtuality_num_colonies
		}
	}

	custom_tooltip = trait_robot_digital_2_tt

	slave_cost = {
		energy = 750
	}
}

trait_robot_suppressed = {
	cost = 3
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive pop_output leader blocks_leaders modularity }

	species_potential_add = {
		can_do_advanced_robo_modding = yes
	}
	species_possible_remove = {
		always = yes
	}
	species_possible_merge_remove = {
		always = yes
	}

	initial = no
	randomized = no

	opposites = { trait_robot_inquisitative_axioms trait_robot_learning_algorithms trait_robot_logic_engines trait_robot_enhanced_memory
	}

	modifier = {
		pop_bonus_workforce_mult = 0.1
		species_leader_exp_gain = -1
		civilian_and_maintenance_drone_cat_bonus_workforce_mult = -0.85
	}

	slave_cost = {
		energy = 750
	}

	custom_tooltip_with_modifiers = trait_robot_suppressed_tt
}

trait_robot_shielded_components = {
	cost = 3
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive habitability pop_output leader modularity }

	species_potential_add = {
		can_do_advanced_robo_modding = yes
	}
	species_possible_remove = {
		always = yes
	}
	species_possible_merge_remove = {
		always = yes
	}

	initial = no
	randomized = no

	modifier = {
		pop_environment_tolerance = 0.30
		pop_bonus_workforce_mult = 0.05
		leader_lifespan_add = 50
	}

	slave_cost = {
		energy = 750
	}
}

trait_robot_monoform = {
	cost = 4
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive pop_growth housing modularity }

	species_potential_add = {
		can_do_advanced_robo_modding = yes
	}
	species_possible_remove = {
		always = yes
	}
	species_possible_merge_remove = {
		always = yes
	}

	initial = no
	randomized = no

	modifier = {
		pop_housing_usage_mult = -0.8
		planet_pop_assembly_mult = 0.2
	}

	slave_cost = {
		energy = 750
	}
}

trait_robot_inquisitative_axioms = {
	cost = 4
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive pop_output research leader modularity }

	species_potential_add = {
		can_do_advanced_robo_modding = yes
	}
	species_possible_remove = {
		always = yes
	}
	species_possible_merge_remove = {
		always = yes
	}

	initial = no
	randomized = no

	modifier = {
		researcher_jobs_bonus_workforce_mult = 0.2
		leaders_upkeep_mult = -0.1
		negative_traits_leader = -1
	}

	opposites = { trait_robot_suppressed }

	slave_cost = {
		energy = 750
	}
}

trait_robot_ceaseless_symmetric_annihilation_engine = {
	cost = 2
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive pop_output upkeep modularity }

	species_potential_add = {
		can_do_advanced_robo_modding = yes
	}
	species_possible_add = {
	}
	species_possible_remove = {
		always = yes
	}
	species_possible_merge_remove = {
		always = yes
	}

	initial = no
	randomized = no

	modifier = {
		pop_bonus_workforce_mult = 0.40
	}

	slave_cost = {
		energy = 750
	}

	resources = {
		category = planet_pops
		upkeep = {
			trigger = {
				is_sapient = yes
			}
			sr_dark_matter = 0.02
		}
	}

	custom_tooltip_with_modifiers = trait_robot_ceaseless_symmetric_annihilation_engine_tt
}

trait_robot_ferro_viscosity_augmentation = {
	cost = 2
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive leader amenities upkeep modularity }

	species_potential_add = {
		can_do_advanced_robo_modding = yes
	}
	species_possible_add = {
	}
	species_possible_remove = {
		always = yes
	}
	species_possible_merge_remove = {
		always = yes
	}

	initial = no
	randomized = no

	modifier = {
		leader_lifespan_mult = 0.5
	}

	triggered_pop_group_modifier = {
		potential = {
			exists = owner
			owner = {
				is_gestalt = yes
			}
		}
		pop_amenities_usage_no_happiness_mult = -0.50
	}

	triggered_pop_group_modifier = {
		potential = {
			exists = owner
			owner = {
				is_gestalt = no
			}
		}
		pop_amenities_usage_mult = -0.50
	}

	slave_cost = {
		energy = 750
	}

	resources = {
		category = planet_pops
		upkeep = {
			trigger = {
				is_sapient = yes
			}
			sr_living_metal = 0.01
		}
	}

	custom_tooltip_with_modifiers = trait_robot_ferro_viscosity_augmentation_tt
}

trait_robot_biomimetic_assembly = {
	cost = 1
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive pop_growth upkeep modularity }

	species_potential_add = {
		can_do_advanced_robo_modding = yes
	}
	species_possible_add = {
	}
	species_possible_remove = {
		always = yes
	}
	species_possible_merge_remove = {
		always = yes
	}

	initial = no
	randomized = no

	modifier = {
		roboticist_jobs_bonus_workforce_mult = 0.50
	}

	slave_cost = {
		energy = 750
	}

	resources = {
		category = planet_pops
		upkeep = {
			trigger = {
				is_sapient = yes
			}
			food = 1
			exotic_gases = 0.02
		}
	}

	custom_tooltip_with_modifiers = trait_robot_biomimetic_assembly_tt
}

trait_robot_matrix_trading = {
	cost = 1
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive pop_output trade upkeep modularity }
	opposites = { trait_robot_scarcity_algorithms }
	species_potential_add = {
		can_do_advanced_robo_modding = yes
		OR = {
			can_add_droid_traits = yes
			can_add_synth_traits = yes
			owner_is_individual_machine = yes
			owner_is_machine_intelligence = yes
		}
	}
	species_possible_add = {
	}
	species_possible_remove = {
		always = yes
	}
	species_possible_merge_remove = {
		always = yes
	}

	initial = no
	randomized = no

	modifier = {
		trader_jobs_bonus_workforce_mult = 0.5
	}

	slave_cost = {
		energy = 750
	}

	resources = {
		category = planet_pops
		upkeep = {
			trigger = {
				is_sapient = yes
			}
			energy = 1
			rare_crystals = 0.01
		}
	}

	custom_tooltip_with_modifiers = trait_robot_matrix_trading_tt
}

trait_robot_mote_powered_tools = {
	cost = 1
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive alloys consumer_goods pop_output upkeep modularity }

	species_potential_add = {
		can_do_advanced_robo_modding = yes
	}
	species_possible_add = {
	}
	species_possible_remove = {
		always = yes
	}
	species_possible_merge_remove = {
		always = yes
	}

	initial = no
	randomized = no

	triggered_pop_group_modifier = {
		potential = {
			exists = owner
			owner = {
				country_uses_consumer_goods = yes
			}
		}
		foundry_jobs_bonus_workforce_mult = 0.2
		artisan_jobs_bonus_workforce_mult = 0.2
	}

	triggered_pop_group_modifier = {
		potential = {
			exists = owner
			owner = {
				country_uses_consumer_goods = no
			}
		}
		foundry_jobs_bonus_workforce_mult = 0.2
	}

	slave_cost = {
		energy = 750
	}

	resources = {
		category = planet_pops
		upkeep = {
			trigger = {
				is_sapient = yes
			}
			minerals = 1
			volatile_motes = 0.01
		}
	}

	custom_tooltip_with_modifiers = trait_robot_mote_powered_tools_tt
}

trait_robot_exotic_fuel_consumption = {
	host_has_dlc = "The Machine Age"
	cost = 1
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive pop_output upkeep }

	species_potential_add = {
		always = yes
	}
	species_possible_add = {
	}
	species_possible_remove = {
		always = yes
	}
	species_possible_merge_remove = {
		always = yes
	}

	initial = no
	randomized = no

	modifier = {
		pop_bonus_workforce_mult = 0.10
	}

	slave_cost = {
		energy = 750
	}

	resources = {
		category = planet_pops
		upkeep = {
			trigger = {
				is_sapient = yes
			}
			exotic_gases = 0.04
		}
	}

	custom_tooltip_with_modifiers = trait_robot_exotic_fuel_consumption_tt
}

trait_robot_rare_crystal_exterior = {
	host_has_dlc = "The Machine Age"
	cost = 1
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive alloys pop_output production upkeep }

	species_potential_add = {
		always = yes
	}
	species_possible_add = {
		custom_tooltip = {
			fail_text = "requires_im_or_droid"
			exists = from
			from = {
				OR = {
					is_individual_machine = yes
					is_machine_empire = yes
					has_technology = tech_droid_workers
				}
			}
		}
	}
	species_possible_remove = {
		always = yes
	}
	species_possible_merge_remove = {
		always = yes
	}

	initial = no
	randomized = no

	modifier = {
		foundry_jobs_bonus_workforce_mult = 0.2
	}

	slave_cost = {
		energy = 750
	}

	resources = {
		category = planet_pops
		upkeep = {
			trigger = {
				is_sapient = yes
			}
			rare_crystals = 0.02
		}
	}

	custom_tooltip_with_modifiers = trait_robot_rare_crystal_exterior_tt
}

trait_robot_volatile_mote_reactor = {
	host_has_dlc = "The Machine Age"
	cost = 1
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive habitability production upkeep }

	species_potential_add = {
		always = yes
	}
	species_possible_add = {
	}
	species_possible_remove = {
		always = yes
	}
	species_possible_merge_remove = {
		always = yes
	}

	initial = no
	randomized = no

	modifier = {
		pop_environment_tolerance = 0.3
	}

	slave_cost = {
		energy = 750
	}

	resources = {
		category = planet_pops
		upkeep = {
			trigger = {
				is_sapient = yes
			}
			volatile_motes = 0.02
		}
	}

	custom_tooltip_with_modifiers = trait_robot_volatile_mote_reactor_tt
}

trait_robot_immortality = {
	cost = 4
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive leader }

	species_potential_add = {
		OR = {
			can_add_synth_traits = yes
			owner_is_machine_intelligence = yes
			owner_is_individual_machine = yes
		}
	}
	species_possible_add = {
		always = yes
	}
	species_possible_remove = {
		always = yes
	}
	species_possible_merge_remove = {
		always = yes
	}

	initial = yes
	randomized = no
	immortal_leaders = yes

	slave_cost = {
		energy = 1000
	}
	custom_tooltip = trait_robot_immortality_tt
}

trait_robot_synthetic_dawn = {
	cost = 0
	category = robotic

	allowed_archetypes = { ROBOT MACHINE }

	species_potential_add = {
		hidden_trigger = { exists = from }
		from = {
			has_modifier = synthetic_dawn
		}
		can_add_synth_traits = yes
	}
	species_possible_add = {
		always = yes
	}
	species_possible_remove = {
		always = yes
	}
	species_possible_merge_remove = {
		always = yes
	}

	modifier = {
		pop_government_ethic_attraction = 0.50
		pop_happiness = 0.05
		bureaucrat_jobs_bonus_workforce_mult = 0.05
	}

	initial = no
	randomized = no
	immortal_leaders = no

	slave_cost = {
		energy = 1000
	}
}

trait_robot_latent_psionic = {
	cost = 0
	category = robotic
	icon = "gfx/interface/icons/traits/trait_latent_psionic_species.dds"

	opposites = { "trait_robot_digital_1" "trait_robot_digital_2" }

	initial = no
	randomized = no
	species_potential_add = {
		always = no
	}
	species_possible_remove = {
		always = no
	}
	species_possible_merge_add = {
		always = no
	}
	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive pop_output research unity psionic }

	inline_script = "traits/latent_psionic_effects"
}

trait_robot_psionic = {
	cost = 0
	category = robotic
	icon = "gfx/interface/icons/traits/trait_psionic_species.dds"

	opposites = { "trait_robot_digital_1" "trait_robot_digital_2" }

	improves_leaders = yes
	initial = no
	randomized = no
	species_potential_add = {
		always = no
	}
	species_possible_remove = {
		always = no
	}
	species_possible_merge_add = {
		always = no
	}

	allowed_archetypes = { ROBOT MACHINE }
	tags = { machine positive pop_output research unity happiness psionic }

	inline_script = "traits/psionic_effects"
}
