Automatically Growing Plants

Post Reply
Grubler
Member
Posts: 98
Joined: Wed Nov 06, 2019 03:01
In-game: Grubler

Automatically Growing Plants

by Grubler » Post

I have a bit that was given to me, and fiddled with, that makes plants appear on their own on grass blocks and stuff. Like saplings and grass and flowers and it could be even more, but I haven't gone that far, and I was thinking with this it could go so far as to have early stages of flowers, and like the grass goes up in stages the flowers could too, and then somehow make it so when you step on things it goes away or down stages, and with it growing on its own, then if it comes back then it may be something that wasn't there before.

So I wanted to maybe make a thread about this idea, because it seemed pretty interesting and has maybe potential to include more than just the basics perhaps. And I seem to not be the most prolific of script writer, or the most knowledgeable. So throwing it out there if it may be an idea that may be interesting to mess with to anyone. Maybe somehow I can find a way to share what I have if anyone may want it.

Might be interesting in a situation where plants get harvested up and bare land is left. Or maybe if things get burned down. With grass growing, it can maybe make it if a fire happens it has a lot of things to spread to. Other mod ideas may follow, and whatnot.

#plants #growing #automatic
Last edited by Grubler on Mon Feb 07, 2022 01:43, edited 1 time in total.

User avatar
Linuxdirk
Member
Posts: 3218
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Automatically Growing Plants

by Linuxdirk » Post

For flowers I created this mod (mainly for Minetest Game) some time ago but never officially released it. You can plant and harvest flowers but it is not automated but faster than waiting for flowers to grow naturally.

https://gitlab.com/4w/afgrow

Needs optimization, though. Also it's quite buggy with the timings not working as intended.

Grubler
Member
Posts: 98
Joined: Wed Nov 06, 2019 03:01
In-game: Grubler

Re: Automatically Growing Plants

by Grubler » Post

Does it have any stages of growth before becoming a fully grown flower? Maybe I can try making some myself. Man it feels like trying to do this sort of thing takes a lot of effort.

User avatar
Linuxdirk
Member
Posts: 3218
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Automatically Growing Plants

by Linuxdirk » Post

Nope, it just grows the default flowers when the timer triggers the function.

Grubler
Member
Posts: 98
Joined: Wed Nov 06, 2019 03:01
In-game: Grubler

Re: Automatically Growing Plants

by Grubler » Post

I am not sure if I might be able to tell the game to only make grass grow if there is enough light in the location. That would be good. And stuff like that.

User avatar
Mantar
Member
Posts: 585
Joined: Thu Oct 05, 2017 18:46
Contact:

Re: Automatically Growing Plants

by Mantar » Post

Exile does that, the relevant bit is to check the result of

Code: Select all

minetest.get_natural_light(pos, 0.5)
to see how bright it will be on that spot at noon. (ie, timeofday = 0.5)
Lead dev of Exile, git repo: https://codeberg.org/Mantar/Exile

Grubler
Member
Posts: 98
Joined: Wed Nov 06, 2019 03:01
In-game: Grubler

Re: Automatically Growing Plants

by Grubler » Post

I am not sure how I would be able to use that. And if anyone knows how to fix some things and would like to make it happen, I don't know how to make it trample flowers and stuff, either. It does grass just fine, but doesn't work for flowers or other smaller plants. Maybe I could try to look at the code for the trampling of crops in other mods. Not sure.

And then I think I saw a cow on a server eat the grass, and maybe some animals can be made to eat the plants so it adds that element. Maybe they could make tracks and trample things as well. Otherwise, over time some areas around where you are most often may get very covered in lots of plants.

Grubler
Member
Posts: 98
Joined: Wed Nov 06, 2019 03:01
In-game: Grubler

Re: Automatically Growing Plants

by Grubler » Post

Was looking into the farming mod and trying to see if I could somehow make the plants that I have appearing randomly on grass act like the plants in the farming mod with how they don't grow in low light and maybe could even have stages of growth work better, but I couldn't seem to figure out a way to make it happen. Not sure what I am even doing on this site. Not sure anything of interest may come of all this.

User avatar
j0j0n4th4n
Member
Posts: 249
Joined: Tue Jan 26, 2021 06:45

Re: Automatically Growing Plants

by j0j0n4th4n » Post

For the plants to have stages I think the farming mod would be the way to go, you could make a couple of your own flowers being 'farmable' in dirt and grass and then use aliases to the minetest flowers. I guess that could work.
And for the stepping part, you could check the node under the player from time to time and if its a flower node it recede one stage.
cdb_894a100ddd76

Grubler
Member
Posts: 98
Joined: Wed Nov 06, 2019 03:01
In-game: Grubler

Re: Automatically Growing Plants

by Grubler » Post

I already have it able to make the flowers grow in stages and reduce stages when stepped on. I may just be missing how to make them not grow in the darkness.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests