Pop Job modding

From Stellaris Wiki
Jump to navigation Jump to search


Outliner top.png
Please help with verifying or updating older sections of this article. At least some were last verified for version 2.6.

This article is for the PC version of Stellaris only.

This page is about how to modify existing and how to create new Jobs.

Social Strata[edit | edit source]

A Social Stratum is the position of a group of Pops in a society. They are defined at "Stellaris/common/pop_categories/.

In the planet population view, jobs are grouped by strata and strata are sorted based on the order they are defined in files.

Data Structure[edit | edit source]

Modifiers and conditions are pop scope.

Property Description
rank = <int> The social rank of this stratum. Vanilla uses ranks 0 (e.g. Slave) to 3 (e.g. Ruler).
clothes_texture_index = <int> The clothes index the portrait of this Pop will use. Only relevant to species portraits with clothes.
change_job_threshold = <float> If a pop of this Stratum is employed, another job must have at least this many times the weight of the current job to make this pop switch to the new job. Should be greater than 1. Vanilla uses values from 1.15 to 2.0. Defined for all vanilla job categories except purge and assimilation.
keep_from_former_job = <yes/no> Default no. If yes, pops remain in this category after they become unemployed. Used for Ruler and Specialist in vanilla.
demotion_time = <int> (Optional) How long, in days, a pop of this category will take to demote. Defined (sometimes as 0) in vanilla for every pop category with a rank greater than 0 except worker.
should_apply_unemployment_penalties = { <conditions> } If this block of conditions (Pop scope) evaluates to true, the modifiers in the unemployment_penalties block are applied and the unemployment empire alert is triggered. Vanilla usually disable unemployment alert for Pops of high living standard, being able to produce resources if unemployed.
unemployment_penalties = { <modifiers> } A block of modifiers applied to unemployed pops of this category if should_apply_unemployment_penalties is true. Used to apply happiness penalties in vanilla.
unemployment_resources = { <economy unit> }
  • An economy unit that defines the resource production and upkeep of unemployed pops in this category.
  • Uses category = unemployment_resources.
resources = { <economy unit> } An economy unit that defines the resource production and upkeep of all pops in this category. Used in vanilla to define pop basic resource upkeep, as well as the strategic resources produced by some Lithoid traits. Scripted variables used here in vanilla are defined in Stellaris/common/scripted_variables/01_scripted_variables_megacorp.txt.
  • Vanilla defines consumer goods upkeep in living standards, not here.
pop_modifier = {0
pop_housing_usage_base = <float>
pop_amenities_usage_base = <float>
pop_amenities_usage_no_happiness_base = <float>
A block of modifiers applied to all Pops of this Stratum. Modifiers that affect base Amenities.png Amenities and Housing.png Housing usage go here. pop_housing_usage_base and either pop_amenities_usage_base (for regular empires) or pop_amenities_usage_no_happiness_base (for gestalts) are defined for every vanilla pop category except purge and assimilation. Vanilla also defines pop_political_power here for certain
triggered_pop_modifier = {0
potential = { <conditions> }
(Optional) A block of modifiers that are applied to the pop if the conditions in the potential block evaluate to true. Used in vanilla to apply a happiness bonus to unemployed pops with an unemployment happiness penalty if the Comfort the Fallen resolution is active.
triggered_planet_modifier = {0
potential = { <conditions> }
  • (no limit) A block of modifiers that are applied to the planet the pop is on if the potential block evaluates true.
  • Vanilla uses a series of these blocks to add Trade value.png Trade Value based on living standards. Living standards scripted triggers can be found in Stellaris/common/scripted_triggers/01_scripted_triggers_jobs.txt and the corresponding trade value scripted variables used in vanilla are defined in Stellaris/common/scripted_variables/01_scripted_variables_megacorp.txt.
  • Also used in vanilla to define which pop categories the Trait plantoid budding.png Budding trait functions for.
  • Pop categories do not support an unconditional planet_modifier.
allow_resettlement = { <conditions> }
  • No.png If this block of conditions evaluates to false, pops in this category can't be forcibly resettled.
  • Yes.png If it evaluates to true, whether or not they can be resettled is determined by a series of rules found in Stellaris/common/game_rules/00_rules.txt (can_resettle_pop, can_country_resettle, can_resettle_planet, and can_resettle_planet_no_owner_check).
  • The only conditions used here in vanilla are always = no for subversive and presapient categories and always = yes for everything else.
resettlement_cost = { <resource> = <int> }
  • (Optional, no limit) May optionally include a trigger = { <conditions> } block. The cost to resettle a pop in this category is the sum of all costs in all resettlement_cost blocks that either evaluate to true or have no trigger conditions.
  • Resettlement cost modifications from civics are defined here in vanilla.
assign_to_pop = { <conditions> } (Optional) This block of conditions is called whenever a pop is created, moved to another planet, or gets a new owner. The pop is then assigned to whichever pop category that evaluated to true has the highest weight.
weight = { weight = <int> } If a pop qualifies for more than one category via the assign_to_pop block, it will be assigned to the one with higher weight.

Questions & Answers[edit | edit source]

Why is a Specialist Pop never attracted to a Worker job?0

The Pop cat specialist.png Specialist Stratum has higher rank than the Pop cat worker.png Worker Stratum, making it unwilling to take any Worker jobs.

The Pop cat complex drone.png Complex Drone Stratum has the same rank as the Pop cat simple drone.png Menial Drone Stratum, making them willing to take Menial Drone jobs if the mastermind so desire.
How does demotion work?0

If a Stratum has keep_from_former_job = yes, a Pop of this Stratum will still be of this Stratum after unemployment, until a number of days equal to the demotion_time have been passed.

For example, the Pop cat specialist.png Specialist Stratum is ranked 2 with a demotion time of 1800 days, making an unemployed Pop that is formerly a Specialist job to still consider itself a Specialist and will only accept a Specialist or Ruler job, until 1800 days have been passed and it will finally stop hiding itself from reality and demote itself to Pop cat worker.png Worker Stratum, or "reset" its Stratum by technical.

The Pop cat complex drone.png Complex Drone Stratum does NOT have keep_from_former_job = yes or demotion_time, making Pops of this Stratum to immediately reset the Stratum after unemployment.
How does slavery work?0

A Slave might take jobs from Pop cat specialist.png Specialist or Pop cat worker.png Worker Stratum, but a Slave will never receive the same amount of Consumer goods.png Consumer Goods upkeep of a Specialist or a Worker. Actually, Pop cat slave.png Slave is a special Stratum with no Jobs specifing itself of it, while it has a higher weight than any of the common Strata. It also has a custom assign_to_pop.

The actual Stratum of a Pop is selected from all Strata with a custom assign_to_pop plus the current Stratum of the Job the Pop is working in. For example, a Pop with Indentured Servitude slavery type working as an Job artisan.png Artisan will choose its Stratum from Pop cat specialist.png Specialist, Pop cat worker.png Worker and Pop cat slave.png Slave, with Slave being with the highest weight, making this Pop a Slave beyond all. (Worker do also have a custom assign_to_pop.)

During the days an unemployed Pop cat specialist.png Specialist Pop wait for a Specialist or Ruler job until its demotion, it still "sees" the Pop cat worker.png Worker Stratum and view it as a lower weighted Stratum, making it unwilling to reconsider itself a Worker. If you enslave it now, it will "see" the Pop cat slave.png Slave Stratum being with higher weight than the Specialist Stratum, and it will now be forced to consider itself a Slave.
What if some parameters were changed?0

If the Pop cat specialist.png Specialist Stratum and the Pop cat worker.png Worker Stratum had the same rank, an unemployed Specialist Pop will happily take a Worker job after unemployment and will instantly become a Worker, and if there was no Worker jobs available, the Pop will become an unemployed Specialist and needs time to demote until a Worker job is available.

If the Specialist Stratum had lower weight than the Worker Stratum, a Pop in Specialist job will still be a Worker, consuming the same amount of Consumer goods.png Consumer Goods as a Worker, and it will be of needing no time at all to demote.

Jobs[edit | edit source]

Jobs are defined at "common/pop_jobs/xxx.txt".

Data Structure[edit | edit source]

Property Description
is_capped_by_modifier = <yes/no> Default yes. If no, this job is always considered available if other conditions are met. If there is a job uncapped by modifiers available that's open to all pops, no pops will become unemployed.
category = <pop category key> The Stratum this Job is binded to. A pop will be considered of this Stratum for as long as they are employed under this job and there isn't any Strata with a custom assign_to_pop and with higher weight than this one.
condition_string = <localisation key> A localisation key to briefingly describe what kind of Pop can be employed on this Job.
building_icon = <building key> Determines the building icon of this Job to be shown in the planet population view behind the Pop portrait. For example, the Job researcher.png Researcher job will use the science lab for a building icon. Nonexistent buildings can be specified and the texture file "gfx/interface/icons/buildings/<building key>.dds" will be used.
clothes_texture_index = <int> Optional. Determines the clothes index of a Pop working on this Job, overwritting the setting of the Stratum.
icon = <pop job key> Optional. Makes this Job to use the icon of another Job. For example, the Job researcher.png Science Director uses the same icon as Job researcher.png Researcher.
possible_pre_triggers A block of Pseudo-Conditions to determine can a Pop work in this Job. Only the following yes-or-no questions are allowed. Without the pre-triggers, the whole set of conditions will be evaluated once for each of the thousands of Pops in the galaxy, which can be performance intensive.
  • has_owner
  • is_enslaved
  • is_being_purged
  • is_being_assimilated
  • has_planet
  • is_sapient
possible A block of Conditions to determine can a Pop work in this Job. (Pop scope)
resources An Economy Units to determine the resource upkeep and production of this Job. (Planet scope, root = pop scope)
Block of Modifiers to be applied to the Planet. Modifiers that add Amenities.png Amenities, Trade value.png Trade Value or decrease Job criminal.png Crime go here.
Block of Modifiers to be applied to the Empire. Modifiers that add Mod navy size add.png Naval Capacity or Mod country admin cap add.png Administrative Cap go here.
A block of Modifiers to be applied to the Pop. Modifiers that add defense armies go here. See Army modding for details of Pop-spawned defense armies.
weight A Pop will attempt to take Jobs with higher weight for it. (Pop scope)

Questions & Answers[edit | edit source]

How to have a Job to produce something more or less without overwritting it?0
  • If you are asking about how to make a Job to produce more resources of a certain type, head to the resource block and find its economy category, then head to the "common/economy_categories" to find what kind of modifiers are generated for this economy category.
    • For example, Job researcher.png Researcher has its own economy category that "produces_mult" modifiers would be generated, making modifiers like job_researchers_physics_research_produces_mult usable. However, since "produces_add" modifiers won't be generated, it's impossible to have researchers produce resources they originally can't, unless you overwrite the economy categories and force it to generate your required kind of modifiers.
    • Also, Job miner.png Miner has its own economy category that both "produces_mult" and "produces_add" modifiers would be generated, making job_miners_minerals_produces_add usable. You can also use the modifier job_miners_minor_artifacts_produces_add = 1 to make Miners produce Minor artifacts.png Minor Artifacts +1, just do what you want.
    • If the job in question does not have its own economy category, for example, the Job clerk.png Clerk, then it's impossible to make them produce more resources by modifiers without affecting other jobs at all.
  • If you are asking about how to make a Job to produce more modifiers, like Amenities.png Amenities, Mod navy size add.png Naval Capacity, Job criminal.png Crime Reduction, Trade value.png Trade Value, or Mod country admin cap add.png Administrative Cap, then you have to overwrite the Jobs and use triggered_(country/planet)_modifiers to implement this. There are no modifiers to modify modifiers produced by Jobs.
    • However, most of the modifiers produced by Jobs are _add. You can use _mult modifiers to multiply the overall Empire stat or Planet stat, effectively making relevant Jobs more effective.
    • Despite the trait Leader trait bureaucrat.png Bureaucrat having a modifier that reads planet_bureaucrats_produces_mult, don't be confused, because this modifier has no effect and all it does is to confuse you.

Relevant Modifiers[edit | edit source]

All jobs will generate the following modifiers for use.

  • job_<key>_add = <int> - This modifier adds that many jobs to the planet.
  • job_<key>_per_pop = <float> - This modifier adds X jobs to the planet, where X is the number of Pops multiplied by the value here.
  • job_<key>_per_crime = <float> - This modifier adds X jobs to the planet, where X is the planet crime multiplied by the value here.
Empire EmpireEthicsGovernments • Civics • OriginsMandatesAgendasTraditions • Ascension perksEdictsPoliciesRelicsTechnologiesCustom empires
Pops JobsFactions
Leaders LeadersLeader traits
Species SpeciesSpecies traits
Planets PlanetsPlanetary feature • Orbital depositBuildings • DistrictsPlanetary decisions
Systems SystemsStarbasesMegastructuresBypassesMap
Fleets FleetsShips • Components
Land Warfare ArmiesBombardment stance
Diplomacy Diplomacy • Federations • Galactic communityOpinion modifiersCasus Belli • War goals
Events EventsAnomaliesSpecial projectsArchaeological sites
Gameplay GameplayDefinesResources • EconomyGame start
Dynamic modding Dynamic moddingEffectsConditionsScopesModifiersVariablesAI
Media/localisation Maya exporterGraphicsPortraitsFlagsEvent picturesInterfaceIconsMusicLocalisation
Other Console commandsSave-game editingSteam WorkshopModding tutorial