[Done] Evolution Factors Display
[Done] Evolution Factors Display
Hi,
There are 3 things that affect evolution, Time, Base Destruction and Pollution (In Vanilla)
I’d like to get a way to show the amount of evolution added by each of these factors.
Would that be possible?
Thanks
There are 3 things that affect evolution, Time, Base Destruction and Pollution (In Vanilla)
I’d like to get a way to show the amount of evolution added by each of these factors.
Would that be possible?
Thanks
Last edited by TheSAguy on Tue Jun 04, 2019 3:35 pm, edited 2 times in total.
Re: Evolution Factors Display
Console command of /evolution gives you that information.
So probably a rather sort of mod that performs performs this console command say once every 60+ ticks, stores the result in variable, and displays the result someplace on the screen, similar to how some of the clock based mods which display the time would do it.
Hiladdar
So probably a rather sort of mod that performs performs this console command say once every 60+ ticks, stores the result in variable, and displays the result someplace on the screen, similar to how some of the clock based mods which display the time would do it.
Hiladdar
Re: Evolution Factors Display
EvoGUI is made for that; https://mods.factorio.com/mod/EvoGUI
But as the OP states (s)he plays vanilla there is no way to show the partial amount of each evolution factor.
But as the OP states (s)he plays vanilla there is no way to show the partial amount of each evolution factor.
Re: Evolution Factors Display
I know the command to show the combined evolution factor, but not the split out values.Hiladdar wrote: ↑Sun May 19, 2019 5:50 pmConsole command of /evolution gives you that information.
So probably a rather sort of mod that performs performs this console command say once every 60+ ticks, stores the result in variable, and displays the result someplace on the screen, similar to how some of the clock based mods which display the time would do it.
Hiladdar
I had a typo in my OP. I meant "In Vanilla", since there are mods that tweak the formula a bit. I'm actually using Next Gen Evolution that increases evolution from pollution only when absorbed.steinio wrote: ↑Sun May 19, 2019 6:10 pmEvoGUI is made for that; https://mods.factorio.com/mod/EvoGUI
But as the OP states (s)he plays vanilla there is no way to show the partial amount of each evolution factor.
I agree EvoGUI is perfect. It just needs the values split by type.
Re: Evolution Factors Display
I've made this display for Evo, but this thing is for normal evolution only. But it's not too complicated to adapt the code for more than one evolution factor or whatever.
Re: Evolution Factors Display
When was the last time you tried /evolution?
Re: Evolution Factors Display
You were talking about the vanilla factors, but you are using my mod Next Gen Evolution. So is this for another world without NGE or?
Because since NGE changes the evolution number directly the /evolution command shows the split factors just for how the game thinks it was calculated based on what it has done to evolution. Which means the splitted factors will show incorrect values for how the evolution was reached. That's just for the displayed splitted values though, the combined evolution factor is still calculated correctly.
Because since NGE changes the evolution number directly the /evolution command shows the split factors just for how the game thinks it was calculated based on what it has done to evolution. Which means the splitted factors will show incorrect values for how the evolution was reached. That's just for the displayed splitted values though, the combined evolution factor is still calculated correctly.
Re: Evolution Factors Display
for vanilla:
-get total evolution:
will give you the total evolution factor.
-get map settings:
will give you the map settings's time factor.
will give you the map settings's destroy factor.
will give you the map settings's pollution factor.
-get required information:
will give u the number of ticks the round is running (edit: not sure about MP here)
will tell you how many big worms the 'force' killed. also works for
and tells you how many biter spawners the force has killed and so on.
idk how to get the pollution factor, the probably inefficient idea would be like
if the mod adds additional numbers to the pollution counter, it doesn't matter because you know time and destroy.
if the mod adds additional numbers to the time but not pollution counter, easy because you know the ticks and base map settings and you can rely on the pollution statistics not being increased by a mod.
if it adds extra pollution to multiple categories, it might get difficult unless you can get the pollution statistics directly (and not via my complicated method)
-get total evolution:
Code: Select all
game.forces.enemy.evolution_factor
-get map settings:
Code: Select all
game.map_settings.enemy_evolution.time_factor
Code: Select all
game.map_settings.enemy_evolution.destroy_factor
Code: Select all
game.map_settings.enemy_evolution.pollution_factor
-get required information:
Code: Select all
game.tick
Code: Select all
game.player.force.kill_count_statistics.get_input_count('big-worm-turret')
Code: Select all
game.player.force.kill_count_statistics.get_input_count('biter-spawner')
idk how to get the pollution factor, the probably inefficient idea would be like
edit: about modded stuff, technically.... (*as long as total evolution stays below 1)total_evolution-ticks*map_timed_evolution-all_nest_kills_by_all_forces_added_up*map_destroy_evolution
if the mod adds additional numbers to the pollution counter, it doesn't matter because you know time and destroy.
if the mod adds additional numbers to the time but not pollution counter, easy because you know the ticks and base map settings and you can rely on the pollution statistics not being increased by a mod.
if it adds extra pollution to multiple categories, it might get difficult unless you can get the pollution statistics directly (and not via my complicated method)
Re: Evolution Factors Display
Pollution is in LuaGame.AlFara wrote: ↑Wed May 29, 2019 4:35 amidk how to get the pollution factor, the probably inefficient idea would be likeedit: about modded stuff, technically.... (*as long as total evolution stays below 1)total_evolution-ticks*map_timed_evolution-all_nest_kills_by_all_forces_added_up*map_destroy_evolution
if the mod adds additional numbers to the pollution counter, it doesn't matter because you know time and destroy.
if the mod adds additional numbers to the time but not pollution counter, easy because you know the ticks and base map settings and you can rely on the pollution statistics not being increased by a mod.
if it adds extra pollution to multiple categories, it might get difficult unless you can get the pollution statistics directly (and not via my complicated method)
Code: Select all
game.pollution_statistics
evolution_factor is not linear. You don't add the different factors
https://wiki.factorio.com/Enemies#Evolution wrote: Computation of actual evolution factor
The actual EF can be computed as follow :, where E[t], E[p], and E[ s] are the single-component values from the pollution, time, and spawner charts, in that order.Code: Select all
1 - EF = (1 - E[t]) * (1 - E[p]) * (1 - E[s])
Re: Evolution Factors Display
thanks for the update but how would your command to call it look like? or does "input_counts" yield the correct number?
Re: Evolution Factors Display
"input" is the left side which lists the entity outputs.
And "output" is the right side which lists the entity input consumption amounts.
Yes, left is right and right is wrong. I'll go ahead and file a bug report.
My mod Next Gen Evolution uses the pollution statistics and does evolution combination calculations. It uses get_flow_count instead since it needs the values for the last minute instead of all time stats but is the best code example I know of
And "output" is the right side which lists the entity input consumption amounts.
Yes, left is right and right is wrong. I'll go ahead and file a bug report.
My mod Next Gen Evolution uses the pollution statistics and does evolution combination calculations. It uses get_flow_count instead since it needs the values for the last minute instead of all time stats but is the best code example I know of
Re: Evolution Factors Display
tx, i'll take a look into it.
-edit-
@Bilka's post below: thanks
-edit-
@Bilka's post below: thanks
Last edited by AlFara on Wed May 29, 2019 1:51 pm, edited 1 time in total.
Re: Evolution Factors Display
Just a note, OP got their answer here: 71114
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Re: Evolution Factors Display
I replied to the other thread.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Re: Evolution Factors Display
"Not a bug"
It's not documented, the words mean the opposite of what my dictionary says they mean for no good reason (at least Rseding91 didn't tell me any reason) and in some places, the meaning flips back again! But now we at least have a soon-to-be-buried bug report to reference...