[Abandoned] [Mod] Soft Leaves [0.2.1] [soft_leaves]

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

[Abandoned] [Mod] Soft Leaves [0.2.1] [soft_leaves]

by Hamlet » Post

Image
Allows to walk through and to climb on leaves.

Version: 0.2.1
Source code's license: EUPL v1.2 or later.
Changelog: link

Dependencies: default (found in Minetest Game)


API for third party mods:
See api.txt


Downloads:
Archives: .zip .tar.gz
Source code: Codeberg


Installation

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

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

If you only want this to be used in a single world, place the folder in
../minetest/worlds/world_name/worldmods/

For further information or help see:
http://wiki.minetest.net/wiki/Installing_Mods
Attachments
screenshot.png
screenshot.png (15.73 KiB) Viewed 1868 times
Last edited by Hamlet on Fri Oct 02, 2020 17:32, edited 11 times in total.
My repositories: Codeberg.org | My ContentDB's page

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Mod] Soft Leaves [0.1.0] [soft_leaves]

by texmex » Post

Nice feature.

Tip: If you loop through registered nodes for the group ”leaves” you won’t have to repeat yourself in your code.

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

Re: [Mod] Soft Leaves [0.1.0] [soft_leaves]

by Hamlet » Post

texmex wrote:Nice feature.

Tip: If you loop through registered nodes for the group ”leaves” you won’t have to repeat yourself in your code.
Thank you; any hints on how to do that?
I've checked the lua_api. but I didn't understood how to scan minetest.registered_nodes for the leaves group.
I was about to do something like:

Code: Select all

for i = 1, #minetest.registered_nodes do
   if (minetest.registered_nodes[i].groups == leaves) then
      ...
   end
end
My repositories: Codeberg.org | My ContentDB's page

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Mod] Soft Leaves [0.1.0] [soft_leaves]

by texmex » Post

Sire, I got the code, will post tomorrow.

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

Re: [Mod] Soft Leaves [0.2.0] [soft_leaves]

by Hamlet » Post

Released v0.2.0

Added:
- Global function which allows other mods to register their nodes (see api.txt).

Changed:
- License changed to EUPL v1.2
- Code entirely rewritten.
- mod.conf set to follow MT v5.x specifics.

Removed:
- Support for MT v0.4.x
My repositories: Codeberg.org | My ContentDB's page

Astrobe
Member
Posts: 571
Joined: Sun Apr 01, 2018 10:46

Re: [Mod] Soft Leaves [0.2.0] [soft_leaves]

by Astrobe » Post

TIL about EUPL. Interesting license!

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

Re: [Mod] Soft Leaves [0.2.0] [soft_leaves]

by Hamlet » Post

Astrobe wrote:TIL about EUPL. Interesting license!
Basically it is like the GPLv3, but officially and legally available in about 30 languages.

I believe that a license should be comprehensible by anyone, and that its translations should be legally valid.

Else you are simply forcing people to adhere to a contract that they don't even understand.

For example, one can use a Spanish or French translation of the GPL, but the only legal version is the English one.
As far as I know, those translations are provided as "courtesy": so if you make some mistake because you don't understand English (legalese English, moreover), it's your fault.

It reminds me of the scene where an European colonist gives a contract to a native - which of course can't even read - telling him/her to sign it with a big X.
Afterward the native discovers that he/she has just given all his/her possessions to the colonist, be it the farmland, the home, whatever.
"Legally valid, friend, here's the contract that you signed. Now be a civil person and get away."

We have made some steps forward from that era - swindling people using language as a trap - haven't we?

Here's a table of comparison between various licenses: https://choosealicense.com/appendix/
My repositories: Codeberg.org | My ContentDB's page

Nordal
Member
Posts: 158
Joined: Mon Jul 30, 2018 15:46
GitHub: Nordall

Re: [Mod] Soft Leaves [0.2.0] [soft_leaves]

by Nordal » Post

I like this very much. Comes in handy when riding on horse! Thank you!
CFS - still widely unknown

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

Re: [Mod] Soft Leaves [0.2.0] [soft_leaves]

by Hamlet » Post

Nordal wrote:I like this very much. Comes in handy when riding on horse! Thank you!
:) You're welcome!
My repositories: Codeberg.org | My ContentDB's page

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

Re: [Mod] Soft Leaves [0.2.0] [soft_leaves]

by ThorfinnS » Post

IMO, they are even more useful in early mining shafts to get iron, before you have ropes or whatever else you are using.

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

Re: [Mod] Soft Leaves [0.2.0] [soft_leaves]

by Hamlet » Post

ThorfinnS wrote:IMO, they are even more useful in early mining shafts to get iron, before you have ropes or whatever else you are using.
They're indeed useful as temporary ladders.
This is another feature that I've ported from Voxelands: I could not really stand not being able to walk in dense woods or climbing on mountains without bonking my head at every step, or 'ruining' forests by tunneling into them.

Tarzan mod!
My repositories: Codeberg.org | My ContentDB's page

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Mod] Soft Leaves [0.2.0] [soft_leaves]

by texmex » Post

I also like it but it’s too exploitable for my needs. The horse exploit I don’t know how to mitigate but I don’t have tamables in my game anyway. The cheap ladder exploit can be solved by tree leave nodes having other drops than themselves: a similar node with different characteristics.

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

Re: [Mod] Soft Leaves [0.2.0] [soft_leaves]

by ThorfinnS » Post

I guess I'm not understanding the problem. It's easy to chop enough wood to do that with ladders. Just one apple tree is almost enough to get you down to the iron. A little over a dozen gets you down to diamond. Only real advantage leaves have there is you can nerdpole with them. Even with bonemeal, compost, basic_materials and techpack, most players on my servers end up with chests full of leaves. There just aren't enough uses for leaves relative to the need for wood. And that's AFTER rebalancing the above mods to cut the output to no more than half, some to a quarter or less.

User avatar
Melkor
Member
Posts: 369
Joined: Sat Sep 24, 2011 01:03
Location: Underground

Re: [Mod] Soft Leaves [0.2.0] [soft_leaves]

by Melkor » Post

can the leaves absorb the impact of a fall? like falling in water

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Mod] Soft Leaves [0.2.0] [soft_leaves]

by texmex » Post

@Thorfinn In my case, trunks aren’t choppable by hand so wood comes more expensively.

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

Re: [Mod] Soft Leaves [0.2.0] [soft_leaves]

by ThorfinnS » Post

texmex wrote:@Thorfinn In my case, trunks aren’t choppable by hand so wood comes more expensively.
OK. While they change the dynamic some, I didn't find it was overpowered, by any means. For example, any mob that jumps goes right up the nerdpole, so no using (just) leaves to get out of range. Slimes become positively deadly if you typically spend the night on a leaf nerdpole. And you can't sneak to place other leaves at the top to make a bigger platform, because sneak is the same key to go back down the nerdpole.

[EDIT]
Incidentally, how do you address that getting the first wood issue? Basic_houses solves it by just giving you the logs or wood (if you find a chest in a log or wood house), there's one mod out there that does so by letting you harvest sticks and pebbles, moretrees (or something) does it by letting you convert leaves to twigs to sticks to wood, there's something that lets you convert saplings to twigs, you could use TNT, I guess... The gathering sticks method is the one that appeals to me most, if I were to include a hard wood mod, but I can't find it anymore, and I don't feel like recreating it...
[/EDIT]

[EDIT2]
Hmmm, maybe if some fraction of leaf nodes actually dropped sticks (branches). Little more realistic, AND reduces the massive numbers of leaves that otherwise get collected...
[/EDIT2]

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

Re: [Mod] Soft Leaves [0.2.0] [soft_leaves]

by Hamlet » Post

Melkor wrote:can the leaves absorb the impact of a fall? like falling in water
Since they're acting as ladders, I guess that they should do it. As far as I know, if you fall in a shaft and some ladder nodes are placed at its bottom, it acts as 'brake'.
My repositories: Codeberg.org | My ContentDB's page

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

Re: [Mod] Soft Leaves [0.2.1] [soft_leaves]

by Hamlet » Post

Released v0.2.1

Changed:
- Code improvements.
My repositories: Codeberg.org | My ContentDB's page

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

Re: [Mod] Soft Leaves [0.2.1] [soft_leaves]

by Sokomine » Post

Hamlet wrote: Allows to walk through and to climb on leaves.
Very good. I love that on servers where this function exists. Gives you great new view on houses and landscape by just climbing up a tree! Navigating a forrest also gets more enjoyable.
A list of my mods can be found here.

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

Re: [Mod] Soft Leaves [0.2.1] [soft_leaves]

by Hamlet » Post

Sokomine wrote:
Thu Jul 02, 2020 20:29
Very good. I love that on servers where this function exists. Gives you great new view on houses and landscape by just climbing up a tree! Navigating a forrest also gets more enjoyable.
Thanks! I hate headbutting into leaves while walking in forests...
My repositories: Codeberg.org | My ContentDB's page

Grubler
Member
Posts: 98
Joined: Wed Nov 06, 2019 03:01
In-game: Grubler

Re: [Abandoned] [Mod] Soft Leaves [0.2.1] [soft_leaves]

by Grubler » Post

This is actually a really good mod, in my opinion. I feel like it is needed for me personally.
I would like if there was a slight modification where when you are climbing around on the branches, that it has a chance to break the leaf block. I once was using a version of this that another person had modified like that, and it was very fun. Like climbing a tree may not always be a sure thing, and you may fall so be careful. I think the person who modified it used something like "global step" to make a chance of removing the block when you stepped on it, or something. If there was a mod that could make branches grow back on trees, then that would be pretty cool, too. Just wanted to mention that, I guess.

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

Re: [Abandoned] [Mod] Soft Leaves [0.2.1] [soft_leaves]

by j0j0n4th4n » Post

Would it be possible to make the player or other entities move slower through the leaves?
cdb_894a100ddd76

Germain
Member
Posts: 42
Joined: Thu Aug 13, 2015 10:16

Re: [Abandoned] [Mod] Soft Leaves [0.2.1] [soft_leaves]

by Germain » Post

j0j0n4th4n wrote:
Fri Sep 10, 2021 22:20
Would it be possible to make the player or other entities move slower through the leaves?
I think it's possible, if you add code using monoid or/and playersphysic.

Monoid : viewtopic.php?f=11&t=14895
Player physic : viewtopic.php?t=22172&p=397187

Would be a great contribution.

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

Re: [Abandoned] [Mod] Soft Leaves [0.2.1] [soft_leaves]

by j0j0n4th4n » Post

Humm .... I looked at those mods, but I don't know how it would trigger the slowing effect. Would it be necessary to check if the player is on a leaf block? If so, wouldn't this cause slow down?
cdb_894a100ddd76

User avatar
Blockhead
Member
Posts: 1622
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: [Abandoned] [Mod] Soft Leaves [0.2.1] [soft_leaves]

by Blockhead » Post

It should be possible to make the leaves slow you by making them a liquid that does not spread and setting the liquid viscosity, much like the quicksand in ethereal.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests