[Mod] Clump Fall Nodes [clumpfall]

Post Reply
User avatar
Noodlemire
Member
Posts: 61
Joined: Sun May 27, 2018 00:07
GitHub: Noodlemire
In-game: Noodlemire

[Mod] Clump Fall Nodes [clumpfall]

by Noodlemire » Post

This mod is designed to set most typical nodes, including ones added by other mods, so that they fall in a very particular way: They will only start falling if there are no Clump Fall Nodes connected to their bottom side, edges, or corners, and they will not fall all at once, but rather a continuous series of "clumps", each about one second after another. This falling method is used to reduce lag overall when a large amount of nodes come loose and begin falling, as instead of 100+ nodes slowing down the world, several sets of 10+ nodes will cascade down with only minimal slowing to anything else. Additionally, due to the nature of how a Clump Fall Node is determined to be needing to fall or not, pyramid structures are often very effective for construction under this mod, and also very often form inside caverns and over structures that have large, easily collapsable ceilings.

Nodes that are considered to be "Clump Fall Nodes" are everything that falls outside of the Falling Nodes, Attached Nodes, Liquid, and Unbreakable groups. Anything that doesn't belong to those groups, including nodes that are registered by other mods, will fall into this category.

This is far from my first ever program, but it is my first time writing anything in Lua. Wish me luck.

As for screenshots, what is shown here is essentially a "comic" consisting of 6 screenshots, detailing the process of the collapse of the roof of a cave, which was initially formed by a lot of explosions. Though the light is low, through sillhouettes formed by nodes in the bright fog, you can see somewhat of step-by-step process of how these stone blocks are falling, the first and last images especially being usable as before/after photos.

Screenshots:
Spoiler
Image
Image
Image
Image
Image
Image
Dependency: entitycontrol (viewforum.php?f=9)
Repository: https://github.com/Noodlemire/clumpfall
Liscense: LGPL 2.1, https://github.com/Noodlemire/clumpfall ... ICENSE.txt
Download (latest): https://mega.nz/#!KngEjC5Z!4OqhArnVv6ch ... xkBERuBT8M

Downloads (older):
Spoiler
Last edited by Noodlemire on Sat Jan 25, 2020 20:56, edited 2 times in total.

User avatar
TechNolaByte
Member
Posts: 465
Joined: Wed May 10, 2017 21:00
GitHub: TechNolaByte

Re: [mod] Clump Fall Nodes [clumpfall]

by TechNolaByte » Post

interesting concept.
The great quest of alchemy neither failed nor attained gold; programmers are those great alchemists who transmute caffeine into code.

User avatar
Lord_Vlad
Member
Posts: 112
Joined: Thu Jul 20, 2017 07:58

Re: [mod] Clump Fall Nodes [clumpfall]

by Lord_Vlad » Post

Yaay, I was looking forward to a mod that would make some kind of cave-ins, Looks great.

Won't it completly destoy houses though ? How do you make a house that resists this ?

Could you make it so it doesn't affect at least some groups of nodes : plancks and maybe woods...

Also, won't it ruin the surface ? Like, not only create big holes but also make trees and leaves fall all over ?

I don't have the time to test rn, so maybe some of these questions are an obvious no after 5 sec, sorry if it's the case.

User avatar
Noodlemire
Member
Posts: 61
Joined: Sun May 27, 2018 00:07
GitHub: Noodlemire
In-game: Noodlemire

Re: [mod] Clump Fall Nodes [clumpfall]

by Noodlemire » Post

Lord_Vlad wrote:Yaay, I was looking forward to a mod that would make some kind of cave-ins, Looks great.

Won't it completly destoy houses though ? How do you make a house that resists this ?

Could you make it so it doesn't affect at least some groups of nodes : plancks and maybe woods...

Also, won't it ruin the surface ? Like, not only create big holes but also make trees and leaves fall all over ?

I don't have the time to test rn, so maybe some of these questions are an obvious no after 5 sec, sorry if it's the case.
Nope, houses are perfectly capable of being made because clump fall nodes won't fall down if their lower edges or corners are connected to other clump fall nodes. This means that as long as you have a triangular roof, it won't fall down. Support pillars will also work in preventing a 3x3 area of flat roofing from falling down (technically 5x5 area if the outermost roof tiles are right next to walls). Also, it's surprisingly difficult to make underground nodes fall down enough to affect the surface due to this. As for trees, the outermost leaves will tend to fall if you punch them, but most stay until you start actually cutting down the tree. Once you remove the base, a tree will usually fall down pretty quickly. Not entirely sure how noticable this is if you haven't read too deeply into how it all works, but you definitely won't see literally everything falling down.

Also, decided to make this as an example of a house that doesn't have anything collapsable in it, with only two support beams necessary (probably could've only had one, but I didn't want anything blocking the path from the door to the fireplace.)
Image
Image

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

Re: [mod] Clump Fall Nodes [clumpfall]

by texmex » Post

Excellent stuff, thank you! This is one of those mods that really modifies the gameplay.

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

Re: [mod] Clump Fall Nodes [clumpfall]

by Astrobe » Post

So it works on trees too. That's an important features too, because of those players who on or two blocks out of a trunk and proceed with the next tree.

However, I'm a bit worried of the effect of this mod on mgv7, which tends to create a lot of "hanging nodes". Has someone tested this configuration?
Last edited by Astrobe on Fri Jun 15, 2018 17:40, edited 1 time in total.

User avatar
Noodlemire
Member
Posts: 61
Joined: Sun May 27, 2018 00:07
GitHub: Noodlemire
In-game: Noodlemire

Re: [mod] Clump Fall Nodes [clumpfall]

by Noodlemire » Post

Astrobe wrote:So it works on tree too. That's an important features too, because of those players who on or two blocks out of a trunk and proceed with the next tree.

However, I'm a bit worried of the effect of this mod on mgv7, which tends to create a lot of "hanging nodes". Has someone tested this configuration?
I've been using V7 for my testing, the typical behavior of those nodes is similar to generated sand and gravel; those nodes will linger in the air, but only until they recieve an update from a nearby punched, placed, or dug node. Pretty much the same behavior that I expect from Clump Fall Nodes in general.
RSLRedstonier wrote:interesting concept.
Lord_Vlad wrote:Yaay, I was looking forward to a mod that would make some kind of cave-ins, Looks great.
texmex wrote:Excellent stuff, thank you! This is one of those mods that really modifies the gameplay.
Thank you all for the supporing words, they mean a lot.

Thus, I'm happy to annouce a decently sized update for this mod: Version "Clump The Second" This is mostly a bug-fix update, but it also now lets beds fall, as well as other nodes with their own on_punch events such as mesecon switches, which previously did not clump fall. Other bugs fixed include:
  • *Falling nodes and Attached nodes lingering in the air after Clump Fall Nodes fall down
    *Floating Clump Fall Nodes not falling down if sand lands on them
    *Beds no longer split in half, spawn other half beds, make other nodes vanish, etc. when falling
    *Clump Fall Nodes trying repeatedly to fall down if the only nodes underneath them are walkable but non-Clump Fall Nodes such as Sand or Bedrock
That being said, there are other in-file additions, such as a changelog.txt for a more thorough list of changes to the code itself, and a depends.txt. Yes, this does mean that there is a dependency, which is for the entitycontrol mod I made. This was used to fix some of bugs listed above, and can be found at viewtopic.php?f=9&t=20264

You can download this version here: https://mega.nz/#!r2ZhkboJ!0TAlXWbUil7p ... YvEjWyNBGM

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [mod] Clump Fall Nodes [clumpfall]

by Krock » Post

Noodlemire wrote:You can download this version here: https://mega.nz/#!r2ZhkboJ!0TAlXWbUil7p ... YvEjWyNBGM
If I may ask - where's the difference between the automatic by GitHub provided zip and your mega link? Both seem to contain very similar if not the identical code.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Noodlemire
Member
Posts: 61
Joined: Sun May 27, 2018 00:07
GitHub: Noodlemire
In-game: Noodlemire

Re: [mod] Clump Fall Nodes [clumpfall]

by Noodlemire » Post

Krock wrote:
Noodlemire wrote:You can download this version here: https://mega.nz/#!r2ZhkboJ!0TAlXWbUil7p ... YvEjWyNBGM
If I may ask - where's the difference between the automatic by GitHub provided zip and your mega link? Both seem to contain very similar if not the identical code.
It's mostly just a mirror for anyone who prefers it over github's downloads, as well as something that someone can use in case something goes wrong with one of the links, however low the chances are.

User avatar
Lord_Vlad
Member
Posts: 112
Joined: Thu Jul 20, 2017 07:58

Re: [Mod] Clump Fall Nodes [clumpfall]

by Lord_Vlad » Post

It needs an exception for the leaves group... or something to make them actually decay when they fall. Rn any time I try to cut a tree it puts leaves everywhere in the whole area and they don't decay naturally once they fell.

Also a chest of mine fell, just one block, but it's whole content was deleted.

User avatar
sparky
Member
Posts: 154
Joined: Sun Oct 05, 2014 00:54
GitHub: Elkien3
IRC: ircSparky
In-game: sparky
Location: USA
Contact:

Re: [Mod] Clump Fall Nodes [clumpfall]

by sparky » Post

minetest.override seems to be causing connected nodes to break.
Image
glass, fence, wall, bars, things like that.

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

Re: [Mod] Clump Fall Nodes [clumpfall]

by texmex » Post

The ceiling's caving in! Halp!

Image
Attachments
roof.png
roof.png (625.93 KiB) Viewed 3286 times

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

Re: [Mod] Clump Fall Nodes [clumpfall]

by texmex » Post

I believe there's a bug in the transfer of meta data from node to falling entity, or from falling entity to the new node position. I put some infotext on placed nodes but it doesn't seem to transfer over.

I'm trying to accomplish clumpfall effects for nodes placed by players only.

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: [Mod] Clump Fall Nodes [clumpfall]

by TenPlus1 » Post

This should fix the issue with falling nodes: https://notabug.org/TenPlus1/falling_item

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

Re: [Mod] Clump Fall Nodes [clumpfall]

by texmex » Post

TenPlus1 wrote:This should fix the issue with falling nodes: https://notabug.org/TenPlus1/falling_item
My meta issue?

Edit: Nope, that didn't solve it.

User avatar
Noodlemire
Member
Posts: 61
Joined: Sun May 27, 2018 00:07
GitHub: Noodlemire
In-game: Noodlemire

Re: [Mod] Clump Fall Nodes [clumpfall]

by Noodlemire » Post

It's been a while, but clumpfall has been updated!

The main feature is extended support of clump fall nodes. Extended support means that nodes can be considered to be supported if they're connected only to the side of a regularly supported node, or if there's a path of nodes connected by only their sides to a regularly supported node. In general, wood is stronger than normal nodes, and stone is stronger than wood. It's easier to explain if you see a picture, like the screenshot below.

From the changelog:
Spoiler

Code: Select all

Clump III:
	+Variable support strength:
		+Now, not all clump fall nodes are created equally; some, typically types of wood and stone, are much more stable and easier to work with.
		+The "level" group now also increases the node's support range
		+Though no nodes currently have this group, "clump_fall_support" can be used to give certain nodes a larger support range.

	+Added settings that can be changed in the "All Settings" menu: Clumpfall's Clump Interval, Clumpfall's Clump Radius, and Clumpfall's Support Radius
	+Added a mod.conf
	*Switched license to LGPL2
	*Spaced out the changelog a little to make it easier to read
	-Removed most of the functions that add to existing node callbacks, except add_punch_event, because minetest.register_on_(callback) functions are used now instead.

	+Fixed:
		-Error message in debug.txt about undeclared globals x, y, and z during clump falls.
		-Chests and other containers losing their contents upon falling
		-group:clump_fall_node nodes floating if the group:falling_node node underneath falls.
		-Connected nodes like fences refusing to make connections, and only ever remaining pole-shaped.
Screenshot:
Spoiler
Image
Download: https://mega.nz/#!KngEjC5Z!4OqhArnVv6ch ... xkBERuBT8M

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

Re: [Mod] Clump Fall Nodes [clumpfall]

by texmex » Post

What a nice surprice! This addresses several of the issues I’ve had with the mod. Bravo!

User avatar
daret
Member
Posts: 136
Joined: Tue Nov 12, 2019 20:36
GitHub: daretmavi
In-game: Daretmavi

Re: [Mod] Clump Fall Nodes [clumpfall]

by daret » Post

Really great mode. Thanx

ZAAo
Member
Posts: 47
Joined: Tue Jul 27, 2021 16:15

Re: [Mod] Clump Fall Nodes [clumpfall]

by ZAAo » Post

Hi. Thanks for creating the Clump Fall mod. It does have the potential to add lots of realism to Minetest. I just feel that it still needs to be expanded in some ways. For example, if certain materials are used in a construction (e.g. steelblock, steel_support, brick) it should allow for a greater structure distance, as these materials (and some others - perhaps even stone, depending on the construction methods; and I would think wood - if perhaps placing slabs or "beams" instead of solid, big, heavy wooden blocks) do in real life allow for greater lengths of construction without support underneath, due to the inherent strength of the material and structure/construction. Would it be possible to create a "strong_materials" group for example, and add various such Minetest materials in that group, and then check in your mod whether such a material is being used, and allow for a greater structure distance without a clump fall? It is a very nice mod and I really like to use it in my server worlds, as it makes the game seem more realistic, but it is also quite annoying when building structures which should be sound in real life and yet they are not regarded as such in Minetest, with clump fall :) I also have a question: I saw in the clumpfall/settingtypes.txt file, there is an option "clumpfall_support_radius (Clumpfall's Support Radius) float 1" which I then changed to a value of 2, hoping that would allow me to at least place one more block before things came tumbling down, but it doesn't seem to make a difference. (How) is it possible to change the structure radius, to allow placing more blocks without support underneath?

User avatar
Noodlemire
Member
Posts: 61
Joined: Sun May 27, 2018 00:07
GitHub: Noodlemire
In-game: Noodlemire

Re: [Mod] Clump Fall Nodes [clumpfall]

by Noodlemire » Post

ZAAo wrote:
Mon Mar 07, 2022 14:28
I saw in the clumpfall/settingtypes.txt file, there is an option "clumpfall_support_radius (Clumpfall's Support Radius) float 1" which I then changed to a value of 2, hoping that would allow me to at least place one more block before things came tumbling down, but it doesn't seem to make a difference.
Odd. I just now tested it in singleplayer, and changing it from 1 to 2 let me build out an extra block farther than before.

To answer your main question, there is actually a "strong_materials"-type group that you can use exactly as you described. It's called "clump_fall_support", and it increases a node's support range by 1. There's also the Default Mod's "level" which also does the same thing, except it also increases the minimum tool level required to break the block (meaning Obsidian, as an example, is a very sturdy building material).

I just never got around to designing nodes that use the "clump_fall_support" group, but since it's already there, it should be plenty easy to make nodes that are easier to support.

ZAAo
Member
Posts: 47
Joined: Tue Jul 27, 2021 16:15

Re: [Mod] Clump Fall Nodes [clumpfall]

by ZAAo » Post

Noodlemire wrote:
Wed Mar 09, 2022 00:44
ZAAo wrote:
Mon Mar 07, 2022 14:28
I saw in the clumpfall/settingtypes.txt file, there is an option "clumpfall_support_radius (Clumpfall's Support Radius) float 1" which I then changed to a value of 2, hoping that would allow me to at least place one more block before things came tumbling down, but it doesn't seem to make a difference.
Odd. I just now tested it in singleplayer, and changing it from 1 to 2 let me build out an extra block farther than before.

To answer your main question, there is actually a "strong_materials"-type group that you can use exactly as you described. It's called "clump_fall_support", and it increases a node's support range by 1. There's also the Default Mod's "level" which also does the same thing, except it also increases the minimum tool level required to break the block (meaning Obsidian, as an example, is a very sturdy building material).

I just never got around to designing nodes that use the "clump_fall_support" group, but since it's already there, it should be plenty easy to make nodes that are easier to support.
Thanks for your reply. I think I figured out what the problem is regarding my Minetest ignoring the settings in settingtypes.txt... from my research, it seems that Minetest ONLY looks at the settings in settingtypes.txt when the mod is in the main /mods folder. My mods in this particular case are actually in a worldmods folder under my world folder, as I did offline testing to see which mods I will upload to my private server for playing with friends. Minetest really should have more consistency! I hope that someone on the main development team will look at the "small annoyances" like this and fix it. I'm now wondering if there is another way to pass mod settings through to Minetest, so it will actually follow the "rules" (settings). I will look at your code to see how the clump_fall_support group works :)

wsor4035
Member
Posts: 182
Joined: Sun Aug 11, 2019 21:23
GitHub: wsor4035
IRC: wsor
In-game: wsor

Re: [Mod] Clump Fall Nodes [clumpfall]

by wsor4035 » Post

you dont change settings in settingtypes.txt, that file is for the settings tab on the main menu to display the settings to the gui. settings should be set in minetest.conf regardless of if they are in mods/worldmods/etc
j5uBLfc6NxgersvVj5D5dIsiKDkoQb0o

ZAAo
Member
Posts: 47
Joined: Tue Jul 27, 2021 16:15

Re: [Mod] Clump Fall Nodes [clumpfall]

by ZAAo » Post

wsor4035 wrote:
Thu Mar 10, 2022 19:27
you dont change settings in settingtypes.txt, that file is for the settings tab on the main menu to display the settings to the gui. settings should be set in minetest.conf regardless of if they are in mods/worldmods/etc
Thanks.

QBSteve
Member
Posts: 19
Joined: Wed Mar 15, 2023 00:00
In-game: QBSteve

Re: [Mod] Clump Fall Nodes [clumpfall]

by QBSteve » Post

It would be nice if there was an option to disable this mod above a certain height, in order to prevent extreme levels of lag from floatlands falling. Besides that, this is a great mod! :)
Hello! I'm just some random person with an ancient 7 year old potato that is my laptop :)

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests