Hello,
I'm attempting to add new enemies to the game, but the spawning numbers are completely confusing, and a search only reveals this forum post when times were much simpler. https://forums.factorio.com/forum/vie ... =25&t=1658
res[1] = {"small-biter", {{0.0, 0.3}, {0.7, 0.0}}}
What are these sets of numbers?
res[2] = {"medium-biter", {{0.3, 0.0}, {0.6, 0.3}, {0.8, 0.1}}}
Why do medium biters have three sets of numbers? Why do big and behemoth biters again only have 2 sets of numbers?
The notes in the demo file are not very illuminating.
Alien Spawning Ratios
Re: Alien Spawning Ratios
I't a bit complex and based on linear interpolation (I think).
Each pair describes value of evolution and probability. For evolution values in between there is an interpolation used.
Small biters will spawn at 0 evolution with factor 0.3 until 0.7 evolution where their factor drops to 0 making them not spawn anymore.
Medium biters are not present till 0.3 evolution (probability 0). From that point they will start appearing till probability factor of 0.3 is reached at 0.6 evolution. After that their factor will start dropping till 0.8 evolution where it will reach 0. and stay at that value till the end.
Probability factors are not %-ages. All factors are summed up and then this pool is used to randomly select one of biters - it's a weighted distribution.
Each pair describes value of evolution and probability. For evolution values in between there is an interpolation used.
Small biters will spawn at 0 evolution with factor 0.3 until 0.7 evolution where their factor drops to 0 making them not spawn anymore.
Medium biters are not present till 0.3 evolution (probability 0). From that point they will start appearing till probability factor of 0.3 is reached at 0.6 evolution. After that their factor will start dropping till 0.8 evolution where it will reach 0. and stay at that value till the end.
Probability factors are not %-ages. All factors are summed up and then this pool is used to randomly select one of biters - it's a weighted distribution.
Re: Alien Spawning Ratios
Alright, I think I understand, thank you.