Natural Tree Expansion Reloaded deprecated


DISCONTINUED - every man and their dog has made a tree spreading mod, so download one of those. Trees spread naturally over time, they'll grow around anywhere the player visits, but only on grass and dirt areas, not concrete or any man-made tiles or sandy deserts etc. This originally was msakuta's mod, I'm simply making it work on newer versions of Factorio. Also I'll add a few new things too.

Tweaks
7 years ago
0.15
6

g More blacklisted surfaces

7 years ago

could you also blacklist asphalt, Safety First and parkingzone (not updated to v15...yet :cof:)?

And, as I reported on natural tree expansion github, on the test_tile function, change the line
if tile.name == names[i] then
for
if string.find(tile.name, names[i]) then

and you can now search for 'namespaces' of tiles, so you can just search if the tile has 5d in his name instead of comparing the tile name with all the possible 5d tiles.
Might seem more inefficient since string.find can be worst on some cases then a equal check but, for example on asphalt mod, you only do check the tile name with asphalt once instead of doing like 30 equal comparatives!

7 years ago

I'll see what I can do and thanks for the info about searching for namespaces, looks like there might be more types of tiles coming in 5dim in the future, so that'll come in handy.

7 years ago

Honestly, the 'right' way of doing it, since now its possible, it changing the string compare to the find function and the list of tiles used for comparison, instead of being hardcoded, being the default value of a mod setting.

This way, the player can just add new tiles for the mods he uses and doesnt force the developer to add support for specific mods.

7 years ago
(updated 7 years ago)

Isn't grass the only place trees should grow on? I can't imagine them spreading on desert either. So instead of blacklisting, i'd suggest to whitelisting growable tiles.

7 years ago

White-listing grass may be the way to go, however, there's an alien biome mod I use that has several non-grass terrains where trees would normally grow. I guess it's just figuring out which list would be shorter, black or white.

New response