Page 1 of 1

Edit Mapgen V6 Trees?

PostPosted: Wed Oct 12, 2016 03:03
by isaiah658
I've been messing around some with the mapgen and understand how to change most things for both V6 and other mapgen versions, but I can't figure out how to edit the trees in V6. The only thing I could find was the trees.lua file in default folder. That doesn't seem to affect mapgen though. I'm guessing it is used only for growing trees from saplings. How should I go about editing the trees in V6?

Re: Edit Mapgen V6 Trees?

PostPosted: Wed Oct 12, 2016 10:03
by Krock
The trees are the same in all mapgens and can be found in this file: src/treegen.cpp#L33
This is a file from the source code, this means you'll have to build Minetest on your machine with the changes to get different trees.

Re: Edit Mapgen V6 Trees?

PostPosted: Wed Oct 12, 2016 19:38
by paramat
> The only thing I could find was the trees.lua file in default folder. That doesn't seem to affect mapgen though. I'm guessing it is used only for growing trees from saplings.

Correct.
Mgv6 mapgen trees are hardcoded in that file linked above.

However trees in all other mapgens are added by the default mod as schematics using the Biome API, which means you can write a mod (depending on default and flowers) that does 'minetest.clear_registered_decorations()', then re-register all decorations (including flowers) but with your changes and using your own schematics.
Create your tree schematic files in this way https://github.com/minetest-mods/saveschems