Page 1 of 1

[mod] New-and-Improved Lava! [lavaplus]

PostPosted: Fri Jun 20, 2014 01:37
by Ackirb
Ackirb here

Introducing LavaPlus! Now lava does a lot more than sitting underground, waiting to be stumbled upon.

With LavaPlus, Lava can
> Kill mobs and entities
> Ignite mobs and players on fire
> Burn through and destroy grass, dirt, sand, glass and trees
> See below for technical information before commenting about the code please :)

Version 0.5.4 (first release)

COMING SOON:
> A bunch of new crafting recipes that involve lava
> More obsidian, and uses for it!
> Smoother, less memory-intensive ABM

Screen shots coming soon

TECHNICAL STUFF:
Yes, I know that lava already ignites flammable nodes via groups ("flammable", "igniter", "hot", "lava", etc).
However, lavaplus uses ABM instead of groups (for the most part).
Instead of igniting flammable nodes, it literally replaces them with "fire:basic_flame".

WARNING:
The ABM from this mod appears to slow the game down somewhat. If you have a strong computer, this should be no problem for you. However, in extreme cases, I have had servers crash due to an overwhelming memory allocation from too much lavaplus lava (aka - overloaded the ram).
Just to be sure, test this mod on a world that you do not care about before using it on your favorite world.

https://www.dropbox.com/s/ck4lcttkb78t1a9/lavaplus.zip

If you have any questions, comments or suggestions, PM me!

Re: [mod] New-and-Improved Lava! [lavaplus]

PostPosted: Fri Jun 20, 2014 03:48
by minermoder27
Doesn't lava already catch trees and wood on fire?

Re: [mod] New-and-Improved Lava! [lavaplus]

PostPosted: Fri Jun 20, 2014 09:16
by Casimir
The way the default fire works needs air around the flammable nodes. A wooden floor covert with lava will stay wooden. Freeminer has a feature that allows you to define freeze melt. So you can say default:tree that reaches 750°C will turn into default:coalblock (water to air, wood to fire).

Re: [mod] New-and-Improved Lava! [lavaplus]

PostPosted: Fri Jun 20, 2014 14:21
by 4aiman
But MT reverted the get_humidity() and get_temp() functions. (Licensing?)
Still, MT can have groups like "heat" and search for nodes in this group to do the same stuff.

Re: [mod] New-and-Improved Lava! [lavaplus]

PostPosted: Fri Jun 20, 2014 15:53
by Ackirb
Casimir wrote:The way the default fire works needs air around the flammable nodes. A wooden floor covert with lava will stay wooden. Freeminer has a feature that allows you to define freeze melt. So you can say default:tree that reaches 750°C will turn into default:coalblock (water to air, wood to fire).


You are correct.
But lavaplus ABM literally replaces certain nodes with "fire:basic_flame" instead of using the "flammable" group to do so.

That's why it burns through sand and dirt now.

Re: [mod] New-and-Improved Lava! [lavaplus]

PostPosted: Fri Jun 20, 2014 15:54
by Ackirb
4aiman wrote:But MT reverted the get_humidity() and get_temp() functions. (Licensing?)
Still, MT can have groups like "heat" and search for nodes in this group to do the same stuff.


Yes, but only nodes with those specific groups will be affected.
I wanted the lava to be able to burn through sand, dirt, grass, etc, which don't use groups that would be affected by "hot" or "igniter" or "lava" groups.

Re: [mod] New-and-Improved Lava! [lavaplus]

PostPosted: Sun Jun 22, 2014 15:12
by rubenwardy
The use of 'literally' in this topic is 'literally' redundant.

'Literally' is used to undo a metaphor or rhetoric. In this topic, 'literally' serves no purpose.

Use 'simply' or 'basically' if that is what you mean.

Nice mod, any way.

Re: [mod] New-and-Improved Lava! [lavaplus]

PostPosted: Sun Jun 22, 2014 21:00
by minermoder27
Technical Tip:
Looking at your code, it looks like most of the lag is coming from the entity damage ABM. I would suggest stepping through the connected players and entity tables, and checking if they are in contact with lava like that.

Re: [mod] New-and-Improved Lava! [lavaplus]

PostPosted: Tue Jun 24, 2014 10:30
by 4aiman
Ackirb wrote:
4aiman wrote:But MT reverted the get_humidity() and get_temp() functions. (Licensing?)
Still, MT can have groups like "heat" and search for nodes in this group to do the same stuff.


Yes, but only nodes with those specific groups will be affected.
I wanted the lava to be able to burn through sand, dirt, grass, etc, which don't use groups that would be affected by "hot" or "igniter" or "lava" groups.

Some mods redefine other nodes. Why not use minetest.override_item() to add as many groups as you wish?
You may use just one loop to iterate through the(minetest.registered_nodes() and add new groups to the existing ones. That way you may support ANY game if you'll define some groups "by default". E.g.
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
for i,node in ipairs(minetest.registered_nodes) do
   if node.name:find('dirt') then
      node.gropus:insert(new_group_for_dirtlike=x, new_group_for_dirtlike2=y)
   elseif node.name:find('sand') then
      node.gropus:insert(new_group_for_sandlike=x, new_group_for_sandlike2=y)
   else
      node.gropus:insert(new_group_for_unknown_nodes=x, new_group_unknown_nodes2=y)
   end
minetest.override_item(node.name,{groups=node.groups})
end

Re: [mod] New-and-Improved Lava! [lavaplus]

PostPosted: Wed May 11, 2016 22:28
by Fixerol
Can you please upload your latest release on forum too (for file mirroring)?