HybridDog / treecapitator

the TreeCapitator mod for minetest
Other
17 stars 11 forks source link

seems to be missing some ethereal trees #13

Open nonchip opened 4 years ago

nonchip commented 4 years ago

missing trees from ethereal:

I tried to fix that in the "mod compatibility layer" of my own modpack, but it feels like this is something treecapitator should fix internally (because ethereal is supported), and also i didn't make much progress:

because i don't quite get the algorithms you used and what the various settings do, I tried to do sakura by just copying the ethereal:acacia definition (which is of type "moretrees") and changing the blocks, which then complained about "no ps found".

changed the type to "default" and now it at least tries to mine a few trunk blocks above the one i hit, but the wider branching pieces don't get detected correctly.

HybridDog commented 4 years ago

it feels like this is something treecapitator should fix internally (because ethereal is supported)

I didn't write the code for ethereal trees and I'd prefer that those are moved to the ethereal mod. I mainly put tree definitions into this mod when I cannot put them in the original mod; e.g. I doubt that minetest_game would accept treecapitator definitions.

because i don't quite get the algorithms you used and what the various settings do, I tried to do sakura by just copying the ethereal:acacia definition (which is of type "moretrees") and changing the blocks, which then complained about "no ps found".

changed the type to "default" and now it at least tries to mine a few trunk blocks above the one i hit, but the wider branching pieces don't get detected correctly.

I have tried to document the tree types and parameters. The "moretrees" type is very simple. It uses a Flood Fill to find the tree nodes, so it works for uncommon tree shapes such as trees with a 5 m radius stem. The "default" type corresponds to a tree with a straight stem and a head which fits well into a cuboid. If the tree has branches which consist of the same nodes than the straight main stem, you can add these nodes to the fruits field. The stem_height_min value can be adjusted when the tree contains long vertical branches which consist of trunk nodes. The treecapitator mod finds neighbouring trees and removes only the nodes of the current tree which do not belong to a neighbouring tree. Adding trunk nodes to the fruits field and adjusting stem_height_min when needed can avoid false neighbour tree detection. The other two types "acacia" and "palm" use algorithms which are specialized for the acacia and palm tree and probably work bad for other tree types. I hope that this helps a bit.