[Mod] TreeCapitator [treecapitator]

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

[Mod] TreeCapitator [treecapitator]

by Hybrid Dog » Post

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?
Attachments
treecapitator.png
treecapitator.png (67.51 KiB) Viewed 3273 times
Last edited by Hybrid Dog on Wed Aug 17, 2016 08:47, edited 7 times in total.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

socramazibi
Member
Posts: 81
Joined: Mon Jan 28, 2013 12:29
Location: España

by socramazibi » Post

It works well, but does not automatically gather wood.

Thanks, good mod
Forgive my English, but it is the translator of google.My Spanish.
My mod:
Pictures wool 1.0 3x5 , Charcoal+Textures , Map

socramazibi
Member
Posts: 81
Joined: Mon Jan 28, 2013 12:29
Location: España

by socramazibi » Post

Yes, within the inventory. :-)
Forgive my English, but it is the translator of google.My Spanish.
My mod:
Pictures wool 1.0 3x5 , Charcoal+Textures , Map

socramazibi
Member
Posts: 81
Joined: Mon Jan 28, 2013 12:29
Location: España

by socramazibi » Post

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
Forgive my English, but it is the translator of google.My Spanish.
My mod:
Pictures wool 1.0 3x5 , Charcoal+Textures , Map

User avatar
Mossmanikin
Member
Posts: 599
Joined: Sun May 19, 2013 16:26
Location: where we don't speak english.

by Mossmanikin » Post

Like this mod!

Noob 4 life!
My stuff

ElectricSolstice
Member
Posts: 90
Joined: Tue Aug 20, 2013 02:00

by ElectricSolstice » Post

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.

ElectricSolstice
Member
Posts: 90
Joined: Tue Aug 20, 2013 02:00

by ElectricSolstice » Post

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.

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [Mod] TreeCapitator [treecapitator]

by Hybrid Dog » Post

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

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] TreeCapitator [treecapitator]

by Sokomine » Post

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.

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [Mod] TreeCapitator [treecapitator]

by Hybrid Dog » Post

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.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

gsmanners
Member
Posts: 159
Joined: Fri Jan 10, 2014 21:37

Re: [Mod] TreeCapitator [treecapitator]

by gsmanners » Post

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.

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [Mod] TreeCapitator [treecapitator]

by Hybrid Dog » Post

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.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] TreeCapitator [treecapitator]

by Sokomine » Post

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...

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] TreeCapitator [treecapitator]

by Krock » Post

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?
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [Mod] TreeCapitator [treecapitator]

by Hybrid Dog » Post

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.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

kerikter4of7
Member
Posts: 16
Joined: Sat Jun 07, 2014 19:22

Re: [Mod] TreeCapitator [treecapitator]

by kerikter4of7 » Post

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.

sloantothebone
Member
Posts: 26
Joined: Thu Aug 28, 2014 18:42

Re: [Mod] TreeCapitator [treecapitator]

by sloantothebone » Post

help... im not getting any saplings please help

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: [Mod] TreeCapitator [treecapitator]

by TenPlus1 » Post

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...

sloantothebone
Member
Posts: 26
Joined: Thu Aug 28, 2014 18:42

Re: [Mod] TreeCapitator [treecapitator]

by sloantothebone » Post

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)

User avatar
cx384
Member
Posts: 653
Joined: Wed Apr 23, 2014 09:38
GitHub: cx384
IRC: cx384

Re: [Mod] TreeCapitator [treecapitator]

by cx384 » Post

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
Can your read this?

User avatar
JPRuehmann
Member
Posts: 334
Joined: Fri Mar 21, 2014 21:40
Location: Germany
Contact:

Re: [Mod] TreeCapitator [treecapitator]

by JPRuehmann » Post

Hello
I get this message, "[treecapitator] Error: Overwriting default:tree went wrong." what is wrong?
Thanks,
JPR

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [Mod] TreeCapitator [treecapitator]

by Hybrid Dog » Post

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"]).

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

mintpick
New member
Posts: 9
Joined: Fri Feb 20, 2015 18:16

Re: [Mod] TreeCapitator [treecapitator]

by mintpick » Post

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.
Last edited by mintpick on Fri Apr 03, 2015 09:59, edited 2 times in total.

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [Mod] TreeCapitator [treecapitator]

by Hybrid Dog » Post

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

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

mintpick
New member
Posts: 9
Joined: Fri Feb 20, 2015 18:16

Re: [Mod] TreeCapitator [treecapitator]

by mintpick » Post

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.
Last edited by mintpick on Fri Apr 03, 2015 10:00, edited 1 time in total.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 18 guests