Lava Shader 2.3, Drop in package for your map
Moderator: Moderators
Lava Shader 2.3, Drop in package for your map
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.
Re: Lava Shader 2.0, Drop in package for your map
this looks pretty awesome!
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Lava Shader 2.0, Drop in package for your map
I like you. Have I ever told you that?
Re: Lava Shader 2.0, Drop in package for your map
Sweet stuff, thanks man!
Re: Lava Shader 2.0, Drop in package for your map
update 2.1:
-fixed messed up partially see through units if /luashaders off
-added readme
-fixed messed up partially see through units if /luashaders off
-added readme
Re: Lava Shader 2.2, Drop in package for your map
-update 2.2
Lava is now extended beyond map edges, lavasplosions have optimized drawRadius (thanks again nixtux)
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
any possibility you will consider allowing it to receive fog.
Re: Lava Shader 2.2, Drop in package for your map
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
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?smoth wrote:any possibility you will consider allowing it to receive fog.
Re: Lava Shader 2.2, Drop in package for your map
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
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
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:
I have to admit, that I do not fully understand the gadget yet. In line 249 there's:
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.
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): ?
Code: Select all
_G.lavaLevel = lavaLevel+math.sin(f/30)*2
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.
- Attachments
-
- lavacolor5.png
- (2.01 MiB) Not downloaded yet
Re: Lava Shader 2.2, Drop in package for your map
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
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.
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
Cool, that's very good news! I'll wait then for the update.
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)The Yak wrote:You can play the map with ZK to avoid error spam for the time being.
Re: Lava Shader 2.3, Drop in package for your map
Great. Thanks a lot!
Works like a charm now
Works like a charm now
Re: Lava Shader 2.3, Drop in package for your map
Lavasplosions are now broken again for all maps that I tested. Anyone know why?