Page 1 of 1

[Mod] More ways for nodes to fall. [falling_nodes]

PostPosted: Fri Oct 07, 2016 20:46
by pithy
This mod adds some groups that can be added to the node definition of your nodes.

Re: [mod] More ways for nodes to fall. [falling_nodes]

PostPosted: Sat Oct 08, 2016 10:45
by azekill_DIABLO
awesome.

Re: [mod] More ways for nodes to fall. [falling_nodes]

PostPosted: Sun Oct 09, 2016 08:25
by DS-minetest
great idea

Re: [mod] More ways for nodes to fall. [falling_nodes]

PostPosted: Sun Oct 09, 2016 16:05
by taikedz
pithy wrote:falling_kill_node "Will kill players if it lands on their heads."


https://github.com/pithydon/falling_nod ... it.lua#L89

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
   local objs = minetest.get_objects_inside_radius(pos, 1)


Won't this also kill any players it falls /past/ ? :-P

But, I like it :D

Re: [mod] More ways for nodes to fall. [falling_nodes]

PostPosted: Sun Oct 09, 2016 19:13
by pithy
taikedz wrote:https://github.com/pithydon/falling_nodes/blob/master/init.lua#L89

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
   local objs = minetest.get_objects_inside_radius(pos, 1)


Won't this also kill any players it falls /past/ ? :-P

Not in my tests.

Re: [Mod] More ways for nodes to fall. [falling_nodes]

PostPosted: Mon Oct 10, 2016 18:22
by Azazel
How could you use this? I mean. How could apply this to a node, is I'm not a programmer but I like to get their hands on some mod that I use when I play.

Re: [Mod] More ways for nodes to fall. [falling_nodes]

PostPosted: Mon Oct 10, 2016 23:07
by pithy
Azazel wrote:How could you use this? I mean. How could apply this to a node, is I'm not a programmer but I like to get their hands on some mod that I use when I play.

You could ask the maintainer of the mod that has the node in question to support this.
The first post tells you how but it assumes you already know how to make a mod.

Re: [Mod] More ways for nodes to fall. [falling_nodes]

PostPosted: Tue Nov 15, 2016 19:00
by Wuzzy
This looks like a very useful general-purpose mod for me. Could be very useful to add a few new gameplay elements.

You should also define the required group ratings in the readme file, this is very important when defining any new groups. Also, do any of your groups interact with the default falling_node group? Or are they independent? Please write this relation down, too. Please. :-)

I would maybe add a variant of falling_kill_node which only damages the player on impact instead of killing directly. E.g. falling_damage_node=<damage>

Finally, I think a group for a node which falls when a player (Or even a mob??? But I think this is too complex) steps on it would be awesome. Especially for jump'n'runs. :-) Maybe with the group rating setting the delay in tenths of seconds, and the special value -1 for instant falling. Example: fall_on_step=30 means the node will fall 3 seconds after the player stepped on it.

EDIT: More group ideas:

- destroy_after_fall=1: Does not trigger falling itself, but when it hits the ground after falling, it will be destroyed (it disappears). Node must of course have any of the groups which can call trigger, otherwise this group will not do anything
- drop_after_fall=1: Similar to the above, but node will instead drop as an item on impact (like attached_node).

EDIT 2:
You might be interested in this mod (WIP): https://github.com/HybridDog/falling_extras

EDIT 3:
I found a bug (I guess …)!

If you place two falling_hanging_nodes below each other, the first one hanging from a normal node, and the second one hanging from the first falling_hanging_node, the nodes won't fall if you dig the normal node. I would expect both nodes to fall since the nodes collectively don't have anything to hang from.

Re: [Mod] More ways for nodes to fall. [falling_nodes]

PostPosted: Tue Nov 15, 2016 22:30
by pithy
Wuzzy wrote:You should also define the required group ratings in the readme file, this is very important when defining any new groups.

I thought the standard was to set a group to 1 when not specified.

Wuzzy wrote:Also, do any of your groups interact with the default falling_node group? Or are they independent? Please write this relation down, too. Please. :-)

They are all independent but falling_kill_node needs another group to specify how the node should fall. Works with falling_node group to.

Wuzzy wrote:I would maybe add a variant of falling_kill_node which only damages the player on impact instead of killing directly. E.g. falling_damage_node=<damage>

I like that idea.

Wuzzy wrote:Finally, I think a group for a node which falls when a player (Or even a mob??? But I think this is too complex) steps on it would be awesome. Especially for jump'n'runs. :-) Maybe with the group rating setting the delay in tenths of seconds, and the special value -1 for instant falling. Example: fall_on_step=30 means the node will fall 3 seconds after the player stepped on it.


Maybe, or maybe it's too complex.

Wuzzy wrote:- destroy_after_fall=1: Does not trigger falling itself, but when it hits the ground after falling, it will be destroyed (it disappears). Node must of course have any of the groups which can call trigger, otherwise this group will not do anything
- drop_after_fall=1: Similar to the above, but node will instead drop as an item on impact (like attached_node).

I think I will fiddle with the other ideas first.

Wuzzy wrote:I found a bug (I guess …)!

If you place two falling_hanging_nodes below each other, the first one hanging from a normal node, and the second one hanging from the first falling_hanging_node, the nodes won't fall if you dig the normal node. I would expect both nodes to fall since the nodes collectively don't have anything to hang from.

I knew about that bug this hole time. I'm so bad.
I could make the code a little heavier to fix it for falling_hanging_node but fixing it for falling_sticky_node would be a mess.

Re: [Mod] More ways for nodes to fall. [falling_nodes]

PostPosted: Wed Nov 16, 2016 16:39
by pithy
Update: added group falling_damage_node. Thanks Wuzzy for the idea.

Re: [Mod] More ways for nodes to fall. [falling_nodes]

PostPosted: Fri Nov 18, 2016 22:38
by Diamond knight
this will be perfect for an idea i have had for a while

realistic physics, make every block in mt_game via overrides falling sticky node so no more anti gravity nodes :)

might post the mod soon