News Liste Stellaris

Stellaris Dev Diary #372 - Modding: Pop Groups and Jobs
Stellaris
27.02.25 12:00 Community Announcements

by Eladrin

Hi everyone!

This week, Gruntsatwork will discuss the technical details of pop group scripting. This topic is likely to be of most interest to the modding community.

The systems we’re implementing now are just scratching the surface of where we want to go with them - we’re looking forward to some of the things we’ll be able to do with these tools over the next few years as well as seeing what you do with them.

As with all of these dev diaries, some of this is still subject to change during implementation and during the beta.

Pop Groups and Jobs​


Hello everyone, Gruntsatwork here! Let us talk about some of the script changes that are coming with 4.0 when it comes to pops and jobs…

As Eladrin already mentioned in Dev Diary 370, we are changing the way we look at Pops by grouping them together into Pop Groups. These groups are defined by their species, traits, ethics, and factions but NOT their jobs. It is entirely possible and likely for a pop group to have pops working different jobs.

The goal is that for most purposes in the game, you will reference pop groups instead of pops, which should hopefully save us from iterating through every single pop in our empire whenever a modifier needs to be re-calculated.

This allows us to tone down or remove some of the most performance-intensive actions we used before and replace them with far more performance-friendly variations instead.

For example, that means that both “random_owned_pop” or “any_owned_pop” have been relegated to the dark corners of history and replaced with “random_owned_pop_group” and “any_owned_pop_group”.

The same holds true for many of the effects used on those pops, like create_pop or kill_pop, or move_pop. Going forward, we will now create, move and kill pop groups, either in their entirety or through percentages. And for the eagle-eyed among you, YES, that means you no longer have to loop through singular pops to do unspeakable things to them, you can nicely target their pop group and let it do the math for you.

Thanks to the tireless efforts of our programmers, who have given us some new functionality for scripted triggers like comparators, other old tools, like num_pops, will see a resurgence as a scripted trigger. We expect the modding folks to find a lot of use in that, even as we slightly dread what you will come up with.

As also mentioned by Eladrin, this means we no longer have a constant contact between pops and their job.

Instead, there is a single moment of assignment when the pop group briefly knows which job it is supplying and with how much workforce. From then on, the job only knows that it has been supplied with workforce and thus must produce the associated resource. As long as the assignment stands, we have no need to check on the pop again.

This brings us to one of our biggest changes: removing all production modifiers on species traits and replacing them with bonus workforce. Simply put, because the workforce assigned to a job does not know which species it came from during most checks, production bonuses from species (modifiers like +10% Research from Jobs from the Psionic trait) cannot be applied. Instead, species traits now provide modifiers like “+10% Bonus Workforce for Researcher Jobs”, which means 100 Psionic Pops working 100 Physicist jobs will have the job upkeep and output of 110 Physicist jobs. In other words, we only pay upkeep on 100 Pops, but we get the output of 110 Researchers! This also has the side effect of the modifiers for job output from species traits are now multiplicative with other modifiers.

As an example, in 3.14 if we had 1 Psionic (+10% Research from Jobs) Pop working a Researcher job in an empire with the Meritocracy civic (+10% Specialist Job Output) on a Relic world with a Central Spire (+15% Research from Jobs), the total output would be 3 × (1 + 0.1 + 0.1 + 0.15) = 3 × 1.35 = 4.05 of each type of research.

In 4.0 if we have 100 Psionic (+10% Bonus Workforce for Researcher Jobs) Pops working 100 Physics jobs in an empire with the Meritocracy civic (+10% Specialist Job Output) on a Relic world with a Central Spire (+15% Research from Jobs), the total output would be 3 × (1 + 0.1) × (1 + 0.1 + 0.15) = 3 × 1.1 × 1.25 = 4.125 physics research.

This brings us beautiful new script entries like this one from the Psionic trait:

It doesn’t have to be like this. But it can be. Grunts made his choice. - E
This is perfectly serviceable - G
I have hopes to refactor this - AS​


As a side note, some checks can still query a pop’s job, but only indirectly, by scoping to a job and determining which pop group is filling it. This means we can still ensure functionality for Death Cults and similar targeted kill_pop effects.

In contrast, production bonuses on the planet or the empire are still available since they simply affect everyone.

So for species traits, we encourage the use of these new modifiers

Code pop_job_bonus_workforce_mult

To increase the bonus workforce a pop generates for a given job.

Code pop_job_workforce_mult

To increase the workforce a pop generates for a given job, this is not bonus workforce.

Code job_max_workforce_mult

To increase the maximum workforce a Job can accept

As a reminder, a job's workforce will fill to its maximum allowed but not beyond that. If a pop generates more workforce than usual, fewer pops will be required to fill the job to max, but it will not produce more than its maximum. If a pop generates a bonus workforce, it can go beyond the job's maximum and scale its production up.

In addition, we have also split quite a few of our economic categories that depended on triggered checks of species traits. This also includes the use of triggers to fake an inheritance of economic classes, which we have removed in many cases and only left in the ones we deemed the most reliant on them.

For inheritance, we recommend the normal parent-child structure of economic categories OR, to use static_modifiers to grant the modifiers of any combination of economic_categories.

Most, if not all, of these changes were made to improve performance: reducing calls, loops, and modifier cascades that would otherwise trigger recalculations across every planet and pop in your empire, just in case a deficit check was needed at that moment.

Looking ahead, we see great potential in workforce mechanics, both for us and the modding community. We've hinted at automation – workforce decoupled from pops – and some of you may have already considered new applications for Virtuality. Who knows what other, more extreme variations in the type and number of pops empires require might now be possible?

Simply put, we now have the workforce to power Stellaris for years to come. Pun very much intended.

What’s Next?​


Our planned livestream is going to be delayed a bit, and will likely end up being alongside the Open Beta. Right now our primary focus is on implementation.

Next week we’ll have some more updates on how things have been going.
Logo for Stellaris
Release:09.05.2016 Genre: Simulation Entwickler: Paradox Interactive Vertrieb: Paradox Interactive Engine:keine Infos Kopierschutz:keine Infos Franchise:keine Infos
Einzelspieler Mehrspieler Koop

Aktuelle Steam News
Neue Steam News in der ePrison Datenbank

Stellaris Dev Diary #373 - 4.0 Development Progress Update
Stellaris
Heute 12:00 Community Announcements
Stellaris Dev Diary #372 - Modding: Pop Groups and Jobs
Stellaris
27.02.25 12:00 Community Announcements
Stellaris Dev Diary #371 - 4.0 Changes: Part 5
Stellaris
20.02.25 12:00 Community Announcements
Stellaris Dev Diary #370 - 4.0 Changes Part 4
Stellaris
13.02.25 12:00 Community Announcements
Stellaris Dev Diary #369 - 4.0 Changes: Part 3
Stellaris
06.02.25 12:00 Community Announcements
Stellaris Dev Diary #368 - 4.0 Changes: Part 2
Stellaris
30.01.25 12:00 Community Announcements
Stellaris Dev Diary #367 - 4.0 Changes: Part 1
Stellaris
23.01.25 12:00 Community Announcements
Announcing Steam RTS Fest!
Stellaris
20.01.25 17:57 Community Announcements
Stellaris Dev Diary #366 - Announcing Stellaris 4.0
Stellaris
16.01.25 12:00 Community Announcements
Feedback Requested: Factions and Politics
Stellaris
09.01.25 13:13 Community Announcements
Stellaris: Season 08 only 24 hours remaining!
Stellaris
08.01.25 14:00 Community Announcements
Feedback Requested: Espionage
Stellaris
02.01.25 14:30 Community Announcements
Feedback Requested: Pirates and Crime
Stellaris
27.12.24 17:14 Community Announcements
Feedback Requested: War and War Resolution
Stellaris
19.12.24 12:00 Community Announcements
Stellaris Dev Diary #365 - 2024 in Review
Stellaris
12.12.24 12:00 Community Announcements
Stellaris Dev Diary #364 - Sights Unseen
Stellaris
28.11.24 12:00 Community Announcements
Changes to Stellaris: Season 08
Stellaris
26.11.24 18:09 Community Announcements
Stellaris Dev Diary #363 - A Journey of Exploration
Stellaris
21.11.24 12:00 Community Announcements
Stellaris Dev Diary #362 - Overwhelming Power
Stellaris
14.11.24 12:04 Community Announcements
Stellaris Dev Diary #361 - The Vision
Stellaris
07.11.24 12:00 Community Announcements
Stellaris Dev Diary #360 - The Archive is Open
Stellaris
31.10.24 12:00 Community Announcements
The Grand Archive Story Pack is available now!
Stellaris
29.10.24 17:15 Community Announcements
Stellaris Dev Diary #359 - Stellaris 3.14.1 'Circinus' Preliminary Release Notes
Stellaris
24.10.24 11:00 Community Announcements
Stellaris Dev Diary #358 - New Life in the Galaxy
Stellaris
17.10.24 11:00 Community Announcements
Stellaris Dev Diary #357 -The Care and Feeding of Tiyanki
Stellaris
10.10.24 11:00 Community Announcements
Dev Diary #356 - Building a Grand Archive and Displaying Your Collection
Stellaris
03.10.24 11:00 Community Announcements
3.13.2 patch released (checksum d465)
Stellaris
01.10.24 08:00 Community Announcements
It Belongs in a Vivarium - Announcing Grand Archive
Stellaris
26.09.24 16:05 Community Announcements
3.13.1 patch released (checksum e6fd)
Stellaris
24.09.24 08:00 Community Announcements
Stellaris Dev Diary #354 - Stellaris 3.13.1 'Vela' Preliminary Release Notes
Stellaris
19.09.24 11:00 Community Announcements
Stellaris Dev Diary #353 - Cosmic Storms Post-Release
Stellaris
12.09.24 11:19 Community Announcements
The Cosmic Storms Mechanical Expansion is available now!
Stellaris
10.09.24 16:07 Community Announcements
Stellaris Dev Diary #352 - 3.13 'Vela' Improvements & Preliminary Release Notes
Stellaris
05.09.24 11:00 Community Announcements
Stellaris Dev Diary #351 - Storm Chaser Origin, Civics, and Precursors
Stellaris
29.08.24 11:00 Community Announcements
Stellaris Dev Diary #350 - Storms and their Aftermath
Stellaris
22.08.24 11:00 Community Announcements
A Storm is Brewing: Announcing Cosmic Storms
Stellaris
15.08.24 16:06 Community Announcements
Mod Highlight #8 - Landscape of Dreams
Stellaris
10.08.24 15:00 Community Announcements
Mod Highlights #7 - A Star to Steer By
Stellaris
01.08.24 11:00 Community Announcements
Mod Highlight #6 - The Friends We Made Along The Way
Stellaris
18.07.24 11:00 Community Announcements
Stellaris Starfish Plushie | LIMITED EDITION | Makeship x Stellaris
Stellaris
27.06.24 11:52 Community Announcements
Stellaris Dev Diary #348 - Tips From the Devs for the Stellaris Free Weekend
Stellaris
20.06.24 11:00 Community Announcements
3.12.5 patch released (checksum 9a6f)
Stellaris
18.06.24 08:12 Community Announcements
[Dev Team] 3.12.4 Hotfix patch released (checksum f4eb)
Stellaris
31.05.24 11:14 Community Announcements
Stellaris Dev Diary #346 - 3.12.3 Released and a Small Peek at the Future
Stellaris
30.05.24 11:00 Community Announcements
Stellaris Dev Diary #345 - Upcoming 3.12.3 Improvements
Stellaris
23.05.24 11:00 Community Announcements
Dev Diary #344 - The Art of The Machine Age (Part II: Art Blast Edition)
Stellaris
16.05.24 11:00 Community Announcements
Happy Anniversary, Stellaris Community!
Stellaris
09.05.24 15:00 Community Announcements
The Machine Age is Available Now!
Stellaris
07.05.24 16:09 Community Announcements
Dev Diary #343 - The Machine Age & 3.12.1 'Andromeda' Preliminary Release Notes
Stellaris
02.05.24 11:00 Community Announcements
Stellaris Dev Diary #342 - The Art of the Machine Age (Part I)
Stellaris
25.04.24 11:00 Community Announcements
Stellaris Dev Diary #341 - Become the Crisis: Cosmogenesis
Stellaris
18.04.24 11:00 Community Announcements
Stellaris Dev Diary #340 - A Release Date, New Crisis and introducing Season 08
Stellaris
11.04.24 16:27 Community Announcements
Stellaris Dev Diary #339 - Civics & Structures of The Machine Age & Auto-Modding
Stellaris
04.04.24 11:00 Community Announcements
Stellaris Dev Diary 3√338: Rick the Cube
Stellaris
01.04.24 11:30 Community Announcements
Stellaris Dev Diary #337 - Individualistic Machines and Machine Gameplay Updates
Stellaris
28.03.24 12:00 Community Announcements
Stellaris Dev Diary #336 - The Origins and Situations of The Machine Age
Stellaris
21.03.24 12:00 Community Announcements
Announcing The Machine Age
Stellaris
14.03.24 16:12 Community Announcements
Stellaris Dev Diary #333 - 3.11.1 “Eridanus” Notes, Introducing Subscriptions
Stellaris
27.02.24 16:04 Community Announcements
Stellaris Dev Diary #332 - 3.11 “Eridanus” Release Notes
Stellaris
22.02.24 12:00 Community Announcements
Stellaris Dev Diary #331 - Custodian Fixes in Eridanus
Stellaris
15.02.24 12:00 Community Announcements
Stellaris Dev Diary #330 - Community Fixes in Eridanus
Stellaris
08.02.24 12:00 Community Announcements
Stellaris Dev Diary #329 - Technology Beta Wrapup
Stellaris
01.02.24 12:00 Community Announcements
Stellaris Dev Diary #328 - New Year, New Beta
Stellaris
18.01.24 12:00 Community Announcements
#MODJAM2024 Available Now!
Stellaris
11.01.24 16:55 Community Announcements
Stellaris #MODJAM2024 - Today's the Day!
Stellaris
11.01.24 12:00 Community Announcements
Stellaris #MODJAM2024 - Feature Freeze and Testing
Stellaris
04.01.24 12:00 Community Announcements
Stellaris #MODJAM2024 - Update #1
Stellaris
28.12.23 12:01 Community Announcements
Stellaris Dev Diary #327 - 2023 in Review
Stellaris
21.12.23 12:00 Community Announcements
Stellaris Technology Open Beta Released [ef75]
Stellaris
15.12.23 13:56 Community Announcements
#MODJAM2024 Theme Reveal!
Stellaris
12.12.23 16:00 Community Announcements
#MODJAM2024 Signups are open now!
Stellaris
05.12.23 16:00 Community Announcements