Stellaris - Job Weight Factors Are Inefficient And...[3.03.] [d281]

  • We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

HistoricalScore1

First Lieutenant
May 5, 2021
265
296
Hey you! Yes, you, reading this!
Don't forget to upvote this.
Maybe that has influence on decision makers on "As Designed" or "Confirmed."
Especially because this won't be a quick fix. And that's just worker_jobs, there's other job files.

upvote.png


Description
Job Weight Factors Are Inefficient And...[3.03.] [d281]

Game Version
3.0.3

What version do you use?
Steam

What expansions do you have installed?
Utopia, Apocalypse, Distant Stars, Ancient Relics, Federations

Do you have mods enabled?
No

Please explain your issue is in as much detail as possible.
...breaks auto resettlement for primary species when another species is present on planet. Mods disabled to easily replicate.

Updated and more detailed version of https://forum.paradoxplaza.com/forum/threads/stellaris-job-weights-are-inefficient.1475990/ feel free to mark as duplicate/delete that one whatever. I decided to dive really deep into this. Especially after discovering how much info "debugtooltip" provides.

PROBLEM 1
Species are not working jobs they are optimized for with current vanilla 03_worker_jobs.txt. As the screenshots with "vainlla" in the title demonstrate, pops are not at jobs where they get the most bonus to production, i.e. "is_enslaved" or "has_trait = trait_ingenious".

PROBLEM 2
Because of the current vanilla weights, the primary species will not be the unemployed pop when other species are present. This effectively breaks auto resettlement for the primary species, as they will not trigger auto_resettle unless they are unemployed.

For these tests all I am running is Edict: Extended Shifts, Capacity Subsidies
My ruler doesn't benefit any one resource production
Empire modifier: Enhanced Solar Panels + Energy Production

Meh SOLUTION BY ME FOR PROBLEM 2 (except syncretic/serviles)
Modified factors in 03_worker_jobs.txt (in color). As a result, the Primary Species will be unemployed, so long as there isn't an open Clerk Position. I only messed with Technician as a proof of concept.

----------------------------------------------------------------------

Technician section

[code above]


weight = {
weight = @worker_job_weight
modifier = {
factor = 20
OR = {
has_trait = trait_robot_superconductive
has_trait = trait_ingenious
has_trait = trait_nuumismatic_administration
}
}
modifier = {
factor = 800
is_enslaved = yes
can_take_servant_job = no
NOR = {
has_trait = trait_syncretic_proles
has_trait = trait_nuumismatic_administration
has_trait = trait_robot_superconductive
has_trait = trait_ingenious

[code in between]

#modifier = {
# factor = 500
# planet = {
# owner = {
# is_megacorp = yes
# }
# }
#}

# low income modifier
modifier = {
factor = 2

OR = {
is_unemployed = yes
has_job = "technician"
}
exists = planet
planet = {
has_available_jobs = "technician"
}
exists = owner
owner = {
is_ai = yes
has_monthly_income = {
resource = energy
value < 20
}
}
}
modifier = {
factor = 0.75
has_trait = trait_necrophage
}
}
}

[code below]
-------------------------------------------------------------


Steps to reproduce the issue.
1. Load test.sav or test.new.sav
2. Close all Worker Jobs
3. Click Restore Worker Jobs
NOTE: Which species/pop is working what job
4. Unpause briefly to make sure numbers/data corrects itself
5. Close various jobs until Pops become unemployed
NOTE: Which species/pop is now unemployed

Upload Attachment
File(s) attached
 

Attachments

  • test.sav
    1,5 MB · Views: 0
  • test.new.sav
    1,5 MB · Views: 0
  • job.weight.vanilla.full.jobs.png
    job.weight.vanilla.full.jobs.png
    1,9 MB · Views: 0
  • job.weight.vanilla.full.unemployed.png
    job.weight.vanilla.full.unemployed.png
    2 MB · Views: 0
  • job.weight.vanilla.png
    job.weight.vanilla.png
    1,7 MB · Views: 0
  • job.weight.vanilla.species0.png
    job.weight.vanilla.species0.png
    1,9 MB · Views: 0
  • job.weight.vanilla.species1.png
    job.weight.vanilla.species1.png
    1,7 MB · Views: 0
  • job.weight.vanilla.species2.png
    job.weight.vanilla.species2.png
    1,7 MB · Views: 0
  • job.weight.vanilla.xanid.unemployed.png
    job.weight.vanilla.xanid.unemployed.png
    1,8 MB · Views: 0
  • job.weight.xanid1.png
    job.weight.xanid1.png
    1,7 MB · Views: 0
  • job.weight.edited.png
    job.weight.edited.png
    1,7 MB · Views: 0
  • job.weight.edited.species0.png
    job.weight.edited.species0.png
    1,7 MB · Views: 0
  • job.weight.edited.species1.png
    job.weight.edited.species1.png
    1,7 MB · Views: 0
  • job.weight.edited.species2.png
    job.weight.edited.species2.png
    1,8 MB · Views: 0
  • job.weight.edited.unemployed.png
    job.weight.edited.unemployed.png
    1,7 MB · Views: 0
  • job.weight.edited.unemployed2.png
    job.weight.edited.unemployed2.png
    1,7 MB · Views: 0
Last edited:
  • 2Like
Reactions:
Update:

Looking through more than just Technician there seems to be some inconsistencies. I was going to do some extensive tests, but I have no idea if these are multiplicative or additive. For instance, let's say base weight for Clerk jobs = 2. If they also have thrifty is that 2 x 1.5 = 3? Or is it just 1.5?

All these are vanilla.

Here's Technician Weight
Side Note: There's two "u"s in the script though it's only supposed to have one "u"

weight = {
weight = @worker_job_weight
modifier = {
factor = 2
OR = {
has_trait = trait_robot_superconductive
has_trait = trait_ingenious
has_trait = trait_nuumismatic_administration
}
}
modifier = {
factor = 8
is_enslaved = yes
can_take_servant_job = no
NOR = {
has_trait = trait_syncretic_proles
has_trait = trait_nuumismatic_administration
has_trait = trait_robot_superconductive
has_trait = trait_ingenious

Here's Miner Weight
and for modifier "is_enslaved" doesn't have NOR = But OR =

weight = {
weight = @worker_job_weight
modifier = {
factor = 3
OR = {
has_trait = trait_industrious
has_trait = trait_robot_power_drills
}
}
modifier = {
factor = 10
is_enslaved = yes
can_take_servant_job = no
}

Here's Farmer Weight
Note: Again, no NOR

weight = {
weight = @worker_job_weight
modifier = {
factor = 3
OR = {
has_trait = trait_robot_harvesters
has_trait = trait_agrarian
}
}
modifier = {
factor = 1.1
owner = { has_valid_civic = civic_agrarian_idyll }
}
modifier = {
factor = 10
is_enslaved = yes
can_take_servant_job = no
}
modifier = {
factor = 3
OR = {
is_non_sapient_robot = yes
is_shackled_robot = yes
}
can_take_servant_job = no
owner = { has_technology = tech_droid_workers }
}

Here's Clerk Weight
Note: Is using OR as well as NOR

weight = {
weight = @clerk_job_weight
modifier = {
factor = 0.25
is_enslaved = yes
can_take_servant_job = no
NOR = {
has_trait = trait_nuumismatic_administration
has_trait = trait_thrifty
}
}
modifier = {
factor = 2
OR = {
is_non_sapient_robot = yes
is_shackled_robot = yes
}
can_take_servant_job = no
}
modifier = {
factor = 1.5
OR = {
has_trait = trait_thrifty
has_trait = trait_nuumismatic_administration


Just for Technician I've tried adding a factor to increase weight of "is_enslaved" under certain conditions. has_edict = extended_shifts. There's also civic = slaver_guilds. But I'm not sure. So far it hasn't impacted the weight for the species with Ingenious that is also enslaved...

Technician Edited Weight

weight = {
weight = @worker_job_weight
modifier = {
factor = 100
OR = {
has_trait = trait_robot_superconductive
has_trait = trait_ingenious
has_trait = trait_nuumismatic_administration
}
}
modifier = {
factor = 100
is_enslaved = yes
can_take_servant_job = no
NOR = {
has_trait = trait_syncretic_proles
has_trait = trait_nuumismatic_administration
has_trait = trait_robot_superconductive
has_trait = trait_ingenious
}
}
modifier = {
factor = 200
is_enslaved = yes
has_edict = extended_shifts
can_take_servant_job = no
NOR = {
has_trait = trait_syncretic_proles
has_trait = trait_nuumismatic_administration
has_trait = trait_robot_superconductive
has_trait = trait_ingenious
}
}
modifier = {
factor = 30000
is_enslaved = yes
has_edict = extended_shifts
can_take_servant_job = no
AND = {
has_trait = trait_syncretic_proles
OR = {
has_trait = trait_nuumismatic_administration
OR = {
has_trait = trait_robot_superconductive
OR = {
has_trait = trait_ingenious
}
}
}
}
}
 
  • 1Like
Reactions:
Update again. Meh Solution for PROBLEM 1 AND PROBLEM 2 (Just for planets with slaves and primary species)

job_weights.edited.edited.tempfix.png


job_weights.edited.edited.tempfix2.png



I'm worn out because again, the data format is not commonplace. So a lot of this was just guessing.

Discovered the full verbage needed for "has_edict" as well as how to ensure slaves will be the last unemployed. All proof of concept. I didn't mess with robots, serviles, nerve_stapled, robust, etc. But the modifications are done to all basic worker jobs, including clerks. Note. The end weights of the various jobs are in the millions for some, but my purpose succeeded.

Note: Used Console Commands to Genetic Resequence different species with ingenious, industrious, thrifty, agrarian. Note which pops are working which jobs. Close any worker job. Notice the primary species is the one becoming unemployed.

Also Note: I have zero idea what #low income modifier does, but messed with it anyway as it wasn't equal.

Conclusion: This will by no means be a fast correction. But at least, now auto resettlement isn't broken for just slaves and primary species on the same planet. Though the weights go from 100s to 10000...likely impacting performance late game. But most importantly, it's the primary species who are unemployed, regardless of what job is closed.

###################
# Basic Jobs
###################
clerk = {
category = worker
condition_string = WORKER_JOB_TRIGGER
building_icon = building_residence
clothes_texture_index = 2
possible_pre_triggers = {
has_owner = yes
is_being_purged = no
is_being_assimilated = no
is_sapient = yes
}
possible = {
worker_job_check_trigger = yes
}
planet_modifier = {
planet_amenities_add = 2
trade_value_add = 4
}
triggered_planet_modifier = {
potential = {
OR = {
has_trait = trait_robot_domestic_protocols
has_trait = trait_charismatic
}
}
modifier = {
planet_amenities_add = 0.4
}
}
triggered_planet_modifier = {
potential = {
has_trait = trait_repugnant
}
modifier = {
planet_amenities_add = -0.4
}
}
triggered_planet_modifier = {
potential = {
has_trait = trait_thrifty
}
modifier = {
trade_value_add = 1
}
}
triggered_planet_modifier = {
potential = {
has_trait = trait_nuumismatic_administration
}
modifier = {
trade_value_add = 1
}
}
weight = {
weight = @clerk_job_weight
modifier = {
factor = 15
is_enslaved = yes
can_take_servant_job = no
NOR = {
has_trait = trait_nuumismatic_administration
has_trait = trait_thrifty
}
}
modifier = {
factor = 2
OR = {
is_non_sapient_robot = yes
is_shackled_robot = yes
}
can_take_servant_job = no
}
modifier = {
factor = 200
OR = {
has_trait = trait_thrifty
has_trait = trait_nuumismatic_administration
}
}
modifier = {
factor = 0.1
can_take_servant_job = yes
}
modifier = {
factor = 1.5
OR = {
has_trait = trait_robot_domestic_protocols
has_trait = trait_charismatic
}
}
modifier = {
factor = 0.5
has_trait = trait_repugnant
}
modifier = {
factor = 0.5
exists = owner
owner = { is_fallen_empire = yes }
}
}
}
technician = {
category = worker
condition_string = WORKER_JOB_TRIGGER
building_icon = building_energy_grid
clothes_texture_index = 2
possible_pre_triggers = {
has_owner = yes
is_being_purged = no
is_being_assimilated = no
is_sapient = yes
}
possible = {
worker_job_check_trigger = yes
owner = {
is_gestalt = no
}
}
resources = {
category = planet_technician
produces = {
energy = 6
}
produces = {
trigger = {
owner = {
is_robot_empire = yes
}
}
energy = 2
}
produces = {
trigger = {
planet = { has_active_building = building_energy_grid }
}
energy = 1
}
produces = {
trigger = {
planet = { has_active_building = building_energy_nexus }
}
energy = 2
}
upkeep = {
trigger = {
exists = owner
owner = {
has_edict = capacity_subsidies
}
}
energy = 0.5
}
}
weight = {
weight = @worker_job_weight
modifier = {
factor = 100
OR = {
has_trait = trait_robot_superconductive
has_trait = trait_ingenious
has_trait = trait_nuumismatic_administration
}
}
modifier = {
factor = 100
is_enslaved = yes
can_take_servant_job = no
NOR = {
has_trait = trait_syncretic_proles
has_trait = trait_nuumismatic_administration
has_trait = trait_robot_superconductive
has_trait = trait_ingenious
}
}
modifier = {
factor = 150
AND = {
is_enslaved = yes
has_trait = trait_ingenious
exists = owner
owner = {
has_edict = extended_shifts

}
}
}

modifier = {
factor = 2
OR = {
is_non_sapient_robot = yes
is_shackled_robot = yes
}
can_take_servant_job = no
}
modifier = {
factor = 0.25
can_take_servant_job = yes
}
modifier = {
factor = 1.5
has_trait = trait_syncretic_proles
}
modifier = {
factor = 4
species = {
has_species_flag = racket_species_flag
}
}
modifier = {
factor = 1.2
has_trait = trait_very_strong
}
modifier = {
factor = 1.1
has_trait = trait_strong
}
modifier = {
factor = 0.9
has_trait = trait_weak
}
modifier = {
factor = 1.3
has_trait = trait_psionic
}
modifier = {
factor = 1.2
has_trait = trait_latent_psionic
}
modifier = {
factor = 1.5
has_trait = trait_presapient_earthbound
}
modifier = {
factor = 1.1
OR = {
has_trait = trait_robust
has_trait = trait_robot_efficient_processors
}
}
modifier = {
factor = 1.1
has_trait = trait_nerve_stapled
}
modifier = {
factor = 1.5
has_trait = trait_void_dweller_1
}
#modifier = {
# factor = 500
# planet = {
# owner = {
# is_megacorp = yes
# }
# }
#}
# low income modifier
modifier = {
factor = 1.1
OR = {
is_unemployed = yes
has_job = "technician"
}
exists = planet
planet = {
has_available_jobs = "technician"
}
exists = owner
owner = {
is_ai = yes
has_monthly_income = {
resource = energy
value < 20
}
}
}
modifier = {
factor = 0.75
has_trait = trait_necrophage
}
}
}
miner = {
category = worker
condition_string = WORKER_JOB_TRIGGER
building_icon = building_mineral_purification_plant
clothes_texture_index = 2
possible_pre_triggers = {
has_owner = yes
is_being_purged = no
is_being_assimilated = no
is_sapient = yes
}
possible = {
hidden_trigger = { exists = owner }
worker_job_check_trigger = yes
owner = {
is_gestalt = no
}
}
resources = {
category = planet_miners
produces = {
minerals = 4
}
produces = {
trigger = {
planet = { has_active_building = building_mineral_purification_plant }
}
minerals = 1
}
produces = {
trigger = {
planet = { has_active_building = building_mineral_purification_hub }
}
minerals = 2
}
upkeep = {
trigger = {
exists = owner
owner = {
has_edict = mining_subsidies
}
}
energy = 0.5
}
}
weight = {
weight = @worker_job_weight
modifier = {
factor = 100
OR = {
has_trait = trait_industrious
has_trait = trait_robot_power_drills
}
}
modifier = {
factor = 100
is_enslaved = yes
can_take_servant_job = no
}
modifier = {
factor = 150
AND = {
is_enslaved = yes
has_trait = trait_industrious
exists = owner
owner = {
has_edict = extended_shifts

}
}
}

modifier = {
factor = 3
OR = {
is_non_sapient_robot = yes
is_shackled_robot = yes
}
can_take_servant_job = no
owner = { has_technology = tech_droid_workers }
}
modifier = {
factor = 200
OR = {
is_non_sapient_robot = yes
is_shackled_robot = yes
}
can_take_servant_job = no
owner = { NOT = { has_technology = tech_droid_workers } }
}
modifier = {
factor = 0.25
can_take_servant_job = yes
}
modifier = {
factor = 2
species = {
has_species_flag = racket_species_flag
}
}
modifier = {
factor = 1.2
has_trait = trait_very_strong
}
modifier = {
factor = 1.1
has_trait = trait_strong
}
modifier = {
factor = 0.9
has_trait = trait_weak
}
modifier = {
factor = 1.5
has_trait = trait_syncretic_proles
}
modifier = {
factor = 1.4
has_trait = trait_presapient_proles
}
modifier = {
factor = 1.1
OR = {
has_trait = trait_robust
has_trait = trait_robot_efficient_processors
}
}
modifier = {
factor = 1.1
has_trait = trait_nerve_stapled
}
modifier = {
factor = 1.5
has_trait = trait_void_dweller_1
}
# low income modifier
modifier = {
factor = 1.1
OR = {
is_unemployed = yes
has_job = "miner"
}
exists = planet
planet = {
has_available_jobs = "miner"
}
owner = {
has_monthly_income = {
resource = minerals
value < 0
}
}
}
modifier = {
factor = 0.75
has_trait = trait_necrophage
}
}
}
crystal_miner = {
category = worker
condition_string = WORKER_JOB_TRIGGER
building_icon = building_crystal_mines
clothes_texture_index = 2
possible_pre_triggers = {
has_owner = yes
is_being_purged = no
is_being_assimilated = no
is_sapient = yes
}
possible = {
worker_job_check_trigger = yes
owner = { is_gestalt = no }
}
resources = {
category = planet_miners
produces = {
rare_crystals = 2
}
upkeep = {
trigger = {
exists = owner
owner = {
has_edict = mining_subsidies
}
}
energy = 0.5
}
}
weight = {
weight = @specialist_job_weight # Important job
modifier = {
factor = 10
is_enslaved = yes
can_take_servant_job = no
}
modifier = {
factor = 2
OR = {
is_non_sapient_robot = yes
is_shackled_robot = yes
}
can_take_servant_job = no
owner = { has_technology = tech_droid_workers }
}
modifier = {
factor = 200
OR = {
is_non_sapient_robot = yes
is_shackled_robot = yes
}
can_take_servant_job = no
owner = { NOT = { has_technology = tech_droid_workers } }
}
modifier = {
factor = 0.1
can_take_servant_job = yes
}
modifier = {
factor = 5
has_trait = trait_syncretic_proles
}
modifier = {
factor = 2
species = {
has_species_flag = racket_species_flag
}
}
modifier = {
factor = 3
has_trait = trait_very_strong
}
modifier = {
factor = 1.5
has_trait = trait_strong
}
modifier = {
factor = 0.1
has_trait = trait_weak
}
modifier = {
factor = 3
OR = {
has_trait = trait_robust
has_trait = trait_robot_efficient_processors
}
}
modifier = {
factor = 3
has_trait = trait_void_dweller_1
}
modifier = {
factor = 3
has_trait = trait_nerve_stapled
}
modifier = {
factor = 0.75
has_trait = trait_necrophage
}
}
}
gas_extractor = {
category = worker
condition_string = WORKER_JOB_TRIGGER
building_icon = building_gas_extractors
clothes_texture_index = 2
possible_pre_triggers = {
has_owner = yes
is_being_purged = no
is_being_assimilated = no
is_sapient = yes
}
possible = {
worker_job_check_trigger = yes
}
resources = {
category = planet_miners
produces = {
exotic_gases = 2
}
upkeep = {
trigger = {
exists = owner
owner = {
has_edict = mining_subsidies
}
}
energy = 0.5
}
}
weight = {
weight = @specialist_job_weight # Important job
modifier = {
factor = 10
is_enslaved = yes
can_take_servant_job = no
}
modifier = {
factor = 2
OR = {
is_non_sapient_robot = yes
is_shackled_robot = yes
}
can_take_servant_job = no
owner = { has_technology = tech_droid_workers }
}
modifier = {
factor = 200
OR = {
is_non_sapient_robot = yes
is_shackled_robot = yes
}
can_take_servant_job = no
owner = { NOT = { has_technology = tech_droid_workers } }
}
modifier = {
factor = 0.1
can_take_servant_job = yes
}
modifier = {
factor = 5
has_trait = trait_syncretic_proles
}
modifier = {
factor = 2
species = {
has_species_flag = racket_species_flag
}
}
modifier = {
factor = 3
has_trait = trait_very_strong
}
modifier = {
factor = 1.5
has_trait = trait_strong
}
modifier = {
factor = 0.1
has_trait = trait_weak
}
modifier = {
factor = 3
OR = {
has_trait = trait_robust
has_trait = trait_robot_efficient_processors
}
}
modifier = {
factor = 3
has_trait = trait_void_dweller_1
}
modifier = {
factor = 3
has_trait = trait_nerve_stapled
}
modifier = {
factor = 0.75
has_trait = trait_necrophage
}
}
}
mote_harvester = {
category = worker
condition_string = WORKER_JOB_TRIGGER
building_icon = building_mote_harvesting_traps
clothes_texture_index = 2
possible_pre_triggers = {
has_owner = yes
is_being_purged = no
is_being_assimilated = no
is_sapient = yes
}
possible = {
worker_job_check_trigger = yes
}
resources = {
category = planet_miners
produces = {
volatile_motes = 2
}
upkeep = {
trigger = {
exists = owner
owner = {
has_edict = mining_subsidies
}
}
energy = 0.5
}
}
weight = {
weight = @specialist_job_weight # Important job
modifier = {
factor = 10
is_enslaved = yes
can_take_servant_job = no
}
modifier = {
factor = 2
OR = {
is_non_sapient_robot = yes
is_shackled_robot = yes
}
can_take_servant_job = no
owner = { has_technology = tech_droid_workers }
}
modifier = {
factor = 200
OR = {
is_non_sapient_robot = yes
is_shackled_robot = yes
}
can_take_servant_job = no
owner = { NOT = { has_technology = tech_droid_workers } }
}
modifier = {
factor = 0.1
can_take_servant_job = yes
}
modifier = {
factor = 5
has_trait = trait_syncretic_proles
}
modifier = {
factor = 2
species = {
has_species_flag = racket_species_flag
}
}
modifier = {
factor = 3
has_trait = trait_very_strong
}
modifier = {
factor = 1.5
has_trait = trait_strong
}
modifier = {
factor = 0.1
has_trait = trait_weak
}
modifier = {
factor = 3
OR = {
has_trait = trait_robust
has_trait = trait_robot_efficient_processors
}
}
modifier = {
factor = 3
has_trait = trait_void_dweller_1
}
modifier = {
factor = 3
has_trait = trait_nerve_stapled
}
modifier = {
factor = 0.75
has_trait = trait_necrophage
}
}
}
farmer = {
category = worker
condition_string = WORKER_JOB_TRIGGER
building_icon = building_food_processing_facility
clothes_texture_index = 2
possible_pre_triggers = {
has_owner = yes
is_being_purged = no
is_being_assimilated = no
is_sapient = yes
}
possible = {
hidden_trigger = { exists = owner }
worker_job_check_trigger = yes
owner = {
is_gestalt = no
}
}
resources = {
category = planet_farmers
produces = {
food = 6
}
produces = {
trigger = {
exists = owner
owner = {
is_robot_empire = yes
}
}
food = -1
}
produces = {
trigger = {
planet = { has_active_building = building_food_processing_facility }
}
food = 1
}
produces = {
trigger = {
planet = { has_active_building = building_food_processing_center }
}
food = 2
}
upkeep = {
trigger = {
exists = owner
owner = {
has_edict = farming_subsidies
}
}
energy = 0.5
}
}
triggered_planet_modifier = {
potential = {
exists = owner
owner = { has_valid_civic = civic_agrarian_idyll }
}
modifier = {
planet_amenities_add = 2
}
}
triggered_planet_modifier = {
potential = {
exists = owner
owner = { has_valid_civic = civic_agrarian_idyll }
OR = {
has_trait = trait_robot_domestic_protocols
has_trait = trait_charismatic
}
}
modifier = {
planet_amenities_add = 0.4
}
}
triggered_planet_modifier = {
potential = {
exists = owner
owner = { has_valid_civic = civic_agrarian_idyll }
has_trait = trait_repugnant
}
modifier = {
planet_amenities_add = -0.4
}
}
weight = {
weight = @worker_job_weight
modifier = {
factor = 100
OR = {
has_trait = trait_robot_harvesters
has_trait = trait_agrarian
}
}
modifier = {
factor = 1.1
owner = { has_valid_civic = civic_agrarian_idyll }
}
modifier = {
factor = 100
is_enslaved = yes
can_take_servant_job = no
}
modifier = {
factor = 150
AND = {
is_enslaved = yes
has_trait = trait_agrarian
exists = owner
owner = {
has_edict = extended_shifts
}
}
}

modifier = {
factor = 3
OR = {
is_non_sapient_robot = yes
is_shackled_robot = yes
}
can_take_servant_job = no
owner = { has_technology = tech_droid_workers }
}
modifier = {
factor = 200
OR = {
is_non_sapient_robot = yes
is_shackled_robot = yes
}
can_take_servant_job = no
owner = { NOT = { has_technology = tech_droid_workers } }
}
modifier = {
factor = 0.25
can_take_servant_job = yes
}
modifier = {
factor = 2
has_trait = trait_syncretic_proles
}
modifier = {
factor = 1.2
has_trait = trait_very_strong
}
modifier = {
factor = 1.1
has_trait = trait_strong
}
modifier = {
factor = 0.9
has_trait = trait_weak
}
modifier = {
factor = 1.5
has_trait = trait_syncretic_proles
}
modifier = {
factor = 1.4
has_trait = trait_presapient_proles
}
modifier = {
factor = 1.1
OR = {
has_trait = trait_robust
has_trait = trait_robot_efficient_processors
}
}
modifier = {
factor = 1.1
has_trait = trait_nerve_stapled
}
modifier = {
factor = 1.5
owner = { has_valid_civic = civic_agrarian_idyll }
OR = {
has_trait = trait_robot_domestic_protocols
has_trait = trait_charismatic
}
}
modifier = {
factor = 0.5
owner = { has_valid_civic = civic_agrarian_idyll }
has_trait = trait_repugnant
}
modifier = {
factor = 1.5
has_trait = trait_void_dweller_1
}
# low income modifier
modifier = {
factor = 1.1
OR = {
is_unemployed = yes
has_job = farmer
}
exists = planet
planet = {
has_available_jobs = farmer
}
owner = {
has_monthly_income = {
resource = food
value < 10
}
}
}
modifier = {
factor = 0.5
has_trait = trait_lithoid
owner = {
is_lithoid_empire = yes
has_monthly_income = {
resource = food
value >= 0
}
}
}
modifier = {
factor = 0.75
has_trait = trait_necrophage
}
}
}
soldier = {
category = worker
condition_string = SOLDIER_JOB_TRIGGER
building_icon = building_stronghold
clothes_texture_index = 4
country_modifier = {
country_naval_cap_add = 4
}
triggered_country_modifier = {
potential = {
exists = planet
planet = {
exists = owner
owner = { has_technology = "tech_ground_defense_planning" }
}
}
modifier = {
country_naval_cap_add = 2
}
}
pop_modifier = {
pop_defense_armies_add = 3
}
resources = {
category = planet_soldiers
produces = {
trigger = {
exists = owner
owner = { has_valid_civic = civic_citizen_service }
}
unity = 2
}
}
triggered_planet_modifier = {
potential = {
exists = planet
planet = {
has_modifier = martial_law
}
}
modifier = {
planet_stability_add = 5
}
}
possible_pre_triggers = {
has_owner = yes
is_being_purged = no
is_being_assimilated = no
is_sapient = yes
}
possible = {
soldier_job_check_trigger = yes
owner = { is_gestalt = no }
}
weight = {
weight = @soldier_job_weight
modifier = {
factor = 10
exists = planet
planet = { has_modifier = martial_law }
}
modifier = {
factor = 2
has_trait = trait_resilient
}
modifier = {
factor = 2
has_trait = trait_very_strong
}
modifier = {
factor = 1.5
has_trait = trait_strong
}
modifier = {
factor = 0.5
has_trait = trait_weak
}
modifier = {
factor = 0.1
is_enslaved = yes
NOT = { has_slavery_type = { type = slavery_military } }
}
modifier = {
factor = 10
is_enslaved = yes
has_slavery_type = { type = slavery_military }
}
modifier = {
factor = 0.1
can_take_servant_job = yes
}
modifier = {
factor = 1.1
has_trait = trait_cybernetic
}
modifier = {
factor = 2
has_trait = trait_presapient_earthbound
}
modifier = {
factor = 1.1
has_trait = trait_limited_regeneration
}
modifier = {
factor = 1.1
has_trait = trait_presapient_proles
}
modifier = {
factor = 1.1
has_trait = trait_brainslug
}
modifier = {
factor = 1.05
has_trait = trait_presapient_natural_intellectuals
}
modifier = {
factor = 1.05
OR = {
has_trait = trait_robust
has_trait = trait_robot_efficient_processors
}
}
modifier = {
factor = 1.05
has_trait = trait_nerve_stapled
}
modifier = {
factor = 1.1
OR = {
has_trait = trait_robot_propaganda_machines
has_trait = trait_traditional
}
}
modifier = {
factor = 0.9
has_trait = trait_quarrelsome
}
modifier = {
factor = 0
can_be_soldier = no
}
modifier = {
factor = 2
has_trait = trait_lithoid
}
}
}
preacher = {
category = worker
condition_string = WORKER_JOB_TRIGGER
building_icon = building_temple_of_prosperity
clothes_texture_index = 3
icon = priest
possible_pre_triggers = {
has_owner = yes
is_being_purged = no
is_being_assimilated = no
is_sapient = yes
}
possible = {
worker_job_check_trigger = yes
}
resources = {
category = planet_priests
produces = {
unity = 1
}
}
planet_modifier = {
planet_amenities_add = 3
trade_value_add = 4
}
triggered_planet_modifier = {
potential = {
OR = {
has_trait = trait_robot_domestic_protocols
has_trait = trait_charismatic
}
}
modifier = {
planet_amenities_add = 0.6
}
}
triggered_planet_modifier = {
potential = {
has_trait = trait_repugnant
}
modifier = {
planet_amenities_add = -0.6
}
}
triggered_planet_modifier = {
potential = {
has_trait = trait_thrifty
}
modifier = {
trade_value_add = 1
}
}
triggered_planet_modifier = {
potential = {
has_trait = trait_nuumismatic_administration
}
modifier = {
trade_value_add = 1
}
}
weight = {
weight = @specialist_job_weight # Important job
modifier = {
factor = 0.2
has_citizenship_rights = no
NOT = { has_trait = trait_mechanical }
}
modifier = {
factor = 2
owner = { has_civic = civic_exalted_priesthood }
}
modifier = {
factor = 1.5
OR = {
has_trait = trait_thrifty
has_trait = trait_nuumismatic_administration
}
}
modifier = {
factor = 1.5
OR = {
has_trait = trait_robot_domestic_protocols
has_trait = trait_charismatic
}
}
modifier = {
factor = 0.5
has_trait = trait_repugnant
}
modifier = {
factor = 1.1
OR = {
has_trait = trait_robot_propaganda_machines
has_trait = trait_traditional
}
}
modifier = {
factor = 1.2
has_ethic = ethic_spiritualist
}
modifier = {
factor = 0.5
has_trait = trait_quarrelsome
}
modifier = {
factor = 0.1
can_take_servant_job = yes
}
modifier = {
factor = 0.1
has_ethic = ethic_materialist
NOT = { has_job = preacher }
}
modifier = {
factor = 1.05
has_trait = trait_very_strong
}
modifier = {
factor = 1.025
has_trait = trait_strong
}
modifier = {
factor = 0.9
has_trait = trait_weak
}
modifier = {
factor = 1.1
has_trait = trait_brainslug
}
modifier = {
factor = 1.05
has_trait = trait_presapient_natural_intellectuals
}
modifier = {
factor = 1.05
OR = {
has_trait = trait_robust
has_trait = trait_robot_efficient_processors
}
}
modifier = {
factor = 0.01
has_trait = trait_nerve_stapled
}
}
}
mortal_initiate = {
category = worker
condition_string = WORKER_JOB_TRIGGER
building_icon = building_sacrificial_temple_1
clothes_texture_index = 3
icon = mortal_initiate
possible_pre_triggers = {
has_owner = yes
is_sapient = yes
is_enslaved = no
is_being_purged = no
is_being_assimilated = no
}
possible = {
worker_job_check_trigger = yes
NOT = { has_trait = trait_mechanical } #No machines
}
resources = {
category = planet_culture_workers
produces = {
society_research = 1
}
}
planet_modifier = { }
weight = {
weight = @specialist_job_weight
modifier = {
factor = 0.2
has_citizenship_rights = no
NOT = { has_trait = trait_mechanical }
}
modifier = {
factor = 2
owner = { has_civic = civic_exalted_priesthood }
}
modifier = {
factor = 1.5
OR = {
has_trait = trait_thrifty
has_trait = trait_nuumismatic_administration
}
}
modifier = {
factor = 1.5
OR = {
has_trait = trait_robot_domestic_protocols
has_trait = trait_charismatic
}
}
modifier = {
factor = 0.5
has_trait = trait_repugnant
}
modifier = {
factor = 1.1
OR = {
has_trait = trait_robot_propaganda_machines
has_trait = trait_traditional
}
}
modifier = {
factor = 1.2
has_ethic = ethic_spiritualist
}
modifier = {
factor = 0.5
has_trait = trait_quarrelsome
}
modifier = {
factor = 0.1
can_take_servant_job = yes
}
modifier = {
factor = 0.1
has_ethic = ethic_materialist
NOT = { has_job = preacher }
}
modifier = {
factor = 1.05
has_trait = trait_weak
}
modifier = {
factor = 1.05
has_trait = trait_presapient_natural_intellectuals
}
modifier = {
factor = 0.01
has_trait = trait_nerve_stapled
}
}
}
 

Attachments

  • 03_worker_jobs.txt
    25,3 KB · Views: 0
  • test.newest.sav
    1,5 MB · Views: 0
  • job_weights.edited.edited.tempfix.png
    job_weights.edited.edited.tempfix.png
    1,8 MB · Views: 0
Last edited:
  • 1Like
Reactions:
Update to the update (don't hate me)

Here's my final very temporary and not all that good workaround for worker jobs of all types (just for slaves and basic traits) for PROBLEM 1 and PROBLEM 2. Clerk weight was by far the hardest for me. I ended up copy/pasting technician weight and changing the trait names. No changes were needed for strategic resource jobs for just slaves. It likely still needs some work. I didn't touch Soldier down because I don't have that DLC.

NOTE: Some of the worker weights were
weight = {
weight = @worker_job_weight

Clerk Weight was
weight = {
weight = @clerk_job_weight

Also Note: I have zero idea what racket_species_flag is, but the others had it. I cannot highlight what I removed. I did remove some of the script.
Code:
###################
# Basic Jobs
###################

clerk = {
    category = worker
    condition_string = WORKER_JOB_TRIGGER
    building_icon = building_residence
    clothes_texture_index = 2

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

    possible = {
        worker_job_check_trigger = yes
    }

    planet_modifier = {
        planet_amenities_add = 2
        trade_value_add = 4
    }
    triggered_planet_modifier = {
        potential = {
            OR = {
                has_trait = trait_robot_domestic_protocols
                has_trait = trait_charismatic
            }
        }
        modifier = {
            planet_amenities_add = 0.4
        }
    }
    triggered_planet_modifier = {
        potential = {
            has_trait = trait_repugnant
        }
        modifier = {
            planet_amenities_add = -0.4
        }
    }
    triggered_planet_modifier = {
        potential = {
            has_trait = trait_thrifty
        }
        modifier = {
            trade_value_add = 1
        }
    }

    triggered_planet_modifier = {
        potential = {
            has_trait = trait_nuumismatic_administration
        }
        modifier = {
            trade_value_add = 1
        }
    }
    weight = {
[COLOR=rgb(250, 197, 28)]        weight = @worker_job_weight
        modifier = {
            factor = 150
            OR = {
                has_trait = trait_robot_domestic_protocols
                has_trait = trait_thrifty
                has_trait = trait_nuumismatic_administration[/COLOR]
         [COLOR=rgb(250, 197, 28)]   }
        }[/COLOR]
        modifier = {
            factor = [COLOR=rgb(250, 197, 28)]100[/COLOR]
            is_enslaved = yes
            can_take_servant_job = no
            NOR = {
                [COLOR=rgb(250, 197, 28)]has_trait = trait_syncretic_proles[/COLOR]
                has_trait = trait_nuumismatic_administration
               [COLOR=rgb(250, 197, 28)] has_trait = trait_robot_domestic_protocols[/COLOR]
                has_trait = trait_thrifty
            }
        }
        modifier = {
            factor = 2
            OR = {
                is_non_sapient_robot = yes
                is_shackled_robot = yes
            }
            can_take_servant_job = no
        }
        modifier = {
            factor = [COLOR=rgb(250, 197, 28)]1[/COLOR]
            can_take_servant_job = yes
        }
 [COLOR=rgb(250, 197, 28)]       modifier = {
            factor = 1.5
            has_trait = trait_syncretic_proles
        }
        modifier = {
            factor = 4
            species = {
                has_species_flag = racket_species_flag
            }
        }
        modifier = {
            factor = 1.3
            has_trait = trait_psionic
        }
        modifier = {
            factor = 1.2
            has_trait = trait_latent_psionic
        }
        modifier = {
            factor = 1.1
            has_trait = trait_nerve_stapled
        }
        modifier = {
            factor = 1.5
            has_trait = trait_void_dweller_1[/COLOR]
       [COLOR=rgb(250, 197, 28)] }[/COLOR]

     [COLOR=rgb(250, 197, 28)]   #modifier = {
        #    factor = 500
        #    planet = {
        #        owner = {
        #            is_megacorp = yes
        #        }
        #    }
        #}

        # low income modifier
        modifier = {
            factor = 1.1

            OR = {
                is_unemployed = yes
                has_job = "clerk"
            }
            exists = planet
            planet = {
                has_available_jobs = "clerk"
            }
            exists = owner
            owner = {
                is_ai = yes
                has_monthly_income = {
                    resource = energy
                    value < 20
                }
            }
        }
        modifier = {
            factor = 0.75
            has_trait = trait_necrophage
        }
    }
}[/COLOR]

technician = {
    category = worker
    condition_string = WORKER_JOB_TRIGGER
    building_icon = building_energy_grid
    clothes_texture_index = 2

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

    possible = {
        worker_job_check_trigger = yes
        owner = {
            is_gestalt = no
        }
    }

    resources = {
        category = planet_technician
        produces = {
            energy = 6
        }
        produces = {
            trigger = {
                owner = {
                    is_robot_empire = yes
                }
            }
            energy = 2
        }
        produces = {
            trigger = {
                planet = { has_active_building = building_energy_grid }
            }
            energy = 1
        }
        produces = {
            trigger = {
                planet = { has_active_building = building_energy_nexus }
            }
            energy = 2
        }
        upkeep = {
            trigger = {
                exists = owner
                owner = {
                    has_edict = capacity_subsidies
                }
            }
            energy = 0.5
        }
    }

    weight = {
        weight = @worker_job_weight
        modifier = {
            factor = [COLOR=rgb(250, 197, 28)]100[/COLOR]
            OR = {
                has_trait = trait_robot_superconductive
                has_trait = trait_ingenious
                has_trait = trait_nuumismatic_administration
            }
        }
        modifier = {
            factor = [COLOR=rgb(250, 197, 28)]100[/COLOR]
            is_enslaved = yes
            can_take_servant_job = no
            NOR = {
                has_trait = trait_syncretic_proles
                has_trait = trait_nuumismatic_administration
                has_trait = trait_robot_superconductive
                has_trait = trait_ingenious
            }
        }
        modifier = {
            factor = 150
            AND = {
                is_enslaved = yes
                has_trait = trait_ingenious
                    exists = owner
                    owner = {
                        has_edict = extended_shifts
            }
                }
            }
        modifier = {
            factor = 2
            OR = {
                is_non_sapient_robot = yes
                is_shackled_robot = yes
            }
            can_take_servant_job = no
        }
        modifier = {
            factor = 0.25
            can_take_servant_job = yes
        }
        modifier = {
            factor = 1.5
            has_trait = trait_syncretic_proles
        }
        modifier = {
            factor = 4
            species = {
                has_species_flag = racket_species_flag
            }
        }
        modifier = {
            factor = 1.2
            has_trait = trait_very_strong
        }
        modifier = {
            factor = 1.1
            has_trait = trait_strong
        }
        modifier = {
            factor = 0.9
            has_trait = trait_weak
        }
        modifier = {
            factor = 1.3
            has_trait = trait_psionic
        }
        modifier = {
            factor = 1.2
            has_trait = trait_latent_psionic
        }
        modifier = {
            factor = 1.5
            has_trait = trait_presapient_earthbound
        }
        modifier = {
            factor = 1.1
            OR = {
                has_trait = trait_robust
                has_trait = trait_robot_efficient_processors
            }
        }
        modifier = {
            factor = 1.1
            has_trait = trait_nerve_stapled
        }
        modifier = {
            factor = 1.5
            has_trait = trait_void_dweller_1
        }

        #modifier = {
        #    factor = 500
        #    planet = {
        #        owner = {
        #            is_megacorp = yes
        #        }
        #    }
        #}

        # low income modifier
        modifier = {
            factor = [COLOR=rgb(250, 197, 28)]1.1[/COLOR]

            OR = {
                is_unemployed = yes
                has_job = "technician"
            }
            exists = planet
            planet = {
                has_available_jobs = "technician"
            }
            exists = owner
            owner = {
                is_ai = yes
                has_monthly_income = {
                    resource = energy
                    value < 20
                }
            }
        }
        modifier = {
            factor = 0.75
            has_trait = trait_necrophage
        }
    }
}

miner = {
    category = worker
    condition_string = WORKER_JOB_TRIGGER
    building_icon = building_mineral_purification_plant
    clothes_texture_index = 2

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

    possible = {
        hidden_trigger = { exists = owner }
        worker_job_check_trigger = yes
        owner = {
            is_gestalt = no
        }
    }

    resources = {
        category = planet_miners
        produces = {
            minerals = 4
        }
        produces = {
            trigger = {
                planet = { has_active_building = building_mineral_purification_plant }
            }
            minerals = 1
        }
        produces = {
            trigger = {
                planet = { has_active_building = building_mineral_purification_hub }
            }
            minerals = 2
        }
        upkeep = {
            trigger = {
                exists = owner
                owner = {
                    has_edict = mining_subsidies
                }
            }
            energy = 0.5
        }
    }

    weight = {
        weight = @worker_job_weight
        modifier = {
            factor = [COLOR=rgb(250, 197, 28)]100[/COLOR]
            OR = {
                has_trait = trait_industrious
                has_trait = trait_robot_power_drills
            }
        }
        modifier = {
            factor = [COLOR=rgb(250, 197, 28)]100[/COLOR]
            is_enslaved = yes
            can_take_servant_job = no
        }
     [COLOR=rgb(250, 197, 28)]   modifier = {
            factor = 150
            AND = {
                is_enslaved = yes
                has_trait = trait_industrious
                    exists = owner
                    owner = {
                        has_edict = extended_shifts
            }
                }
            }[/COLOR]
        modifier = {
            factor = 3
            OR = {
                is_non_sapient_robot = yes
                is_shackled_robot = yes
            }
            can_take_servant_job = no
            owner = { has_technology = tech_droid_workers }
        }
        modifier = {
            factor = 200
            OR = {
                is_non_sapient_robot = yes
                is_shackled_robot = yes
            }
            can_take_servant_job = no
            owner = { NOT = { has_technology = tech_droid_workers } }
        }
        modifier = {
            factor = 0.25
            can_take_servant_job = yes
        }
        modifier = {
            factor = 2
            species = {
                has_species_flag = racket_species_flag
            }
        }
        modifier = {
            factor = 1.2
            has_trait = trait_very_strong
        }
        modifier = {
            factor = 1.1
            has_trait = trait_strong
        }
        modifier = {
            factor = 0.9
            has_trait = trait_weak
        }
        modifier = {
            factor = 1.5
            has_trait = trait_syncretic_proles
        }
        modifier = {
            factor = 1.4
            has_trait = trait_presapient_proles
        }
        modifier = {
            factor = 1.1
            OR = {
                has_trait = trait_robust
                has_trait = trait_robot_efficient_processors
            }
        }
        modifier = {
            factor = 1.1
            has_trait = trait_nerve_stapled
        }
        modifier = {
            factor = 1.5
            has_trait = trait_void_dweller_1
        }

        # low income modifier
        modifier = {
            factor = 1.1

            OR = {
                is_unemployed = yes
                has_job = "miner"
            }
            exists = planet
            planet = {
                has_available_jobs = "miner"
            }
            owner = {
                has_monthly_income = {
                    resource = minerals
                    value < 0
                }
            }
        }
        modifier = {
            factor = 0.75
            has_trait = trait_necrophage
        }
    }
}

crystal_miner = {
    category = worker
    condition_string = WORKER_JOB_TRIGGER
    building_icon = building_crystal_mines
    clothes_texture_index = 2

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

    possible = {
        worker_job_check_trigger = yes
        owner = { is_gestalt = no }
    }

    resources = {
        category = planet_miners
        produces = {
            rare_crystals = 2
        }
        upkeep = {
            trigger = {
                exists = owner
                owner = {
                    has_edict = mining_subsidies
                }
            }
            energy = 0.5
        }
    }

    weight = {
        weight = @specialist_job_weight # Important job
        modifier = {
            factor = 10
            is_enslaved = yes
            can_take_servant_job = no
        }
        modifier = {
            factor = 2
            OR = {
                is_non_sapient_robot = yes
                is_shackled_robot = yes
            }
            can_take_servant_job = no
            owner = { has_technology = tech_droid_workers }
        }
        modifier = {
            factor = 200
            OR = {
                is_non_sapient_robot = yes
                is_shackled_robot = yes
            }
            can_take_servant_job = no
            owner = { NOT = { has_technology = tech_droid_workers } }
        }
        modifier = {
            factor = 0.1
            can_take_servant_job = yes
        }
        modifier = {
            factor = 5
            has_trait = trait_syncretic_proles
        }
        modifier = {
            factor = 2
            species = {
                has_species_flag = racket_species_flag
            }
        }
        modifier = {
            factor = 3
            has_trait = trait_very_strong
        }
        modifier = {
            factor = 1.5
            has_trait = trait_strong
        }
        modifier = {
            factor = 0.1
            has_trait = trait_weak
        }
        modifier = {
            factor = 3
            OR = {
                has_trait = trait_robust
                has_trait = trait_robot_efficient_processors
            }
        }
        modifier = {
            factor = 3
            has_trait = trait_void_dweller_1
        }
        modifier = {
            factor = 3
            has_trait = trait_nerve_stapled
        }
        modifier = {
            factor = 0.75
            has_trait = trait_necrophage
        }
    }
}

gas_extractor = {
    category = worker
    condition_string = WORKER_JOB_TRIGGER
    building_icon = building_gas_extractors
    clothes_texture_index = 2

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

    possible = {
        worker_job_check_trigger = yes
    }

    resources = {
        category = planet_miners
        produces = {
            exotic_gases = 2
        }
        upkeep = {
            trigger = {
                exists = owner
                owner = {
                    has_edict = mining_subsidies
                }
            }
            energy = 0.5
        }
    }

    weight = {
        weight = @specialist_job_weight # Important job
        modifier = {
            factor = 10
            is_enslaved = yes
            can_take_servant_job = no
        }
        modifier = {
            factor = 2
            OR = {
                is_non_sapient_robot = yes
                is_shackled_robot = yes
            }
            can_take_servant_job = no
            owner = { has_technology = tech_droid_workers }
        }
        modifier = {
            factor = 200
            OR = {
                is_non_sapient_robot = yes
                is_shackled_robot = yes
            }
            can_take_servant_job = no
            owner = { NOT = { has_technology = tech_droid_workers } }
        }
        modifier = {
            factor = 0.1
            can_take_servant_job = yes
        }
        modifier = {
            factor = 5
            has_trait = trait_syncretic_proles
        }
        modifier = {
            factor = 2
            species = {
                has_species_flag = racket_species_flag
            }
        }
        modifier = {
            factor = 3
            has_trait = trait_very_strong
        }
        modifier = {
            factor = 1.5
            has_trait = trait_strong
        }
        modifier = {
            factor = 0.1
            has_trait = trait_weak
        }
        modifier = {
            factor = 3
            OR = {
                has_trait = trait_robust
                has_trait = trait_robot_efficient_processors
            }
        }
        modifier = {
            factor = 3
            has_trait = trait_void_dweller_1
        }
        modifier = {
            factor = 3
            has_trait = trait_nerve_stapled
        }
        modifier = {
            factor = 0.75
            has_trait = trait_necrophage
        }
    }
}

mote_harvester = {
    category = worker
    condition_string = WORKER_JOB_TRIGGER
    building_icon = building_mote_harvesting_traps
    clothes_texture_index = 2

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

    possible = {
        worker_job_check_trigger = yes
    }

    resources = {
        category = planet_miners
        produces = {
            volatile_motes = 2
        }
        upkeep = {
            trigger = {
                exists = owner
                owner = {
                    has_edict = mining_subsidies
                }
            }
            energy = 0.5
        }
    }

    weight = {
        weight = @specialist_job_weight # Important job
        modifier = {
            factor = 10
            is_enslaved = yes
            can_take_servant_job = no
        }
        modifier = {
            factor = 2
            OR = {
                is_non_sapient_robot = yes
                is_shackled_robot = yes
            }
            can_take_servant_job = no
            owner = { has_technology = tech_droid_workers }
        }
        modifier = {
            factor = 200
            OR = {
                is_non_sapient_robot = yes
                is_shackled_robot = yes
            }
            can_take_servant_job = no
            owner = { NOT = { has_technology = tech_droid_workers } }
        }
        modifier = {
            factor = 0.1
            can_take_servant_job = yes
        }
        modifier = {
            factor = 5
            has_trait = trait_syncretic_proles
        }
        modifier = {
            factor = 2
            species = {
                has_species_flag = racket_species_flag
            }
        }
        modifier = {
            factor = 3
            has_trait = trait_very_strong
        }
        modifier = {
            factor = 1.5
            has_trait = trait_strong
        }
        modifier = {
            factor = 0.1
            has_trait = trait_weak
        }
        modifier = {
            factor = 3
            OR = {
                has_trait = trait_robust
                has_trait = trait_robot_efficient_processors
            }
        }
        modifier = {
            factor = 3
            has_trait = trait_void_dweller_1
        }
        modifier = {
            factor = 3
            has_trait = trait_nerve_stapled
        }
        modifier = {
            factor = 0.75
            has_trait = trait_necrophage
        }
    }
}

farmer = {
    category = worker
    condition_string = WORKER_JOB_TRIGGER
    building_icon = building_food_processing_facility
    clothes_texture_index = 2

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

    possible = {
        hidden_trigger = { exists = owner }
        worker_job_check_trigger = yes
        owner = {
            is_gestalt = no
        }
    }

    resources = {
        category = planet_farmers
        produces = {
            food = 6
        }
        produces = {
            trigger = {
                exists = owner
                owner = {
                    is_robot_empire = yes
                }
            }
            food = -1
        }
        produces = {
            trigger = {
                planet = { has_active_building = building_food_processing_facility }
            }
            food = 1
        }
        produces = {
            trigger = {
                planet = { has_active_building = building_food_processing_center }
            }
            food = 2
        }
        upkeep = {
            trigger = {
                exists = owner
                owner = {
                    has_edict = farming_subsidies
                }
            }
            energy = 0.5
        }
    }

    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = { has_valid_civic = civic_agrarian_idyll }
        }
        modifier = {
            planet_amenities_add = 2
        }
    }
    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = { has_valid_civic = civic_agrarian_idyll }
            OR = {
                has_trait = trait_robot_domestic_protocols
                has_trait = trait_charismatic
            }
        }
        modifier = {
            planet_amenities_add = 0.4
        }
    }
    triggered_planet_modifier = {
        potential = {
            exists = owner
            owner = { has_valid_civic = civic_agrarian_idyll }
            has_trait = trait_repugnant
        }
        modifier = {
            planet_amenities_add = -0.4
        }
    }

    weight = {
        weight = @worker_job_weight
        modifier = {
            factor = [COLOR=rgb(250, 197, 28)]100[/COLOR]
            OR = {
                has_trait = trait_robot_harvesters
                has_trait = trait_agrarian
            }
        }
        modifier = {
            factor = 1.1
            owner = { has_valid_civic = civic_agrarian_idyll }
        }
        modifier = {
            factor = [COLOR=rgb(250, 197, 28)]100[/COLOR]
            is_enslaved = yes
            can_take_servant_job = no
        }
      [COLOR=rgb(250, 197, 28)]  modifier = {
            factor = 150
            AND = {
                is_enslaved = yes
                has_trait = trait_agrarian
                    exists = owner
                    owner = {
                        has_edict = extended_shifts
            }
                }
            }[/COLOR]
        modifier = {
            factor = 3
            OR = {
                is_non_sapient_robot = yes
                is_shackled_robot = yes
            }
            can_take_servant_job = no
            owner = { has_technology = tech_droid_workers }
        }
        modifier = {
            factor = 200
            OR = {
                is_non_sapient_robot = yes
                is_shackled_robot = yes
            }
            can_take_servant_job = no
            owner = { NOT = { has_technology = tech_droid_workers } }
        }
        modifier = {
            factor = 0.25
            can_take_servant_job = yes
        }
        modifier = {
            factor = 2
            has_trait = trait_syncretic_proles
        }
        modifier = {
            factor = 1.2
            has_trait = trait_very_strong
        }
        modifier = {
            factor = 1.1
            has_trait = trait_strong
        }
        modifier = {
            factor = 0.9
            has_trait = trait_weak
        }
        modifier = {
            factor = 1.5
            has_trait = trait_syncretic_proles
        }
        modifier = {
            factor = 1.4
            has_trait = trait_presapient_proles
        }
        modifier = {
            factor = 1.1
            OR = {
                has_trait = trait_robust
                has_trait = trait_robot_efficient_processors
            }
        }
        modifier = {
            factor = 1.1
            has_trait = trait_nerve_stapled
        }
        modifier = {
            factor = 1.5
            owner = { has_valid_civic = civic_agrarian_idyll }
            OR = {
                has_trait = trait_robot_domestic_protocols
                has_trait = trait_charismatic
            }
        }
        modifier = {
            factor = 0.5
            owner = { has_valid_civic = civic_agrarian_idyll }
            has_trait = trait_repugnant
        }
        modifier = {
            factor = 1.5
            has_trait = trait_void_dweller_1
        }

        # low income modifier
        modifier = {
            factor =[COLOR=rgb(250, 197, 28)] 1.1[/COLOR]

            OR = {
                is_unemployed = yes
                has_job = [COLOR=rgb(250, 197, 28)]"[/COLOR]farmer[COLOR=rgb(250, 197, 28)]"[/COLOR]
            }
            exists = planet
            planet = {
                has_available_jobs = [COLOR=rgb(250, 197, 28)]"[/COLOR]farmer[COLOR=rgb(250, 197, 28)]"[/COLOR]
            }
            owner = {
                has_monthly_income = {
                    resource = food
                    value < 10
                }
            }
        }

        modifier = {
            factor = 0.5
            has_trait = trait_lithoid

            owner = {
                is_lithoid_empire = yes
                has_monthly_income = {
                    resource = food
                    value >= 0
                }
            }
        }
        modifier = {
            factor = 0.75
            has_trait = trait_necrophage
        }
    }
}

soldier = {
    category = worker
    condition_string = SOLDIER_JOB_TRIGGER
    building_icon = building_stronghold
    clothes_texture_index = 4

    country_modifier = {
        country_naval_cap_add = 4
    }

    triggered_country_modifier = {
        potential = {
            exists = planet
            planet = {
                exists = owner
                owner = { has_technology = "tech_ground_defense_planning" }
            }
        }
        modifier = {
            country_naval_cap_add = 2
        }
    }

    pop_modifier = {
        pop_defense_armies_add = 3
    }

    resources = {
        category = planet_soldiers
        produces = {
            trigger = {
                exists = owner
                owner = { has_valid_civic = civic_citizen_service }
            }
            unity = 2
        }
    }

    triggered_planet_modifier = {
        potential = {
            exists = planet
            planet = {
                has_modifier = martial_law
            }
        }
        modifier = {
            planet_stability_add = 5
        }
    }

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

    possible = {
        soldier_job_check_trigger = yes
        owner = { is_gestalt = no }
    }

    weight = {
        weight = @soldier_job_weight
        modifier = {
            factor = 10
            exists = planet
            planet = { has_modifier = martial_law }
        }
        modifier = {
            factor = 2
            has_trait = trait_resilient
        }
        modifier = {
            factor = 2
            has_trait = trait_very_strong
        }
        modifier = {
            factor = 1.5
            has_trait = trait_strong
        }
        modifier = {
            factor = 0.5
            has_trait = trait_weak
        }
        modifier = {
            factor = 0.1
            is_enslaved = yes
            NOT = { has_slavery_type = { type = slavery_military } }
        }
        modifier = {
            factor = 10
            is_enslaved = yes
            has_slavery_type = { type = slavery_military }
        }
        modifier = {
            factor = 0.1
            can_take_servant_job = yes
        }
        modifier = {
            factor = 1.1
            has_trait = trait_cybernetic
        }
        modifier = {
            factor = 2
            has_trait = trait_presapient_earthbound
        }
        modifier = {
            factor = 1.1
            has_trait = trait_limited_regeneration
        }
        modifier = {
            factor = 1.1
            has_trait = trait_presapient_proles
        }
        modifier = {
            factor = 1.1
            has_trait = trait_brainslug
        }
        modifier = {
            factor = 1.05
            has_trait = trait_presapient_natural_intellectuals
        }
        modifier = {
            factor = 1.05
            OR = {
                has_trait = trait_robust
                has_trait = trait_robot_efficient_processors
            }
        }
        modifier = {
            factor = 1.05
            has_trait = trait_nerve_stapled
        }
        modifier = {
            factor = 1.1
            OR = {
                has_trait = trait_robot_propaganda_machines
                has_trait = trait_traditional
            }
        }
        modifier = {
            factor = 0.9
            has_trait = trait_quarrelsome
        }
        modifier = {
            factor = 0
            can_be_soldier = no
        }
        modifier = {
            factor = 2
            has_trait = trait_lithoid
        }
    }
}

preacher = {
    category = worker
    condition_string = WORKER_JOB_TRIGGER
    building_icon = building_temple_of_prosperity
    clothes_texture_index = 3
    icon = priest

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

    possible = {
        worker_job_check_trigger = yes
    }

    resources = {
        category = planet_priests
        produces = {
            unity = 1
        }
    }

    planet_modifier = {
        planet_amenities_add = 3
        trade_value_add = 4
    }

    triggered_planet_modifier = {
        potential = {
            OR = {
                has_trait = trait_robot_domestic_protocols
                has_trait = trait_charismatic
            }
        }
        modifier = {
            planet_amenities_add = 0.6
        }
    }
    triggered_planet_modifier = {
        potential = {
            has_trait = trait_repugnant
        }
        modifier = {
            planet_amenities_add = -0.6
        }
    }
    triggered_planet_modifier = {
        potential = {
            has_trait = trait_thrifty
        }
        modifier = {
            trade_value_add = 1
        }
    }

    triggered_planet_modifier = {
        potential = {
            has_trait = trait_nuumismatic_administration
        }
        modifier = {
            trade_value_add = 1
        }
    }

    weight = {
        weight = @specialist_job_weight # Important job
        modifier = {
            factor = 0.2
            has_citizenship_rights = no
            NOT = { has_trait = trait_mechanical }
        }
        modifier = {
            factor = 2
            owner = { has_civic = civic_exalted_priesthood }
        }
        modifier = {
            factor = 1.5
            OR = {
                has_trait = trait_thrifty
                has_trait = trait_nuumismatic_administration
            }
        }
        modifier = {
            factor = 1.5
            OR = {
                has_trait = trait_robot_domestic_protocols
                has_trait = trait_charismatic
            }
        }
        modifier = {
            factor = 0.5
            has_trait = trait_repugnant
        }
        modifier = {
            factor = 1.1
            OR = {
                has_trait = trait_robot_propaganda_machines
                has_trait = trait_traditional
            }
        }
        modifier = {
            factor = 1.2
            has_ethic = ethic_spiritualist
        }
        modifier = {
            factor = 0.5
            has_trait = trait_quarrelsome
        }
        modifier = {
            factor = 0.1
            can_take_servant_job = yes
        }
        modifier = {
            factor = 0.1
            has_ethic = ethic_materialist
            NOT = { has_job = preacher }
        }
        modifier = {
            factor = 1.05
            has_trait = trait_very_strong
        }
        modifier = {
            factor = 1.025
            has_trait = trait_strong
        }
        modifier = {
            factor = 0.9
            has_trait = trait_weak
        }
        modifier = {
            factor = 1.1
            has_trait = trait_brainslug
        }
        modifier = {
            factor = 1.05
            has_trait = trait_presapient_natural_intellectuals
        }
        modifier = {
            factor = 1.05
            OR = {
                has_trait = trait_robust
                has_trait = trait_robot_efficient_processors
            }
        }
        modifier = {
            factor = 0.01
            has_trait = trait_nerve_stapled
        }
    }
}

mortal_initiate = {
    category = worker
    condition_string = WORKER_JOB_TRIGGER
    building_icon = building_sacrificial_temple_1
    clothes_texture_index = 3
    icon = mortal_initiate

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

    possible = {
        worker_job_check_trigger = yes
        NOT = { has_trait = trait_mechanical } #No machines
    }

    resources = {
        category = planet_culture_workers
        produces = {
            society_research = 1
        }
    }

    planet_modifier = { }

    weight = {
        weight = @specialist_job_weight
        modifier = {
            factor = 0.2
            has_citizenship_rights = no
            NOT = { has_trait = trait_mechanical }
        }
        modifier = {
            factor = 2
            owner = { has_civic = civic_exalted_priesthood }
        }
        modifier = {
            factor = 1.5
            OR = {
                has_trait = trait_thrifty
                has_trait = trait_nuumismatic_administration
            }
        }
        modifier = {
            factor = 1.5
            OR = {
                has_trait = trait_robot_domestic_protocols
                has_trait = trait_charismatic
            }
        }
        modifier = {
            factor = 0.5
            has_trait = trait_repugnant
        }
        modifier = {
            factor = 1.1
            OR = {
                has_trait = trait_robot_propaganda_machines
                has_trait = trait_traditional
            }
        }
        modifier = {
            factor = 1.2
            has_ethic = ethic_spiritualist
        }
        modifier = {
            factor = 0.5
            has_trait = trait_quarrelsome
        }
        modifier = {
            factor = 0.1
            can_take_servant_job = yes
        }
        modifier = {
            factor = 0.1
            has_ethic = ethic_materialist
            NOT = { has_job = preacher }
        }
        modifier = {
            factor = 1.05
            has_trait = trait_weak
        }
        modifier = {
            factor = 1.05
            has_trait = trait_presapient_natural_intellectuals
        }
        modifier = {
            factor = 0.01
            has_trait = trait_nerve_stapled
        }
    }
}
 

Attachments

  • job_weights.final.tempfix.png
    job_weights.final.tempfix.png
    1,8 MB · Views: 0
  • job_weights.final.tempfix.unemployed.png
    job_weights.final.tempfix.unemployed.png
    1,8 MB · Views: 0
  • test.last.sav
    1,5 MB · Views: 0
  • 03_worker_jobs.txt
    24,7 KB · Views: 0
Last edited by a moderator:
  • 1Like
Reactions:
in the future, please use code tags so the post isn't a couple miles long please. Thank you
 
in the future, please use code tags so the post isn't a couple miles long please. Thank you

Sure thing. I didn't because it removes the formatting where I highlight the changes (which I thought would be useful). Is there a way to highlight or color in code? Or does that not really matter?

I ask because now some of the has COLOR=rgb etc. etc. mixed in there.

Code:
[COLOR=rgb(250, 197, 28)]        weight = @worker_job_weight        modifier = {            factor = 150            OR = {                has_trait = trait_robot_domestic_protocols                has_trait = trait_thrifty                has_trait = trait_nuumismatic_administration[/COLOR]         [COLOR=rgb(250, 197, 28)]   }        }[/COLOR]
 
Last edited:
hmm... yeah it does remove text formatting... maybe add comments?
 
hmm... yeah it does remove text formatting... maybe add comments?

I'm really not very code savvy. A lot of these hours were trial and error. What I do understand (after several Redditers pointed it out) is it's not a typical data format, so rules for what breaks the script may be different. :/ I hear ya, that is a great wall of mind-numbing text. I've reached out to a few to see what they prefer. Once I know I'll edit it to that. Reddit had the same issue. There's a way to make specific lines of script or code pink. By doing something 'like this' where you want it pink.
 
FWIW, I have another user reported the technician-specific issue here:


And made a mod for adjusting it here:

 
  • 1
Reactions:
Also Note: I have zero idea what racket_species_flag is, but the others had it.
It identifies the Racket species. That's the Junk Ratlings, the Racket Industrial Fleet, and possibly one other. The game adds the flag so it can find the species again easier. They have the Psionic species trait, which has bonuses to energy production and research.
 
  • 1
Reactions:
I don't see why job weights should lead to main species going unemployed. The issue you explained here is not the right thing to look at to fix the problem you have: that auto-resettlement won't work on main species most of the time.

The mechanic to look at should be the resettlement mechanic, not the job weights: if resettlement were possible for pops that currently have a job, e. g. based on better housing and amenities on another planet, then this would solve your actual problem, no?

Besides, main species can go unemployed even on planets with other species present. In fact in my games this is happening too often for my taste. Therefore I do agree the job weights need work, but for other reasons: e. g. farming-specialized robots working the mines while at the same time a mining-specialized robot does a clerk job!

Personally, I would prefer the indiividual pop system should go, or at least the stratum system. Without Stratum, the job weight system would work much, much better!
 
  • 1
Reactions: