[protomod] Treecapitator (tree falls down) [treecapitator]

Post Reply
User avatar
Oil_boi
Member
Posts: 139
Joined: Mon Jan 28, 2019 13:12
GitHub: oilboi
IRC: oilboi
In-game: oilboi
Contact:

[protomod] Treecapitator (tree falls down) [treecapitator]

by Oil_boi » Post

Here is a mod which makes the trees fall down. Only default:tree, as this was a prototype for crafter.
Here is the download link
treecapitator.zip
(165.94 KiB) Downloaded 49 times
Here is a video: https://youtu.be/5rAYG0WrGvA

license GPLV2
I like to make mods :D
I also made a patreon!

User avatar
Walker
Member
Posts: 1172
Joined: Tue Oct 03, 2017 09:22
In-game: Walker

Re: [protomod] Treecapitator (tree falls down) [treecapitator]

by Walker » Post

O.o

WHAT !???!

the Video looks SOOOOO amazing ...

User avatar
FreeLikeGNU
Member
Posts: 229
Joined: Tue Oct 28, 2014 02:50
GitHub: FreeLikeGNU
IRC: freelikegnu
In-game: FreeLikeGNU

Re: [protomod] Treecapitator (tree falls down) [treecapitator]

by FreeLikeGNU » Post

in the video, it looks great! Can't wait to see this work with more trees (and [more trees] too)!

User avatar
sirrobzeroone
Member
Posts: 279
Joined: Mon Jul 16, 2018 07:56

Re: [protomod] Treecapitator (tree falls down) [treecapitator]

by sirrobzeroone » Post

Im not sure if Oil_boi is still working on this protomod, I made some minor additions:
  • Supports all MTGame default tree types
  • Apples/Snow fall with the relevant trees
  • Changed drop to log,fruit/attached, leaves & sticks and lowered drop frequency on those last two
  • Axe...well tool should take wear, this will increase or decrease dpending on how many logs are in the tree
  • Tree will fall from cut point not base (not 100% yet)
  • Cutting individual tree nodes wont trigger "falling animation"
  • Cutting logs with no leaves wont trigger "falling animation"
I'm still trying to workout how to increase cut down time on the fly...Im also trying to see if the current code attached can support more trees if I can make that work (semi-reliably) I'll upload the code to git.

Consider the attached a sort of work in progress but with what I thought could be handy additions to just about make the code usable on at least base MTGame.
Attachments
treecapitator.zip
(168.06 KiB) Downloaded 18 times

User avatar
sirrobzeroone
Member
Posts: 279
Joined: Mon Jul 16, 2018 07:56

Re: [protomod] Treecapitator (tree falls down) [treecapitator]

by sirrobzeroone » Post

Not perfect but I think its a solid start and looking workable, I think these are the biggest trees so they take a bit of time to fall and they certainly make my computer work a bit. I might be able to fake it a little more and only add every 2nd leaf node to the entity and not worry about adding the branch logs.

The small issue of almost 300 logs per tree might create an over resource issue...but oddly very satisfying to cut down.

Hopefully slightly intresting to a few others as well :)

Image
Attachments
screenshot_20210221_213220.jpg
(227.17 KiB) Not downloaded yet

Termos
Member
Posts: 399
Joined: Sun Dec 16, 2018 12:50

Re: [protomod] Treecapitator (tree falls down) [treecapitator]

by Termos » Post

Nice one.
I bet there shouldn't be much of a problem with felling trees consisting of 300 nodes if done one at a time.

Couldn't resist the association: Trees Come Down
Last edited by Termos on Sun Feb 21, 2021 12:55, edited 1 time in total.

ShadMOrdre
Member
Posts: 755
Joined: Mon Dec 29, 2014 08:07
GitHub: ShadMOrdre
In-game: shadmordre
Location: USA

Re: [protomod] Treecapitator (tree falls down) [treecapitator]

by ShadMOrdre » Post

sirrobzeroone,

This looks nice.

Should be easy to read dimensions from lua schems to auto configure tree data.

Shad
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.

User avatar
sirrobzeroone
Member
Posts: 279
Joined: Mon Jul 16, 2018 07:56

Re: [protomod] Treecapitator (tree falls down) [treecapitator]

by sirrobzeroone » Post

They come down okay just not quiet as smoothly as smaller trees, fairly sure it relates to the trees being built up from a bunch pf parent/child nodes into an entity...or i should say I think thats what it does I havent tinkered with that bit of the code and pulled it apart to understand it, so its blackbox to me at this point.

I'd hoped to use the schematic files to get shapes/dimensions but moretrees uses the L-System to define trees. My very basic understanding off the L-system, is you specify a tree using a bunch of characters which have different meanings (forward, rotate, place etc). Which actually makes things easier right upto the point the engine runs a random seed in someway over the config instructions making i think every tree unique? The api is a bit unclear on that point...the visual inspection Ive done of a number of trees seems to indicate they are all slightly random although they keep there overal shape, anyways great in game lots of unqiue trees...not so great for figuring out tree dimensions.

Anyways I shouldnt complain Oil_boi did all the hardwork Im very much just plugging into his solution....well hotwiring into his soln might be a better analogy not sure what Ive done is as elegant as a plug :)

Termos
Member
Posts: 399
Joined: Sun Dec 16, 2018 12:50

Re: [protomod] Treecapitator (tree falls down) [treecapitator]

by Termos » Post

sirrobzeroone wrote:
Mon Feb 22, 2021 08:49
I'd hoped to use the schematic files to get shapes/dimensions but moretrees uses the L-System to define trees.
An universal solution could be to travel upwards from the initial node trying to recursively find connected wood/leaf nodes within some limits, that way theoretically even hand built trees could be felled.

Are you planning to put it up on git or somewhere?

User avatar
sirrobzeroone
Member
Posts: 279
Joined: Mon Jul 16, 2018 07:56

Re: [protomod] Treecapitator (tree falls down) [treecapitator]

by sirrobzeroone » Post

Termos wrote:
Mon Feb 22, 2021 10:08
sirrobzeroone wrote:
Mon Feb 22, 2021 08:49
I'd hoped to use the schematic files to get shapes/dimensions but moretrees uses the L-System to define trees.
An universal solution could be to travel upwards from the initial node trying to recursively find connected wood/leaf nodes within some limits, that way theoretically even hand built trees could be felled.

Are you planning to put it up on git or somewhere?
Most definitly, Im going to get moretrees working roughly using the current process then upload to git, then look at adjusting how it functions in regards to "finding trees"....or someone else might beat me too it :)

Currently adding the rough tree config in for the rest of moretrees and making sure they at least sort of work 90/95% of the time. I dont mind leaving the odd leaf block behind but Im trying to get all trunk/log blocks.

User avatar
sirrobzeroone
Member
Posts: 279
Joined: Mon Jul 16, 2018 07:56

Re: [protomod] Treecapitator (tree falls down) [treecapitator]

by sirrobzeroone » Post

I've uploaded what I've done so far to git, I havent fully supported all tree types in moretrees. I need to go back and re-write/re-think the trunk identification code. I hadn't reliased some tree types in more trees use all 3 types (single, double and crossed). While doing that I'll clean up the top and bottom trunk position code at the moment its all done via estimating but I can adjust that as I do have bottom pos and top pos, that will stop the trunk falling overshooting.

I uploaded the orginal code from Oil_boi 1st then my zipped code above next then my latest code just to keep the history intact. I did a release version for each so: v0.3 supported trees although some are glitchy and its more a yes it sort of works type concept:
  • Beech Tree
  • Apple Tree
  • Oak Tree
  • Poplar Tree
  • Sequoi Tree
  • Birch Tree
  • Spruce Tree
  • Cedar Tree
  • Willow Tree
I'm off to do a partial re-write now and cleanup to support moretrees more :)

Gundul
Member
Posts: 1221
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia
Contact:

Re: [protomod] Treecapitator (tree falls down) [treecapitator]

by Gundul » Post

This is super cool ! Trees falling like in real and it works. I did not really suspect this to happen so I was super surprised after my first cut that the really fall :D

I do not know if that is only me, but there are no saplings dropped ?
And a mod.conf file would be helpful, so you do not have to rename the mod folder to 'treecapitator' after
cloning from github :)
My servers: Jungle, Lilly in the valley click for my mods

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 2 guests