[REQUEST] Per-spawner evolution

This is the place to request new mods or give ideas about what could be done.
Post Reply
jchardin64
Inserter
Inserter
Posts: 38
Joined: Mon Apr 30, 2018 6:00 pm
Contact:

[REQUEST] Per-spawner evolution

Post by jchardin64 »

So basically I don't really like the way pollution/evolution work in the game. I've thought for quite a while about how to improve it, and this is what I've come up with:

-- Pollution only affects spawners that it actually touches. This is to encourage keeping trees, water, and unpaved ground around your factory to soak up pollution. Also mods with air filtering become even more beneficial.
-- For each X pollution a spawner absorbs, its individual evolution % increases. This has the same effect as the vanilla evolution value (more/stronger biters generated), except it's a per-spawner value and not global.
-- Destroying a spawner releases all the pollution it has absorbed, so nearby spawners will evolve very quickly.

I'd tackle this myself, but my own modding experience is really limited (basically I know how to change recipes but that's it). This sounds like something that should be possible, right?

thelordodin
Fast Inserter
Fast Inserter
Posts: 148
Joined: Fri Jan 06, 2017 1:54 am
Contact:

Re: [REQUEST] Per-spawner evolution

Post by thelordodin »

It's possible. Different spawner types can be set to produce specific enemies. Than you have spawner levels 1-10. And you can replace them gradually. This way you can implement per-spawner evolution, triggered by some logic.

thelordodin
Fast Inserter
Fast Inserter
Posts: 148
Joined: Fri Jan 06, 2017 1:54 am
Contact:

Re: [REQUEST] Per-spawner evolution

Post by thelordodin »


mrvn
Smart Inserter
Smart Inserter
Posts: 5682
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [REQUEST] Per-spawner evolution

Post by mrvn »

Watching every spawner to monitor how much pollution they absorb is probably cost prohibitive. At minimum you need to check only N spawners per tick and go through them slowly.

thelordodin
Fast Inserter
Fast Inserter
Posts: 148
Joined: Fri Jan 06, 2017 1:54 am
Contact:

Re: [REQUEST] Per-spawner evolution

Post by thelordodin »

I think much easier to just allow spawner of level 1 in starting zone, next 500 tiles are level 1-2, next 500 tiles level 2-3, next 500 tiles level 3-4, etc.
This way there is nothing to check. And effectivelly you'll get wanted: when you destroy first line of nests your pollution cloud would grow to next line with bigger enemies there...

User avatar
garrotte
Burner Inserter
Burner Inserter
Posts: 17
Joined: Tue Mar 10, 2020 5:10 pm
Contact:

Re: [REQUEST] Per-spawner evolution

Post by garrotte »

Implement almost according the thread post
https://mods.factorio.com/mod/RampantEvolution

thelordodin
Fast Inserter
Fast Inserter
Posts: 148
Joined: Fri Jan 06, 2017 1:54 am
Contact:

Re: [REQUEST] Per-spawner evolution

Post by thelordodin »

garrotte wrote: ↑
Wed Dec 15, 2021 9:10 pm
Implement almost according the thread post
https://mods.factorio.com/mod/RampantEvolution
Nope, you got it wrong. Rampart evolution is still a global thing. What I suggest is very local evolution.

User avatar
MEOWMI
Filter Inserter
Filter Inserter
Posts: 307
Joined: Wed May 22, 2019 12:21 pm
Contact:

Re: [REQUEST] Per-spawner evolution

Post by MEOWMI »

If you can detect when attacks are triggered (maybe like a wave as a whole, that shouldn't be very expensive), you could perhaps use that as a measurement of local pollution absorption, and thus local evolution.

thelordodin
Fast Inserter
Fast Inserter
Posts: 148
Joined: Fri Jan 06, 2017 1:54 am
Contact:

Re: [REQUEST] Per-spawner evolution

Post by thelordodin »

Well... I don't know deeply how to implement it - i've never modded enemies, but I suppose that it will have almost no impact on performance.
- First create say 5 or 10 (setting) copies of each spawner type in game. Each spawner type will be for evo level (Lv1 - Lv5)
- Now each spawner can only spawn entities of specific level (i.e. Lv5 = Behemots, Lv 1 = only small biters)
- On chunk generation event see if there are any spawners there and if there are - replace them with corresponding Level
- On Nauvis surface level should be k*(distance from 0, 0, 0 to chunk position), k is a setting.
- On every other surface if there is a spawner - don't touch it (setting) /or should always be max level (setting)
- I didn't wanted to make evolution to account pollution at all, but with a setting it can be added:
-- Make an empty table, handle "on enemy spawned" event and add some value for that chunk every time an enemy is spawned (spawns come from pollution, so counting enemies spawned is roughly the same as counting pollution, but even better! because if you attack a spawner many times and don't still kill it, the evolution of it seems even more reasonable)
-- When the value in chunk reaches some limit, replace all spawners with next level.

- As you can see, there is no "on_tick" needed for the implementation, so only when a chunk is generated or when an enemy is spawned there will be some impact on performance, but thouse are very quite rare events.

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2485
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: [REQUEST] Per-spawner evolution

Post by FuryoftheStars »

thelordodin wrote: ↑
Sat Dec 23, 2023 12:16 pm
Well... I don't know deeply how to implement it - i've never modded enemies, but I suppose that it will have almost no impact on performance.
- First create say 5 or 10 (setting) copies of each spawner type in game. Each spawner type will be for evo level (Lv1 - Lv5)
- Now each spawner can only spawn entities of specific level (i.e. Lv5 = Behemots, Lv 1 = only small biters)
- On chunk generation event see if there are any spawners there and if there are - replace them with corresponding Level
- On Nauvis surface level should be k*(distance from 0, 0, 0 to chunk position), k is a setting.
- On every other surface if there is a spawner - don't touch it (setting) /or should always be max level (setting)
This much just sounds like evolution as a pure factor of distance?
thelordodin wrote: ↑
Sat Dec 23, 2023 12:16 pm
- I didn't wanted to make evolution to account pollution at all, but with a setting it can be added:
-- Make an empty table, handle "on enemy spawned" event and add some value for that chunk every time an enemy is spawned (spawns come from pollution, so counting enemies spawned is roughly the same as counting pollution, but even better! because if you attack a spawner many times and don't still kill it, the evolution of it seems even more reasonable)
-- When the value in chunk reaches some limit, replace all spawners with next level.

- As you can see, there is no "on_tick" needed for the implementation, so only when a chunk is generated or when an enemy is spawned there will be some impact on performance, but thouse are very quite rare events.
While there is an event for enemy spawning, it should be noted that nests do spawn biters without the need of absorbing pollution. That's where the biters that hang around the nests come from. It's the attack waves you probably need, but I'm not sure what that event is called.

Edit: Well, actually, every spawner has a absorbed_pollution property, so I suppose if you create yourself some thresholds on this, each time a nest spawns an enemy, you could just check this against your thresholds and replace the nest accordingly.

That said, evolution also controls worm size spawned from expansion parties. If late game an expansion party manages to sneak in and spawn closer to 0,0, it probably shouldn't be spawning small worms. ;)
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles

thelordodin
Fast Inserter
Fast Inserter
Posts: 148
Joined: Fri Jan 06, 2017 1:54 am
Contact:

Re: [REQUEST] Per-spawner evolution

Post by thelordodin »

FuryoftheStars wrote: ↑
Sat Dec 23, 2023 2:59 pm
This much just sounds like evolution as a pure factor of distance?
Exactly.

I can explain why this approach is really good at least in some cases.
This will be much different gameplay.

Detailed explanation for "why?":

My kids are playing factorio and there are some common issues i want to solve with this.
Factorio is hard to play for kids, but it developes them develop reasoning, planning, math, reading and much more - I can see it works!

The issues:
1. You can't just leave your factory running for half a day, even if it's stopped and does zero pollution - the time still ticks.
And kids tend to play few minutes and just leave game as is to run around or do something else.
Now they are back to play.
But evolution is say 50%
And its fatal mistake for a game... You have to start over as your economy just cant keep up with it.

4 hours ago you had a task to connect burner drill to smelter with a conveyor belt - that was your easy task a kid could and was willing to do.
Now your task is building economy capable of dealing with Behemots.... that is challenging even for adult who played factorio for quite a long time I say.
And that's totally impossible for a kid.

He just have to start over again. And he didn't even understand why?!

2. You can't just plumb a warehouse after mining site. It'll create big pollution.
The pollution cloud itself is fun, I like it - it triggers attack and action - we all like it.
But then: yes you built defences, yes you removed the warehouse, the pollution is gone...
But evolution is say 50%
And its fatal mistake for a game... You have to start over.

3. You can't just go and have some brake by having fun at killing biter bases. Even if you have a tank.
So... you build for a tank. You invested a lot of effort (for a kid) into building a tank.
And there you have it. But you can't just use it! Because after you destroy nests for an hour your base will be destroyed.
And kids won't even understand why that happen. Why?!

And its fatal mistake for a game... You have to start over.

So the solution is distance only based evolution.
But it's absolutely ok for mod users to have any mixed approaches they like - maybe one can find some other interestion combination.

How it will work:
- You'll anyway have to go futher from your base eventually - when your resources are over. And the more experianced player you are - the faster you'll deplete starting resources and have to go futher
- Your resources richness and size will matter much more than now. (Now time, pollution and kill counts matters more).
- With mod setting you should be able to set difficlullity - that is how fast evolution growth from distance. Will behemots be in 1000 tiles from start or 10 000 makes big difference
- The pollution still matters - it still triggers attacks, but not the evolution.
thelordodin wrote: ↑
Sat Dec 23, 2023 12:16 pm
While there is an event for enemy spawning, it should be noted that nests do spawn biters without the need of absorbing pollution.
I play factorio for quite long and NEVER seen this. Well the nest does spawn some biters that protect the nest.
This group have limit and won't go away from nest if it doesn't see player.

The biters will ONLY attack you in two cases:
1. The pollution reached them and they started building attacking forces from it. They just can't build "attacking" biters without pollution.
2. Biter base expantion - ! IF ! you turned it on - than, yes the base will sometime spawn a group to make a nest.
And that group can sometime hit your defences, occasionaly, not intentionally - they just go building their new spawner.

In fact if you have zero pollution the biters won't even have pathfinding algorithm to go to you :) Because they are guided by pollution gradient - i.e. they make next step to the direction with greater pollution.

So for:
thelordodin wrote: ↑
Sat Dec 23, 2023 12:16 pm
While there is an event for enemy spawning, it should be noted that nests do spawn biters without the need of absorbing pollution. That's where the biters that hang around the nests come from. It's the attack waves you probably need, but I'm not sure what that event is called.

Edit: Well, actually, every spawner has a absorbed_pollution property, so I suppose if you create yourself some thresholds on this, each time a nest spawns an enemy, you could just check this against your thresholds and replace the nest accordingly.
Just count them all. Thouse 20 biters the nest spawns for defence won't do much difference in calculation - if they stay there. Or you cant just ignore first 100 biters spawned.
And if you build a turrent near a spawner so the next defenders constantly attack it then, well, it's your fault and you have to deal with it :) But that just one nest!

thelordodin wrote: ↑
Sat Dec 23, 2023 12:16 pm
That said, evolution also controls worm size spawned from expansion parties. If late game an expansion party manages to sneak in and spawn closer to 0,0, it probably shouldn't be spawning small worms. ;)
Very edge case, but I think it should spawn small worms and spawners with small biters in it, because else it kills all the idea.
You don't have any control over it - you can't prevent it as a player. So it just shouldn't happen.
If you are on burner stage and a behemot comes to you - it's an unsolvable problem (at least for a kid).

For me game design is not about how to make game very realistic, because in reality the war isn't fun at all.
For me game design is about fairness: the more effort put in, - the more results you gain. In the game you need to have control over what's going on.

So:
- If time passes - you don't have control. Well a pro player have this control, a novice - don't. Any time-based mechanic always discriminate novice players, so I really hate it.
- If some randomness kills you - it's also bad mechanic, because you have no control over it.
- If you destroy a biter base on the north and now your base is totally annihilated from the south - you don't understand why?! - it's bad mechanic because it's very counter intuitive if you don't know it, because it ignores locality: how did biters on south came to know that they need to evolve? Why? They have internet or a cell phone?

On the other hand:
- If you build near spawner nest and it constantly send defenders to you - this is nice and fun to have it evolve. Because it's totally your responsibility and you can see very clear why that happen. Also your big base have enough resources to deal with 1 spawner after all! Or you can just retreat from it and leave it alone for a while.
- If you have to kill biters to get that nice oil patch - that's also good.

thelordodin
Fast Inserter
Fast Inserter
Posts: 148
Joined: Fri Jan 06, 2017 1:54 am
Contact:

Re: [REQUEST] Per-spawner evolution

Post by thelordodin »

By the way I also posted simmilar request a little earliear:
viewtopic.php?p=542142#p542142

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2485
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: [REQUEST] Per-spawner evolution

Post by FuryoftheStars »

thelordodin wrote: ↑
Sun Dec 24, 2023 6:45 am
FuryoftheStars wrote: ↑
Sat Dec 23, 2023 2:59 pm
This much just sounds like evolution as a pure factor of distance?
Exactly.
This thread was about evolution per spawner with pollution, though. Not distance. And yes, I saw the other thread that you had created a month after this one, so... why'd you start taking this one over? This one was about using pollution, yours was about using distance... they probably should've remained in separate threads.

Personally, though, while I agree somewhat with your complaints of the current evolution system (time is a different issue from what you mention because most people don't leave their computers running with a game going while they're afk for hours or days), I still disagree with changing it to a function of distance. I, personally, like setting up rail-worlds with resources spread out very far apart. I have to use mods to achieve the distances I want, though. Vanilla already increases the size of the worms that spawn with nests, and on the current map I'm playing, by the time I can reach my second iron field, nests are already spawning with behemoth worms.

But, this is a mod request thread, not a gameplay suggestion thread, so I'm not going to get into a debate of what's better as this is, essentially, a request for something of personal use.
thelordodin wrote: ↑
Sun Dec 24, 2023 6:45 am
I play factorio for quite long and NEVER seen this. Well the nest does spawn some biters that protect the nest.
This group have limit and won't go away from nest if it doesn't see player.
Yes, those are the exact biters I'm talking about. They can go off to attack if they're close enough to something of interest, though, especially if one spawns close enough to a defensive wall but far enough not to get shot. But also if you travel by one between outposts often.

It's enough that checking purely for the spawn event I don't think should be done, but should also be coupled with checking the spawner's absorbed pollution level (at the very least, did it change since the last spawn event?). But I suppose that's me.
thelordodin wrote: ↑
Sun Dec 24, 2023 6:45 am
Very edge case, but I think it should spawn small worms and spawners with small biters in it, because else it kills all the idea.
You don't have any control over it - you can't prevent it as a player. So it just shouldn't happen.
If you are on burner stage and a behemot comes to you - it's an unsolvable problem (at least for a kid).
I would disagree with your reasoning, here. I'm not talking about having it as a factor of time, but rather of how much you've been triggering attacks via pollution (or as tech, ie what military research stage you are at). If you've triggered 10k attacks and are still on burner stage, then you're not actually playing the game and I completely feel that new nests, even ones that somehow spawn in close to origin, should spawn of appropriate level of where you are in the game, not as measly lvl 1s.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles

mrvn
Smart Inserter
Smart Inserter
Posts: 5682
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [REQUEST] Per-spawner evolution

Post by mrvn »

I really like the idea of evolution based on local pollution. So here is my take on it (and sorry if I repeat ideas):
  1. There should be some small evolution for time and overall pollution. Otherwise late game you would explore new parts of the map and you get tiny nests and worms that are just ridiculously easy to kill. The tech level or amount of explored chunks could also or instead factor into this. But I feel a purely tech level based evolution would mean you are never challenged. If you don't research uranium bullets you don't get biters that need uranium bullets to kill? That would be boring.
  2. I think nests and worms should evolve by absorbing pollution. If there is a small nest next to your mining drills then it should become more and more aggressive with bigger and bigger bitters and spitters. You can't just put down a few turrets to deal with small bitters and call it a day. You have to kill the nest or things will become worse over time. But a few turrets are enough to get settled, the nests aren't overwhelming from the start. And yes, by this I mean the nests changes from spawning small to medium to big to behemoth bitters. The worms grow up too. So a worm that's initially out of range might evolve and suddenly reach your defences.
  3. Another thing could be that nests grow with pollution. By that I don't mean evolution but pure numbers. That means the nest will produce larger attack groups when it keeps failing with it's current size.
  4. Lastly I think nests should breed new nests of the same or smaller evolution. This wouldn't be the nest just getting bigger but going of into some distance and starting a new nest. But the new nest would be at a higher than base evolution. It could be a level below the originating nest or the average of base + origin or something. The new nest would be smaller to mimic it being a baby nest that still has to grow up. The reason I think a reduction in evolution when breeding is a good idea is so that you don't get overwhelmed by behemoths just because one nest got a high dose of pollution once and now it spreads behemoth nests all around faster than you can destroy them. Maybe the evolution of a new nest could also reduce with distance from it's origin. The further away from the origin nest it starts the weaker it's starting evolution. Travelling to a new spot uses up resources causing a less evolved nest to appear.
  5. If a nests tries to breed but there are less evolved nests all around it then maybe one of the less evolved nests could evolve instead. So a small bitter nest near a behemoth bitter nest would become a medium bitter nest. Think of it this way: A behemoth joins the small bitter nests and passes on it's behemoth genes resulting in larger offspring for the nest.
I don't like that you make the game so much easier if you go around and explore all around you at the start to spawn tiny nests on the map instead of getting harder nests if you explore later in the game.

Panzerknacker
Inserter
Inserter
Posts: 38
Joined: Mon Aug 22, 2022 5:27 am
Contact:

Re: [REQUEST] Per-spawner evolution

Post by Panzerknacker »

I also agree with some points made in this topic.

For me the timefactor is really a love/hate thing. On one side the time pressure adds to the thrill, on the other side I really love to optimize my factory in great detail, taking a lot of time with that. That is discouraged because it's better to simply press on with a less-optimized factory than waste time optimizing while the biters simply keep evolving. This I feel is the number one factor that results into many players constantly restarting maps because time catched up to them.
Also, especially on non-marathon mode, you unlock new technologies so fast that it's pretty impossible to learn to put em to use in time, due to knowing that if you waste time with that, biters keep evolving.
What I also enjoy, is building a good-looking factory instead of just lining up assembler after assembler in the same boring pattern, this is extremely discouraged due to the timefactor.

I know you can turn off the timefactor but I am not the player wanting to mess too much with custom difficulty settings, I like to play how the devs intended it.

And while I wish there is a way to not have a time-factor I still want the enemy to be challenging and unpredictable, forcing me to build appropriate defenses.

Another thing I wish was different is that when you don't produce pollution or the pollution does not reach a nest, you NEVER get attacked. I really found out that mechanic early on. My first ever rocket launched was actually in a Marathon game where I researched only the necessarry technologies for the rocket, I could win by simply spreading my mining, smelting and power generation over the map and hiding stuff in forests. While cool, I felt like I cheesed the game after I won, felt like the other technologies (even simple Gun turrets) are just redundant.

mrvn
Smart Inserter
Smart Inserter
Posts: 5682
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [REQUEST] Per-spawner evolution

Post by mrvn »

Panzerknacker wrote: ↑
Thu Feb 22, 2024 5:14 pm
Another thing I wish was different is that when you don't produce pollution or the pollution does not reach a nest, you NEVER get attacked. I really found out that mechanic early on. My first ever rocket launched was actually in a Marathon game where I researched only the necessarry technologies for the rocket, I could win by simply spreading my mining, smelting and power generation over the map and hiding stuff in forests. While cool, I felt like I cheesed the game after I won, felt like the other technologies (even simple Gun turrets) are just redundant.
I got my spoon by building the factory so small I never even saw any aliens on the map.

Panzerknacker
Inserter
Inserter
Posts: 38
Joined: Mon Aug 22, 2022 5:27 am
Contact:

Re: [REQUEST] Per-spawner evolution

Post by Panzerknacker »

mrvn wrote: ↑
Fri Feb 23, 2024 8:19 am
Panzerknacker wrote: ↑
Thu Feb 22, 2024 5:14 pm
Another thing I wish was different is that when you don't produce pollution or the pollution does not reach a nest, you NEVER get attacked. I really found out that mechanic early on. My first ever rocket launched was actually in a Marathon game where I researched only the necessarry technologies for the rocket, I could win by simply spreading my mining, smelting and power generation over the map and hiding stuff in forests. While cool, I felt like I cheesed the game after I won, felt like the other technologies (even simple Gun turrets) are just redundant.
I got my spoon by building the factory so small I never even saw any aliens on the map.
I did that also on normal mode, but before that on Marathon difficulty you will need to have multiple mining sites at least and also spread the power generation. Here comes in another thing I wish would be changed (going a bit offtopic now sorry): the overpoweredness of belts. They simply run for free and completely make railways obsolete in games where you just try to beat the game by launching a rocket.

Post Reply

Return to β€œIdeas and Requests For Mods”