MOD REQUEST: A true Eco-Friendly (zero pollution footprint factory) mod

This is the place to request new mods or give ideas about what could be done.
Qon
Smart Inserter
Smart Inserter
Posts: 2118
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: MOD REQUEST: A true Eco-Friendly (zero pollution footprint factory) mod

Post by Qon »

darkfrei wrote: ↑
Tue May 14, 2019 6:41 pm
Here is my version, UPS up to 2500.
https://mods.factorio.com/mod/Evo
You are going through the chunks and measuring pollution/chunk and counting spawners with count_entities_filtered. 2500 UPS on a new world with nothing on it maybe. It's going to choke hard on any real factory, will probably bring any factory down to 1 UPS by itself.

Also, your evolution model doesn't work like the vanilla evolution model at all. It will skyrocket to maximum quickly with any somewhat large amount of pollution. It counts the same pollution every tick and it doesn't slow down when you reach higher evolution factors. So even if you scale it down you would go from 0 to medium biters and small spitters and then suddenly get mostly behemoths, maybe even before you get any major big biter attacks.

And you don't differentiate between pollution absorbed by trees or spawners. Pollution absorbed is first going to trees and spawners after that I think, seemed like that when I tested spawning massive amounts of pollution with commands.

I would use my mod instead. I just need a thumbnail....


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

Re: MOD REQUEST: A true Eco-Friendly (zero pollution footprint factory) mod

Post by darkfrei »

Qon wrote: ↑
Tue May 14, 2019 7:08 pm
You are going through the chunks and measuring pollution/chunk and counting spawners with count_entities_filtered. 2500 UPS on a new world with nothing on it maybe. It's going to choke hard on any real factory, will probably bring any factory down to 1 UPS by itself.
count_entities_filtered will be used only on chunks with pollution and only for one chunk per tick; UPS is the same by huge megabase and empty world, count doesn't make high impact
Qon wrote: ↑
Tue May 14, 2019 7:08 pm
Also, your evolution model doesn't work like the vanilla evolution model at all. It will skyrocket to maximum quickly with any somewhat large amount of pollution. It counts the same pollution every tick and it doesn't slow down when you reach higher evolution factors. So even if you scale it down you would go from 0 to medium biters and small spitters and then suddenly get mostly behemoths, maybe even before you get any major big biter attacks.
You are right, in my mod the pollution makes acceleration, the speed of evolution will be higher in chunks with more pollution and where is a big amount of enemy bases.
No pollution or no bases changes nothing. High pollution cloud on the big "enemy city" makes evolution higher.
Probably the evolution must go down with the time, may be negative evolution_factor_by_time or higher absorption by unit creating.
Qon wrote: ↑
Tue May 14, 2019 7:08 pm
And you don't differentiate between pollution absorbed by trees or spawners. Pollution absorbed is first going to trees and spawners after that I think, seemed like that when I tested spawning massive amounts of pollution with commands.
My mod adds no absorption, the spawners make it by unit spawning. If spawners have pollution than they evolve.
2019-05-14T22_19_56-Window.png
2019-05-14T22_19_56-Window.png (17.77 KiB) Viewed 1916 times
2019-05-14T22_22_05-Window.png
2019-05-14T22_22_05-Window.png (19.02 KiB) Viewed 1915 times

Qon
Smart Inserter
Smart Inserter
Posts: 2118
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: MOD REQUEST: A true Eco-Friendly (zero pollution footprint factory) mod

Post by Qon »

darkfrei wrote: ↑
Tue May 14, 2019 8:19 pm
Qon wrote: ↑
Tue May 14, 2019 7:08 pm
You are going through the chunks and measuring pollution/chunk and counting spawners with count_entities_filtered. 2500 UPS on a new world with nothing on it maybe. It's going to choke hard on any real factory, will probably bring any factory down to 1 UPS by itself.
count_entities_filtered will be used only on chunks with pollution and only for one chunk per tick; UPS is the same by huge megabase and empty world, count doesn't make high impact
Then the behaviour will be a bit wonky. For big pollution clouds, pollution will be absorbed before your mod measures that chunk. So it can randomly fail to increase pollution. But for dense pollution it will count the same pollution many times even if it isn't absorbed. How can you ever balance something like that when it can exhibit completely different behaviours depending on pseudo-random factors that you have no real control over?
darkfrei wrote: ↑
Tue May 14, 2019 8:19 pm
Qon wrote: ↑
Tue May 14, 2019 7:08 pm
You are going through the chunks and measuring pollution/chunk and counting spawners with count_entities_filtered. 2500 UPS on a new world with nothing on it maybe. It's going to choke hard on any real factory, will probably bring any factory down to 1 UPS by itself.
count_entities_filtered will be used only on chunks with pollution and only for one chunk per tick; UPS is the same by huge megabase and empty world, count doesn't make high impact
Yeah, but instead the behaviour changes in unpredictable ways.
darkfrei wrote: ↑
Tue May 14, 2019 8:19 pm
Qon wrote: ↑
Tue May 14, 2019 7:08 pm
And you don't differentiate between pollution absorbed by trees or spawners. Pollution absorbed is first going to trees and spawners after that I think, seemed like that when I tested spawning massive amounts of pollution with commands.
My mod adds no absorption, the spawners make it by unit spawning. If spawners have pollution than they evolve.
You misunderstood me. Your mod will cause evolution even if the pollution doesn't ever get absorbed by spawners if there's pollution in chunks with spawners and trees, even if the trees in the chunk absorb all the pollution before it 'reaches' the spawners.

Qon
Smart Inserter
Smart Inserter
Posts: 2118
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: MOD REQUEST: A true Eco-Friendly (zero pollution footprint factory) mod

Post by Qon »

On the portal, of course:

Code: Select all

Version: 0.0.3
  Changes:
    - The presets now start with the vanilla pollution evolution factor 0 instead of 9 (or instead of 12 for death worlds).
So you can have both vanilla and NGE active at the same time. But you don't have to turn it off for every new map you create.
https://mods.factorio.com/mod/ChangeMapSettings if you want to edit map gen settings on an already created map.

Qon
Smart Inserter
Smart Inserter
Posts: 2118
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: MOD REQUEST: A true Eco-Friendly (zero pollution footprint factory) mod

Post by Qon »

@darkfrei, it's nice of you to fulfill a mod request. My critiscism is all meant to be constructive and helpful so that your mod can be as good as it can be.

I do wonder though why you decided to post this mod hours after I had posted my mod. Of course you could have started it earlier than me posting it, but I had discussed feature list, implementation details with specific APIs used and with testing results making it pretty clear that I was working on it too. But your mod doesn't use the any of the info I released on how I would make the mod which is a bit Qonfusing to me.

So after I released my mod you decided to complete yours and post it. Of course different people can post different mods and people can choose which version they prefer. Different mods can suit different tastes. But I haven't seen any feature that Evo has that mine doesn't. I would say NGE does evolution scaling better since it follows the vanilla behaviour and the settings values mean the same in NGE as in vanilla. My mod uses the stats Factorio already collects which means precise values even if the mod only does a tiny amount of work once every minute. Evo collects data via APIs that I believe to be more expensive and it has to do it every tick and it still can't really keep up with the data produced. So while Evo doesn't greatly impact performance it is still like 10 000 times more performance intensive than the solution NGE uses and it's only really fast because it doesn't try to keep up with the pollution cloud statistics and just makes an extrapolated approximation instead.

Your mod isn't configurable. That could of course fairly easily change. But the other stats like trees damaged by pollution isn't really measurable with the way Evo is built.

The wiki has great info on how evolution is supposed to work: https://wiki.factorio.com/Enemies#Evolution
It provides formulas and other great info. I used that article to learn how evolution works in vanilla so I could make the formulas in NGE "correct".

Vanilla pollution evolution curve:
Image
The formula you use give you a linear graph line. That means you go from from 60% to 100% just as easily as you go from 0 to 40%. But the difficulty of the evolution changes much more from 90% to 95% than it does from 0% to 40%. And you typically release much more pollution later in the game. This means with "Evo" you might get from 40% to 100% faster than it takes to get from 0 to 40%. So you might see medium biters and when you try to research solar and efficiency modules you get max evolution immediately.

The spawning probablility graphs shows this:
Image

Compare the area of the purple of the small biters to the green of the behemoth biters. Behemoth biters start at 90%. And with vanilla evolution you never really reach 100% evolution because it increases slower the higher you go. And the effect of 1% unit more evolution is a noticable jump in difficulty when you reach this stage but it requires quite a bit of spawner killing or massive pollution to actually happen.

So a different evolution curve is maybe preferable to some, but most would definitly not want it changed to linear without being told about it. Unless they are doing a specific challenge run where they want exponential difficulty it's hard for me to see any benefits so I'm assuming it's an oversight by you.

So finally is there anything that your mod does that makes it a preferable option to you? You decided to release it so I assume you prefer something about it?

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

Re: MOD REQUEST: A true Eco-Friendly (zero pollution footprint factory) mod

Post by darkfrei »

You are right, right now my mod a little bit hardcore.

Thank you for the "Vanilla pollution evolution curve", I haven't seen it before.
It looks like y = 1 - exp((-1/70) * x), where x is million of pollution.
https://www.google.com/search?q=y+%3D+1 ... %29+*+x%29

y=1-exp(-x*ln2/50) https://www.desmos.com/calculator/0ozjjihotd
So by x=50 y=1-1/2,
by x=100 y=1-1/4,
by x=150 y=1-1/8,
by x=200 y=1-1/16 etc.

I must to adjust my evolution to this curve, but the evolution must be much faster then here, wile it comes not from all pollution, but from pollution, that _touched_ enemy bases. For the player is not visible if the spawner took that pollution or trees in the same chunk. The touching makes evolution independent of absorption.

Maybe I need to adjust units/spawners to get small biters from 0 evolution, medium from 0.02, big from 0.1 and behemoth from 0.5 evolution factor.
Last edited by darkfrei on Fri May 17, 2019 2:43 pm, edited 3 times in total.

Koub
Global Moderator
Global Moderator
Posts: 7203
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: MOD REQUEST: A true Eco-Friendly (zero pollution footprint factory) mod

Post by Koub »

Qon wrote: ↑
Tue May 14, 2019 7:29 pm
Next Gen Evolution is now on the portal!
Download it there! Tell your grandma about it! ;)
BTW I totally forgot to thank you for the mod. I downloaded it yesterday. My next big objective is to find some time to play and be able to actually test it :mrgreen:.
Also my grandma was very impressed too. Already 30 downloads the first day, gratz :).
Koub - Please consider English is not my native language.

Qon
Smart Inserter
Smart Inserter
Posts: 2118
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: MOD REQUEST: A true Eco-Friendly (zero pollution footprint factory) mod

Post by Qon »

darkfrei wrote: ↑
Wed May 15, 2019 10:29 am
I must to adjust my evolution to this curve, but the evolution must be much faster then here, wile it comes not from all pollution, but from pollution, that _touched_ enemy bases. For the player is not visible if the spawner took that pollution or trees in the same chunk. The touching makes evolution independent of absorption.
I hope you succeed :)
darkfrei wrote: ↑
Wed May 15, 2019 10:29 am
Maybe I need to adjust units/spawners to get small biters from 0 evolution, medium from 0.02, big from 0.1 and behemoth from 0.5 evolution factor.
If you do this then it might work fine for those who start their world with your mod. But people that add this mod to their playthrough after a few hours in will go from medium biters to behemoths immediately when they load their game because their 0.5 evolution number is low in vanilla but high with your suggestion. You could use a migration to fix this though. But if people look at their evolution number with /evolution then they might get confused by the different numbers and why spawners spawn behemoths at 0.5 evolution. So I would recommend adjusting your formula for the evolution factor instead of the spawner values if you can.
Koub wrote: ↑
Wed May 15, 2019 3:21 pm
BTW I totally forgot to thank you for the mod. I downloaded it yesterday. My next big objective is to find some time to play and be able to actually test it :mrgreen:.
Also my grandma was very impressed too. Already 30 downloads the first day, gratz :).
Thanks! Welcome to the mod addicts! <3
If you have any thoughts on the default values for the mod settings or any additional things that could influence evolution then I would be happy to hear about it (once you have tested it of course)!

The descriptions of the different values are kind of confusing and long atm but maybe I can find a way to improve that later.

Post Reply

Return to β€œIdeas and Requests For Mods”