Page 3 of 3

PostPosted: Sat Nov 10, 2012 15:58
by sky
i have a idea to upgrade this mod :the idea is different wood plank colour

PostPosted: Thu Dec 06, 2012 10:40
by RAPHAEL
I would be interested in this mod being updated but don't know how to myself.

PostPosted: Sat Dec 29, 2012 22:33
by VanessaE
I've been working on some updates to this mod:

Download: https://github.com/VanessaE/conifers/archive/master.zip
...or browse the code: https://github.com/VanessaE/conifers

Mainly I did this to reduce the CPU usage and slow down the growth of the trees, plus my fork depends on my plantlife library to control where and how the saplings are spawned. I also tried to fix a bug where sometimes the conifers would replace the nodes around them. In this fork, the default spawn altitude is 25m instead of 30, and the spawning and growing ABMs have been given separate config variables.

For now, use the commit messages and read the code to understand what I changed. :-)

PostPosted: Sun Dec 30, 2012 15:11
by dannydark
It would be nice to see this mod updated to use the new L-System treegen.

PostPosted: Sun Dec 30, 2012 15:46
by jojoa1997
dannydark wrote:It would be nice to see this mod updated to use the new L-System treegen.

but aren't conifers straight

PostPosted: Sun Dec 30, 2012 17:58
by Dopium
Some reason i get huge lag with this mod and most my other normal trees turn black. The lag im talking about is without the mod 45-60fps steady, with the mod installed 5-15fps. For me even 15fps is unplayable, its a shame as i really like the mod and waited along time till this was made. I have played with the lua for about the past 6 months or so but nothing helped, also sure its something clashing i just dont know what it is yet.

PostPosted: Sun Dec 30, 2012 19:30
by VanessaE
Low FPS is not the same as lag; your problem is different from that. There is a known bug in the engine where very large trees (or lots of them) can cause the engine to start throwing tons of "out of indexes", "rendering errors may occur" errors, which will slow your FPS to a crawl; if that's what's happening to you, a solution should be coming soon.

That said, with the old version of this mod, actual lag (as in the server appears to hang briefly) does happen as the trees are generated, which is what my fork hopes to solve temporarily. I or RealBadAngel will be adding the code needed to make Conifers use the L-Systems trees soon, which will solve that issue for good.

As for black trees, that's an engine bug that has existed for quite a long time now, and is unrelated to conifers.

PostPosted: Mon Dec 31, 2012 06:32
by Dopium
Thanks for the info VanessaE, you are correct with my first problem i do get fps spikes and with this mod installs the spikes come to a crawl. I actually didnt mean server lag just fps drop that makes it very choppy and sluggish, i know its this mod because when i remove it the frames jump right up. Good to know you guys are aware of what i was saying and making fixes.

The black trees im do see them without the mod however they are very rare, but same deal as the fps drop as soon as i install this mod just about every tree is black. Im going to be installing Linux soon anyway, one reason is for this game as i seen in the past people say windows version can be a bit buggy. Thanks again for the help

PostPosted: Wed Jan 02, 2013 17:24
by VanessaE
The following code will generate several random conifers using the new L-Systems generator. Make a mod of this code plus the conifers textures, give yourself the conifers spawner object, then strike the ground with it (thanks to RealBadAngel for the example for the spawner). Stick to low elevations when testing, there's a bug in the generator that causes the tops to get cut off (it will be fixed soon). I tried to model these after the originals, but I didn't put as much detail into them as they could have had.

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
conifer_tree1={
        axiom="FFFAF[&&-F][&&+F][&&---F][&&+++F]FF",
        rules_a="FF[FF][&&-FBF][&&+FBF][&&---FBF][&&+++FBF]F/A",
        rules_b="[-FB][+FB]",
        trunk="conifers:trunk",
        leaves="conifers:leaves",
        angle=45,
        iterations=7,
        random_level=4,
        thin_trunks=true
}
 
conifer_tree2={
        axiom="FFFAF[&&-F][&&+F][&&---F][&&+++F]FF",
        rules_a="FF[FF][&&-FBF][&&+FBF][&&---FBF][&&+++FBF]F/A",
        rules_b="[-FB][+FB]",
        trunk="conifers:trunk",
        leaves="conifers:leaves_special",
        angle=45,
        iterations=7,
        random_level=4,
        thin_trunks=true
}

minetest.register_craftitem("treetest:conifer", {
            description = "Conifer tree spawner",
            inventory_image = "default_stick.png",
        on_use = function(itemstack, user, pointed_thing)
                    --print(dump(pointed_thing))
                    if pointed_thing.type == "node" then
                            local pos = pointed_thing.above
                                if math.random(1, 2) > 1.5 then
                                    minetest.env:spawn_tree(pos,conifer_tree1)
                                else
                                    minetest.env:spawn_tree(pos,conifer_tree2)
                                end
                    end
            end,
})


minetest.register_node(":conifers:trunk", {
        description = "Conifer trunk",
        tile_images = {
                "conifers_trunktop.png",
                "conifers_trunktop.png",
                "conifers_trunk.png",
                "conifers_trunk.png",
                "conifers_trunk.png",
                "conifers_trunk.png"
        },
        paramtype = "facedir_simple",
        is_ground_content = true,
        groups = {
                tree = 1,
                snappy = 2,
                choppy = 2,
                oddly_breakable_by_hand = 1,
                flammable = 2
        },
        sounds = default.node_sound_wood_defaults()
})
 
minetest.register_node(":conifers:leaves", {
        description = "Conifer leaves",
        drawtype = "allfaces_optional",
        visual_scale = 1.3,
        tile_images = { "conifers_leaves.png" },
        paramtype = "light",
        groups = {
                snappy = 3,
                leafdecay = 3,
                flammable = 2
        },
        drop = {
                max_items = 1,
                items = {
                        {
                                -- player will get sapling with 1/20 chance
                                items = {'conifers:sapling'},
                                rarity = 20,
                        },
                        {
                                -- player will get leaves only if he get no saplings,
                                -- this is because max_items is 1
                                items = {'conifers:leaves'},
                        }
                }
        },
        sounds = default.node_sound_leaves_defaults()
})
 
minetest.register_node(":conifers:leaves_special", {
        description = "Bright conifer leaves",
        drawtype = "allfaces_optional",
        visual_scale = 1.3,
        tile_images = { "conifers_leaves_special.png" },
        paramtype = "light",
        groups = {
                snappy = 3,
                leafdecay = 3,
                flammable = 2
        },
        drop = {
                max_items = 1,
                items = {
                        {
                                -- player will get sapling with 1/20 chance
                                items = {'conifers:sapling'},
                                rarity = 20,
                        },
                        {
                                -- player will get leaves only if he get no saplings,
                                -- this is because max_items is 1
                                items = {'conifers:leaves'},
                        }
                }
        },
        sounds = default.node_sound_leaves_defaults()
})

PostPosted: Wed Jan 02, 2013 18:26
by Inocudom
I too recommend the usage of the new L-Systems tree generator. You can give your trees branches with it.

PostPosted: Wed Jan 02, 2013 18:44
by jojoa1997
But conifers should be straight.

PostPosted: Wed Jan 02, 2013 19:23
by Inocudom
jojoa1997 wrote:But conifers should be straight.


That is true, but there could be a few branches in the rows of pine needles. These rows could be one block long and made up of the horizontal conifer trunk blocks.

PostPosted: Thu Jan 10, 2013 03:05
by VanessaE
I've re-implemented this mod in my moretrees mod:

http://minetest.net/forum/viewtopic.php?id=4394

The output isn't *quite* as varied as the original conifers mod, but it's close, and of course it can be improved easily. Uses L-System trees, so you need a MT build dated 2013-01-08 or later. Uses my plantlife mod to create the spawn biomes.

PostPosted: Thu Mar 28, 2013 16:43
by sfan5-bot
[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