[Mod] Hard Trees Redo [0.2.0] [hard_trees_redo]

Do you use this mod?

Yes, I like it.
3
100%
No, I'm not interested.
0
No votes
 
Total votes : 3

User avatar
Hamlet
Member
 
Posts: 695
Joined: Sat Jul 29, 2017 21:09
Location: Lombardy, Italy
GitHub: h4ml3t
IRC: H4mlet

[Mod] Hard Trees Redo [0.2.0] [hard_trees_redo]

by Hamlet » Mon Apr 23, 2018 12:18

Prevents digging trees by punching them.

Version: 0.2.0
Source code's license: EUPL v1.2 or later.
Textures and locale files' license: CC BY-SA 4.0 International or later.

Dependencies: default, farming (found in Minetest Game)
Supported: bonemeal, intllib, fallen_nodes, fallen_trees

Description:
Leaf nodes will drop sticks, dirt/cobble/stone/etc. nodes will drop rocks.
Wooden axe and wooden pick will be removed.
Stone tools can be crafted using sticks and rocks (or flints).
Rocks can be used to craft cobblestone nodes, recipe:

R = Rock

RRR
RRR
RRR

9 rocks give 1 cobblestone node.

These game mechanics have been ported from Voxelands.


Downloads:
Archives: .zip .tar.gz
Source: GitHub


Installation
Unzip the archive, rename the folder to hard_trees_redo and place it in
../minetest/mods/

If you only want this to be used in a single world, place it in
../minetest/worlds/WORLD_NAME/worldmods/

GNU+Linux - If you use a system-wide installation place it in
~/.minetest/mods/

For further information or help see:
https://wiki.minetest.net/Help:Installing_Mods
Last edited by Hamlet on Sat Nov 09, 2019 15:34, edited 3 times in total.
 

User avatar
Hamlet
Member
 
Posts: 695
Joined: Sat Jul 29, 2017 21:09
Location: Lombardy, Italy
GitHub: h4ml3t
IRC: H4mlet
 

ThorfinnS
Member
 
Posts: 214
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [Mod] Hard Trees Redo [0.1.1] [hard_trees_redo]

by ThorfinnS » Fri Nov 08, 2019 15:33

I'm not sure how to code it, but until you figure out how to add drops to nodes instead of overriding them, you might want to make a note that this is incompatible with TenPlus1's bonemeal. Only mention it because it seems that's a really popular mod in the server list I looked at. And it won't work with ours.

Someone added pebbles and sticks just lying on the ground (nature or forest_litter or something) that I always meant to port over with oddly_breakable_by_hand. That's a possible answer to making it compatible, if someone remembers what that was called.
 

User avatar
Hamlet
Member
 
Posts: 695
Joined: Sat Jul 29, 2017 21:09
Location: Lombardy, Italy
GitHub: h4ml3t
IRC: H4mlet

Re: [Mod] Hard Trees Redo [0.1.1] [hard_trees_redo]

by Hamlet » Fri Nov 08, 2019 20:02

ThorfinnS wrote:I'm not sure how to code it, but until you figure out how to add drops to nodes instead of overriding them, you might want to make a note that this is incompatible with TenPlus1's bonemeal. Only mention it because it seems that's a really popular mod in the server list I looked at. And it won't work with ours.


As far as I know, once that you have defined and registered a node the only way to modify its behavior is to override it.

E.g.:
I register a stone that when dug does not drop anything, the node's definition will not have the field
Code: Select all
drops = {}

Bob decides that it should drop dollars, thus it adds the field
Code: Select all
drops = {"bob_mod:dollar"}

by using an overrider.

Anyway, thanks for the heads up: the conflicting code is here for BoneMeal and here for HardTreesRedo.

I will add support for BoneMeal's drop, maybe someone growing forests underground might use it.


ThorfinnS wrote:Someone added pebbles and sticks just lying on the ground (nature or forest_litter or something) that I always meant to port over with oddly_breakable_by_hand. That's a possible answer to making it compatible, if someone remembers what that was called.


Uh I can't remember either. I saw that in RealTest, but to be honest I don't like the look of it - I mean, it's realistic to find rocks laying on the ground (I'm thinking about rivers' sides, especially) but for some reason I can't get to like them.
 

User avatar
TenPlus1
Member
 
Posts: 2645
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Hard Trees Redo [0.1.1] [hard_trees_redo]

by TenPlus1 » Sat Nov 09, 2019 11:57

Thorfinss: here's a little code snippet to insert item drops into a current node without overriding the existing ones:

viewtopic.php?f=9&t=9741&p=361200#p361200
 

User avatar
Hamlet
Member
 
Posts: 695
Joined: Sat Jul 29, 2017 21:09
Location: Lombardy, Italy
GitHub: h4ml3t
IRC: H4mlet

Re: [Mod] Hard Trees Redo [0.2.0] [hard_trees_redo]

by Hamlet » Sat Nov 09, 2019 15:36

Released v0.2.0

Added:
- Support for Minetest Game v5.x new nodes.
- Support for Bonemeal.

Changed:
- License changed to EUPL v1.2.
- mod.conf set to follow Minetest v5.x specifics.
- Textures have been optimized with optipng.
- Code cleaning.

Removed:
- Support for Minetest Game v0.4.x
- ../doc/
 

Nordal
Member
 
Posts: 76
Joined: Mon Jul 30, 2018 15:46
Location: Germany
GitHub: Nordall

Re: [Mod] Hard Trees Redo [0.2.0] [hard_trees_redo]

by Nordal » Mon Nov 25, 2019 17:08

I like your 5.x safe updated version.
Just an idea: Stones drop rock pieces still when you have metal or mese pickaxe/axe and don't need them anymore. Thus while mining you constantly have to get rid of them to avoid an overflow of your inventory. Maybe it's possible to stop dropping rocks if the player has a pickaxe tool in his inventory. I think sand and dirt is not digged too often. But digging stone is the main activity.
 

Nordal
Member
 
Posts: 76
Joined: Mon Jul 30, 2018 15:46
Location: Germany
GitHub: Nordall

Re: [Mod] Hard Trees Redo [0.2.0] [hard_trees_redo]

by Nordal » Tue Nov 26, 2019 11:30

Code: Select all
local picks = {"default:pick_steel", "default:pick_mese", "default:pick_diamond", "default:pick_obsidian"}
local inv = minetest.get_inventory({type="player", name="main"})
for i, p in ipairs(picks) do
    if inv:contains_item(p)
        --do not drop rocks => remove from drop-list
         break
    end
end

If you used the code proposed by TenPlus1, which only adds drops to nodes so that they can drop more than one thing instead of overriding, it would be easy to remove the rocks from the drops-lists of the nodes stone and dirt. If you leave sand droping rocks, player still has rocks available in a transitional phase from stone to metal. Otherwise one had to constantly test the inventory and add or remove rock dropping. If I think right.
 

User avatar
Hamlet
Member
 
Posts: 695
Joined: Sat Jul 29, 2017 21:09
Location: Lombardy, Italy
GitHub: h4ml3t
IRC: H4mlet

Re: [Mod] Hard Trees Redo [0.2.0] [hard_trees_redo]

by Hamlet » Tue Nov 26, 2019 18:25

Remember that you can turn rocks into cobblestone nodes: placing 9 rocks in the crafting grid will give you 1 cobblestone.

99 rocks = 11 cobblestone nodes.

Or simply /pulverize while holding the stack.

I am not sure that preventing the rocks drop if the inventory contains a steel or better pick would be a good idea: following this reasoning, one might not want cobblestone drops as well - I have chests filled of cobblestone.

I'd rather change from the Craft Guide to the Unified Inventory, because the latter has a trash-can slot that can be used to delete unwanted items without using the /pulverize command; this would be useful both for rocks and cobblestone stacks.

What do you think?
 

Nordal
Member
 
Posts: 76
Joined: Mon Jul 30, 2018 15:46
Location: Germany
GitHub: Nordall

Re: [Mod] Hard Trees Redo [0.2.0] [hard_trees_redo]

by Nordal » Wed Nov 27, 2019 08:57

Remember that you can turn rocks into cobblestone nodes: placing 9 rocks in the crafting grid will give you 1 cobblestone.

99 rocks = 11 cobblestone nodes.

Or simply /pulverize while holding the stack.

Yes, of course, these are possible ways. If you have a levelled up diamond pickaxe the inventory is just very fast full of rocks and cobblestone. From another point of view, rocks are even very realistic. Particularly concerning digging earth or mining. :)

I just thought about an elegant programmatically solution. The linked code snippet of TenPlus1 pointing out a different way of handling drops made me start thinking. I'm working on a more complex mod than bunkbed. I will need clay in the sense of loam for it and I want to run it together with darkage and hard_trees_redo. Darkage makes the default:clay to powder clay. So I just thought where can I get the loam from: As a dirt's drop would make sense. (Or somehow as an additional special sort of dirt. But that is far too complicated for me.)

I am not convinced of unified inventory. Since MT 5.x it shows items belonging into a creative mode inventory guide though you're in survival mode. And VanessaE has handed over maintaining the mod. sfinv based craftign guides are actively improved at the moment. This is just my impression. And I prefer the look and feel of sfinv. And backpacks. But I admit a trash slot can be an advantage. :)
 

User avatar
Hamlet
Member
 
Posts: 695
Joined: Sat Jul 29, 2017 21:09
Location: Lombardy, Italy
GitHub: h4ml3t
IRC: H4mlet

Re: [Mod] Hard Trees Redo [0.2.0] [hard_trees_redo]

by Hamlet » Wed Nov 27, 2019 12:54

Nordal wrote:I just thought about an elegant programmatically solution. The linked code snippet of TenPlus1 pointing out a different way of handling drops made me start thinking. I'm working on a more complex mod than bunkbed. I will need clay in the sense of loam for it and I want to run it together with darkage and hard_trees_redo. Darkage makes the default:clay to powder clay. So I just thought where can I get the loam from: As a dirt's drop would make sense. (Or somehow as an additional special sort of dirt. But that is far too complicated for me.)


Oh thanks for mentioning this: I've just discovered your bunkbed mod; some months ago I was pondering about adding a mod that added a campfire and a bedroll, for exploration or simply to skip nights in the game's early stages. Then I forgot about it, I'll keep an eye on your mod. :)

Nordal wrote:I am not convinced of unified inventory. Since MT 5.x it shows items belonging into a creative mode inventory guide though you're in survival mode. And VanessaE has handed over maintaining the mod. sfinv based craftign guides are actively improved at the moment. This is just my impression. And I prefer the look and feel of sfinv. And backpacks. But I admit a trash slot can be an advantage. :)


Uh I wasn't aware of those issues; about the look and feel, I agree: I prefer sfinv over UI.

About the trash slot, I did a little research and I've found that there are a couple of mods that add a trashcan item in-game, but no inventory slot. Except one coded by prestidigitator, which I used to make a mod: link.

I've tested it on Minetest Game, it works properly.
Unfortunately it does not work in Hamlet's Quest, no idea why: my knowledge of formspecs is zero.
If you have the time and the will, you could give it a look and see if it can be adapted for today's Minetest Game's inventory's look, and perhaps for Hamlet's Quest - I would surely add that utility!
 

ThorfinnS
Member
 
Posts: 214
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [Mod] Hard Trees Redo [0.2.0] [hard_trees_redo]

by ThorfinnS » Wed Nov 27, 2019 17:45

It's been a while, so I wouldn't swear to it, but I think bell07 turned in a PR to add trash can to the smart_sfinv.

What is the creative/survival thing about UI? Do you mean that items that don't have a craft recipe are still listed?
 

User avatar
Hamlet
Member
 
Posts: 695
Joined: Sat Jul 29, 2017 21:09
Location: Lombardy, Italy
GitHub: h4ml3t
IRC: H4mlet

Re: [Mod] Hard Trees Redo [0.2.0] [hard_trees_redo]

by Hamlet » Wed Nov 27, 2019 18:03

ThorfinnS wrote:It's been a while, so I wouldn't swear to it, but I think bell07 turned in a PR to add trash can to the smart_sfinv.


Just downloaded and tried, no trashcan slot yet. However thanks for mentioning it, I'll keep an eye on it!
 

ThorfinnS
Member
 
Posts: 214
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [Mod] Hard Trees Redo [0.2.0] [hard_trees_redo]

by ThorfinnS » Fri Nov 29, 2019 18:42

Hamlet wrote:
ThorfinnS wrote:Someone added pebbles and sticks just lying on the ground (nature or forest_litter or something) that I always meant to port over with oddly_breakable_by_hand. That's a possible answer to making it compatible, if someone remembers what that was called.


Uh I can't remember either. I saw that in RealTest, but to be honest I don't like the look of it - I mean, it's realistic to find rocks laying on the ground (I'm thinking about rivers' sides, especially) but for some reason I can't get to like them.
Found it. There are several, but this has the best looking ones I found, and I'm pretty sure the one I was thinking of.

VanessaE's plantlife modpack, specifically components cavestuff and trunks.

https://gitlab.com/VanessaE/plantlife_modpack

https://forum.minetest.net/viewtopic.php?f=11&t=3898

Just replace "cracky" and "choppy"with "dig_immediate" for the twigs and pebbles, and it operates pretty much how I'd like. Maybe the pebbles are too common to be a replacement for cobble, IMO, they are not common enough to be 9:1.
 

User avatar
Hamlet
Member
 
Posts: 695
Joined: Sat Jul 29, 2017 21:09
Location: Lombardy, Italy
GitHub: h4ml3t
IRC: H4mlet

Re: [Mod] Hard Trees Redo [0.2.0] [hard_trees_redo]

by Hamlet » Fri Nov 29, 2019 19:18

ThorfinnS wrote:VanessaE's plantlife modpack, specifically components cavestuff and trunks.

https://gitlab.com/VanessaE/plantlife_modpack

https://forum.minetest.net/viewtopic.php?f=11&t=3898

Just replace "cracky" and "choppy"with "dig_immediate" for the twigs and pebbles, and it operates pretty much how I'd like. Maybe the pebbles are too common to be a replacement for cobble, IMO, they are not common enough to be 9:1.


Oh thanks for the info, I will check it for sure.
I did some tests with node decorations, that is, a blue cube to be randomly scattered on surface; I wanted to see if I could find a good perlin noise to implement surface rocks - my flat map got covered with blue nodes.
I guess I'll have to apply myself far better than what I did. :)

Speaking of pebbles... they could be good for a slingshot. No, surely not a cobble node for 9 pebbles, not even a gravel node I think.
I'd like rocks to be throw-able, to give players a cheap ranged weapon - well maybe not that good for a server, but for a local game it would be realistic.
 

Nordal
Member
 
Posts: 76
Joined: Mon Jul 30, 2018 15:46
Location: Germany
GitHub: Nordall

Re: [Mod] Hard Trees Redo [0.2.0] [hard_trees_redo]

by Nordal » Mon Dec 02, 2019 19:25

@ThorfinnS
What is the creative/survival thing about UI? Do you mean that items that don't have a craft recipe are still listed?

Yes. If you have mob_animal of TenPlus1 installed UI lists every animal and every spawn-egg in it's inventory. No matter which mode (survival/creative).
 


Return to Mod Releases



Who is online

Users browsing this forum: rubberduck and 8 guests