[mod] plant aging library [0.1b] [plantaging]

Belgac
Member
 
Posts: 57
Joined: Wed Aug 08, 2012 15:27

[mod] plant aging library [0.1b] [plantaging]

by Belgac » Sat Aug 18, 2012 16:07

Description:
This is a plant aging library to make plants grow and mature.
This could be used and included in a lot of mods
It's a modified version of randomproof's growing with improvements of ironzorg
The mod was then updated by Casimir(official maintainer) to 0.4.2
I separated the growing system from the actual plant list and improved it.

License:
WTFPL applies to all parts.

Screenshots
if someone as a clever idea for screenshots of a library just share it

Features:
  • plantaging function to declare
    • plants
    • speed of the abm
    • surfaces on wich they grow
    • per surface
      • light level needed
      • growing and maturing odds
      • maturing to node depending on minimal height

Future features:
  • one abm per plant kind (first thing to do)
  • fertilizing integration (not instant fertilizing like in minecraft but soil amelioration)
  • unified seed finding
  • multi-node non vertical plants integration (ie: plants with trunk and leaves => trees)
  • external surface adding
  • plant genetics
  • -non horizontal surface integration
  • -...

Compatible mods:

Future compatible mods:
(will be forked to comply with plantaging (and maybe reintegrated in main if author accept))

Downloads:
  • 0.1b
    Changelog:
    • some code tweaking
    • created separated grow and maturing odds (main odds overwrite this)
  • 0.1a
    Changelog:
    • corrected the fact that height could be calculated twice in some cases
  • 0.1

How-to:
just use this function:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
plantaging (plantname, plantinterval, plantchance, plantsurfaces)

where
  • plantname = plant node
  • plantinterval = abm interval
  • plantchance = abm chance
  • plantsurfaces is a table that contains:
    • name = name of the surface node
    • odds = on 1000 (overwrite specific growing or maturing odds*) (optional if specific odds set)
    • growing_odds = odds of growing*(optional if global odds set)
    • maturing_odds = odds of maturing*(optional if global odds set)
    • minimal_light = minimal light to grow(optional if no growing)
    • max_height = max height of the plant (put to 1 if just maturing)
    • maturing_height = minimal heigth to mature (optional)
    • matured_node = node it matures to (optional)


* = after 0.1b


Supressed properties:

  • prior to 0.1b:
    • maturing = boolean telling if plant is maturing (optional)


Any suggestion or critic is welcome!
Last edited by Belgac on Thu Aug 30, 2012 15:23, edited 1 time in total.
Contributor: Plant aging library
Creator: (soon)
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sat Aug 18, 2012 16:13

This cannot replace my mod because your mod just add new nodes at the top of other nodes. My mod is real growing where the nodes are replaced by a new node.
 

Belgac
Member
 
Posts: 57
Joined: Wed Aug 08, 2012 15:27

by Belgac » Sat Aug 18, 2012 16:15

This cannot replace my mod because your mod just add new nodes at the top of other nodes. My mod is real growing where the nodes are replaced by a new node.


I'm not sure I really understand what you mean. I think this is covered by the maturing part. You just have to declare the new node in matured_node. what's the difference?

edit 3: the objective is not to replace but to integrate ;)
edit 2: and use maturing= true, maturing_height=1 and declare the new node as a plant if there are further maturing stages
edit: and thank you for the answering speed
Last edited by Belgac on Sat Aug 18, 2012 16:43, edited 1 time in total.
Contributor: Plant aging library
Creator: (soon)
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sat Aug 18, 2012 17:53

Belgac wrote:
This cannot replace my mod because your mod just add new nodes at the top of other nodes. My mod is real growing where the nodes are replaced by a new node.


I'm not sure I really understand what you mean. I think this is covered by the maturing part. You just have to declare the new node in matured_node. what's the difference?

edit 3: the objective is not to replace but to integrate ;)
edit 2: and use maturing= true, maturing_height=1 and declare the new node as a plant if there are further maturing stages
edit: and thank you for the answering speed

Ahh i see. But you have to define a abm for each state of growth?
 

Belgac
Member
 
Posts: 57
Joined: Wed Aug 08, 2012 15:27

by Belgac » Sat Aug 18, 2012 17:55

yes indeed. I'm kind of new to programming. why is that a problem?
Contributor: Plant aging library
Creator: (soon)
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sat Aug 18, 2012 17:55

Belgac wrote:yes indeed. I'm kind of new to programming. why is that a problem?

Many abms -> slow
Last edited by PilzAdam on Sat Aug 18, 2012 17:55, edited 1 time in total.
 

Belgac
Member
 
Posts: 57
Joined: Wed Aug 08, 2012 15:27

by Belgac » Sat Aug 18, 2012 17:57

oh ok didn't think of that. I will add this to future improvements. Thank you very much for your constructive criticism :)
Contributor: Plant aging library
Creator: (soon)
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sat Aug 18, 2012 18:38

Belgac wrote:oh ok didn't think of that. I will add this to future improvements. Thank you very much for your constructive criticism :)

I have now a function that adds plant growing so you dont need to add that to your libary: https://github.com/PilzAdam/farming/blob/master/init.lua#L3
 

Belgac
Member
 
Posts: 57
Joined: Wed Aug 08, 2012 15:27

by Belgac » Sat Aug 18, 2012 21:42

OK so in fact you made your own function as i sugested in your thread. Nice work. I will still integrate this kind of stuff to my library so it is able to do it if someone needs it in another mod.

And by the way what's the advantage of making inverted if conditions with return???
Last edited by Belgac on Sat Aug 18, 2012 21:55, edited 1 time in total.
Contributor: Plant aging library
Creator: (soon)
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sun Aug 19, 2012 10:51

Belgac wrote:OK so in fact you made your own function as i sugested in your thread. Nice work. I will still integrate this kind of stuff to my library so it is able to do it if someone needs it in another mod.

And by the way what's the advantage of making inverted if conditions with return???

Because otherwise the whole block under the if would be in the if block and you have to insert a new tab. With inverted ifs and return it looks cleaner to me.
 

User avatar
Bas080
Member
 
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080

by Bas080 » Tue Aug 21, 2012 11:05

Maybe you can support my plants mod too.

I would like to see some plants grow to a tree. Or flowers blossoming at a certain time.
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Tue Aug 21, 2012 11:41

Bas080 wrote:Maybe you can support my plants mod too.

I would like to see some plants grow to a tree. Or flowers blossoming at a certain time.

I will add a function to my mod that adds tree growing.
 

Belgac
Member
 
Posts: 57
Joined: Wed Aug 08, 2012 15:27

by Belgac » Thu Aug 23, 2012 17:26

Bas080 wrote:Maybe you can support my plants mod too.

I would like to see some plants grow to a tree. Or flowers blossoming at a certain time.


Yes sure. (the library is quite easy to use)

I'm a little busy with my exams right now but i will rework this in september.

The trees are planned, but i'm thinking of a more evolved trees system with a branch system.

For the flowers, i am working on it too, i was thinking of plants growing, flowering and spreading and including a small genetics system (ie: for colors)
Last edited by Belgac on Thu Aug 23, 2012 17:26, edited 1 time in total.
Contributor: Plant aging library
Creator: (soon)
 

Belgac
Member
 
Posts: 57
Joined: Wed Aug 08, 2012 15:27

by Belgac » Thu Aug 23, 2012 17:29

PilzAdam wrote:
Bas080 wrote:Maybe you can support my plants mod too.

I would like to see some plants grow to a tree. Or flowers blossoming at a certain time.

I will add a function to my mod that adds tree growing.


I love how you hunt for ideas for your mod on my topic ;)
Contributor: Plant aging library
Creator: (soon)
 

User avatar
Bas080
Member
 
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080

by Bas080 » Tue Aug 28, 2012 01:31

The trees are planned, but i'm thinking of a more evolved trees system with a branch system.

For the flowers, i am working on it too, i was thinking of plants growing, flowering and spreading and including a small genetics system (ie: for colors)


You are very ambitious! I like your ideas and that you are sharing them, but many of what you are describing requires allot of png's. Thus drawing... :S.

Also my experience is, and what i have seen from others is when the scope of the project is to big they never tend to finish the project. What is the essence of your mod?

The idea you gave when reading your ideas was to make a plant that has some genetic differences to eachother. For example one grows on that node the other hangs from a tree and another one has thorns and one is climable. But when you combine the seeds of the plants you get hybrids. For every plant you add you do have to make all the versions of the hybrids. That ofcourse would be neatest.

You could also do the visual genetic differences. That way when you look at a field you first see two colonies. One red and the other blue and when they grow near each other you might get some purple versions. etc.

plz checkout my jungletree mod. Before I start making the mod i first build a tree in minetest for inspiration this is what they looked like...

Image
 

Belgac
Member
 
Posts: 57
Joined: Wed Aug 08, 2012 15:27

by Belgac » Thu Aug 30, 2012 15:10

The base idea of this mod was to make a simple to use library that could manage all plants in the minetest world and that was easy to use for other modders (ie: no need to use all capacities for each plant). I know the scope of this mod is large but i think i'm commited enough :).

You're right about the png's that's why i chose to separate the plant library from the actual mods so people more gifted than me could do mods using the capacities of the library. (yeah i suck at drawing :/)

The idea behing genetics is just as you described it, creating hybrids. That's a really large project so i will first implement the base capacities for plants and then expand it through genetics.

Your color example is perfectly describing what i mean as the first genetic step.
The demo mod for genetics will be an alternate flower mod where you start with the three base colors + black and white and from there get flower for every color existing in unified dies (but just by genetic mixing and then cooking the flowers i don't like the vessel dependencies and i find powder dies are enough) .

Your jungle trees look awesome and i hope my mod will allow this kind of things.

As said before this mod as a large scope. Si i will focus on steps. I'm actually converting the function so it creates only one abm per plant type. i'm also plannig to make the lib ligther by just puting abm's on the plant base.

I'm also working on a web based plant mod creator so everybody could add plants without coding knowledge (the hope here is this will attract designers)

Another thing that is essential to my mod is that plants could grow to different plant kinds based on surfaces they grow on. That's the actual reason for the multiple abm's approach that is used for now. (the idea came from hydro subject in this forum)

I hadn't planned the fact that plants don't only grow from the ground but also could hang from a cliff, i will add this to the future plans.

Your questions and suggestions are really motivating me to work on this thanks a lot.

Sorry for my english.

(people can also ask me questions and post suggestions in dutch, german and french if they want to, I will translate them and answer in both english and the language you use)
Last edited by Belgac on Thu Aug 30, 2012 15:24, edited 1 time in total.
Contributor: Plant aging library
Creator: (soon)
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Fri Aug 31, 2012 13:14

PilzAdam wrote:
Bas080 wrote:Maybe you can support my plants mod too.

I would like to see some plants grow to a tree. Or flowers blossoming at a certain time.

I will add a function to my mod that adds tree growing.

This is maybe a bit late but: https://github.com/PilzAdam/farming/commit/b3cc4e6c91a1245eca1d40a8440744c4a2f56c8f
 

User avatar
JPRuehmann
Member
 
Posts: 334
Joined: Fri Mar 21, 2014 21:40

by JPRuehmann » Fri Apr 04, 2014 19:34

Links are broken
 

User avatar
mimilus
Member
 
Posts: 75
Joined: Thu Mar 06, 2014 09:08
GitHub: mimilus
IRC: Mimilus

by mimilus » Fri Apr 04, 2014 23:02

minetest 0.4.9
Ubuntu 12.04
 

User avatar
JPRuehmann
Member
 
Posts: 334
Joined: Fri Mar 21, 2014 21:40

by JPRuehmann » Sat Apr 05, 2014 19:59

Thanks,
JPR
 


Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 41 guests

cron