Page 1 of 1

[Mod] Clump Fall Nodes [clumpfall]

Posted: Mon Jun 11, 2018 04:12
by Noodlemire
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

Re: [mod] Clump Fall Nodes [clumpfall]

Posted: Mon Jun 11, 2018 14:05
by TechNolaByte
interesting concept.

Re: [mod] Clump Fall Nodes [clumpfall]

Posted: Wed Jun 13, 2018 17:52
by Lord_Vlad
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.

Re: [mod] Clump Fall Nodes [clumpfall]

Posted: Wed Jun 13, 2018 18:52
by Noodlemire
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

Re: [mod] Clump Fall Nodes [clumpfall]

Posted: Wed Jun 13, 2018 19:53
by texmex
Excellent stuff, thank you! This is one of those mods that really modifies the gameplay.

Re: [mod] Clump Fall Nodes [clumpfall]

Posted: Fri Jun 15, 2018 16:36
by Astrobe
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?

Re: [mod] Clump Fall Nodes [clumpfall]

Posted: Fri Jun 15, 2018 17:16
by Noodlemire
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

Re: [mod] Clump Fall Nodes [clumpfall]

Posted: Fri Jun 15, 2018 17:31
by Krock
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.

Re: [mod] Clump Fall Nodes [clumpfall]

Posted: Fri Jun 15, 2018 17:37
by Noodlemire
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.

Re: [Mod] Clump Fall Nodes [clumpfall]

Posted: Sun Aug 19, 2018 23:01
by Lord_Vlad
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.

Re: [Mod] Clump Fall Nodes [clumpfall]

Posted: Mon Aug 20, 2018 03:11
by sparky
minetest.override seems to be causing connected nodes to break.
Image
glass, fence, wall, bars, things like that.

Re: [Mod] Clump Fall Nodes [clumpfall]

Posted: Wed Jun 12, 2019 07:56
by texmex
The ceiling's caving in! Halp!

Image

Re: [Mod] Clump Fall Nodes [clumpfall]

Posted: Wed Jun 12, 2019 08:02
by texmex
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.

Re: [Mod] Clump Fall Nodes [clumpfall]

Posted: Thu Jun 13, 2019 05:55
by TenPlus1
This should fix the issue with falling nodes: https://notabug.org/TenPlus1/falling_item

Re: [Mod] Clump Fall Nodes [clumpfall]

Posted: Thu Jun 13, 2019 07:41
by texmex
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.

Re: [Mod] Clump Fall Nodes [clumpfall]

Posted: Sat Jan 25, 2020 20:52
by Noodlemire
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

Re: [Mod] Clump Fall Nodes [clumpfall]

Posted: Sat Jan 25, 2020 22:42
by texmex
What a nice surprice! This addresses several of the issues I’ve had with the mod. Bravo!

Re: [Mod] Clump Fall Nodes [clumpfall]

Posted: Sun Aug 16, 2020 18:09
by daret
Really great mode. Thanx

Re: [Mod] Clump Fall Nodes [clumpfall]

Posted: Mon Mar 07, 2022 14:28
by ZAAo
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?

Re: [Mod] Clump Fall Nodes [clumpfall]

Posted: Wed Mar 09, 2022 00:44
by Noodlemire
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.

Re: [Mod] Clump Fall Nodes [clumpfall]

Posted: Thu Mar 10, 2022 11:22
by ZAAo
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 :)

Re: [Mod] Clump Fall Nodes [clumpfall]

Posted: Thu Mar 10, 2022 19:27
by wsor4035
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

Re: [Mod] Clump Fall Nodes [clumpfall]

Posted: Fri Mar 25, 2022 13:22
by ZAAo
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.

Re: [Mod] Clump Fall Nodes [clumpfall]

Posted: Thu Mar 30, 2023 00:59
by QBSteve
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! :)