Renewal


Gives more life to your world by allowing trees to grow and spread.

7 years ago
0.13
6

i Thoughts

7 years ago

Hey Sam,
Glad to see another mod like this.
Aster has something similar, called Natural tree expansion.
How does yours differ?

I'd like to ask for some additional features:

Have trees die now and then. Change living trees into dead trees.
Remove dead trees now and then.
This will make it feel a lot more 'living'. As before have terrain affect growth and death rates.

Have pollution affect growth and death rates, higher pollution will have a lower growth rate and a higher death rate.

Keep up the good work!

7 years ago

I'll admit, I've had this code for over a year now, and I just recently updated and uploaded it. I didn't realize that someone else had uploaded a mod that does something similar until I started browsing the list of mods.

The difference between mine and his?
I would have to say that mine is more configurable and doesn't lock you into using it just as I intended. You can use my mod to allow any entity to spread, if you so desire.
I also believe mine is more lightweight and multiplayer friendly. There's not a lot of calculations to determine whether or not a tree should grow, and tree growth is distributed across ticks to prevent tons of trees popping up at once and causing lag.
I don't limit how many trees can exist, but I have set the defaults so that while playing a regular game of factorio you shouldn't see a massive spike in save size while playing. However, players can choose to adjust those settings to whatever they feel like.

I like the idea of trees dying now and again, but I'll probably implement it in a companion mod to this one.

7 years ago

You had this for a year and did not share!!!

Well I for one would really like to see the trees dying added or be it's own mod.
Thanks SamJBarney.

7 years ago

you wrote:
There's not a lot of calculations to determine whether or not a tree should grow, and tree growth is distributed across ticks to prevent tons of trees popping up at once and causing lag.

when i used the mod, i couldn't confirm this :-(
i had a really large explored area (up to 16km in one direction, save file with decorations 250 MB, without decorations still 95 MB) and once per gameday (maybe 20 hours or something), my FPS/UPS dropped from 60/60 to values between 20/20 and 30/30. during the next few ingame hours the fps/ups slowly recovered to the full 60/60, only to drop back to those low values another 20 ingame hours later. when i checked with F4, i noticed that renewal usually uses only 0.007 or even less, but matching exactly the drops in frame rate those values were well above 30 or 35 (everything above 2 or 3 starts producing noticable lag) and then slowly got lower again while the frame rate recovered. thus it looks to me as if you spread your calculations a bit, but still do most of the work during the first few ingame hour(s) after the daily growing cycle is triggered, and not spread it equally across the whole ingame day.
because of this huge lag, i temporarily have disabled the mod, but hope to be able to use it again soon :-)

another question: after a whole forest has burnt down, does it recover, eg by the burnt trees regenerating or spreading new trees, or do i have to somehow plant new trees myself, or wait until some trees from the next forest biome have "traveled" through a desert (or other tree-less areas) and start repopulating the burnt forest ?

7 years ago
(updated 7 years ago)

Hmmmm.... I'll look into it. It is probably be the number of chunks that it is evaluating. I still need to do some optimization in that department. I might have to go the same route that the other mod did and only evaluate chunks nearer the player, but I hope to avoid that.

When the forest gets burnt to the ground, you're gonna have to wait for it to regrow from someplace else currently.

7 years ago

hehe, yes, it is a really huge map that i explored mostly for testing long distance train connections, and to see how large ore spots become (with default settings on world generation, most spots at 16 km distance from my base have around 20++ million ore, and trains take 5 minutes to go there), thus total size of the explored area may be 300x150 chunks in the center, and then 50x(16000/32) for the path to the distant ore spot, total of 60k+ chunks :-)
when you spread calculations equally around a full ingame day, you need to do "only" 3 chunks per tick on this map ... I wouldn't mind if you cap the calculations per tick to 1 chunk or less: for normal maps you would still have unused ticks, and on huge maps it will take ingame weeks anyway until players go everywhere to check all forests (lots of time between visits to the same area, many new trees even with slower growth :-)

about "forests burnt to the ground": most of the time, it's not only ashes on the ground, but there are still hundreds of black trees. i don't know what type of tree is used for them, but it would be nice if some of those trees could regenerate (switch back to the healthy green tree type) and/or they could spawn new healthy trees ...

New response