### UPDATED

stz_viridian_replicator = {
    category = complex_drone

    swappable_data = {
        default = {
            condition_string = DRONE_JOB_TRIGGER
            building_icon = building_robot_assembly_plant
        }
    }

    tags = { pop_assembly }

    possible_pre_triggers = {
        has_owner = yes
        is_enslaved = no
        is_being_purged = no
        is_being_assimilated = no
        is_sapient = yes
    }

    possible_precalc = can_fill_drone_job

    possible = { can_think = yes }

    planet_modifier = {
        planet_pop_assembly_add = 3
    }
    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                has_tradition = tr_modularity_2
            }
        }
        planet_pop_assembly_add = 1.5 #If this changes, update tr_modularity_2_modifier_desc
    }

    resources = {
        category = planet_pop_assemblers
        upkeep = {
            alloys = 3
        }

        upkeep = {
            stz_sr_viridisium = 1
        }
    }

    weight = {
        weight = @spawner_drone_job_weight
        mult = value:scripted_job_weight_shroud_forged_mult
        modifier = {
            factor = 0.01 # crisis purge
            exists = planet
            exists = planet.controller
            planet.controller = {
                OR = {
                    is_country_type = swarm
                    is_country_type = ai_empire
                }
            }
        }
    }

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

stz_viridian_roboticist = {
    category = specialist

    swappable_data = {
        default = {
            condition_string = SPECIALIST_JOB_TRIGGER
            building_icon = building_robot_assembly_plant
        }
    }
    tags = { pop_assembly }

    possible_pre_triggers = {
        has_owner = yes
        is_being_purged = no
        is_being_assimilated = no
        is_sapient = yes
    }

    possible_precalc = can_fill_specialist_job

    resources = {
        category = planet_pop_assemblers
        upkeep = {
            alloys = 6
        }
        upkeep = {
            trigger = {
                exists = owner
                owner = {
                    has_country_flag = synth_unscheduled_updates
                }
            }
            alloys = 3
        }
        upkeep = {
            trigger = {
                owner = {
                    has_active_tradition = tr_cybernetics_metabolic_reprocessing
                }
            }
            alloys = 1.05
        }

        upkeep = {
            stz_sr_viridisium = 1
        }
    }

    triggered_planet_modifier = {
        planet_pop_assembly_add = 6
    }

    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                exists = ruler
                ruler = {
                    has_trait = leader_trait_legendary_great_inventor
                }
                NOT = {
                    has_valid_civic = civic_dystopian_society
                }
            }
        }
        planet_amenities_add = 300
        mult = value:scripted_modifier_mult|MODIFIER|pop_job_amenities_mult|
    }

    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                exists = ruler
                ruler = {
                    has_trait = leader_trait_legendary_great_inventor_2
                }
                NOT = {
                    has_valid_civic = civic_dystopian_society
                }
            }
        }
        planet_amenities_add = 600
        mult = value:scripted_modifier_mult|MODIFIER|pop_job_amenities_mult|
    }

    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                exists = ruler
                ruler = {
                    has_trait = leader_trait_legendary_great_inventor_3
                }
                NOT = {
                    has_valid_civic = civic_dystopian_society
                }
            }
        }
        planet_amenities_add = 900
        mult = value:scripted_modifier_mult|MODIFIER|pop_job_amenities_mult|
    }

    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                has_tradition = tr_modularity_2
            }
        }
        planet_pop_assembly_add = 3 #If this changes, update tr_modularity_2_modifier_desc
    }

    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                has_active_tradition = tr_synthetics_prefabricated_components
                NOT = {
                    has_valid_civic = civic_dystopian_society
                }
            }
        }
        planet_amenities_add = 600
        mult = value:scripted_modifier_mult|MODIFIER|pop_job_amenities_mult|
    }

    triggered_planet_pop_group_modifier_for_all = {
        potential = {
            owner = {
                has_active_tradition = tr_cybernetics_metabolic_reprocessing
            }
        }
        bonus_pop_growth = 1.5
    }

    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                has_active_tradition = tr_cybernetics_metabolic_reprocessing
            }
        }
        fake_pop_growth_mod = 1.5
    }

    triggered_planet_modifier = {
        potential = {
            check_modifier_value = {
                modifier = job_roboticist_branch_office_value_mult
                value > 0
            }
        }
        # Actual value determined in the script value below
        branch_office_value_mult = 1
        mult = value:roboticist_branch_office_value_mult
    }

    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                has_policy_flag = computation_core_production
            }
        }
        foundry_jobs_bonus_workforce_mult = 0.075
        artisan_jobs_bonus_workforce_mult = 0.075
    }

    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                has_policy_flag = computation_core_stability
            }
        }
        bureaucrat_jobs_bonus_workforce_mult = 0.075
    }

    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = {
                has_policy_flag = computation_core_research
            }
        }
        physicist_jobs_bonus_workforce_mult = 0.075
        biologist_jobs_bonus_workforce_mult = 0.075
        engineer_jobs_bonus_workforce_mult = 0.075
    }

    weight = {
        weight = 500
        modifier = {
            factor = 10
            owner = { is_synthetic_empire = yes }
        }
    }

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