[2.0.76] LuaForce.get_evolution_factor_by_killing_spawners returns zero
Posted: Wed Apr 08, 2026 8:23 am
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.
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.