Lava Shader 2.3, Drop in package for your map

Lava Shader 2.3, Drop in package for your map

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

User avatar
The Yak
Posts: 343
Joined: 20 May 2012, 05:36

Lava Shader 2.3, Drop in package for your map

Post by The Yak » 11 Nov 2013, 20:43

Image

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
Last edited by The Yak on 05 May 2015, 20:59, edited 11 times in total.
0 x

User avatar
smoth
Posts: 22295
Joined: 13 Jan 2005, 00:46

Re: Lava Shader 2.0, Drop in package for your map

Post by smoth » 11 Nov 2013, 23:28

this looks pretty awesome!
0 x

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10098
Joined: 24 Jan 2006, 21:12

Re: Lava Shader 2.0, Drop in package for your map

Post by PicassoCT » 12 Nov 2013, 00:18

0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14524
Joined: 17 Nov 2005, 02:43

Re: Lava Shader 2.0, Drop in package for your map

Post by Forboding Angel » 12 Nov 2013, 00:26

I like you. Have I ever told you that?
0 x

User avatar
Beherith
Moderator
Posts: 4932
Joined: 26 Oct 2007, 16:21

Re: Lava Shader 2.0, Drop in package for your map

Post by Beherith » 12 Nov 2013, 00:52

Sweet stuff, thanks man!
0 x

User avatar
The Yak
Posts: 343
Joined: 20 May 2012, 05:36

Re: Lava Shader 2.0, Drop in package for your map

Post by The Yak » 25 Nov 2013, 18:27

update 2.1:
-fixed messed up partially see through units if /luashaders off
-added readme
0 x

User avatar
The Yak
Posts: 343
Joined: 20 May 2012, 05:36

Re: Lava Shader 2.2, Drop in package for your map

Post by The Yak » 10 Dec 2013, 19:56

-update 2.2
Image

Lava is now extended beyond map edges, lavasplosions have optimized drawRadius (thanks again nixtux)
0 x

User avatar
smoth
Posts: 22295
Joined: 13 Jan 2005, 00:46

Re: Lava Shader 2.2, Drop in package for your map

Post by smoth » 20 Feb 2014, 17:18

any possibility you will consider allowing it to receive fog.
0 x

User avatar
Cheesecan
Posts: 1571
Joined: 07 Feb 2005, 21:30

Re: Lava Shader 2.2, Drop in package for your map

Post by Cheesecan » 20 Feb 2014, 17:20

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. :-)
0 x

User avatar
The Yak
Posts: 343
Joined: 20 May 2012, 05:36

Re: Lava Shader 2.2, Drop in package for your map

Post by The Yak » 21 Feb 2014, 02:47

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?
0 x

User avatar
smoth
Posts: 22295
Joined: 13 Jan 2005, 00:46

Re: Lava Shader 2.2, Drop in package for your map

Post by smoth » 21 Feb 2014, 02:59

Map fog.
0 x

User avatar
The Yak
Posts: 343
Joined: 20 May 2012, 05:36

Re: Lava Shader 2.2, Drop in package for your map

Post by The Yak » 23 Feb 2014, 02:12

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
0 x

User avatar
smoth
Posts: 22295
Joined: 13 Jan 2005, 00:46

Re: Lava Shader 2.2, Drop in package for your map

Post by smoth » 23 Feb 2014, 03:38

No problem, just wanted to raise awareness of it. I figured it probably slipped your mind
0 x

User avatar
qray
Posts: 377
Joined: 02 Feb 2009, 18:49

Re: Lava Shader 2.2, Drop in package for your map

Post by qray » 25 Apr 2015, 16:13

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 :wink:

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.
Attachments
lavacolor5.png
(2.01 MiB) Not downloaded yet
0 x

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10098
Joined: 24 Jan 2006, 21:12

Re: Lava Shader 2.2, Drop in package for your map

Post by PicassoCT » 25 Apr 2015, 17:49

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
0 x

User avatar
The Yak
Posts: 343
Joined: 20 May 2012, 05:36

Re: Lava Shader 2.2, Drop in package for your map

Post by The Yak » 25 Apr 2015, 18:27

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.
0 x

User avatar
qray
Posts: 377
Joined: 02 Feb 2009, 18:49

Re: Lava Shader 2.2, Drop in package for your map

Post by qray » 25 Apr 2015, 18:41

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)
0 x

User avatar
The Yak
Posts: 343
Joined: 20 May 2012, 05:36

Re: Lava Shader 2.3, Drop in package for your map

Post by The Yak » 04 May 2015, 22:39

updated to 2.3

EDIT: Also commited to github https://github.com/The-Yak/lavashader
0 x

User avatar
qray
Posts: 377
Joined: 02 Feb 2009, 18:49

Re: Lava Shader 2.3, Drop in package for your map

Post by qray » 05 May 2015, 21:00

Great. Thanks a lot!
Works like a charm now :-)
0 x

User avatar
The Yak
Posts: 343
Joined: 20 May 2012, 05:36

Re: Lava Shader 2.3, Drop in package for your map

Post by The Yak » 24 Oct 2016, 20:12

Lavasplosions are now broken again for all maps that I tested. Anyone know why?
0 x

Post Reply

Return to “Lua Scripts”