Here is a generic version of the growing mod. I've made it so other mods can use it such as my bread mod which uses it for wheat to grow. Look at the examples for papyrus and cactus on how to us it. The function add_grow_type is called with the first param as the node type you want to grow. The second param is a table of tables. Each inner table has a field for name, odds and max_height. The name field is the surface node name that the growing node must be on top of to grow. The odds field controls how fast it will grow(between 1 and 1000; lower numbers are slower growing) Figure about ((odds/100)/2)% will grow every 5 minutes. The last field, max_height, controls how many nodes high it will grow.
Gitorious Link
[Mod] Growing [growing]
-
- Member
- Posts: 214
- Joined: Thu Nov 17, 2011 06:31
- Location: California, USA
[Mod] Growing [growing]
Last edited by randomproof on Mon Dec 05, 2011 17:17, edited 1 time in total.
-
- Member
- Posts: 103
- Joined: Sat Dec 03, 2011 05:41
- Location: San Francisco, CA
- Contact:
It takes a *long* time for this stuff to grow....did you mean for that to happen?
Also, you should consider using "default:dirt" instead of "dirt" for the node names (same thing for all of the nodenames)
Also, you should consider using "default:dirt" instead of "dirt" for the node names (same thing for all of the nodenames)
Mods: https://gitorious.org/marktraceur-minetest-mods
IRC: marktraceur on freenode
IRC: marktraceur on freenode
-
- Member
- Posts: 214
- Joined: Thu Nov 17, 2011 06:31
- Location: California, USA
Yes, I meant for it to take time to grow, stuff in real life takes time to grow, but it is tweakable to whatever your needs are. I just wanted it to grow slowly enough that I wouldn't really see it. Maybe just a few pieces every time I walked past a certain spot. I also planned this as a base for mods based on farming crops.MarkTraceur wrote:It takes a *long* time for this stuff to grow....did you mean for that to happen?
Also, you should consider using "default:dirt" instead of "dirt" for the node names (same thing for all of the nodenames)
Also I did notice that all the regular stuff got "default:" added to it and I've update the code. I've been pulling from github every morning and he seems to be working hard on getting all this mod stuff up quick, which is great.
Last edited by randomproof on Mon Dec 05, 2011 06:56, edited 1 time in total.
- Hackeridze
- Member
- Posts: 310
- Joined: Thu Nov 03, 2011 13:35
My game: RTMG
GENTOO USER
GENTOO USER
-
- Member
- Posts: 214
- Joined: Thu Nov 17, 2011 06:31
- Location: California, USA
[EE] No License found
[EE] No Dependencies found
Please fix these Mistakes and report this post, a moderator will delete it
If you believe I have made a Mistake contact sfan5
[EE] No Dependencies found
Please fix these Mistakes and report this post, a moderator will delete it
If you believe I have made a Mistake contact sfan5
My source code: gist.github.com/sfan5/4642453
Who is online
Users browsing this forum: No registered users and 7 guests