[Mod] More Trees! [git][moretrees]

GreenGerm
Member
 
Posts: 22
Joined: Sun Jul 07, 2013 15:10

by GreenGerm » Sun Jul 07, 2013 15:14

Could I use the source code for a fruit/nut mod I might start working on?
I'm not GreenGerm from Minecraft and Roblox. I'm XXGreenGermXX on Roblox and DJ_IbMasterX on Minecraft.
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Sun Jul 07, 2013 15:17

GreenGerm wrote:Could I use the source code for a fruit/nut mod I might start working on?
VanessaE wrote:License: WTFPL for the code.
Heh. You can do what the fuck you want to with the code.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Sun Jul 07, 2013 19:59

As Jordach implied, go right ahead and use whatever you want from it.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

GreenGerm
Member
 
Posts: 22
Joined: Sun Jul 07, 2013 15:10

by GreenGerm » Tue Jul 09, 2013 15:39

Jordach wrote:
GreenGerm wrote:Could I use the source code for a fruit/nut mod I might start working on?
VanessaE wrote:License: WTFPL for the code.
Heh. You can do what the fuck you want to with the code.


I tried to un pick the code but I cant find how to spawn the trees. I have a rough idea of how to define the tree shape but it needs clarification. are there and on-line tutorials you recommend I look at?
I'm not GreenGerm from Minecraft and Roblox. I'm XXGreenGermXX on Roblox and DJ_IbMasterX on Minecraft.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Tue Jul 09, 2013 17:51

The Minetest API explains it for the most part, starting at line 1734: https://github.com/minetest/minetest/blob/master/doc/lua_api.txt#L1734

This site will help a little at making a model, but it renders strictly in isometric view, which might throw you off a little: http://www.kevs3d.co.uk/dev/lsystems/

Basically, trees are spawned by calling the API spawn_tree() function, you need only supply a position where the base of the tree will sit, and an L-Systems definition, both in the form of a normal Lua table. See moretrees/tree_models.lua for further examples of the latter. The Minetest engine will build the tree and place it according to the position and model you supplied.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

GreenGerm
Member
 
Posts: 22
Joined: Sun Jul 07, 2013 15:10

by GreenGerm » Tue Jul 09, 2013 18:22

thanks! ;)
I'm not GreenGerm from Minecraft and Roblox. I'm XXGreenGermXX on Roblox and DJ_IbMasterX on Minecraft.
 

GreenGerm
Member
 
Posts: 22
Joined: Sun Jul 07, 2013 15:10

by GreenGerm » Tue Jul 09, 2013 20:28

I was going to ask you how to to make a node have an inventory but the API explains it all, thanks again.
I'm not GreenGerm from Minecraft and Roblox. I'm XXGreenGermXX on Roblox and DJ_IbMasterX on Minecraft.
 

GreenGerm
Member
 
Posts: 22
Joined: Sun Jul 07, 2013 15:10

by GreenGerm » Wed Jul 10, 2013 20:07

sorry to keep on bothering you but i would like some help with why the init.lua script wont work.

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("morefruit:Kiwi", {
    description = "Kiwi",
    drawtype = "plantlike",
    visual_scale = 1.0,
    tiles = {"Morefruit_Kiwi.png"},
    inventory_image = "Kiwi.png",
    paramtype = "light",
    sunlight_propagates = true,
    walkable = false,
    selection_box = {
        type = "fixed",
        fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}
    },
    groups = {fleshy=3,dig_immediate=3,flammable=2,leafdecay=3,leafdecay_drop=1},
    on_use = minetest.item_eat(1),
    sounds = default.node_sound_defaults(),
    after_place_node = function(pos, placer, itemstack)
        if placer:is_player() then
            minetest.set_node(pos, {name="default:apple", param2=1})
        end
    end,
})


minetest.register_node("morefruit:Kiwi_leaves", {
    description = "Kiwi leaves",
    drawtype = "allfaces_optional",
    visual_scale = 1.3,
    tiles = {"Morefruit_Kiwi_leaves.png"},
    paramtype = "light",
    sunlight_propagates = true,    groups = {snappy=7, leafdecay=3, flammable=2, leaves=1},
    drop = {   
items = {
            {
                items = {'morefruit:Kiwi'},            },}           
        }
    },    sounds = morefruit.node_sound_leaves_morefruits(),
})
--    minetest.register_craft({    output = '"morefruit:Kiwi_leaves" 1',    recipe = {
        {'morefruit:leaves'},
    }
}

kiwi_tree={
  axiom="F",
  rules_a="F=C0FF-[C1-F+F+F]+[C2+F-F-F]",
  trunk,         - string  trunk node name
  leaves="morefruit:Kiwi_leaves"
  angle=22,
  iterations=2,
  random_level=0,
  trunk_type="single",
  thin_branches=true,
  fruit="morefruit:Kiwi"
  fruit_chance=10,
  }

also would you recommend any graphic program? I'm currently using Gimp 2.6.
Last edited by GreenGerm on Wed Jul 10, 2013 20:09, edited 1 time in total.
I'm not GreenGerm from Minecraft and Roblox. I'm XXGreenGermXX on Roblox and DJ_IbMasterX on Minecraft.
 

User avatar
Dan Duncombe
Member
 
Posts: 904
Joined: Thu May 09, 2013 21:11

by Dan Duncombe » Wed Jul 10, 2013 20:33

Well, without looking at the code much, I would say it is generally a good idea to give mod node/entity names a lower case name. i.e. 'morefruit:kiwi' not 'morefruit:Kiwi'
Also, I think this may be an error (not sure if it makes a difference).
Try replacing 'tiles = {"Morefruit_Kiwi.png"},'
with 'tiles = { "Morefruit_Kiwi.png" },'

As for graphic programs I often use GreenFish Icon Editor for things like textures up to around 512x512 before it starts to be a laggy program. For awesome built-in textures I would say Serif Drawplus, but it costs ~£200 I think.
GreenGerm wrote:sorry to keep on bothering you but i would like some help with why the init.lua script wont work.

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("morefruit:Kiwi", {
    description = "Kiwi",
    drawtype = "plantlike",
    visual_scale = 1.0,
    tiles = {"Morefruit_Kiwi.png"},
    inventory_image = "Kiwi.png",
    paramtype = "light",
    sunlight_propagates = true,
    walkable = false,
    selection_box = {
        type = "fixed",
        fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}
    },
    groups = {fleshy=3,dig_immediate=3,flammable=2,leafdecay=3,leafdecay_drop=1},
    on_use = minetest.item_eat(1),
    sounds = default.node_sound_defaults(),
    after_place_node = function(pos, placer, itemstack)
        if placer:is_player() then
            minetest.set_node(pos, {name="default:apple", param2=1})
        end
    end,
})


minetest.register_node("morefruit:Kiwi_leaves", {
    description = "Kiwi leaves",
    drawtype = "allfaces_optional",
    visual_scale = 1.3,
    tiles = {"Morefruit_Kiwi_leaves.png"},
    paramtype = "light",
    sunlight_propagates = true,    groups = {snappy=7, leafdecay=3, flammable=2, leaves=1},
    drop = {   
items = {
            {
                items = {'morefruit:Kiwi'},            },}           
        }
    },    sounds = morefruit.node_sound_leaves_morefruits(),
})
--    minetest.register_craft({    output = '"morefruit:Kiwi_leaves" 1',    recipe = {
        {'morefruit:leaves'},
    }
}

kiwi_tree={
  axiom="F",
  rules_a="F=C0FF-[C1-F+F+F]+[C2+F-F-F]",
  trunk,         - string  trunk node name
  leaves="morefruit:Kiwi_leaves"
  angle=22,
  iterations=2,
  random_level=0,
  trunk_type="single",
  thin_branches=true,
  fruit="morefruit:Kiwi"
  fruit_chance=10,
  }

also would you recommend any graphic program? I'm currently using Gimp 2.6.
Last edited by Dan Duncombe on Wed Jul 10, 2013 20:35, edited 1 time in total.
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.
 

User avatar
aracnus
Member
 
Posts: 57
Joined: Wed May 15, 2013 01:09
GitHub: aracnus
IRC: aracnus
In-game: aracnus

by aracnus » Thu Jul 18, 2013 12:35

First, thank you VanessaE for this mod. The landscape is much more full of life (literally!) with it! :-)

In fact the problem that I am having here is because it works a way too good. :-) Much of the time, the trees grow together, with side-by-side trunks. I tried to alter "rarity" and "avoid_radius" on biome_defs.lua, with no results (screenshot below was taken after alter all avoid_radius to, at minimum, 10).

Image

I'm using Minetest 0.4.7 stable with "moreblocks", "moretrees", "plantlife" and "vines" mods (downloaded last week). All trees, except beech are set to "true" on default_settings.txt.

Is there anything I can do to alter this? Or is this a normal behavior?
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Mon Jul 22, 2013 08:00

Minor update: moreblocks is now optional and can be disabled by changing a moretrees config setting.

If you've used moretrees stairs/slabs/etc. on an existing world, you need to update your moretrees_settings.txt file in that world's folder and add:

moretrees.enable_stairsplus = true

...somewhere in that file (say, at the bottom), to enable moreblocks explicitly. It's enabled by default on new maps, as usual though.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Mon Jul 22, 2013 08:04

aracnus, I'm not sure why it's doing that. One or two others have mentioned similar issues, but it always seems to work perfectly for me. It must be some obscure bug in plants_lib since that is what handles actually placing the trees, but I'll be damned if I know what the issue is. Anyone got any ideas?
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
Dan Duncombe
Member
 
Posts: 904
Joined: Thu May 09, 2013 21:11

by Dan Duncombe » Mon Jul 22, 2013 09:47

I never get that, although sometimes with jungles, every single node up to around 20 nodes up is solid leaves or wood, making traversing the jungle difficult.
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Tue Aug 06, 2013 16:35

Would voxel_manip be useful for this mod?
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Tue Aug 06, 2013 18:12

L-system is used via a single API call to generate the trees, which the engine then passes internally to the vmanip code, actually. The slow part is the lighting updates - the trees code still uses "the slow way". This is already a known issue to the dev team, not sure what the plan is for fixing it.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

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

by PilzAdam » Tue Aug 06, 2013 19:21

VanessaE wrote:L-system is used via a single API call to generate the trees, which the engine then passes internally to the vmanip code, actually. The slow part is the lighting updates - the trees code still uses "the slow way". This is already a known issue to the dev team, not sure what the plan is for fixing it.

Its very unlikely that the lighting of the engine is what makes this mod so slow.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Tue Aug 06, 2013 20:25

PilzAdam: hmmmm has already confirmed that the main bottleneck is the lighting code.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

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

by PilzAdam » Tue Aug 06, 2013 20:39

VanessaE wrote:PilzAdam: hmmmm has already confirmed that the main bottleneck is the lighting code.

The bottleneck of the L-System, but there is the whole Lua thing too, its not like that takes no time at all.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Tue Aug 06, 2013 20:47

Well of course my mod takes some time, but I've benchmarked it in detail - something like 90% of the time is spent waiting for the engine to finish executing all of the spawn_tree() calls.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

DarthNihilus
Member
 
Posts: 14
Joined: Fri Aug 02, 2013 10:45

by DarthNihilus » Wed Aug 07, 2013 09:08

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
Item "moretrees:apple_tree_trunk_sideways" not defined.


crafts a box with "unknown texture" on it LMAO
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Sun Aug 25, 2013 12:57

I'm trying to think of ways to easily improve performance until something can be done in the engine.
Is there an easy variable that can be set that just makes all of these trees spawn less frequently? Would that serve as a quick performance improvement? The trees tend to get a little too densely packed in some areas anyway.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Sun Aug 25, 2013 21:13

Just edit biome_defs.lua and turn "rarity" up and "max_count" down on each of the trees you want to edit. You can turn the different types of trees off entirely by editing <minetestfolder>/worlds/<yourworld>/moretrees_settings.txt .
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Tue Sep 10, 2013 04:10

Update: New sapling textures contributed by Tim "Mitroman" Huppertz. License of all textures has been changed to CC-By-SA 3.0 (code remains WTFPL).
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Sun Sep 15, 2013 02:44

Update:

Added an option to spawn saplings instead of fully-grown trees at mapgen time. Such saplings will grow very quickly into a tree, compared to a planted sapling. Defaults to spawning saplings, which will sharply cut down the mapgen lag precipitated by this mod. This comes at the cost of not having the land be fully populated when you first get there, but since you can see where the saplings are, you can plan around them. You can always change it back if the lag doesn't bother you. :-)

Added a custom jungle tree sapling and aliased the default one to that, so that Moretrees will be able to grow its own jungle trees.

Fixed that damn tree density bug.

Be sure you update your copy of plants_lib also. Probably not necessary as it was just a readability update, but do it anyway. :P
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Sun Sep 15, 2013 05:54

Oops, dropped an obsolete alias, but that caused jungle trees to spawn without trunks! :D Fixed by altering the tree model to use the original node instead of the alias. Also fixed a forgotten spawn interval/chance for some of the new "_ongen" saplings.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Mon Sep 16, 2013 01:16

I took the sequoia leaves texture and used it in my bushes mod because it looks perfect on the bushes. I see that the textures are cc-by-sa 3.0. I believe that means I need to give credit to who created the sequoia leaf texture. Do you know who did, or better yet, can you just give me the blurb I need to put in my license file? I just improved the bushes mod and want to make it available.

Thanks much!
Last edited by Neuromancer on Mon Sep 16, 2013 01:17, edited 1 time in total.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Mon Sep 16, 2013 02:56

Most likely I got it from RealBadAngel since he and I worked on this mod together, but damned if I can remember for sure! :D

I think just mentioning it came from moretrees is sufficient.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

Ol
New member
 
Posts: 3
Joined: Mon Sep 02, 2013 11:55

by Ol » Thu Sep 19, 2013 11:42

This mod is just beautiful, thank you !

I crafted a coconut + drinking glass + old used bronze axe. And I get : coconut pieces, a glass of coconut milk and my old axe replaced by a was brand one !

I haven't tried with another axe. But the result is surprising, is it a bug ?

Using official 0.4.7 stable + latest Moretrees.

Ol
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Thu Sep 19, 2013 22:53

It's not so much a bug as my not knowing how to restore the axe to its former status. I don't think there's a way to do this from a craft recipe.

Anyone know how to fix this?
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

Jouster27
Member
 
Posts: 117
Joined: Fri Mar 29, 2013 14:16

by Jouster27 » Thu Oct 03, 2013 14:28

VanessaE wrote:It's not so much a bug as my not knowing how to restore the axe to its former status. I don't think there's a way to do this from a craft recipe.

Anyone know how to fix this?


You could skip the crafting idea and just hit it with the axe and let it drop the mats.
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 37 guests

cron