[0.17.71] Evolution Factor by Time/Pollution

Bugs that are actually features.
Post Reply
Schallfalke
Fast Inserter
Fast Inserter
Posts: 162
Joined: Sun Oct 28, 2018 7:57 am
Contact:

[0.17.71] Evolution Factor by Time/Pollution

Post by Schallfalke »

I start a new game, and see how the evolution factor increases.
And I looked into the three quantities, as mentioned in Lua API:

Code: Select all

evolution_factor_by_pollution :: double [RW]
evolution_factor_by_time :: double [RW]
evolution_factor_by_killing_spawners :: double [RW]
My Tests:
  1. I used "Default" setting, and start new game doing nothing. So I expected only the "by_time" value increases, while "by_pollution" stays 0. Results are opposite, it shows "by_pollution" increases, "by_time" is 0. ("by_killing_spawners" is 0 as expected.)
  2. Then I tried with "Death World" setting, and start new game doing nothing again. The results are like above, except "by_pollution" value increases faster.
  3. Then I tuned with the start new game panel 3rd tab "Enemy", went into "Evolution" section. Max out "Time factor" to 1000, remove "Pollution factor" to 0. Guess what I got? Like 1 and 2, although "by_pollution" value increases even faster.
  4. Then I tuned with another setting: remove "Time factor" to 0, max out "Pollution factor" to 1000. And stay in game doing nothing for like 10 min. Results are three "by_*" values and the total evolution factor all stay absolute zero.
  5. (This time not starting a new game.) I load my old megabase save, the "by_time" is non-zero and actually highest among the three "by_*" values.
My Conclusion:
  1. Starting new games, "by_time" value always stays zero, no matter what the setting is.
  2. The actual contribution by "Time factor", seems have been wrongly added to "by_pollution" value instead.
  3. Old megabase save proved I did not mistype variable names. (So I am looking into correct variables.)
  4. Seems this bug was made in some recent version(?).
PS: I used my own mod
Schall Endgame Evolution
to look into the values. This saved me a lot of typing work in console. Hope this maybe helpful to you in solving the bug. ;)

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.71] Evolution Factor by Time/Pollution

Post by Rseding91 »

Thanks for the report however nothing around this logic has changed in over a year.

There is 1 place in the code where "by_time" is increased and it's called once per game tick so I know it's correct. There is 1 place in the code where "by_pollution" is increased and it's called from where pollution is created so I know it's correct.

I would have to see your code you're using to read out the game but I would guess that you've done the reading backwards in what ever mod you've created or you've made some bad assumption about values you're changing thinking they're somehow related to the evolution logic when they're actually not.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.17.71] Evolution Factor by Time/Pollution

Post by Klonan »

I'm gonna take this bit by bit.
Schallfalke wrote:
Thu Oct 17, 2019 8:31 am
[*] Starting new games, "by_time" value always stays zero, no matter what the setting is.
Cannot reproduce:
Image

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2249
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [0.17.71] Evolution Factor by Time/Pollution

Post by boskid »

Not a bug (in Factorio itself)
Schallfalke wrote:
Thu Oct 17, 2019 8:31 am
PS: I used my own mod Schall Endgame Evolution;)
control.lua:256:

Code: Select all

  -- Frames : Evolution Factor Components
  t = frame.add { type = "table", name="table_evo_pol", column_count = 3 } ------ pollution
  table.insert(captions, t.add { type = "label", caption = {"description.Schall-evolution-factor-time"} } ) ------ time ?
  table.insert(stretches, t.add { type = "flow" } )
  table.insert(evo_numbers, t.add { type = "label", name="label_evo_pol", caption = "0%" } )
control.lua:260:

Code: Select all

  t = frame.add { type = "table", name="table_evo_tim", column_count = 3 } ------ time
  table.insert(captions, t.add { type = "label", caption = {"description.Schall-evolution-factor-pollution"} } ) ------ pollution?
  table.insert(stretches, t.add { type = "flow" } )
  table.insert(evo_numbers, t.add { type = "label", name="label_evo_tim", caption = "0%" } )

Schallfalke
Fast Inserter
Fast Inserter
Posts: 162
Joined: Sun Oct 28, 2018 7:57 am
Contact:

Re: [0.17.71] Evolution Factor by Time/Pollution

Post by Schallfalke »

I am sorry. Did not realize it is bug from my own mod... :oops:
Especially thanks boskid for debugging.

EDIT: A question though. Is killing trees not counting towards pollution? This is what happened to real-world Amazon...

Post Reply

Return to “Not a bug”