Alien Spawning Ratios

Place to get help with not working mods / modding interface.
Dakkan
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Jul 23, 2015 6:22 pm
Contact:

Alien Spawning Ratios

Post by Dakkan »

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.
orzelek
Smart Inserter
Smart Inserter
Posts: 3928
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Alien Spawning Ratios

Post by orzelek »

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.
Dakkan
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Jul 23, 2015 6:22 pm
Contact:

Re: Alien Spawning Ratios

Post by Dakkan »

Alright, I think I understand, thank you.
Post Reply

Return to “Modding help”