[2.0.76] LuaForce.get_evolution_factor_by_killing_spawners returns zero

Bugs that are actually features.
cs314
Manual Inserter
Manual Inserter
Posts: 1
Joined: Wed Apr 08, 2026 7:52 am
Contact:

[2.0.76] LuaForce.get_evolution_factor_by_killing_spawners returns zero

Post by cs314 »

The get_evolution_factor_by_killing_spawners method always returns zero even if spawners have already been destroyed.

Reproduce:
1. Load game
2. open console
3. /evolution
-> Nauvis - Evolution factor: 0.9024. (Time 29%) (Pollution 51%) (Spawner Kills 20%)
4. /c game.player.print(game.forces["player"].get_evolution_factor_by_killing_spawners(game.player.surface))
0
5. /c game.player.print(game.forces["player"].get_evolution_factor_by_pollution(game.player.surface))
4.7366950325372
6. /c game.player.print(game.forces["player"].get_evolution_factor_by_time(game.player.surface))
2.6409000000004
7. /c game.player.print(game.forces["player"].get_evolution_factor(game.player.surface))
0.88065275230258

It looks like get_evolution_factor is also calculated with Spawner Kills = 0.
(4.7366950325372+2.6409000000004)/(1+4.7366950325372+2.6409000000004) = 0,8806

Attached is a save file from which this data was generated.
Attachments
t10-tmp.zip
(14.21 MiB) Downloaded 9 times
factorio-current.log
(8.53 KiB) Downloaded 7 times
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4449
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.0.76] LuaForce.get_evolution_factor_by_killing_spawners returns zero

Post by boskid »

Welcome on forums. This is not a bug. `/evolution` uses data from `enemy` force while you are trying to read this data from `player` force.
Post Reply

Return to “Not a bug”