TES ReloadedForum
TES Reloaded is one of the biggest project of the modding community.
It is a plugin for Oblivion, Skyrim and Fallout New Vegas.
HAVE FUN!
- Just_Chill
- Posts : 21
Join date : 2021-01-05
"Water.ini" settings
Wed 20 Jan 2021, 23:02
Hello,
I would like to set up specific water settings for a dungeon.
However, my problem is that I have 2 different types of water in that dungeon where one does damage and the other doesn't.
Is it somehow possible to adress both water types separately in the INI?
As the cell entry would just overwrite both of them, while I want one to look like a thick acid and the other like normal water.
Kindest regards,
JC
I would like to set up specific water settings for a dungeon.
However, my problem is that I have 2 different types of water in that dungeon where one does damage and the other doesn't.
Is it somehow possible to adress both water types separately in the INI?
As the cell entry would just overwrite both of them, while I want one to look like a thick acid and the other like normal water.
Kindest regards,
JC
- Just_Chill
- Posts : 21
Join date : 2021-01-05
Re: "Water.ini" settings
Wed 20 Jan 2021, 23:43
In addition:
I came across another issue.
There is a big lake in the middle of the worldspace which has bad water (does damage).
This lake only has a small region called "Krater".
Using that region for water changes works, but when leaving the region the water immediately turns back normal (visually).
I am using OR on Nehrim, just in case anyone is wondering about my request. ^^
I'm not sure if I remember that dungeon correctly with the 2 water types (I know a dungeon can normally only have 1 but I think the other water was placed by hand), as it is long ago.
But back then, we used OBGE to adress specific water setups.
Was a bit different as an INI for each cell had to be made, but it either supported INIs for the water type.
Would it be possible to adress water types directly in the INI of OR too?
Kindest regards,
JC
I came across another issue.
There is a big lake in the middle of the worldspace which has bad water (does damage).
This lake only has a small region called "Krater".
Using that region for water changes works, but when leaving the region the water immediately turns back normal (visually).
I am using OR on Nehrim, just in case anyone is wondering about my request. ^^
I'm not sure if I remember that dungeon correctly with the 2 water types (I know a dungeon can normally only have 1 but I think the other water was placed by hand), as it is long ago.
But back then, we used OBGE to adress specific water setups.
Was a bit different as an INI for each cell had to be made, but it either supported INIs for the water type.
Would it be possible to adress water types directly in the INI of OR too?
Kindest regards,
JC
- Just_Chill
- Posts : 21
Join date : 2021-01-05
Re: "Water.ini" settings
Thu 21 Jan 2021, 00:53
Just a quick record to have some visuals.
OBGE surely showed wrongfully colored sea water a little longer, but the switch wasn't as noticeable.
And as many of the water settings share the same name, I wonder if such a function as in OBGE would be possible.
I would be very grateful. :-)
And I guess I was wrong about the 2 water types. Which is good as that will be a lot easier for the interiors.
Trying to convert that OBGE mod to OR, as the water settings are almost identical.
Thank you so much for your outstanding work on OR, Alenet!
I love to see this old gem getting enhanced in such an awesome way.
- Just_Chill
- Posts : 21
Join date : 2021-01-05
Re: "Water.ini" settings
Thu 21 Jan 2021, 09:45
Hey, sorry again for the wrongfulness.
I just checked the mod again I linked for OBGE, and realized that there was some sort of patch script, that took care about the water type:
That script is telling that the water settings for the "Kraterwasser" should be loaded when
I wonder if I can come up with something similar for OR... Except that the solution has to be very different, as OR just uses the Water.ini, but no other unique inis for specific areas.
I just checked the mod again I linked for OBGE, and realized that there was some sort of patch script, that took care about the water type:
- Spoiler:
- Code:
scn OBGEWaterScript
float fQuestDelayTime
short WaterFX
; Refs
ref Climate
ref CurWeather
ref OldWeather
ref cell
; Variables
short TimeOfDay
int hasWater
float waterHeight
float fogStart
float fogEnd
float NewFogNear
float NewFogFar
float OldFogNear
float OldFogFar
float sunriseBegin
float sunriseEnd
float sunsetBegin
float sunsetEnd
float frame
short lava
; Transition Values
float sunriseAmount
float dayAmount
float sunsetAmount
float nightAmount
; Colors
float oldfogR
float oldfogG
float oldfogB
float fogR
float fogG
float fogB
float oldsunR
float oldsunG
float oldsunB
float sunR
float sunG
float sunB
array_var CellLight
array_var rgbArray
array_var WaterSettings
; Water Settings
float choppiness
float waveHeight
float waveWidth
float waveSpeed
float reflectivity
float causticsStrength
float shoreFactor
float turbidity
float inScattCoeff
float inExtCoeff_R
float inExtCoeff_G
float inExtCoeff_B
float depthDarkness
float LODdistance
float MinLOD
string_var CurFile
string_var OldCellFile
string_var CurCellFile
string_var CurWorldspace
string_var CurCell
; Other Settings
int showCurLocation
begin GameMode
if GetGameLoaded
let OldWeather := GetCurrentWeatherID
let OldCellFile := "%e"
let WaterFX := LoadEffect "Water.fx"
; Set the water settings
let WaterSettings := ar_Construct StringMap
RunBatchScript "data\shaders\Liquid Water Settings\Water.ini"
let WaterSettings["choppiness"] := choppiness
let WaterSettings["waveHeight"] := waveHeight
let WaterSettings["waveWidth"] := waveWidth
let WaterSettings["waveSpeed"] := waveSpeed
let WaterSettings["reflectivity"] := reflectivity
let WaterSettings["causticsStrength"] := causticsStrength
let WaterSettings["shoreFactor"] := shoreFactor
let WaterSettings["turbidity"] := turbidity
let WaterSettings["inScattCoeff"] := inScattCoeff
let WaterSettings["inExtCoeff_R"] := inExtCoeff_R
let WaterSettings["inExtCoeff_G"] := inExtCoeff_G
let WaterSettings["inExtCoeff_B"] := inExtCoeff_B
let WaterSettings["depthDarkness"] := depthDarkness
let WaterSettings["LODdistance"] := LODdistance
let WaterSettings["MinLOD"] := MinLOD
endif
let CurWorldspace := ToString player.GetParentWorldspace
let cell := player.GetParentCell
let CurCell := ToString cell
; Set special settings if appropriate
if ( GetWaterShader "blend" == 21 ) ; KontaminiertesWasser, KontaminiertesWasserStark
let CurCell := "Contaminated"
endif
if ( GetWaterShader "blend" == 22 ) ; SRKraterwasser
let CurCell := "Crater"
endif
if ( GetWaterShader "blend" == 23 ) ; DungeonWater01Blue2
let CurCell := "Deep"
endif
if ( GetWaterShader "blend" == 24 ) ; SwampWater2
let CurCell := "Swamp"
endif
let CurFile := "data\shaders\Liquid Water Settings\Unique" + CurWorldspace + ".ini"
let CurCellFile := "data\shaders\Liquid Water Settings\Unique" + CurCell + ".ini"
; Set interior cell lighting;
if ( (player.IsInInterior) && (GetCellBehavesAsExterior cell == 0) )
if ( 0 != sv_Compare $CurCellFile OldCellFile)
let CellLight := GetCellLighting cell
let rgbArray := CellLight["fog"]
let fogR := rgbArray[0] / 255
let fogG := rgbArray[1] / 255
let fogB := rgbArray[2] / 255
let sunR := 0
let sunG := 0
let sunB := 0
let fogStart := CellLight["fognear"]
let fogEnd := CellLight["fogfar"]
let CurWorldspace := "Interiors"
endif
else
; Weather Section
let Climate := GetCurrentClimateID
let CurWeather := GetCurrentWeatherID
let sunriseBegin := ( GetClimateSunriseBegin Climate ) / 6 - 1
let sunriseEnd := ( GetClimateSunriseEnd Climate ) / 6
let sunsetBegin := ( GetClimateSunsetBegin Climate ) / 6
let sunsetEnd := ( GetClimateSunsetEnd Climate ) / 6 + 1
if ( GameHour >= ( sunriseEnd ) ) && ( GameHour <= ( sunsetBegin ) )
let sunriseAmount := 0
let dayAmount := 1
let sunsetAmount := 0
let nightAmount := 0
let TimeOfDay := 1
elseif ( GameHour >= ( sunriseBegin ) ) && ( GameHour <= ( sunriseEnd ) )
if ( (GameHour - sunriseBegin)*2 <= sunriseEnd - sunriseBegin )
let sunriseAmount := ( GameHour - sunriseBegin ) * 2 / ( sunriseEnd - sunriseBegin)
let dayAmount := 0
let sunsetAmount := 0
let nightAmount := 1 - ( GameHour - sunriseBegin ) * 2 / ( sunriseEnd - sunriseBegin)
else
let sunriseAmount := 2 - ( GameHour - sunriseBegin ) * 2 / ( sunriseEnd - sunriseBegin)
let dayAmount := ( GameHour - sunriseBegin ) * 2 / ( sunriseEnd - sunriseBegin) - 1
let sunsetAmount := 0
let nightAmount := 0
endif
let TimeOfDay := 0
elseif ( GameHour >= ( sunsetBegin ) ) && ( GameHour <= ( sunsetEnd ) )
if ( (GameHour - sunsetBegin)*2 <= sunsetEnd - sunsetBegin )
let sunriseAmount := 0
let dayAmount := 1 - ( GameHour - sunsetBegin) * 2 / ( sunsetEnd - sunsetBegin)
let sunsetAmount := ( GameHour - sunsetBegin) * 2 / ( sunsetEnd - sunsetBegin)
let nightAmount := 0
else
let sunriseAmount := 0
let dayAmount := 0
let sunsetAmount := 2 - ( GameHour - sunsetBegin) * 2 / ( sunsetEnd - sunsetBegin)
let nightAmount := ( GameHour - sunsetBegin) * 2 / ( sunsetEnd - sunsetBegin) - 1
endif
let TimeOfDay := 2
else
let sunriseAmount := 0
let dayAmount := 0
let sunsetAmount := 0
let nightAmount := 1
let TimeOfDay := 3
endif
if ( TimeOfDay == 3 )
let OldFogNear := GetWeatherFogNightNear OldWeather
let OldFogFar := GetWeatherFogNightFar OldWeather
let NewFogNear := GetWeatherFogNightNear CurWeather
let NewFogFar := GetWeatherFogNightFar CurWeather
else
let OldFogNear := GetWeatherFogDayNear OldWeather
let OldFogFar := GetWeatherFogDayFar OldWeather
let NewFogNear := GetWeatherFogDayNear CurWeather
let NewFogFar := GetWeatherFogDayFar CurWeather
endif
let fogStart := NewFogNear
let fogEnd := NewFogFar
let fogR := ( GetWeatherColor 0 1 CurWeather 0 ) / 255 * sunriseAmount
let fogR += ( GetWeatherColor 0 1 CurWeather 1 ) / 255 * dayAmount
let fogR += ( GetWeatherColor 0 1 CurWeather 2 ) / 255 * sunsetAmount
let fogR += ( GetWeatherColor 0 1 CurWeather 3 ) / 255 * nightAmount
let fogG := ( GetWeatherColor 1 1 CurWeather 0 ) / 255 * sunriseAmount
let fogG += ( GetWeatherColor 1 1 CurWeather 1 ) / 255 * dayAmount
let fogG += ( GetWeatherColor 1 1 CurWeather 2 ) / 255 * sunsetAmount
let fogG += ( GetWeatherColor 1 1 CurWeather 3 ) / 255 * nightAmount
let fogB := ( GetWeatherColor 2 1 CurWeather 0 ) / 255 * sunriseAmount
let fogB += ( GetWeatherColor 2 1 CurWeather 1 ) / 255 * dayAmount
let fogB += ( GetWeatherColor 2 1 CurWeather 2 ) / 255 * sunsetAmount
let fogB += ( GetWeatherColor 2 1 CurWeather 3 ) / 255 * nightAmount
let sunR := ( GetWeatherColor 0 5 CurWeather 0 ) / 255 * sunriseAmount
let sunR += ( GetWeatherColor 0 5 CurWeather 1 ) / 255 * dayAmount
let sunR += ( GetWeatherColor 0 5 CurWeather 2 ) / 255 * sunsetAmount
let sunR += ( GetWeatherColor 0 5 CurWeather 3 ) / 255 * nightAmount
let sunG := ( GetWeatherColor 1 5 CurWeather 0 ) / 255 * sunriseAmount
let sunG += ( GetWeatherColor 1 5 CurWeather 1 ) / 255 * dayAmount
let sunG += ( GetWeatherColor 1 5 CurWeather 2 ) / 255 * sunsetAmount
let sunG += ( GetWeatherColor 1 5 CurWeather 3 ) / 255 * nightAmount
let sunB := ( GetWeatherColor 2 5 CurWeather 0 ) / 255 * sunriseAmount
let sunB += ( GetWeatherColor 2 5 CurWeather 1 ) / 255 * dayAmount
let sunB += ( GetWeatherColor 2 5 CurWeather 2 ) / 255 * sunsetAmount
let sunB += ( GetWeatherColor 2 5 CurWeather 3 ) / 255 * nightAmount
let oldfogR := ( GetWeatherColor 0 1 OldWeather 0 ) / 255 * sunriseAmount
let oldfogR += ( GetWeatherColor 0 1 OldWeather 1 ) / 255 * dayAmount
let oldfogR += ( GetWeatherColor 0 1 OldWeather 2 ) / 255 * sunsetAmount
let oldfogR += ( GetWeatherColor 0 1 OldWeather 3 ) / 255 * nightAmount
let oldfogG := ( GetWeatherColor 1 1 OldWeather 0 ) / 255 * sunriseAmount
let oldfogG += ( GetWeatherColor 1 1 OldWeather 1 ) / 255 * dayAmount
let oldfogG += ( GetWeatherColor 1 1 OldWeather 2 ) / 255 * sunsetAmount
let oldfogG += ( GetWeatherColor 1 1 OldWeather 3 ) / 255 * nightAmount
let oldfogB := ( GetWeatherColor 2 1 OldWeather 0 ) / 255 * sunriseAmount
let oldfogB += ( GetWeatherColor 2 1 OldWeather 1 ) / 255 * dayAmount
let oldfogB += ( GetWeatherColor 2 1 OldWeather 2 ) / 255 * sunsetAmount
let oldfogB += ( GetWeatherColor 2 1 OldWeather 3 ) / 255 * nightAmount
let oldsunR := ( GetWeatherColor 0 5 OldWeather 0 ) / 255 * sunriseAmount
let oldsunR += ( GetWeatherColor 0 5 OldWeather 1 ) / 255 * dayAmount
let oldsunR += ( GetWeatherColor 0 5 OldWeather 2 ) / 255 * sunsetAmount
let oldsunR += ( GetWeatherColor 0 5 OldWeather 3 ) / 255 * nightAmount
let oldsunG := ( GetWeatherColor 1 5 OldWeather 0 ) / 255 * sunriseAmount
let oldsunG += ( GetWeatherColor 1 5 OldWeather 1 ) / 255 * dayAmount
let oldsunG += ( GetWeatherColor 1 5 OldWeather 2 ) / 255 * sunsetAmount
let oldsunG += ( GetWeatherColor 1 5 OldWeather 3 ) / 255 * nightAmount
let oldsunB := ( GetWeatherColor 2 5 OldWeather 0 ) / 255 * sunriseAmount
let oldsunB += ( GetWeatherColor 2 5 OldWeather 1 ) / 255 * dayAmount
let oldsunB += ( GetWeatherColor 2 5 OldWeather 2 ) / 255 * sunsetAmount
let oldsunB += ( GetWeatherColor 2 5 OldWeather 3 ) / 255 * nightAmount
if ( CurWeather != OldWeather )
let fogStart := ( OldFogNear - ( ( OldFogNear - NewFogNear ) * GetCurrentWeatherPercent ) )
let fogEnd := ( OldFogFar - ( ( OldFogFar - NewFogFar ) * GetCurrentWeatherPercent ) )
let fogR := ( oldfogR - ( ( oldfogR - fogR ) * GetCurrentWeatherPercent ) )
let fogG := ( oldfogG - ( ( oldfogG - fogG ) * GetCurrentWeatherPercent ) )
let fogB := ( oldfogB - ( ( oldfogB - fogB ) * GetCurrentWeatherPercent ) )
let sunR := ( oldsunR - ( ( oldsunR - sunR ) * GetCurrentWeatherPercent ) )
let sunG := ( oldsunG - ( ( oldsunG - sunG ) * GetCurrentWeatherPercent ) )
let sunB := ( oldsunB - ( ( oldsunB - sunB ) * GetCurrentWeatherPercent ) )
if ( GetCurrentWeatherPercent == 1.0 )
let OldWeather := CurWeather
endif
endif
let sunR *= ( IsPleasant ) * ( 1 - nightAmount )
let sunG *= ( IsPleasant ) * ( 1 - nightAmount )
let sunB *= ( IsPleasant ) * ( 1 - nightAmount )
endif
; Water Height
let waterHeight := player.GetParentCellWaterHeight
; Temporary
if ( fQuestDelayTime != 0.25 )
let fQuestDelayTime := 0.25
endif
if ( GetWaterShader "blend" == 50 )
SetEffectConstantB WaterFX "lava" 1
else
SetEffectConstantB WaterFX "lava" 0
endif
if ( 0 != sv_Compare $CurCellFile OldCellFile)
if ( showCurLocation == 1 )
Print "Current Worldspace: " + CurWorldspace
Print "Current Cell: " + CurCell
endif
if ( FileExists $CurCellFile )
if ( showCurLocation == 1 )
Print "This cell has custom water settings"
endif
RunBatchScript $CurCellFile
elseif ( FileExists $CurFile )
if ( showCurLocation == 1 )
Print "This cell doesn't have custom water settings."
Print "This worldspace has custom water settings."
endif
RunBatchScript $CurFile
else
if ( showCurLocation == 1 )
Print "This location doesn't have custom water settings."
endif
let choppiness := WaterSettings["choppiness"]
let waveHeight := WaterSettings["waveHeight"]
let waveWidth := WaterSettings["waveWidth"]
let waveSpeed := WaterSettings["waveSpeed"]
let reflectivity := WaterSettings["reflectivity"]
let causticsStrength := WaterSettings["causticsStrength"]
let shoreFactor := WaterSettings["shoreFactor"]
let turbidity := WaterSettings["turbidity"]
let inScattCoeff := WaterSettings["inScattCoeff"]
let inExtCoeff_R := WaterSettings["inExtCoeff_R"]
let inExtCoeff_G := WaterSettings["inExtCoeff_G"]
let inExtCoeff_B := WaterSettings["inExtCoeff_B"]
let depthDarkness := WaterSettings["depthDarkness"]
let LODdistance := WaterSettings["LODdistance"]
let MinLOD := WaterSettings["MinLOD"]
endif
; For the underwater volumetric effects
SetEffectConstantF WaterFX "waveSpeed" waveSpeed
SetEffectConstantF WaterFX "causticsStrength" causticsStrength
SetEffectConstantF WaterFX "turbidity" turbidity
SetEffectConstantF WaterFX "inScattCoeff" inScattCoeff
SetEffectConstantV WaterFX "inExtCoeff" inExtCoeff_R inExtCoeff_G inExtCoeff_B 1
SetEffectConstantF WaterFX "depthDarkness" depthDarkness
; For the default shader hooks
SetShaderConstantF "*" "waveSpeed" waveSpeed 0 0 0
SetShaderConstantF "*" "waterCoefficients" inExtCoeff_R inExtCoeff_G inExtCoeff_B inScattCoeff
SetShaderConstantF "*" "waveParams" choppiness waveWidth waveHeight reflectivity
SetShaderConstantF "*" "waterVolume" causticsStrength shoreFactor turbidity 0
SetShaderConstantF "*" "foamAndLODSettings" 0 0 LODdistance MinLOD
set OldCellFile to sv_Construct "%z" CurCellFile
endif
; Enable the Water if the cell has water
if player.ParentCellHasWater
EnableEffect WaterFX
; For the underwater volumetric effects
SetEffectConstantF WaterFX "fogStart" fogStart
SetEffectConstantF WaterFX "fogEnd" fogEnd
SetEffectConstantV WaterFX "fogColor" fogR fogG fogB 1
SetEffectConstantV WaterFX "sunColor" sunR sunG sunB 1
SetEffectConstantF WaterFX "waterHeight" waterHeight
SetEffectConstantF WaterFX "waveWidth" waveWidth
; For the default shader hooks
SetShaderConstantF "*" "fogColor" fogR fogG fogB 1
SetShaderConstantF "*" "sunColor" sunR sunG sunB nightAmount
else
DisableEffect WaterFX
endif
end
That script is telling that the water settings for the "Kraterwasser" should be loaded when
- Code:
if ( GetWaterShader "blend" == 22 ) ; SRKraterwasser
let CurCell := "Crater"
endif
I wonder if I can come up with something similar for OR... Except that the solution has to be very different, as OR just uses the Water.ini, but no other unique inis for specific areas.
- Just_Chill
- Posts : 21
Join date : 2021-01-05
Re: "Water.ini" settings
Thu 21 Jan 2021, 10:21
Now that was quick. ^^
I simply changed the EditorID from all Wilderness cells around the Krater cell into Krater2, Krater3, Krater4, Krater5, ... up til Krater22.
Then I've added these sections into the Water.ini and it works like a charm.
Being very happy about that solution. I'll send a small donation towards your direction Alenet.
Keep up the good work.
I simply changed the EditorID from all Wilderness cells around the Krater cell into Krater2, Krater3, Krater4, Krater5, ... up til Krater22.
Then I've added these sections into the Water.ini and it works like a charm.
Being very happy about that solution. I'll send a small donation towards your direction Alenet.
Keep up the good work.
Permissions in this forum:
You cannot reply to topics in this forum
|
|