Page 1 of 1

[Mod] Jungle Grass [20120712][junglegrass]

PostPosted: Sun Jul 08, 2012 15:03
by VanessaE
This mod is obsolete and will not receive any further updates. Please use Plantlife instead. That mod replaces this mod and two others.

Since recent versions of Minetest no longer contain jungle biomes, and hence no jungle grass, I created this mod to re-add said grass back into the game, with a twist: There are now four different sizes of grasses, all of which yield a single junglegrass object when gathered (so all four sizes may be used where jungle grass is called for). The largest size uses the game's standard jungle grass node, while the others are defined by this mod.

Junglegrass will spawn on dirt, grass, sand, desert sand and the tops of papyrus and cactus (though rarely), and will do so anywhere in the map. Grass on the ground will grow and eventually die (or turn into dry shrubs, in the desert), given enough time.

Now using Perlin noise to manage the growth areas, and slightly better code overall. Effectively, jungle grass now grows in large (but sparse) patches instead of just all over.

License: N/A
Download: N/A

Screenshot:

Image

PostPosted: Sun Jul 08, 2012 16:47
by Topywo
I tried it. Nice straightforward mod!

PostPosted: Sun Jul 08, 2012 21:35
by Gambit
Nature is having its comeback. Nice mod, took long to have standard grass sizes, so this is a plus.

PostPosted: Sun Jul 08, 2012 22:22
by Splizard
Nice mod, I’ve been missing jungle grass :D

PostPosted: Mon Jul 09, 2012 05:26
by Josh
Thankyou VanessaE now we can have junglegrass back! also can it be crafted in mods? for instance you need 2 junglegrass to make a string in the bow mod is this possible can you use the junglegrass for that if you have the bow mod?

PostPosted: Mon Jul 09, 2012 09:00
by Calinou
I like it.
Suggestion for grow_on_surfaces: sand, cacti. ;)

PostPosted: Mon Jul 09, 2012 14:17
by VanessaE
2012-07-09: Added cactus, sand, and desert sand as spawning surfaces. Reduced and tuned the spawn rates a bit to try to balance things out. Made that which spawns on grass, dirt, or sand start out at any size, grow over time, and eventually die off. Limited desert sand to only the first two sizes (the smallest size will grow one step, eventually), which will eventually die and turn into dry shrubs. Only the two smallest sizes can spawn on cactus or papyrus (and they don't grow or die). Fixed slightly off-center smallest size. Fixed selection boxes.

A bit later: tuned the spawn/grow rates a bit more, made the numbers more sane. Added a radius check to limit the density of the spawned grasses.

PostPosted: Mon Jul 09, 2012 15:51
by VanessaE
@Josh: You're quite welcome :-) Yes, you can use it in any mod that calls for jungle grass. Harvesting a piece of any size will (at least at present) yield a single normal junglegrass item which can then be used with whatever normally needs it (e.g. homedecor, mesecons, the throwing mod you mentioned, etc).

PostPosted: Tue Jul 10, 2012 03:19
by Josh
Oh thanks for telling me that VanessaE i was just curious. I might try this mod out!

PostPosted: Wed Jul 11, 2012 03:04
by Josh
I tried it & it works I made a bow & it works fine!

PostPosted: Fri Aug 03, 2012 07:39
by Splizard
Just a suggestion, could you change it so jungle grass only spawns in certain biomes/areas?
I find after awhile junglegrass is absolutely everywhere and this would help prevent that.
You can do this by testing minetest.env:get_perlin in the abm (see my snow mod as an example).

PostPosted: Fri Aug 03, 2012 12:25
by Bas080
Splizard wrote:Just a suggestion, could you change it so jungle grass only spawns in certain biomes/areas?
I find after awhile junglegrass is absolutely everywhere and this would help prevent that.
You can do this by testing minetest.env:get_perlin in the abm (see my snow mod as an example).


My plants mod does exactly that. Shall I add Jungle grass to it? And where is it best to spawn?

PostPosted: Fri Aug 03, 2012 16:51
by VanessaE
Splizard, it sounds like you are using an old version of Jungle Grass. The most recent release added a density control to keep the jungle grass from overrunning your map, and the excess grass will also eventually die off given enough time. You can tune that control if you feel there's too much, as well.

You can tell whether your current copy is old or recent by pointing at a short piece of grass and observing the selection box. If it highlights the whole 1m cube the grass sits in, that's the old version.

PostPosted: Fri Aug 03, 2012 21:28
by Splizard
@VanessaE
ahh thanks It turned out I was using an older version of the mod.
I still think it'd be nice though if junglegrass was its own biome, since junglegrass can grow anywhere on the map.
Therefore junglegrass would only grow in certain areas.

@Bas080 Ill have a look at plants mod.

PostPosted: Fri Aug 03, 2012 21:58
by VanessaE
Well I think of junglegrass as more like "wild grass", since we don't have jungle biomes anymore. At any rate, I'd try the perlin noise thing but I haven't the faintest clue how it works :-)

PostPosted: Fri Aug 03, 2012 22:38
by Splizard
VanessaE wrote:Well I think of junglegrass as more like "wild grass", since we don't have jungle biomes anymore. At any rate, I'd try the perlin noise thing but I haven't the faintest clue how it works :-)

I had the same problem with perlin noise in snow mod :D
Some background info:
http://c55.me/random/2011-07/noisestuff/

Example of the usage inside an ABM 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
function (pos, node, active_object_count, active_object_count_wider)
    local perlin = minetest.env:get_perlin(seedif,3, 0.5, scale)
    --scale is the average size of the noise eg. 150
    --seedif is the difference in seed just give it a number

    --This is how common the biome is.
    --Compare the noise variable with a value from -1 to 1 (> -1 = everywhere,  > 1 = nowhere)
    --eg. > 0.35 is as common as deserts,  > 0.53 is as common as snow
    local noise = perlin:get2d({x=pos.x, y=pos.z})
    if noise > 0.35 then
        --junglegrass stuff here
    end
end

Good idea for when modifying this is to generate a new world every time.

PostPosted: Sat Aug 04, 2012 03:21
by VanessaE
Updated per your suggestions. Now with Perlin noise (TM)! :-)

Also took the time to tune out the random-numbers-inside-ABM stuff, now it uses the ABM's own "chance" parameter for growth control, so it should use slightly less CPU than before.

PostPosted: Mon Sep 03, 2012 11:45
by madarexxx
What about any seeds of jungle grass? Like farming mod by PilzAdam may be?
I'm asking because it is using in pipeworks mod, and as far as i can understand, it will be used for crafting a tubes. I've great experience in minecraft's Buildcraft schemes making, so i know that it will be used more than stack per 15 minutes - there is too few grass in my world!

PostPosted: Mon Sep 03, 2012 15:32
by VanessaE
I don't plan on adding seeds, no. That said, in the most recent junglegrass, it grows in reasonably dense biomes now. There should be plenty. :-)