Page 1 of 1

How do we make flowers reproduce is minetest 5.0?

PostPosted: Sun Jun 09, 2019 19:05
by damongang
We used to be able to plant flowers in an L shape on dirt/grass and they would spread. How do we make that work in minetest 5.0?
Thanks.
I like that feature but my wife REALLY likes that feature.

Re: How do we make flowers reproduce is minetest 5.0?

PostPosted: Mon Jun 10, 2019 09:20
by Topywo
Without modding or changing the minetest_game mods, remove all grasses and ferns from the area where you want to spread the flowers.

Re: How do we make flowers reproduce is minetest 5.0?

PostPosted: Fri Jun 14, 2019 14:01
by Wuzzy
Are you talking about Minetest Game?

The flower spread rules have been changed. In 0.4.17 and before, it was:

First, a definition: “flora node”. A “flora node” is any node that is either a flower or any grass (i.e. Grass, Dry Grass, Jungle Grass, Marram Grass). See also: https://wiki.minetest.net/Group:flora
There is not actually a rule for spreading flowers, but a rule for spreading both grass and flowers. It's the same rule for both of them

Each flora node can spawn a new flora node. First, it must be on a block on which saplings would grow (like dirt or dirt with grass). Then, there must be enough light (light level > 13).
Now, a new flora node is spawned if and only if there are at most 4 flora nodes (including itself) in a cube of 9×9×9 around it, with the flower that is being checked by Minetest in the center. The new flora node will be spawned randomly in that 9×9×9 cube.

The new rule since 5.0.0 is almost the same, but the new limit is a maximum of 3 flora nodes now.

This also explains why your “L” shape doesn't work anymore, those are now too many flowers packed together.


Oh: I'm not sure if the cube size in 0.4.17 was actually 9×9×9, but it sure is 9×9×9 in 5.0.0.

TL;DR:
To spread, a flower must:
  • Be on Dirt with Grass or another sapling-friendly node
  • In light (light level >=13)
  • Around an area of 9×9×9, not have more than 3 flowers or grasses (including itself)

Re: How do we make flowers reproduce is minetest 5.0?

PostPosted: Sat Jun 15, 2019 01:32
by paramat
Speaking as a MTGame core dev, the flower spreading system is really bad, i can think of far better ways to do it. However it probably can't be changed because so many games and mods depend on MTGame being the way it is.

Re: How do we make flowers reproduce is minetest 5.0?

PostPosted: Sat Jun 15, 2019 02:15
by ShadMOrdre
In my lib_ecology mod, I had recently considered using node_timers to "play" conways game of life. Each timer event, I would check for how many of that node type was near; if too few, death from isolation; if just enough, either spawn new plant or blossom; and if too many, death by overcrowding. This is very similar to what exists already, just using node timers instead of abms. This should work for plants, grass, flowers, mushrooms, saplings and trees, because they all essentially use the same logic. In lib_ecology, they mostly use the same code.