-
Notifications
You must be signed in to change notification settings - Fork 316
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lava: includable in mapconfig, new config options, some refactor (#3964)
Refactor lavaConfig.lua module into Spring.Lava so it can be easier to access (only available to LuaUI and LuaRules for now). Make lava config includable in mapconfig/lava.lua inside mapfiles. * Also now game provided config goes into common/configs/LavaMaps/ Add more lava config options: * The options were already inside map_lava.lua as TODO notes and comments. * See at the bottom of this PR for more details. * damageFeatures: enable damage to features and control damage speed to features. * effectDamage: set custom ceg effect for damage. * effectBurst: set custom ceg effect for bursts (or disable). * effectBurstSounds: set custom sounds for bursts. * ambientSounds: set custom ambient sounds (or disable). Slight cleanup of the lava code. * Extracted shaders to shaders/GLSL/lava/. * No more lava globals from the lavaConfig.lua (now lava.lua) module. * Optimized most critical parts from map_lava.lua a bit (tried not to overdo it).
- Loading branch information
Showing
27 changed files
with
1,122 additions
and
1,000 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
local conf = { | ||
grow = 0, | ||
effectBurst = false, | ||
level = 5, | ||
colorCorrection = "vec3(0.26, 1.0, 0.03)", | ||
--coastColor = "vec3(0.6, 0.7, 0.03)", | ||
coastLightBoost = 1.2, | ||
coastWidth = 10.0, | ||
fogColor = "vec3(1.60, 0.8, 0.3)", | ||
--coastWidth = 30.0, | ||
lavaParallaxDepth = 32.0, | ||
lavaParallaxOffset = 0.2, | ||
swirlFreq = 0.008, | ||
swirlAmp = 0.017, | ||
uvScale = 2.2, | ||
specularExp = 12.0, | ||
tideAmplitude = 3, | ||
tidePeriod = 40, | ||
fogFactor = 0.13, | ||
fogHeight = 36, | ||
fogAbove = 0.1, | ||
fogDistortion = 2.0, | ||
tideRhym = { { 4, 0.05, 5*6000 } }, | ||
} | ||
|
||
return conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
local conf = { | ||
grow = 0, | ||
effectBurst = false, | ||
diffuseEmitTex = "LuaUI/images/lava/lava2_diffuseemitblue.dds", | ||
colorCorrection = "vec3(0.4, 0.5, 0.4)", | ||
coastColor = "vec3(0.24, 0.46, 0.5)", | ||
coastLightBoost = 0.3, | ||
fogColor = "vec3(0.24, 0.46, 0.5)", | ||
fogFactor = 0.01, | ||
fogHeight = 15, | ||
fogAbove = 4.0, | ||
fogDistortion = 2.0, | ||
tideAmplitude = 0.3, | ||
tidePeriod = 1000, | ||
tideRhym = { { -1, 0.05, 5*6000 } }, | ||
} | ||
|
||
return conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
local conf = { | ||
level = 0, | ||
damage = 150, | ||
tideAmplitude = 3, | ||
tidePeriod = 95, | ||
diffuseEmitTex = "LuaUI/images/lava/lava7_diffuseemit.dds", | ||
normalHeightTex = "LuaUI/images/lava/lava7_normalheight.dds", | ||
losDarkness = 0.7, | ||
colorCorrection = "vec3(1.1, 1.0, 0.88)", | ||
shadowStrength = 1.0, | ||
coastColor = "vec3(2.2, 0.4, 0.0)", | ||
coastLightBoost = 0.7, | ||
coastWidth = 36.0, | ||
fogFactor = 0.02, | ||
fogColor = "vec3(2.0, 0.31, 0.0)", | ||
fogHeight = 35, | ||
fogAbove = 0.18, | ||
|
||
tideRhym = { { -1, 0.25, 5*6000 } }, | ||
} | ||
|
||
return conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
local conf = { | ||
level = 251, | ||
damage = 750, | ||
colorCorrection = "vec3(0.7, 0.7, 0.7)", | ||
swirlFreq = 0.017, | ||
swirlAmp = 0.0024, | ||
tideAmplitude = 3, | ||
specularExp = 4.0, | ||
shadowStrength = 0.9, | ||
coastLightBoost = 0.8, | ||
uvScale = 1.5, | ||
tideRhym = { { 250, 0.10, 15 }, | ||
{ 415, 0.05, 30 }, | ||
{ 250, 0.10, 5*60 }, | ||
{ 415, 0.05, 30 }, | ||
{ 250, 0.10, 5*60 }, | ||
{ 415, 0.05, 3*30 }, | ||
{ 250, 0.10, 10*60 } }, | ||
} | ||
|
||
return conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
local conf = { | ||
level = 100, | ||
damage = 130, | ||
tideRhym = { { 90, 0.25, 5*60 }, | ||
{ 215, 0.10, 5 }, | ||
{ 90, 0.25, 5*60 }, | ||
{ 290, 0.15, 5 }, | ||
{ 90, 0.25, 4*60 }, | ||
{ 355, 0.20, 5 }, | ||
{ 90, 0.25, 4*60 }, | ||
{ 390, 0.20, 5 }, | ||
{ 90, 0.25, 2*60 }, | ||
{ 440, 0.04, 2*60 } }, | ||
} | ||
|
||
return conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
local conf = { | ||
grow = 0, | ||
effectBurst = false, | ||
diffuseEmitTex = "LuaUI/images/lava/lava2_diffuseemitblue.dds", | ||
colorCorrection = "vec3(1.0, 1.0, 1.0)", | ||
coastColor = "vec3(0.0, 0.35, 0.9)", | ||
coastLightBoost = 0.3, | ||
fogColor = "vec3(0.0, 0.3, 1.0)", | ||
fogFactor = 0.01, | ||
fogHeight = 15, | ||
fogAbove = 4.0, | ||
fogDistortion = 2.0, | ||
tideAmplitude = 0.3, | ||
tidePeriod = 1000, | ||
tideRhym = { { -1, 0.05, 5*6000 } }, | ||
} | ||
|
||
return conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
local conf = { | ||
level = 207, | ||
damage = 150, | ||
tideAmplitude = 3, | ||
tidePeriod = 95, | ||
diffuseEmitTex = "LuaUI/images/lava/lava7_diffuseemit.dds", | ||
normalHeightTex = "LuaUI/images/lava/lava7_normalheight.dds", | ||
losDarkness = 0.7, | ||
colorCorrection = "vec3(1.1, 1.0, 0.88)", | ||
shadowStrength = 1.0, | ||
coastColor = "vec3(2.2, 0.4, 0.0)", | ||
coastLightBoost = 0.7, | ||
coastWidth = 36.0, | ||
fogFactor = 0.08, | ||
fogColor = "vec3(2.0, 0.31, 0.0)", | ||
fogHeight = 85, | ||
fogAbove = 0.18, | ||
|
||
tideRhym = { { 206, 0.25, 5*6000 } }, | ||
} | ||
|
||
return conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
local conf = { | ||
grow = 0, | ||
colorCorrection = "vec3(1.0, 1.0, 1.0)", | ||
coastColor = "vec3(1.0, 0.25, 0.0)", | ||
coastLightBoost = 0.3, | ||
fogColor = "vec3(1.5, 0.1, 0.0)", | ||
fogFactor = 0.01, | ||
fogHeight = 15, | ||
fogAbove = 4.0, | ||
fogDistortion = 2.0, | ||
tideAmplitude = 0.3, | ||
tidePeriod = 1000, | ||
tideRhym = { { -1, 0.05, 5*6000 } }, | ||
} | ||
|
||
return conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
local conf = { | ||
level = 0, | ||
damage = 150, | ||
tideAmplitude = 3, | ||
tidePeriod = 95, | ||
diffuseEmitTex = "LuaUI/images/lava/lava7_diffuseemit.dds", | ||
normalHeightTex = "LuaUI/images/lava/lava7_normalheight.dds", | ||
losDarkness = 0.7, | ||
colorCorrection = "vec3(1.1, 1.0, 0.88)", | ||
shadowStrength = 1.0, | ||
coastColor = "vec3(2.2, 0.4, 0.0)", | ||
coastLightBoost = 0.7, | ||
coastWidth = 36.0, | ||
fogFactor = 0.02, | ||
fogColor = "vec3(2.0, 0.31, 0.0)", | ||
fogHeight = 35, | ||
fogAbove = 0.18, | ||
fogDistortion = 2.0, | ||
uvScale = 10.0, | ||
tideRhym = { { -1, 0.25, 5*6000 } }, | ||
} | ||
|
||
return conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
### Lava Map Configuration Directory | ||
|
||
Place map specific lava configuration files here. | ||
|
||
Note the lava configuration can also be included inside the map pack in mapconfig/lava.lua (recommmended). | ||
|
||
The mapconfig has precedence over game provided configuration, but overrideMap can be set to true inside the file here to make it have priority. | ||
|
||
The game will try to find the full name with version, like "Ghenna Rising 4.0.1.lua", if not found then it will search for a configuration without the version "Ghenna Rising.lua". | ||
|
||
### Note for map makers | ||
|
||
You can just take a file from here and place it inside mapconfig/lava.lua for your map to have lava. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
local conf = { | ||
grow = 0, | ||
effectBurst = false, | ||
level = 5, | ||
diffuseEmitTex = "LuaUI/images/lava/lava7_diffuseemit.dds", | ||
normalHeightTex = "LuaUI/images/lava/lava7_normalheight.dds", | ||
colorCorrection = "vec3(0.2, 0.65, 0.03)", | ||
--coastColor = "vec3(0.6, 0.7, 0.03)", | ||
coastLightBoost = 0.6, | ||
coastWidth = 60.0, | ||
fogColor = "vec3(1.60, 0.8, 0.3)", | ||
--coastWidth = 30.0, | ||
lavaParallaxDepth = 8.0, | ||
lavaParallaxOffset = 0.2, | ||
swirlFreq = 0.008, | ||
swirlAmp = 0.017, | ||
uvScale = 2.2, | ||
specularExp = 12.0, | ||
tideAmplitude = 3, | ||
tidePeriod = 40, | ||
fogFactor = 0.13, | ||
fogHeight = 36, | ||
fogAbove = 0.1, | ||
fogDistortion = 2.0, | ||
tideRhym = { { 4, 0.05, 5*6000 } }, | ||
} | ||
|
||
return conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
local conf = { | ||
grow = 0, | ||
effectBurst = false, | ||
level = 1, | ||
colorCorrection = "vec3(0.3, 0.1, 1.5)", | ||
--coastWidth = 40.0, | ||
--coastColor = "vec3(1.7, 0.02, 1.4)", | ||
fogColor = "vec3(0.60, 0.02, 1)", | ||
swirlFreq = 0.025, | ||
swirlAmp = 0.003, | ||
tideAmplitude = 3, | ||
tidePeriod = 50, | ||
tideRhym = { { 1, 0.05, 5*6000 } }, | ||
} | ||
|
||
return conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
local config = { | ||
grow = 0, | ||
effectBurst = false, | ||
level = 5, | ||
diffuseEmitTex = "LuaUI/images/lava/lava7_diffuseemit.dds", | ||
normalHeightTex = "LuaUI/images/lava/lava7_normalheight.dds", | ||
colorCorrection = "vec3(0.2, 0.65, 0.03)", | ||
--coastColor = "vec3(0.6, 0.7, 0.03)", | ||
coastLightBoost = 0.6, | ||
coastWidth = 60.0, | ||
fogColor = "vec3(1.60, 0.8, 0.3)", | ||
--coastWidth = 30.0, | ||
lavaParallaxDepth = 8.0, | ||
lavaParallaxOffset = 0.2, | ||
swirlFreq = 0.008, | ||
swirlAmp = 0.017, | ||
uvScale = 2.2, | ||
specularExp = 12.0, | ||
tideAmplitude = 3, | ||
tidePeriod = 40, | ||
fogFactor = 0.13, | ||
fogHeight = 36, | ||
fogAbove = 0.1, | ||
fogDistortion = 2.0, | ||
tideRhym = { { 4, 0.05, 5*6000 } }, | ||
} | ||
|
||
return config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
local conf = { | ||
grow = 0, | ||
colorCorrection = "vec3(1.0, 1.0, 1.0)", | ||
coastColor = "vec3(1.0, 0.25, 0.0)", | ||
coastLightBoost = 0.3, | ||
fogColor = "vec3(1.5, 0.1, 0.0)", | ||
fogFactor = 0.01, | ||
fogHeight = 15, | ||
fogAbove = 4.0, | ||
fogDistortion = 2.0, | ||
tideAmplitude = 0.3, | ||
tidePeriod = 1000, | ||
tideRhym = { { -1, 0.05, 5*6000 } }, | ||
} | ||
|
||
return conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
local conf = { | ||
level = 0, | ||
damage = 150, | ||
tideAmplitude = 3, | ||
tidePeriod = 95, | ||
diffuseEmitTex = "LuaUI/images/lava/lava7_diffuseemit.dds", | ||
normalHeightTex = "LuaUI/images/lava/lava7_normalheight.dds", | ||
losDarkness = 0.7, | ||
colorCorrection = "vec3(1.1, 1.0, 0.88)", | ||
shadowStrength = 1.0, | ||
coastColor = "vec3(2.2, 0.4, 0.0)", | ||
coastLightBoost = 0.7, | ||
coastWidth = 36.0, | ||
fogFactor = 0.08, | ||
fogColor = "vec3(2.0, 0.31, 0.0)", | ||
fogHeight = 85, | ||
fogAbove = 0.18, | ||
|
||
tideRhym = { { -1, 0.25, 5*6000 } }, | ||
} | ||
|
||
return conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
local conf = { | ||
grow = 0, | ||
level = 1, | ||
damage = 75, | ||
uvScale = 1.5, | ||
colorCorrection = "vec3(0.4, 0.09, 1.2)", | ||
losDarkness = 0.8, | ||
coastColor = "vec3(0.8, 0.03, 1.1)", | ||
fogColor = "vec3(0.60, 0.10, 1.1)", | ||
coastLightBoost = 1.3, | ||
tideAmplitude = 1.5, | ||
tidePeriod = 150, | ||
tideRhym = { { 0, 0.3, 5*6000 } }, | ||
} | ||
|
||
return conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.