[Mod] Hard Trees [hardtrees]

Post Reply
User avatar
octacian
Member
Posts: 597
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

[Mod] Hard Trees [hardtrees]

by octacian » Post

Hard Trees [hardtrees]

License: MIT (see LICENSE)

hardtrees is a mod with a very simple concept. Trees are made harder, meaning you cannot punch them with your fists. Instead, you must find rocks on cobble, stone, mossy cobble, or sandstone, and make the appropriate rock tool, in this case, an axe. However, to make an axe you must have sticks, for which there are two methods to optain. When leaves are broken then have a 1 out of 13 chance to drop not only the broken node, but also a stick. Once every day, sticks also drop from trees to the group. The mod uses overrides to make trees unbreakable by hand, and also modifies leaves so that they drop the needed items. Leaves are also modified to act as ladders, so you can climb through the tops of trees.

Mod Support
hardtrees supports all trees within the moretrees and default mod as of July 7th, 2016. To add support for more trees, use the code below modified to fit the new tree and save it in hardtrees/override.lua.

Code: Select all

-- override tree node
hardtrees.override.tree("modname:treename")
-- override leaves
hardtrees.override.leaf("modname:leavesname", "modname:saplingname")
treename is the name of the tree node so that hardtrees can override it to not be `oddly_breakable_by_hand`. The leavesname is the name of the leaves node which is modified to drop sticks. saplingname is required to allow the leaves to drop both sticks and saplings.

Configuration

Within the mod directory, is conf.txt within which you can specify many of the settings used within this mod. You can also create world specific configuration files by placing another conf.txt file within the world directory. Remember, you do not have to specify all settings in either configuration file, however, only those that you would like to change from the default.
Spoiler

Code: Select all

-- hardtrees config --

-- require tools to break trees (default: true)
require_tools = true

-- rock tools (default: true)
rock_tools = true

-- generate rocks (default: true)
gen_rocks = true

-- distance between rocks (default: 5)
-- gen_rocks must be true
rock_distance = 5

-- rock generation interval (default: 60)
-- gen_rocks must be true
rock_interval = 60

-- rock abm chance (default: 13)
-- gen_rocks must be true
rock_chance = 13

-- generate sticks (default: true)
gen_sticks = true

-- distance between stick and tree (default: 3)
-- gen_sticks must be true
stick_distance = 3

-- stick generation interval (default: 1440.0)
-- gen_sticks must be true
stick_interval = 1440.0

-- stick abm chance (default: 50)
-- gen_sticks must be true
stick_chance = 50
Download
View source on Github

Installation

Download a ZIP of the mod from Github and unzip it, or clone the repository from the command line. Then, the resulting directory in the mods directory of your local Minetest installation. On Linux this is usually ~/.minetest/mods. You do not have to ensure that the installed mod directory is named hardtrees unless it is your personal preference to do so.

You can also install this mod in the worldmods folder inside any world directory to use it only within one world.

For further information or help see: http://wiki.minetest.com/wiki/Installing_Mods
Last edited by octacian on Sat Mar 10, 2018 03:41, edited 9 times in total.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod] Hard Trees [git] [hardtrees]

by Don » Post

I did something similar in a subgame I am making. It makes more sense!
+1
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

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

Re: [Mod] Hard Trees [0.2] [hardtrees]

by Sokomine » Post

How do you handle tree nodes placed by the player? Sometimes digged trees are used as building material. It would be very annoying if they had to be digged again the same way as the original tree had to be cut.
A list of my mods can be found here.

User avatar
octacian
Member
Posts: 597
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

Re: [Mod] Hard Trees [0.2] [hardtrees]

by octacian » Post

Sokomine wrote:How do you handle tree nodes placed by the player? Sometimes digged trees are used as building material. It would be very annoying if they had to be digged again the same way as the original tree had to be cut.
As mentioned in the first post, I change the group to not be oddly_breakable_by_hand. This means after they are places you still have to use an axe. I hadn't thought about doing it any different. Would it really be that bad? If so, I will probably just register a new set of nodes with the "unbreaking" property that when placed use the breakable tree nodes. (This could be configured via the conf.txt file also.)
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Mod] Hard Trees [0.2] [hardtrees]

by Byakuren » Post

Sokomine wrote:How do you handle tree nodes placed by the player? Sometimes digged trees are used as building material. It would be very annoying if they had to be digged again the same way as the original tree had to be cut.
If I'm building with wood in a normal game I use an axe to clear mistakes anyway, because breaking wood or tree by hand is slow already. If the player has obtained tree in this mod then they should have access to an axe.
Every time a mod API is left undocumented, a koala dies.

User avatar
Hamlet
Member
Posts: 766
Joined: Sat Jul 29, 2017 21:09
IRC: H4mlet
In-game: Hamlet
Location: Lombardy, Italy

Re: [Mod] Hard Trees [0.2] [hardtrees]

by Hamlet » Post

Is this mod still available somewhere?
The provided links seem to be unreachable, and there isn't on GitHub.
My repositories: Codeberg.org | My ContentDB's page

User avatar
octacian
Member
Posts: 597
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

Re: [Mod] Hard Trees [0.2] [hardtrees]

by octacian » Post

Hamlet wrote:Is this mod still available somewhere?
The provided links seem to be unreachable, and there isn't on GitHub.
Right now, no, it isn't. I can't seem to convert my old git repositories from my old personal server, so it's looking as though I'll have to rewrite this from scratch. I hope to do that in a few days though, so will post when it is available again.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

User avatar
Hamlet
Member
Posts: 766
Joined: Sat Jul 29, 2017 21:09
IRC: H4mlet
In-game: Hamlet
Location: Lombardy, Italy

Re: [Mod] Hard Trees [0.2] [hardtrees]

by Hamlet » Post

octacian wrote:Right now, no, it isn't. I can't seem to convert my old git repositories from my old personal server, so it's looking as though I'll have to rewrite this from scratch. I hope to do that in a few days though, so will post when it is available again.
Thank you, this mod is a must have for a survival game.
My repositories: Codeberg.org | My ContentDB's page

drkwv
Member
Posts: 102
Joined: Thu Jun 28, 2012 13:48
GitHub: aa6

Re: [Mod] Hard Trees [0.2] [hardtrees]

by drkwv » Post

Download links are broken. Could you please fix it?

diriel
Member
Posts: 23
Joined: Wed Jun 01, 2016 23:00

Re: [Mod] Hard Trees [0.2] [hardtrees]

by diriel » Post

Looking forward to this mod!

User avatar
octacian
Member
Posts: 597
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

Re: [Mod] Hard Trees [0.2] [hardtrees]

by octacian » Post

I apologize to all who were interested in this mod for the delay in getting it back up. However, I am happy to say that I did find a copy of the original source. With this in mind, I will get this mod back up within the next week, along with some improvements to the original code in hopes of making it compatible with as many mods as possible with as little code as possible.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

User avatar
TheReaperKing
Member
Posts: 531
Joined: Sun Nov 22, 2015 21:36
Contact:

Re: [Mod] Hard Trees [0.2] [hardtrees]

by TheReaperKing » Post

That is great news! I love the concept behind this mod!

Should it really be 1/13 chance because wouldn't you be able to find a branch to break? It doesn't really matter so much, just a thought.

Thanks for all of your hard work, I absolutely love your mods!
-Mike
Become A Real Life Superhero - http://SuperheroHill.com
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids

User avatar
octacian
Member
Posts: 597
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

Re: [Mod] Hard Trees [hardtrees]

by octacian » Post

Update!

This mod is now available once again, as I've pushed the old code onto Github. I haven't really made any changes to the code yet, besides updating some meta-related files (e.g. license year). One notable thing is that I have switched this mod to a rolling release, meaning that there is no longer any versioning or particular release cycle. Why? Well, not only is this mod small, but there isn't much more that can be done with it anyways.

I may do a little more work on this yet to clean up the code further and possibly to expand support, but for now, it supports everything that it did before.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

User avatar
j0j0n4th4n
Member
Posts: 249
Joined: Tue Jan 26, 2021 06:45

Re: [Mod] Hard Trees [hardtrees]

by j0j0n4th4n » Post

Do you plan on support other mods which add trees like Ethereal?
cdb_894a100ddd76

Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 15 guests