Parallel purging - a solution to endless purge times & Crisis passivity?

  • 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.

Pancakelord

Lord of Pancakes
43 Badges
Apr 7, 2018
3.374
12.267
  • Cities: Skylines - Green Cities
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Ancient Relics
  • Cities: Skylines - Mass Transit
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Imperator: Rome
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Cities: Skylines Industries
  • Imperator: Rome Deluxe Edition
  • Cities: Skylines - After Dark
  • Stellaris: Nemesis
  • Europa Universalis IV
  • Stellaris: Necroids
  • Crusader Kings III
  • War of the Roses
  • Cities: Skylines
  • Stellaris: Federations
  • Magicka: Wizard Wars Founder Wizard
  • Cities: Skylines - Snowfall
  • Stellaris: Lithoids
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Stellaris - Path to Destruction bundle
  • Stellaris: Megacorp
  • Stellaris: Synthetic Dawn
  • Crusader Kings II
  • Stellaris
  • Cities: Skylines Deluxe Edition
  • Sword of the Stars II
  • March of the Eagles
  • Darkest Hour
When working on my own performance mod I found the Crisis factions (Scourge & Contingency) use the extermination purge type by default [+1000% +600% purge speed], and the max # pops that can be purged at any one time is capped at 1 per month (the extermination purge is much slower than this).

There is a hard upper cap - at most 1 pop can assemble/grow or be purged ("Decline") per month, no matter how fast your growth/assembly/purging is.

If the Scourge purge at 1 pop per month, in my own tests, I find they often (though not 100% the time) expand far more aggressively - i.e. Purge speed is linked to crisis passivity, and a 'custom Crisis-only purge' setting (e.g. +10000% purge speed to guarantee you hit the 1pop a month cap) would benefit the scourge & contingency expansion rates - unbidden don't use ground troops.

Imagine the scourge purging a 100 pop world, at a rate of 1 pop/month it'd "only" take 100 months (~8.3 yrs) for them to kill everyone and move on. In reality its closer to 27 years or something based on the vanilla purge speed - and many worlds sit at well over 100 pops by lategame.

The "best" solution would be for crisis (and regular?) factions to parallel purge multiple pops - instead of purging 1 pop at a time - but i think that's hardcoded and havent found any way to mod it in to test it.

Parallel purging would let you simultaneously purge multiple pops on a colony/habitat at once.

The number of pops purged simultaneously could be tied to the purge method (e.g. with extermination letting you wipe out up to 10 pops at once, or forced labour letting you purge up to 25 pops at once) or it could be tied to a fraction of the planetsize (e.g. planetsize/5 rounded up to next whole integer).
  • To use the earlier 100pop example again, still assuming it takes just 1 month for a pop to be purged (for easy maths), on a 25 size world, 5 pops could decline simultaneously each month.
  • This would bring total purge time down from 8.3 years to ~1.6 years ([100/5] / 12) which is a more reasonable kill-time
    • Even the vanilla extermination speed with parallel purging, in this scenario, would bring total purge times down to under 8 years.
    • After this the planet would be infested (or machinified in the case of the contingency) and the crisis would move on.
Parallel purging would also mean you don't get the silly situation in the current game where you can either wait decades to kill off pops or just crack the planet to kill them in 60 days. or use this to create exploitey "purge-worlds" where you dump thousands of undesirable pops that functionally never really die off, given how long it takes to purge them one-after-another.

If you actually want to wipe out an alien species quickly, in the current game, you have to scatter them evenly amongst all your owned colonies (as every extra planet/habitat you own means one more pop you can kill at once), so parallel purging would also cut down on needless/senseless micro and brain-dead waiting around.

Thoughts?
 
Last edited:
  • 1Like
Reactions:
I think parallel purging would be a benefit to the game, but I'm unsure how much coding that would take. Perhaps as a work-around there could be a planetary decision that instantly kills off all undesirables and gives you resources based on how many there were?
 
  • 1Like
Reactions:
I think parallel purging would be a benefit to the game, but I'm unsure how much coding that would take. Perhaps as a work-around there could be a planetary decision that instantly kills off all undesirables and gives you resources based on how many there were?
It definitely seems to be something PDX would have to do, if it was to be done properly.

Though I know the game can support stuff like this as I do remember pops Pre-economy rework declining concurrently on planets. here. This video is an example of how you could exterminate an entire planet's worth of pops all at once (thank you google pre-2019 results search). Each pop seemed to have a timer fitted to it, denoted by the red skull flag. In that example all the timers were the same date, roughly 5 years later, and when that date arrives it all pops would go poof out of existence.

Pops also used to auto-migrate pre-economy rework (i.e. true emmigration/immigration with pops actually moving about, not just a growth modifier), and more than one could do it at a time, too. Which is why I assume this hardcap on 1 pop Grow/Ass./Dec. per month was a byproduct of the economic changes.

The planetary decision might be a good alternative - though I wonder if it could be made into an edict instead? so it would be an empire wide extermination of all undesirables. Not sure if Crisis factions can use planetary decisions or edicts though.
 
Last edited:
  • 1Like
Reactions:
When working on my own performance mod I found the Crisis factions (Scourge & Contingency) use the extermination purge type by default [+1000% purge speed], and the max # pops that can be purged at any one time is capped at 1 per month (the extermination purge is much slower than this).

There is a hard upper cap - at most 1 pop can assemble/grow or be purged ("Decline") per month, no matter how fast your growth/assembly/purging is.

If the Scourge purge at 1 pop per month, in my own tests, I find they often (though not 100% the time) expand far more aggressively - i.e. Purge speed is linked to crisis passivity, and a 'custom Crisis-only purge' setting (e.g. +100000% purge speed to guarantee you hit the 1pop a month cap) would benefit the scourge & contingency expansion rates - unbidden don't use ground troops.

Imagine the scourge purging a 100 pop world, at a rate of 1 pop/month it'd "only" take 100 months (~8.3 yrs) for them to kill everyone and move on. In reality its closer to 27 years or something based on the vanilla purge speed - and many worlds sit at well over 100 pops by lategame.

The "best" solution would be for crisis (and regular?) factions to parallel purge multiple pops - instead of purging 1 pop at a time - but i think that's hardcoded and havent found any way to mod it in to test it.

Parallel purging would let you simultaneously purge multiple pops on a colony/habitat at once.

The number of pops purged simultaneously could be tied to the purge method (e.g. with extermination letting you wipe out up to 10 pops at once, or forced labour letting you purge up to 25 pops at once) or it could be tied to a fraction of the planetsize (e.g. planetsize/5 rounded up to next whole integer).
  • To use the earlier 100pop example again, still assuming it takes just 1 month for a pop to be purged (for easy maths), on a 25 size world, 5 pops could decline simultaneously each month.
  • This would bring total purge time down from 8.3 years to ~1.6 years ([100/5] / 12) which is a more reasonable kill-time
    • Even the vanilla extermination speed with parallel purging, in this scenario, would bring total purge times down to under 8 years.
    • After this the planet would be infested (or machinified in the case of the contingency) and the crisis would move on.
Parallel purging would also mean you don't get the silly situation in the current game where you can either wait decades to kill off pops or just crack the planet to kill them in 60 days. or use this to create exploitey "purge-worlds" where you dump thousands of undesirable pops that functionally never really die off, given how long it takes to purge them one-after-another.

If you actually want to wipe out an alien species quickly, in the current game, you have to scatter them evenly amongst all your owned colonies (as every extra planet/habitat you own means one more pop you can kill at once), so parallel purging would also cut down on needless/senseless micro and brain-dead waiting around.

Thoughts?
I've thought about this.

First, I think it's +600% for extermination by default, bringing it to 35 progress out of 100 every month. 3 months to kill, ugh.

I think the best way to go about this is to combine two ideas I've seen: Let multiple pops be purged at once if the progress is something like 200/100 every month or higher, AND have purging get a speed bonus the more pops there are to represent a target rich environment vs scraping the bottom of the barrel.

I've made a python program for this, in the past, to see how it'd be affected. If you have standard purge speed at 1 pop, and each pop afterwards gives +50%, then if that's multiplicative with the Purge Type bonus then you can get a city-world depopulated in about 2 years.

2 years, which is about how long Extermination purge took pre-2.2 anyway!

This'd also help resolve the downright silly exploit where stacking every pop you're purging onto a prison world gives you an eternal glut of resources because the angry melting people take so long to, well, melt. As far as purge resources go, you're incentivized to keep the pops alive as long as possible! Good grief!

Of course there's more to crisis passivity than purge speeds. The Unbidden are passive, and they have little difficulty depopulating worlds. It's all about construction ships and pathing.
 
I've thought about this.

First, I think it's +600% for extermination by default, bringing it to 35 progress out of 100 every month. 3 months to kill, ugh.

I think the best way to go about this is to combine two ideas I've seen: Let multiple pops be purged at once if the progress is something like 200/100 every month or higher, AND have purging get a speed bonus the more pops there are to represent a target rich environment vs scraping the bottom of the barrel.

I've made a python program for this, in the past, to see how it'd be affected. If you have standard purge speed at 1 pop, and each pop afterwards gives +50%, then if that's multiplicative with the Purge Type bonus then you can get a city-world depopulated in about 2 years.

2 years, which is about how long Extermination purge took pre-2.2 anyway!

This'd also help resolve the downright silly exploit where stacking every pop you're purging onto a prison world gives you an eternal glut of resources because the angry melting people take so long to, well, melt. As far as purge resources go, you're incentivized to keep the pops alive as long as possible! Good grief!

Of course there's more to crisis passivity than purge speeds. The Unbidden are passive, and they have little difficulty depopulating worlds. It's all about construction ships and pathing.

Yes you are correct, it's 600% I'd even made a note of this in my performance mod's changelog - when writing my post I'd lazily checked the wiki instead and misread the -1000% happiness debuff as purge speed.

I like your idea though. Having it make use of the purge overflow and some pop-size modifiers sounds like a good alternative to using an arbitrary planet size fraction or hard-capping it by purge type.

There is more to passivity than just purge rates, true, but this is the one factor that definitely seems to be tied to game mechanics and isn't linked to something hard to decompose like "Crisis AI" or "pathing logic". As, the other big issue is constructor allocative efficiency, specifically, which is possibly a product of several different AI decisions not being weighted properly [if at all] by Time, or it lacking weighted construction priorities (Crisis AI - probably normal AI too - loves sending constructors to build crisis stations clean across their territory, instead of picking the closest one, for example, or just spawning in constructors from adjacent stations as needed. This does slow down the crisis further, once/IF it manages to snowball at all).
 
Last edited:
Rework pop growth and decline will fix purging. Purging isn't the main issue

I would say Purging is a subset of population weirdness. Population growth weirdness is why Spiritualists and hives are in a vastly underpowered state, since they can't properly (or at all) use robots.

Purging is part of but not entirely the problem with crises, the bigger purging problem is the fact that Purge Worlds are free resources forever, and despite constant complaints this has not be addressed.
 
I would say Purging is a subset of population weirdness. Population growth weirdness is why Spiritualists and hives are in a vastly underpowered state, since they can't properly (or at all) use robots.
IMO purging could be addressed completely outside addressing POP growth handling. Tying purging to the "decline" slot was the mistake - if they allowed it to happen in bulk again, it'd stop being a problem. Maybe use the same mechanics as Assimilation? I dunno. It needs to kill LOTS of POPs at once.

Purging is part of but not entirely the problem with crises, the bigger purging problem is the fact that Purge Worlds are free resources forever, and despite constant complaints this has not be addressed.
Purge worlds are definitely a big issue and then main reason purging needs to be fixed, but the purge mechanics REALLY negatively impact the Prethoryn and Contingency by slowing down their expansion even further. In the case of the Prethoryn, it (along with the bug that stops the prethoryn from being able to infest uncolonized worlds) also makes it harder for them to gain reinforcements, weakening them in another way.
 
I want to test this, where do you edit the purge speed?

Edit: also, if there is a hard cap on purge speed, maybe you can bypass it by creating a custom event that kills x number of pops on a crisis-occupied planet each month?
 
I want to test this, where do you edit the purge speed?

Edit: also, if there is a hard cap on purge speed, maybe you can bypass it by creating a custom event that kills x number of pops on a crisis-occupied planet each month?

In the below file, also copied in the purge changes I'd made for my own mod for reference.

Purge speed increase
#FOLDER\SteamLibrary\steamapps\common\Stellaris\common\species_rights\04_purge_types.txt

pop_decline_speed is the main thing to play with (I also, later on, manipulated max pop values so they pops grow after 10 instead of 100 points, meaning the below values are effectively 10x higher) so to make it hit 1 pop decline a month you'll probably want to just set it to 600 or something, to be safe.

#purge_normal (extermination - and what the crisis factions use)
pop_modifier = {
pop_decline_speed = 60 #### was 6(x) base decline speed (is 1x). a 10x increase.
pop_happiness = -10
}

#purge_displacement
pop_modifier = {
pop_happiness = -0.3
pop_housing_usage_mult = -0.50
pop_decline_speed = 2 #### was 1(x) base decline speed (is 1x). a 2x increase.
}

#Purge_labor_camps
pop_modifier = {
pop_decline_speed = 4 #### was 2(x) base decline speed (is 1x). a 2x increase.
pop_happiness = -10
}

#purge_matrix
pop_modifier = {
pop_decline_speed = 6 #### was 3(x) base decline speed (is 1x). a 2x increase.
pop_happiness = -10
}

#purge_processing
pop_modifier = {
pop_decline_speed = 6 #### was 3(x) base decline speed (is 1x). a 2x increase.
pop_happiness = -10
}

#Neutering left unchanged.
 
Last edited:
Slow purging is specifically made to allow time to counter attack, I suppose.
Crisis might be sped up easily if you add more construction ships for it. May be, I do not mod myself.
 
IMO purging could be addressed completely outside addressing POP growth handling. Tying purging to the "decline" slot was the mistake - if they allowed it to happen in bulk again, it'd stop being a problem. Maybe use the same mechanics as Assimilation? I dunno. It needs to kill LOTS of POPs at once.


Purge worlds are definitely a big issue and then main reason purging needs to be fixed, but the purge mechanics REALLY negatively impact the Prethoryn and Contingency by slowing down their expansion even further. In the case of the Prethoryn, it (along with the bug that stops the prethoryn from being able to infest uncolonized worlds) also makes it harder for them to gain reinforcements, weakening them in another way.
This seems like a good idea to me. Rather than pumping up the decline speed for purging, just unshackle it from decline completely. Then you avoid all the headache of one pop per purge and trying to work around that. Making it work like assimilation (only you're assimilating them to the growing population of dead pops) would be a good fix for this, and would get rid of the cheese tactic of moving all undesirables to one world to die one at a time.
 
This seems like a good idea to me. Rather than pumping up the decline speed for purging, just unshackle it from decline completely. Then you avoid all the headache of one pop per purge and trying to work around that. Making it work like assimilation (only you're assimilating them to the growing population of dead pops) would be a good fix for this, and would get rid of the cheese tactic of moving all undesirables to one world to die one at a time.

I just had a quick look at how assimilation works,
  • Assimilation has a bunch of files referencing it. But, the main bit, calls "action.64" in 00_on_actions.txt once a year (annual block) [Stellaris\common\on_actions].
    • action.64 is in found within on_action_events.txt [Stellaris\events].
  • And if conditions are met action.64 then runs action.65 and converts 3, 6, or 12 [IDK why those numbers specifically] pops accordingly.
Perhaps a hackish workaround - until/if paradox ever revisit this system, would be to duplicate this assimilation chain and make it kill pops as you suggest, but instead have it target anything with the extermination flag, rather than assimilation.
Pops would still decline, but once a year (or event trigger could be put in the biannual/monthly sections 00_on_actions.txt) "X" number of pops would then be purged via event. Which doesn't sound too different to how the old system worked to be fair.

Edit: Actually, if extermination speed was set to 0%, pops set to exterminate wouldn't "decline", which would divorce pops from that mechanism/the UI completely. It would all be event driven.
This could be replicated for other purge methods - like forced labour.
Though I have no idea how this would effect unusual factions (like crises - do they fire events in the usual way too?).
 
Last edited:
Just give the crisis a special purging policy that kills a pop per planet every month. Wouldn't require much special coding. Doesn't even have to be a policy, just add a monthly event that does it.
Wouldn't be enough. That still gives you 6 years to save an 80-pop world, and a decade and a half for a 200-pop cityworld.
 
This seems like a good idea to me. Rather than pumping up the decline speed for purging, just unshackle it from decline completely. Then you avoid all the headache of one pop per purge and trying to work around that. Making it work like assimilation (only you're assimilating them to the growing population of dead pops) would be a good fix for this, and would get rid of the cheese tactic of moving all undesirables to one world to die one at a time.
Yeah, the problem with pumping up decline speed is that, ultimately, it can only ever get as high as "1 POP per month", which is still WAY too slow and leaves all the exploits regarding purge worlds intact. The only way to FIX purge worlds for good is going to be to detach purging from decline somehow so that it can happen to multiple POPs per world.

Ideally, purged POPs should be producing resources upon death instead of as a job, too. Hell, even that change would go a long way to discouraging purge worlds; it'd encourage people to spread out POPs as far as possible so they got the resources quicker.

Just fixing purge worlds doesn't solve the problems with Crisis purging, though, unfortunately.
 
If it takes 3 months to kill a pop with the current mechanics, then that should mean there are 4 pops killed per year.

What if crises killed off about a fifth of a world’s population each year as well?

Following these rules:
151 or more kills 40 pops
101 to 150 kills 30 pops
51 to 100 kills 20 pops
26 to 50 kills 10 pops
0 to 25 kills 5 pops

It should take about 8 years for a 200 pop world to fully die out, with the following amount of pops left at the end of each year:
156
112
78
54
30
16
7
0

Similarly, for an 80 pop world to fully die out, it should take about the same amount of time with the following amount of pops left at the end of each year:
66
52
38
29
20
11
2
0

Say we had an extreme case where somehow the Crisis captured a 400 pop world, would it take the same amount of time? Well, no, it’d take a bit longer than previous cases—there’d need to be more increases at equal intervals for the amount of pops killed—so it’d take 13 years with the current rules instead, with the following amount of pops each year:
356
312
268
224
180
136
102
68
44
30
16
7
0

But I think this is more acceptable since such worlds are rare indeed.

I think such a rate would be acceptable in the case of a crisis capturing a world, but were the same rules applied to regular purging, I feel like it may overdo it. Maybe instead regular purging stays the same in display and action—4 pops purged per year—except that each time a pop is purged on the planet view that pop and a (much smaller than the calculation’s) portion of the amount of pops being purged are killed off as well.