Skip to content

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:

Returns:


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:

Returns:


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:


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:


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:

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 in tes3.weather table.
    • 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 in tes3.weather table.
    • 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:


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:


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: