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

mightnight

RtP Dev and CK2+ Partner Dev
62 Badges
Jul 27, 2012
414
59
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Megacorp
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Distant Stars
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • 500k Club
  • Stellaris: Necroids
  • Imperator: Rome Deluxe Edition
  • Prison Architect
  • Stellaris: Ancient Relics
  • Europa Universalis IV
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • War of the Roses
  • Crusader Kings III
  • Stellaris: Synthetic Dawn
  • March of the Eagles
  • Heir to the Throne
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
  • Crusader Kings II
I noticed that a planet will continually switch jobs on a daily basis. This is due to the fact that you guys implemented the "lazy" approach of dealing with trait priorities. The fix for this mess is to, instead of checking DAILY for pop switching priorities, implement a few on_action triggers attached to events (i.e. a new building is built, relocation of a pop, a pop is born, a new planet is conquered, etc.) which will DRASTICALLY help CPUs. Daily O(n) operations are absolutely not needed for this! (even monthly or yearly for that matter!).
I am sure your coders implemented this half-a*s method because of the release date "rush"...now that the holidays are over there are no excuses for not sitting down and implementing a few on_action triggers to help with performance.
 
Upvote 0

Arrnea

Meatbag Exterminator
67 Badges
Jun 30, 2008
531
289
  • Stellaris: Necroids
  • 500k Club
  • Arsenal of Democracy
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Holy Fury
  • Stellaris: Galaxy Edition
  • Stellaris - Path to Destruction bundle
  • Stellaris: Apocalypse
  • Stellaris: Megacorp
  • Stellaris: Federations
  • Stellaris: Leviathans Story Pack
  • Stellaris: Synthetic Dawn
  • Stellaris: Distant Stars
  • Stellaris: Ancient Relics
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Humanoids Species Pack
  • Stellaris: Lithoids
  • Surviving Mars
  • Surviving Mars: First Colony Edition
  • Surviving Mars: First Colony Edition
  • Magicka
  • Prison Architect
  • Prison Architect: Psych Ward
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Mass Transit
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Parklife
  • Cities: Skylines Industries
  • Cities: Skylines - Campus
  • Age of Wonders III
  • Majesty 2 Collection
  • Shadowrun Returns
  • Sword of the Stars
Yes! The amount of useless calculations being performed right now is too damn high!
 

phoenix3716

Corporal
11 Badges
Jan 1, 2019
26
0
  • Stellaris: Synthetic Dawn
  • Stellaris
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Surviving Mars
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
I didn't even realize this was a thing, especially since from what I can tell the "trait priorities" doesn't seem to work right. At least, not for the uplifted species traits, or maybe all my robot pops are somehow throwing the calculations off.
 

mightnight

RtP Dev and CK2+ Partner Dev
62 Badges
Jul 27, 2012
414
59
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Megacorp
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Distant Stars
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • 500k Club
  • Stellaris: Necroids
  • Imperator: Rome Deluxe Edition
  • Prison Architect
  • Stellaris: Ancient Relics
  • Europa Universalis IV
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • War of the Roses
  • Crusader Kings III
  • Stellaris: Synthetic Dawn
  • March of the Eagles
  • Heir to the Throne
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
  • Crusader Kings II
I am not mad at the programmers for leaving the daily checks in there due to them being rushed. I am absolutely mad at them because they gave modders 0 control over these "daily_pulses". I would have patched this issue from launch had they opened these triggers to the modding community. If they don't want to fix this themselves: at least give us the tools to fix them for you ffs.
 

Yandersen

First Lieutenant
3 Badges
May 30, 2016
255
85
  • Stellaris
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
I am not mad at the programmers for leaving the daily checks in there due to them being rushed. I am absolutely mad at them because they gave modders 0 control over these "daily_pulses". I would have patched this issue from launch had they opened these triggers to the modding community. If they don't want to fix this themselves: at least give us the tools to fix them for you ffs.
Hold on. Are you sure there is no such triggers exists? Besides, pop growth or building completion is not the only factors that may require pop shuffling. Consider refugees, bombardment losses, migration, district completion, species modification completion (some traits can be gained even from an anomaly event), and so on.

Actually, considering how much events have a potential to trigger pop shuffling for a certain planet I may suggest to introduce a per-planet "Attention" flag cleared by default and set by any event that may change job priorities. And on weekly/monthly basis the per-planet loop may check if the flag is set and perform pop shuffling if it is, clearing it back when complete.

But for the start, we can change pop shuffling from daily ticks to monthly ticks - no matter what pops were busy during the month, only by the end of it their positions matter to conclude the resource output.
 
Last edited:

mightnight

RtP Dev and CK2+ Partner Dev
62 Badges
Jul 27, 2012
414
59
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Megacorp
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Distant Stars
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • 500k Club
  • Stellaris: Necroids
  • Imperator: Rome Deluxe Edition
  • Prison Architect
  • Stellaris: Ancient Relics
  • Europa Universalis IV
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • War of the Roses
  • Crusader Kings III
  • Stellaris: Synthetic Dawn
  • March of the Eagles
  • Heir to the Throne
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
  • Crusader Kings II
Hold on. Are you sure there is no such triggers exists? Besides, pop growth or building completion is not the only factors that may require pop shuffling. Consider refugees, bombardment losses, migration, district completion, species modification completion (some traits can be gained even from an anomaly event), and so on.

Actually, considering how much events have potential to trigger pop shuffling for a certain planet I may suggest to introduce a per-planed "Attention" flag cleared by default and set by any event that may change job priorities. And on weekly/monthly basis the per-planet loop may check if the flag is set and perform pop shuffling if it is, clearing it back when complete.

But for the start, we can change pop shuffling from daily ticks to monthly ticks - no matter what pops were busy during the month, only by the end of it their positions matter to conclude the resource output.

I surely hope they don't exist, otherwise that would have been a big f**k you to us. Even if they existed, I would not be able to change the daily ticks since they modders have no control over them. The on_action triggers, no matter how many events there are, will be nothing compared to the current performance loss of the on_daily pulse. Monthly ticks will be waaaaaay much better compared to daily that is for sure, but I still think that Linear loops should be avoided like the plague in games which utilized a lot of CPU.
 

Sigma 582

Colonel
19 Badges
Aug 3, 2018
875
5
  • Stellaris
  • Stellaris: Necroids
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Age of Wonders: Planetfall Premium edition
  • Age of Wonders: Planetfall Deluxe edition
  • Age of Wonders: Planetfall
  • Age of Wonders: Planetfall - Revelations
  • Age of Wonders: Planetfall Season pass
  • Crusader Kings II: The Old Gods
Monthly assignment can be a bit frustrating though. Even if shuffling pops doesn't give any economical effect until end of month, player still needs to see what's going on without waiting a month. E.g. if you resettle a pop on a planet where there are free jobs, you expect the pop to take one of them. If job assignment only happens monthly, the pop will stay unemployed till EOM. Unemployment icon will be shown even though there are actually free jobs there which is confusing. You'll have to figure out by yourself how many jobs each planet actually has and memorize which planets have genuine unemployment and which just wait for EOM to assign pops.

On the other hand, there are quite a lot of events which can cause pops reshuffling, and in theory some of them can happen on the same day. If the game reshuffles pops every time something changed, it might have to do it more than once a day for some planets.


Best of both worlds would be to:
  • set a planetary flag every time something changed and
  • have daily tick to rearrange pops on flagged planets

If tests show that this approach is still too slow, then some sort of throttling can be added. I.e. only rearrange pops on planets which have had the flag on them for X days. This way any number of pop/job affecting events happening on a planet within X days period will only trigger one round of pops reshuffling.
Ideally, X can be made dynamic and adjusted based on current game performance (either measured by some module or assessed based on number of planets/pops in the galaxy). Alternatively, X can be part of global defines so that people could adjust it via personal mods if they want to trade some refresh rate for performance or vice versa.