Page 1 of 3

[Mod] TreeCapitator [treecapitator]

Posted: Wed Feb 13, 2013 12:53
by Hybrid Dog
I edited Jeja's timber mod to create this mod.
There I got the name.
It works like the timber mod but it destroys the leaves and the fruits, too. Of course, the leaves won't be dropped - only saplings. Hold shift to avoid its function.

Depends: default
License: GPL, WTFPL for the changes (most of it now)
Download: zip, tar.gz
github: treecapitator

Image
↑ you can only see the animation if your browser supports apng

If you got ideas or found bugs, please tell them to me.

How to install a mod?

Posted: Wed Feb 13, 2013 20:58
by socramazibi
It works well, but does not automatically gather wood.

Thanks, good mod

Posted: Wed Feb 13, 2013 23:13
by socramazibi
Yes, within the inventory. :-)

Posted: Thu Feb 14, 2013 15:36
by socramazibi
Hybrid Dog wrote:
socramazibi wrote:Yes, within the inventory. :-)
finished.
Only exchange treecapitator.drop_items = true with treecapitator.drop_items = false at the init.lua file

Thanks , good mod

Posted: Fri May 24, 2013 16:34
by Mossmanikin
Like this mod!

Posted: Tue Oct 29, 2013 16:45
by ElectricSolstice
Just tried it out with my voltbuild mod. There's one problem. Not all my tree nodes drop the same node as itself. For example, all my rubber tree nodes that have rubber in them just drop a regular rubber tree node when chopped instead of the one with rubber in it and sometimes it'll even drop the item rubber instead of the tree node.

Posted: Fri Nov 01, 2013 17:38
by ElectricSolstice
Hybrid Dog wrote:
ElectricSolstice wrote:Just tried it out with my voltbuild mod. There's one problem. Not all my tree nodes drop the same node as itself. For example, all my rubber tree nodes that have rubber in them just drop a regular rubber tree node when chopped instead of the one with rubber in it and sometimes it'll even drop the item rubber instead of the tree node.
I edited the code. It might work now.
Cool ^_^ Everything appears to be good. Even got the item on a rare occasion instead of the node. Support for your mod has been added to voltbuild's rubber trees.

Re: [Mod] TreeCapitator [treecapitator]

Posted: Fri May 09, 2014 19:44
by Hybrid Dog
New version:
— greatly reduced lag if treecapitator.drop_items isn't used (default) (I noticed while testing that capitating gets
. . executed more times because the trees are dug with minetest.node_dig up to the tree head)
— trees only become capitated if they have leaves (or fruits)
— the leaves (and fruits) don't get removed if they could belong to a tree next to the dug one
— 2 new settings:
. . . . – the drop of leaves not only as saplings can be allowed
. . . . – the default used tree values can be changed
— adding different trees with the same stem node could work now
— the stem needs to be at least 2 nodes heigh (Please tell me if I should change this (or add a settingto enable it))
— the trees of the two mods (sumpf and nyanland) are only registered if these mods are installed


before digging:
Image


after digging:
Image

Re: [Mod] TreeCapitator [treecapitator]

Posted: Fri May 09, 2014 22:29
by Sokomine
This is very useful. Does it work on moretrees as well? (might be asking a bit much though).

It is certainly more fun felling trees with a mod that digs up the rest automaticly. Normal decay of leaves is also too slow on some servers, so this is a definite plus.

Re: [Mod] TreeCapitator [treecapitator]

Posted: Sat May 10, 2014 08:14
by Hybrid Dog
Sokomine wrote:This is very useful. Does it work on moretrees as well? (might be asking a bit much though).

It is certainly more fun felling trees with a mod that digs up the rest automaticly. Normal decay of leaves is also too slow on some servers, so this is a definite plus.
thanks.
I didn't add moretrees' trees yet. I don't know enough about them because this mod is fairly new to my minetest world and on servers I didn't watch them often enough. I don't know exactly how they look like. Maybe every palm tree looks completely similar but I'm not sure.

Re: [Mod] TreeCapitator [treecapitator]

Posted: Sun May 11, 2014 21:15
by gsmanners
The tricky thing about moretrees is a how freakin huge they can get, and the fact that they can sometimes overlap other trees. Then there's all the branch tree nodes. It can be a real pain to harvest the big redwoods.

Re: [Mod] TreeCapitator [treecapitator]

Posted: Tue May 13, 2014 16:31
by Hybrid Dog
gsmanners wrote:The tricky thing about moretrees is a how freakin huge they can get, and the fact that they can sometimes overlap other trees. Then there's all the branch tree nodes. It can be a real pain to harvest the big redwoods.
So most of the moretrees have a straight stem, leaves, but also tree nodes, on the top and can be compared a little bit to the usual apple tree.
I would need to add a new type of tree with configurable stem sizes, min- and maxpoints for the top and an option to enable checking tree nodes around different.

Re: [Mod] TreeCapitator [treecapitator]

Posted: Thu May 15, 2014 13:41
by Sokomine
It would be really great if moretree trees could be harvested like this. Cutting one down for the wood may easily take half an hour. Most players are not considerate enough to do it in a clean way (=take the entire tree down and replant). My traders are one way around that - they "sell" moretrees wood as admin shops. But sometimes, there's a tree just in the way...

Re: [Mod] TreeCapitator [treecapitator]

Posted: Thu May 15, 2014 17:05
by Krock
Hybrid Dog wrote:So most of the moretrees have a straight stem, leaves, but also tree nodes, on the top and can be compared a little bit to the usual apple tree.
I would need to add a new type of tree with configurable stem sizes, min- and maxpoints for the top and an option to enable checking tree nodes around different.
How about a chainsaw-like style which is contain in the technic mod?

Re: [Mod] TreeCapitator [treecapitator]

Posted: Fri May 16, 2014 18:38
by Hybrid Dog
Krock wrote:
Hybrid Dog wrote:So most of the moretrees have a straight stem, leaves, but also tree nodes, on the top and can be compared a little bit to the usual apple tree.
I would need to add a new type of tree with configurable stem sizes, min- and maxpoints for the top and an option to enable checking tree nodes around different.
How about a chainsaw-like style which is contain in the technic mod?
I don't know much about this chainsaw.
I think it doesn't preserve the tree(s) next to the sawn one.

Re: [Mod] TreeCapitator [treecapitator]

Posted: Wed Jun 18, 2014 14:26
by kerikter4of7
Bumping this mod mostly because it's been very useful, but also because I selfishly want updates (still learning lua atm or I'd do it myself). So cool.

Re: [Mod] TreeCapitator [treecapitator]

Posted: Thu Aug 28, 2014 19:21
by sloantothebone
help... im not getting any saplings please help

Re: [Mod] TreeCapitator [treecapitator]

Posted: Thu Aug 28, 2014 19:33
by TenPlus1
The way this mod works it removed a node and places it as a dropped item, it will not give you saplings unless the mod incorporated such a feature to drop them as well...

Re: [Mod] TreeCapitator [treecapitator]

Posted: Sat Aug 30, 2014 04:12
by sloantothebone
well then HOW DO I MAKE IT GIVE ME SAPLINGS?!?

all i need is a small code to give me a random number of saplings every time a tree is treecapitated that i can paste somewhere in the code (where it will execute at the right time)

Re: [Mod] TreeCapitator [treecapitator]

Posted: Sat Aug 30, 2014 22:04
by cx384
sloantothebone wrote:well then HOW DO I MAKE IT GIVE ME SAPLINGS?!?

all i need is a small code to give me a random number of saplings every time a tree is treecapitated that i can paste somewhere in the code (where it will execute at the right time)
you need a new version this was a bug

Re: [Mod] TreeCapitator [treecapitator]

Posted: Fri Oct 17, 2014 17:32
by JPRuehmann
Hello
I get this message, "[treecapitator] Error: Overwriting default:tree went wrong." what is wrong?
Thanks,
JPR

Re: [Mod] TreeCapitator [treecapitator]

Posted: Fri Oct 17, 2014 17:43
by Hybrid Dog
JPRuehmann wrote:Hello
I get this message, "[treecapitator] Error: Overwriting default:tree went wrong." what is wrong?
Thanks,
JPR
This message means that a tree node (e.g. "default:tree") which became overridden to capitate a tree if it's dug (without shift etc.) became overridden by another mod again, so the treecapitator mod uses minetest.register_on_dignode instead of the after_dig_node of trunk nodes, which causes a little bit more lag but not noticeable.

So it's actually just an info message, not an error.
I guess a mod, not default, redefines "default:tree" without keeping its default values (the ones of minetest.registered_nodes["default:tree"]).

Re: [Mod] TreeCapitator [treecapitator]

Posted: Sat Mar 14, 2015 19:06
by mintpick
I updated this mod with sound of a falling tree, taken from there http://www.freesound.org/people/ecfike/sounds/139952/.
EDIT: Now in upstream.

Re: [Mod] TreeCapitator [treecapitator]

Posted: Sun Mar 15, 2015 11:31
by Hybrid Dog
mintpick wrote:I updated this mod with sound of a falling tree, taken from there http://www.freesound.org/people/ecfike/sounds/139952/.
thanks, I added it but disabled it by default because the sound was also played if a single trunk block was dug

Re: [Mod] TreeCapitator [treecapitator]

Posted: Sun Mar 15, 2015 13:04
by mintpick
Hybrid Dog wrote:thanks, I added it but disabled it by default because the sound was also played if a single trunk block was dug
I moved "sound_play" call to "if tree_found then" section. It is fixed sound playing when individual nodes of wood is mined, but when there is at least one another wood node above one mined it still fires the sound.
EDIT:
Ok, finally fixed it by moving "sound_play" call to "if leaf_found then" section.
EDIT2: Removed download, now it's in upstream.