Page 1 of 2
					
				Lava Shader 2.3, Drop in package for your map
				Posted: 11 Nov 2013, 20:43
				by The Yak
				 http://springfiles.com/spring/lua-scrip ... op-package
http://springfiles.com/spring/lua-scrip ... op-package
Now on github: 
https://github.com/The-Yak/lavashader
2.3:
-added new lavatex by qray
-fixed lavalevel errorspam with some games
-renamed lava2.1.lua to lava.lua (for easy overwriting for future updates)
2.2 changes:
-extended lava beyond map edges
-removed foam.tga (unused)
-optimized lavasplosions (thanks nixtux)
2.1 Changes:
-fixed messed up partially see through units if /luashaders off
-added readme
----------------------------------------
For example usage see map Violence_3
----------------------------------------
Includes:
-Lava gadget (GPL)
-hover playable lava
-working GLSL shader
-dynamic edge glow
-several different seamless lava textures (default seen above)
-improved lavasplosions (thanks [BoS]nixtux)
-hover damage workaround
-lava ambiance widget
How do I use this shit in my map?
Just extract the .7z into your map folder. That's all, works out of the box. Set voidwater=0 in your mapconfig or you will see water flicker above lava on some settings.
How do I change the lavatexture?
Find all instances of lavacolor3.png in lava.lua and change to desired image (make sure it's in /LuaRules/images/). One changes texture for GLSL shader and one for fallback mode.
Can I change the height of the lavaplane?
Yes, just change lavaLevel, but this will break hover playability. Right now it is set equal to waterlevel.
Can this extend beyond map edges/onto an infinite plane?
As of version 2.2 somewhat, not an infinite plane but a large one
Who is behind this?
Assembled by The_Yak
Knorke, Beherith, Anarchid, The_Yak - Lava gadget
Audionautics, e__ - Lava SFX from freesound.org
lava textures - yhughes, mavrosh, sadronmeldir, qray
Kloot - Hover waterdamage workaround
[BoS]nixtux - Improved lavasplosions
 
			
					
				Re: Lava Shader 2.0, Drop in package for your map
				Posted: 11 Nov 2013, 23:28
				by smoth
				this looks pretty awesome!
			 
			
					
				Re: Lava Shader 2.0, Drop in package for your map
				Posted: 12 Nov 2013, 00:18
				by PicassoCT
				
			 
			
					
				Re: Lava Shader 2.0, Drop in package for your map
				Posted: 12 Nov 2013, 00:26
				by Forboding Angel
				I like you. Have I ever told you that?
			 
			
					
				Re: Lava Shader 2.0, Drop in package for your map
				Posted: 12 Nov 2013, 00:52
				by Beherith
				Sweet stuff, thanks man!
			 
			
					
				Re: Lava Shader 2.0, Drop in package for your map
				Posted: 25 Nov 2013, 18:27
				by The Yak
				update 2.1:
-fixed messed up partially see through units if /luashaders off
-added readme
			 
			
					
				Re: Lava Shader 2.2, Drop in package for your map
				Posted: 10 Dec 2013, 19:56
				by The Yak
				-update 2.2
 
Lava is now extended beyond map edges, lavasplosions have optimized drawRadius (thanks again nixtux)
 
			
					
				Re: Lava Shader 2.2, Drop in package for your map
				Posted: 20 Feb 2014, 17:18
				by smoth
				any possibility you will consider allowing it to receive fog.
			 
			
					
				Re: Lava Shader 2.2, Drop in package for your map
				Posted: 20 Feb 2014, 17:20
				by Cheesecan
				This is excellent, I asked for this a few years ago when I was working on a new map. Now I could theoretically finally finish it, if I felt like it. 

 
			
					
				Re: Lava Shader 2.2, Drop in package for your map
				Posted: 21 Feb 2014, 02:47
				by The Yak
				smoth wrote:any possibility you will consider allowing it to receive fog.
What do you mean by allowing to receive? Does the lua fog gadget not work with lava? Or are you referring to mapconfig fog setting?
 
			
					
				Re: Lava Shader 2.2, Drop in package for your map
				Posted: 21 Feb 2014, 02:59
				by smoth
				Map fog.
			 
			
					
				Re: Lava Shader 2.2, Drop in package for your map
				Posted: 23 Feb 2014, 02:12
				by The Yak
				Not a bad idea at all but I've got other stuff going on and won't be working on lava shader anytime in the near future
			 
			
					
				Re: Lava Shader 2.2, Drop in package for your map
				Posted: 23 Feb 2014, 03:38
				by smoth
				No problem, just wanted to raise awareness of it. I figured it probably slipped your mind
			 
			
					
				Re: Lava Shader 2.2, Drop in package for your map
				Posted: 25 Apr 2015, 16:13
				by qray
				I would like to use the drop-in package in a new map. But unfortunately I am getting spammed with this error message with the latest version 2.2 from springfiles:
Code: Select all
[f=0000000] Error: LuaRules::RunCallIn: error = 2, GameFrame, [Internal Lua error: Call failure] [string "LuaRules/Gadgets/lava2.1.lua"]:249: attempt to perform arithmetic on global 'lavaLevel' (a nil value)
stack traceback:
	[string "LuaRules/Gadgets/lava2.1.lua"]:249: in function 'GameFrame'
	[string "LuaRules/gadgets.lua"]:838: in function <[string "LuaRules/gadgets.lua"]:836>
	(tail call): ?
I have to admit, that I do not fully understand the gadget yet. In line 249 there's:
Code: Select all
_G.lavaLevel = lavaLevel+math.sin(f/30)*2
If I get it right, "_G "has sth. to do with global variables shared between synced and unsynced? But it seems this does not work correctly as lavalevel is not defined in the unsynced part .
What puzzles me a bit, that the same calculation is done also in the synced part in line 82. This might contradict my understanding that this is a global variable 
 
Am I the only one getting this error message or did this just go unnoticed so far? Would a SendToUnsynced to transfer the lavalevel value from synced to unsynced help here?
To reproduce: I get this error also in the current version 4.1 of 
Violence
EDIT:
Attached an additional lava texture option I made, in case you like to include it.
 
			
					
				Re: Lava Shader 2.2, Drop in package for your map
				Posted: 25 Apr 2015, 17:49
				by PicassoCT
				Code: Select all
if not _G.lavaLevel then _G.lavaLevel =lavaLevel+math.sin(f/30)*2 end
_G.lavaLevel = lavaLevel+math.sin(f/30)*2
 
			
					
				Re: Lava Shader 2.2, Drop in package for your map
				Posted: 25 Apr 2015, 18:27
				by The Yak
				That error spam is already fixed, but I don't have my computer for the time being and can't upload the new version, sorry.
The 2 calculations you have observed for lavalevel are redundant, one of them needs to be removed (I forget which) and this will fix it.
You can play the map with ZK to avoid error spam for the time being.
			 
			
					
				Re: Lava Shader 2.2, Drop in package for your map
				Posted: 25 Apr 2015, 18:41
				by qray
				Cool, that's very good news! I'll wait then for the update.
The Yak wrote:You can play the map with ZK to avoid error spam for the time being.
For the development phase it's not a show stopper here. Just wanted to get rid of them before map release 

 (and report the bug)
 
			
					
				Re: Lava Shader 2.3, Drop in package for your map
				Posted: 04 May 2015, 22:39
				by The Yak
				updated to 2.3
EDIT: Also commited to github 
https://github.com/The-Yak/lavashader 
			
					
				Re: Lava Shader 2.3, Drop in package for your map
				Posted: 05 May 2015, 21:00
				by qray
				Great. Thanks a lot!
Works like a charm now 

 
			
					
				Re: Lava Shader 2.3, Drop in package for your map
				Posted: 24 Oct 2016, 20:12
				by The Yak
				Lavasplosions are now broken again for all maps that I tested. Anyone know why?