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

User avatar
Ackirb
Member
 
Posts: 23
Joined: Thu Mar 27, 2014 21:01

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

by Ackirb » Fri Jun 20, 2014 01:37

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!
Last edited by Ackirb on Fri Jun 20, 2014 16:00, edited 1 time in total.
 

User avatar
minermoder27
Member
 
Posts: 127
Joined: Wed Nov 20, 2013 23:24
GitHub: ZNixian
In-game: minermoder27

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

by minermoder27 » Fri Jun 20, 2014 03:48

Doesn't lava already catch trees and wood on fire?
 

User avatar
Casimir
Member
 
Posts: 1101
Joined: Fri Aug 03, 2012 16:59

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

by Casimir » Fri Jun 20, 2014 09:16

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).
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

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

by 4aiman » Fri Jun 20, 2014 14:21

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.
 

User avatar
Ackirb
Member
 
Posts: 23
Joined: Thu Mar 27, 2014 21:01

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

by Ackirb » Fri Jun 20, 2014 15:53

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.
 

User avatar
Ackirb
Member
 
Posts: 23
Joined: Thu Mar 27, 2014 21:01

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

by Ackirb » Fri Jun 20, 2014 15:54

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.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

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

by rubenwardy » Sun Jun 22, 2014 15:12

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.
 

User avatar
minermoder27
Member
 
Posts: 127
Joined: Wed Nov 20, 2013 23:24
GitHub: ZNixian
In-game: minermoder27

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

by minermoder27 » Sun Jun 22, 2014 21:00

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.
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

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

by 4aiman » Tue Jun 24, 2014 10:30

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
 

Fixerol
Member
 
Posts: 633
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer

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

by Fixerol » Wed May 11, 2016 22:28

Can you please upload your latest release on forum too (for file mirroring)?
 


Return to WIP Mods

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 7 guests

cron