[Mod] Bamboo [bamboo]

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

[Mod] Bamboo [bamboo]

by Krock » Mon Jan 13, 2014 13:21

Bamboo mod
Image
Contents:
Bamboo: It grows rarely and next to water. It grows 10 nodes high and requires soil/dirt and light to grow. Developer hint: Bamboo grows faster, when its high is 3-6 nodes.

Bamboo nodes: Craft 3 bamboo into a bamboo block, you can craft bamboo blocks into simple stairs. The 2 settings in init.lua allow the support of stairsplus (moreblocks).

Craftings: Crafting guides are helpful.
Depends: default
License: WTFPL (for everything)
Download: Master *.zip from GitHub, Browse source codes

Are you in a "It was better before"-phase, get it here --v
Attachments
bamboo_v2.zip
(2.96 KiB) Downloaded 268 times
Last edited by Krock on Thu Mar 20, 2014 17:57, edited 1 time in total.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

jenova99sephiros
Member
 
Posts: 158
Joined: Sat Aug 03, 2013 15:16
In-game: Jenova

by jenova99sephiros » Mon Jan 13, 2014 13:59

Oh!
cute mod!
I english google translator
 

User avatar
philipbenr
Member
 
Posts: 1665
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: WisdomFire or philipbenr

by philipbenr » Tue Jan 14, 2014 01:33

Looks nice. I was trying to make a mod like this, but I guess you beat me to it.
"The Foot is down!"
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

by Sokomine » Tue Jan 14, 2014 03:27

There's at least one other bamboo mod out there. Seems to be a popular plant :-)

It would be nice to provide a working download link. Mediafire is not a good place to place mods. The best (and most likely easiest) solution would be to just attach the mod as a .zip archive to your post.
A list of my mods can be found here.
 

User avatar
philipbenr
Member
 
Posts: 1665
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: WisdomFire or philipbenr

by philipbenr » Tue Jan 14, 2014 04:50

Sokomine wrote:There's at least one other bamboo mod out there. Seems to be a popular plant :-)

It would be nice to provide a working download link. Mediafire is not a good place to place mods. The best (and most likely easiest) solution would be to just attach the mod as a .zip archive to your post.

Well, I use mediafire, because I started that way and you cant remove forum attachments as of yet (that's what I heard.) I might add mine to dropbox.

Edit: This one doesn't require plants_lib
Last edited by philipbenr on Tue Jan 14, 2014 04:50, edited 1 time in total.
"The Foot is down!"
 

User avatar
LionsDen
Member
 
Posts: 525
Joined: Thu Jun 06, 2013 03:19

by LionsDen » Tue Jan 14, 2014 05:13

I think that it has been changed and the original poster can remove uploaded files now. Not 100% positive on this but I think it's the case.
 

Markov
New member
 
Posts: 6
Joined: Sat Jan 11, 2014 06:59

by Markov » Tue Jan 14, 2014 08:12

Maybe you will add smthg like bamboo karpet or bamboo wood? Because now It's unuseful mode.
But realy nice O~O
 

Markov
New member
 
Posts: 6
Joined: Sat Jan 11, 2014 06:59

by Markov » Tue Jan 14, 2014 08:15

I've made firewood mode (wood makes from 3 trees and burn for 1000 sec every, just to make fireplace from furance) and you can make something like it. I'm new here, so I can't start new topic. Maybe later I upload it to Github.
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

by Krock » Tue Jan 14, 2014 17:41

Released v2
- Added 2 new slabs
- Added file in the first post as attachment

Image

Thanks for your answers, I noticed, there's the following problem:
The bamboo does not generate in worlds automatically and needs to get planted first.

Well, I think the bamboo comes from far far away, therefore you need to import it first with
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
/giveme bamboo:bamboo 99


I can add more nodes or dependencies, give suggestions :)
Last edited by Krock on Tue Jan 14, 2014 17:58, edited 1 time in total.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

by Sokomine » Wed Jan 15, 2014 04:27

Thanks for making it available for download! That bamboo hut doesn't look bad. I'm not sure yet if the texture will work on large areas, but it might give some color to buildings.
A list of my mods can be found here.
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Wed Jan 15, 2014 12:24

Krock wrote:Released v2
- Added 2 new slabs
- Added file in the first post as attachment

http://i.imgur.com/rP7HYnv.png

Thanks for your answers, I noticed, there's the following problem:
The bamboo does not generate in worlds automatically and needs to get planted first.

Well, I think the bamboo comes from far far away, therefore you need to import it first with
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
/giveme bamboo:bamboo 99


I can add more nodes or dependencies, give suggestions :)
Hm, I could add the natural spawning a pull reque.... oh wait, you use mediafire
Last edited by Evergreen on Wed Jan 15, 2014 12:25, edited 1 time in total.
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

by Krock » Wed Jan 15, 2014 13:30

Evergreen wrote:spawning a pull reque.... oh wait, you use mediafire

Well, I see you like GitHub - there's it.
If there should be an automatic spawn for bamboo, then it should be rare because there aren't many diffrent places where it grows. (naturally)

EDIT: added a rotated bamboo block, have fun!
Last edited by Krock on Wed Jan 15, 2014 13:32, edited 1 time in total.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Wed Jan 15, 2014 13:33

Krock wrote:
Evergreen wrote:spawning a pull reque.... oh wait, you use mediafire

Well, I see you like GitHub - there's it.
If there should be an automatic spawn for bamboo, then it should be rare because there aren't many diffrent places where it grows. (naturally)

EDIT: added a rotated bamboo block, have fun!
Right, bamboo isn't very common. I'll try using the papyrus spawning code and make it more rare.
EDIT: I'll do it when I get back home in the afternoon
EDIT #2: If you want 6d facedir, take the logs in minetest_game for example. (paramtype2 = "facedir", is required)
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
minetest.register_node("default:tree", {
        description = "Tree",
        tiles = {"default_tree_top.png", "default_tree_top.png", "default_tree.png"},
        paramtype2 = "facedir",
        groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
        sounds = default.node_sound_wood_defaults(),
        on_place = minetest.rotate_node
})
Last edited by Evergreen on Wed Jan 15, 2014 13:37, edited 1 time in total.
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Thu Jan 16, 2014 02:28

Added ongen for bamboo(did this in about 10 minutes, so tweak it to what you want):
https://github.com/SmallJoker/bamboo/pull/1

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
@@ -213,3 +213,47 @@ minetest.register_abm({

                 end

         end,

 })

+

+--Mapgen Stuff

+function make_bamboo(pos, size)

+  for y=0,size-1 do

+    local p = {x=pos.x, y=pos.y+y, z=pos.z}

+    local nn = minetest.get_node(p).name

+    if minetest.registered_nodes[nn] and

+      minetest.registered_nodes[nn].buildable_to then

+      minetest.set_node(p, {name="bamboo:bamboo"})

+    else

+      return

+    end

+  end

+end

+

+minetest.register_on_generated(function(minp, maxp, seed)

+  if maxp.y >= 2 and minp.y <= 0 then

+    -- Generate Bamboo

+    local perlin1 = minetest.get_perlin(354, 3, 0.7, 100)

+    -- Assume X and Z lengths are equal

+    local divlen = 8

+    local divs = (maxp.x-minp.x)/divlen+1;

+    for divx=0,divs-1 do

+    for divz=0,divs-1 do

+      local x0 = minp.x + math.floor((divx+0)*divlen)

+      local z0 = minp.z + math.floor((divz+0)*divlen)

+      local x1 = minp.x + math.floor((divx+1)*divlen)

+      local z1 = minp.z + math.floor((divz+1)*divlen)

+      -- Determine bamboo amount from perlin noise

+      local bamboo_amount = math.floor(perlin1:get2d({x=x0, y=z0}) * 45 - 20)

+      -- Find random positions for Bamboo based on this random

+      local pr = PseudoRandom(seed+1)

+      for i=0,bamboo_amount do

+        local x = pr:next(x0, x1)

+        local z = pr:next(z0, z1)

+        if minetest.get_node({x=x,y=1,z=z}).name == "default:dirt_with_grass" and

+            minetest.find_node_near({x=x,y=1,z=z}, 1, "default:water_source") then

+          make_bamboo({x=x,y=2,z=z}, pr:next(2, 4))

+        end

+      end

+    end

+    end

+  end

+end)


Also, will make a pull request which adds support for 6d facedir, support for stairsplus(optional via settings.txt), and an abm to replace all the old horizontal bamboo with the new 6d bamboo(also optional via settings.txt).

PS:
Change the number 45 to something lower (rarer) or higher (less rare) in this piece of code:
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
local bamboo_amount = math.floor(perlin1:get2d({x=x0, y=z0}) * 45 - 20)
Last edited by Evergreen on Thu Jan 16, 2014 02:32, edited 1 time in total.
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

by Krock » Thu Jan 16, 2014 17:59

Evergreen wrote:Added ongen for bamboo(did this in about 10 minutes, so tweak it to what you want)

...

Also, will make a pull request which adds support for 6d facedir, support for stairsplus(optional via settings.txt), and an abm to replace all the old horizontal bamboo with the new 6d bamboo(also optional via settings.txt).

...


Thanks for your help but it simply generated "over" the papyrus node, so I reworked a faster system. It's not a good one but works well.

To the 2nd point: I don't know if a 6d facedir is even needed on this simple node, I think it also has positive things having 2 diffrent rotated nodes :)
Last edited by Krock on Thu Jan 16, 2014 18:00, edited 1 time in total.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Thu Jan 16, 2014 19:20

Krock wrote:
Evergreen wrote:Added ongen for bamboo(did this in about 10 minutes, so tweak it to what you want)

...

Also, will make a pull request which adds support for 6d facedir, support for stairsplus(optional via settings.txt), and an abm to replace all the old horizontal bamboo with the new 6d bamboo(also optional via settings.txt).

...


Thanks for your help but it simply generated "over" the papyrus node, so I reworked a faster system. It's not a good one but works well.

To the 2nd point: I don't know if a 6d facedir is even needed on this simple node, I think it also has positive things having 2 diffrent rotated nodes :)
You're welcome! About the generation, I just had to do it quickly, didn't have time for cleanup.
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 


Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 8 guests

cron