mgeWeatherConfig⚓︎
Allows control of MGE weather features.
Functions⚓︎
getDistantFog⚓︎
This function returns the distant fog settings for given weather type. These can be found in the Distant Land Weather Settings in MGE XE.
local result = mgeWeatherConfig.getDistantFog(weather)
Parameters:
weather(tes3.weather): Maps to values intes3.weathertable.
Returns:
result(mgeDistantFogTable)
getPerPixelLighting⚓︎
Gets the PPL data for a weather from MGE. These are returned in a table with the sun and ambient keys, as well as the weather redefined. The result table can be modified, then sent back to setPerPixelLighting.
local result = mgeWeatherConfig.getPerPixelLighting(weather)
Parameters:
weather(tes3.weather): Maps to values intes3.weathertable.
Returns:
result(mgePerPixelLightingTable)
getScattering⚓︎
Gets the in- and out-scatter values from MGE. These are returned in a table with the inscatter and outscatter keys. The result table can be modified, then sent back to setScattering.
local scatters = mgeWeatherConfig.getScattering()
Returns:
scatters(mgeScatteringTable)
getSkylightScattering⚓︎
Gets the skylight scatter values from MGE. These are returned in a table with the skylight and mix keys. The result table can be modified, then sent back to setSkylightScattering.
local scatters = mgeWeatherConfig.getSkylightScattering()
Returns:
scatters(mgeSkylightScatteringTable)
getWind⚓︎
Gets the wind speed for a weather from MGE. This is returned in a table with the speed key, as well as the weather redefined. The result table can be modified, then sent back to setWind.
local result = mgeWeatherConfig.getWind(weather)
Parameters:
weather(tes3.weather): Maps to values intes3.weathertable.
Returns:
result(mgeWindTable): A package containing the speed property.
setDistantFog⚓︎
This is used to change the distant fog settings for given weather type.
mgeWeatherConfig.setDistantFog({ weather = ..., distance = ..., offset = ... })
Parameters:
params(table, mgeDistantFogTable)weather(tes3.weather): Maps to values intes3.weathertable.distance(number): Corresponds to the value of "Fog range factor" setting for given weather in the Distant Land Weather Settings of MGE XE.offset(number): Corresponds to the value of "Fog offset" setting for given weather in the Distant Land Weather Settings of MGE XE.
setPerPixelLighting⚓︎
Sets the PPL values for a weather in MGE. The result table of getPerPixelLighting can be modified then passed to this function.
mgeWeatherConfig.setPerPixelLighting({ weather = ..., sun = ..., ambient = ... })
Parameters:
params(table, mgePerPixelLightingTable)weather(tes3.weather): Maps to values intes3.weathertable.sun(number): Corresponds to the value of "Sun brightness multiplier" setting for given weather in the Per-pixel Lighting Settings menu of MGE XE.ambient(number): Corresponds to the value of "Ambient brightness multiplier" setting for given weather in the Per-pixel Lighting Settings menu of MGE XE.
setScattering⚓︎
Sets the in- and out-scatter values for MGE. The result table of getScattering can be modified then passed to this function.
mgeWeatherConfig.setScattering({ inscatter = ..., outscatter = ... })
Parameters:
params(table, mgeScatteringTable)inscatter(tes3vector3, number[])outscatter(tes3vector3, number[])
setSkylightScattering⚓︎
Sets the sky scatter values for MGE. The result table of getSkylightScattering can be modified then passed to this function.
mgeWeatherConfig.setSkylightScattering({ skylight = ..., mix = ... })
Parameters:
params(table, mgeSkylightScatteringTable)skylight(tes3vector3, number[])mix(number): Default:0.44.
setWind⚓︎
Sets the wind speed for a weather in MGE. The result table of getWind can be modified then passed to this function.
mgeWeatherConfig.setWind({ weather = ..., speed = ... })
Parameters:
params(table, mgeWindTable)weather(tes3.weather): Maps to values intes3.weathertable.speed(number)