Show Individual Evolution Factors

Things that already exist in the current mod API
Post Reply
TheSAguy
Smart Inserter
Smart Inserter
Posts: 1449
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

Show Individual Evolution Factors

Post by TheSAguy »

Hi,

Per my post here. There are 3 things in Vanilla that cause the Evolution to go up.

I'd like to be able to show what Evolution caused by each of these individually please.

% Evolution caused by Time
% Evolution caused by Destruction
% Evolution caused by Pollution (or in the case of Next Gen Evolution or Evo, the caused by Spawner absorption.)

Thanks.

Bilka
Factorio Staff
Factorio Staff
Posts: 3132
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Show Individual Evolution Factors

Post by Bilka »

I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Show Individual Evolution Factors

Post by darkfrei »

Print to console:

Code: Select all

/c game.print ('evolution_factor: '.. game.forces['enemy'].evolution_factor)
game.print ('evolution_factor_by_pollution: '.. game.forces['enemy'].evolution_factor_by_pollution)
game.print ('evolution_factor_by_time: '.. game.forces['enemy'].evolution_factor_by_time)
game.print ('evolution_factor_by_killing_spawners: '.. game.forces['enemy'].evolution_factor_by_killing_spawners)
2019-05-21T21_31_03-Factorio 0.17.41.png
2019-05-21T21_31_03-Factorio 0.17.41.png (16.37 KiB) Viewed 2156 times
Don't ask me why some of them are higher than 1.

TheSAguy
Smart Inserter
Smart Inserter
Posts: 1449
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

Re: Show Individual Evolution Factors

Post by TheSAguy »

Great!
Thanks :mrgreen:

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Show Individual Evolution Factors

Post by darkfrei »

How to calculate them and why some of them are higher than 1?

Bilka
Factorio Staff
Factorio Staff
Posts: 3132
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Show Individual Evolution Factors

Post by Bilka »

darkfrei wrote:
Wed May 22, 2019 4:52 am
How to calculate them and why some of them are higher than 1?

Code: Select all

total_increase = pollution + time + killing_spawners

pollution_percentage = pollution / total_increase * 100
time_percentage = time / total_increase * 100
killing_spawners_percentage = killing_spawners / total_increase * 100
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Show Individual Evolution Factors

Post by darkfrei »

Bilka wrote:
Wed May 29, 2019 5:52 pm
darkfrei wrote:
Wed May 22, 2019 4:52 am
How to calculate them and why some of them are higher than 1?

Code: Select all

total_increase = pollution + time + killing_spawners

pollution_percentage = pollution / total_increase * 100
time_percentage = time / total_increase * 100
killing_spawners_percentage = killing_spawners / total_increase * 100
It looks like the summ of them must be always 100.

Post Reply

Return to “Already exists”