tes3weatherController⚓︎
A data structure that handles the weather.
Properties⚓︎
ambientPostSunriseTime⚓︎
Hours added after sunriseDuration before the ambient sunrise transition ends. The transition ends at sunriseHour + sunriseDuration + ambientPostSunriseTime; the sunrise color is the midpoint, not the color at this field's value. This is an offset, not an absolute hour.
Returns:
result(number)
ambientPostSunsetTime⚓︎
Hours added after sunsetDuration before the ambient sunset transition ends. The transition ends at sunsetHour + sunsetDuration + ambientPostSunsetTime; the sunset color is the midpoint, not the color at this field's value. This is an offset, not an absolute hour.
Returns:
result(number)
ambientPreSunriseTime⚓︎
Hours before sunriseHour when the ambient-color transition begins. The window is sunriseHour - ambientPreSunriseTime through sunriseHour + sunriseDuration + ambientPostSunriseTime, split between night → ambientSunriseColor and ambientSunriseColor → day. This is an offset, not an absolute hour.
Returns:
result(number)
ambientPreSunsetTime⚓︎
Hours before sunsetHour when the ambient-color transition begins. The window is sunsetHour - ambientPreSunsetTime through sunsetHour + sunsetDuration + ambientPostSunsetTime, split between day → ambientSunsetColor and ambientSunsetColor → night. This is an offset, not an absolute hour.
Returns:
result(number)
currentFogColor⚓︎
The current fog color. The values can range from 0 to 1.
Returns:
result(tes3vector3)
currentSkyColor⚓︎
The current sky color. The values can range from 0 to 1.
Returns:
result(tes3vector3)
currentWeather⚓︎
Read-only. The current weather.
Returns:
result(tes3weather)
daysRemaining⚓︎
The days remaining for the current weather.
Returns:
result(number)
fogDepthChangeSpeed⚓︎
Duration, in in-game hours, used to interpolate land-fog depth from night to day after sunriseHour and from day to night after sunsetHour. It controls land-fog depth, not fog color.
Returns:
result(number)
fogPostSunriseTime⚓︎
Hours added after sunriseDuration before the fog sunrise transition ends. The transition ends at sunriseHour + sunriseDuration + fogPostSunriseTime; the sunrise color is the midpoint, not the color at this field's value. This is an offset, not an absolute hour.
Returns:
result(number)
fogPostSunsetTime⚓︎
Hours added after sunsetDuration before the fog sunset transition ends. The transition ends at sunsetHour + sunsetDuration + fogPostSunsetTime; the sunset color is the midpoint, not the color at this field's value. This is an offset, not an absolute hour.
Returns:
result(number)
fogPreSunriseTime⚓︎
Hours before sunriseHour when the fog-color transition begins. The window is sunriseHour - fogPreSunriseTime through sunriseHour + sunriseDuration + fogPostSunriseTime, split between night → fogSunriseColor and fogSunriseColor → day. This is an offset, not an absolute hour.
Returns:
result(number)
fogPreSunsetTime⚓︎
Hours before sunsetHour when the fog-color transition begins. The window is sunsetHour - fogPreSunsetTime through sunsetHour + sunsetDuration + fogPostSunsetTime, split between day → fogSunsetColor and fogSunsetColor → night. This is an offset, not an absolute hour.
Returns:
result(number)
hoursBetweenWeatherChanges⚓︎
The hours between weather changes. Stored as a float value.
Returns:
result(number)
hoursRemaining⚓︎
The hours remaining.
Returns:
result(number)
lastActiveRegion⚓︎
Read-only. Provides read-only access to last active region object.
Returns:
result(tes3region)
masser⚓︎
Read-only. Provides read-only access to the Masser moon object.
Returns:
result(tes3moon)
nextWeather⚓︎
Read-only. The next weather.
Returns:
result(tes3weather)
particlesActive⚓︎
Read-only. Provides a list of active weather particles.
Returns:
result(tes3weatherControllerParticle[])
particlesInactive⚓︎
Read-only. Provides a list of inactive weather particles.
Returns:
result(tes3weatherControllerParticle[])
precipitationFallSpeed⚓︎
The z component of the rain or snow fall particle velocity (not including blizzards). Snow fall velocity is also multiplied by snowFallSpeedScale. This value is initialized by the "Precipitation Gravity" entry in morrowind.ini.
Returns:
result(number)
sceneAtmosphere⚓︎
Read-only. Provides access to the scene atmosphere skydome NiNode.
Returns:
result(niNode)
sceneClouds⚓︎
Read-only. Provides access to the scene clouds root NiNode.
Returns:
result(niNode)
sceneNightSky⚓︎
Read-only. Provides access to the scene night sky (stars and nebula) NiNode.
Returns:
result(niNode)
sceneRainRoot⚓︎
Read-only. Provides access to the scene rain root NiNode.
Returns:
result(niNode)
sceneSkyLight⚓︎
Read-only. Provides access to the scene sky light directional light.
Returns:
result(niDirectionalLight)
sceneSkyRoot⚓︎
Read-only. Provides access to the scene sky root NiNode.
Returns:
result(niNode)
sceneSnowRoot⚓︎
Read-only. Provides access to the scene snow root NiNode.
Returns:
result(niNode)
sceneStormRoot⚓︎
Read-only. Provides access to the scene storm root NiNode.
Returns:
result(niNode)
sceneSunBase⚓︎
Read-only. Provides read-only access to the scenesun base NiNode.
Returns:
result(niNode)
sceneSunGlare⚓︎
Read-only. Provides read-only access to the scene sun glare NiNode.
Returns:
result(niNode)
sceneSunVis⚓︎
Read-only. Provides read-only access to the scene sun vis NiNode.
Returns:
result(niNode)
secunda⚓︎
Read-only. Provides read-only access to the Secunda moon object.
Returns:
result(tes3moon)
skyPostSunriseTime⚓︎
Hours added after sunriseDuration before the sky sunrise transition ends. The transition ends at sunriseHour + sunriseDuration + skyPostSunriseTime; the sunrise color is the midpoint, not the color at this field's value. This is an offset, not an absolute hour.
Returns:
result(number)
skyPostSunsetTime⚓︎
Hours added after sunsetDuration before the sky sunset transition ends. The transition ends at sunsetHour + sunsetDuration + skyPostSunsetTime; the sunset color is the midpoint, not the color at this field's value. This is an offset, not an absolute hour.
Returns:
result(number)
skyPreSunriseTime⚓︎
Hours before sunriseHour when the sky-color transition begins. The window is sunriseHour - skyPreSunriseTime through sunriseHour + sunriseDuration + skyPostSunriseTime, split between night → skySunriseColor and skySunriseColor → day. This is an offset, not an absolute hour.
Returns:
result(number)
skyPreSunsetTime⚓︎
Hours before sunsetHour when the sky-color transition begins. The window is sunsetHour - skyPreSunsetTime through sunsetHour + sunsetDuration + skyPostSunsetTime, split between day → skySunsetColor and skySunsetColor → night. This is an offset, not an absolute hour.
Returns:
result(number)
snowFallSpeedScale⚓︎
A multipler for the z component of snow fall particle velocity (not including blizzards). The z component is set by precipitationFallSpeed * snowFallSpeedScale. This value is initialized by the "Snow Gravity Scale" entry in morrowind.ini.
Returns:
result(number)
starsFadingDuration⚓︎
Duration, in in-game hours, of each star fade. Opacity rises from 0 to 1 between starsPostSunsetStart and starsPostSunsetStart + starsFadingDuration, and falls from 1 to 0 between starsPreSunriseFinish and starsPreSunriseFinish + starsFadingDuration.
Returns:
result(number)
starsPostSunsetStart⚓︎
Absolute game hour when the stars start fading in. At construction, this is initialized as sunsetHour + the Morrowind.ini offset (default +1 hour); the field itself is then compared directly with the current game hour.
Returns:
result(number)
starsPreSunriseFinish⚓︎
Absolute game hour when the stars start fading out. At construction, this is initialized as sunriseHour - the Morrowind.ini offset (default offset 2 hours); the field itself is then compared directly with the current game hour. Despite its name, it marks the start of the fade-out.
Returns:
result(number)
sunglareFaderAngleMax⚓︎
The sunglare fader maximum angle.
Returns:
result(number)
sunglareFaderColor⚓︎
The sunglare fader color. The values can range from 0 to 1.
Returns:
result(tes3vector3)
sunglareFaderMax⚓︎
The sunglare fader maximum.
Returns:
result(number)
sunPostSunriseTime⚓︎
Hours added after sunriseDuration before the sunlight-color sunrise transition ends. The transition ends at sunriseHour + sunriseDuration + sunPostSunriseTime; the sunrise color is the midpoint, not the color at this field's value. This is an offset, not an absolute hour.
Returns:
result(number)
sunPostSunsetTime⚓︎
Hours added after sunsetDuration before the sunlight-color sunset transition ends. The transition ends at sunsetHour + sunsetDuration + sunPostSunsetTime; the sunset color is the midpoint, not the color at this field's value. This is an offset, not an absolute hour.
Returns:
result(number)
sunPreSunriseTime⚓︎
Hours before sunriseHour when the sunlight-color transition begins. The window is sunriseHour - sunPreSunriseTime through sunriseHour + sunriseDuration + sunPostSunriseTime, split between night → sunSunriseColor and sunSunriseColor → day. This is an offset, not an absolute hour.
Returns:
result(number)
sunPreSunsetTime⚓︎
Hours before sunsetHour when the sunlight-color transition begins. The window is sunsetHour - sunPreSunsetTime through sunsetHour + sunsetDuration + sunPostSunsetTime, split between day → sunSunsetColor and sunSunsetColor → night. This is an offset, not an absolute hour.
Returns:
result(number)
sunriseDuration⚓︎
Duration, in in-game hours, of the sun's sunrise motion/fade. It also contributes to every sunrise color window: that window lasts Pre + sunriseDuration + Post hours.
Returns:
result(number)
sunriseHour⚓︎
Absolute in-game hour used as the sunrise reference. The sun's sunrise motion begins here; each ambient, fog, sky, and sunlight color transition may begin earlier or end later according to its Pre and Post settings.
Returns:
result(number)
sunsetDuration⚓︎
Duration, in in-game hours, of the sun's sunset motion/fade. It also contributes to every sunset color window: that window lasts Pre + sunsetDuration + Post hours.
Returns:
result(number)
sunsetHour⚓︎
Absolute in-game hour used as the sunset reference. Each ambient, fog, sky, and sunlight color transition may begin earlier or end later according to its Pre and Post settings.
Returns:
result(number)
timescaleClouds⚓︎
The timescale for clouds.
Returns:
result(string)
transitionScalar⚓︎
The scalar transition.
Returns:
result(number)
underwaterColor⚓︎
Color blended into weather colors while underwater. underwaterColorWeight controls the blend amount. Values range from 0 to 1.
Returns:
result(tes3vector3)
underwaterColorWeight⚓︎
Blend weight for underwaterColor: 0 keeps the normal weather color, and 1 replaces it with underwaterColor. Values are clamped to 0–1 during initialization.
Returns:
result(number)
underwaterDayFog⚓︎
Underwater fog-density multiplier used during the daytime portion between the sunrise and sunset transitions.
Returns:
result(number)
underwaterIndoorFog⚓︎
Underwater fog-density multiplier used in ordinary interior cells. Exterior-interior cells use the time-of-day underwater values instead.
Returns:
result(number)
underwaterNightFog⚓︎
Underwater fog-density multiplier used during the nighttime portion outside the sunrise and sunset transitions.
Returns:
result(number)
underwaterSunriseFog⚓︎
Underwater fog-density multiplier used at the sunrise endpoint. In exterior water, it is blended from underwaterNightFog toward underwaterDayFog using sunriseHour and the day midpoint.
Returns:
result(number)
underwaterSunsetFog⚓︎
Underwater fog-density multiplier used at the sunset endpoint. In exterior water, it is blended from underwaterDayFog toward underwaterNightFog between sunsetHour and midnight.
Returns:
result(number)
weathers⚓︎
Read-only. Array-style table with weather objects for each weather type. The indices in the table map to the values in the tes3.weather table.
Returns:
result(table<tes3.weather, tes3weather>)
windVelocityCurrWeather⚓︎
The wind velocity for the current weather.
Returns:
result(tes3vector3)
windVelocityNextWeather⚓︎
The wind velocity for the next weather.
Returns:
result(tes3vector3)
Methods⚓︎
calcSunDamageScalar⚓︎
Calculates the sun damage based on the current weather.
local result = myObject:calcSunDamageScalar()
Parameters:
Returns:
result(number)
switchImmediate⚓︎
Immediately switches the weather to the provided weather parameter.
myObject:switchImmediate(weatherId)
Parameters:
weatherId(tes3.weather): Maps to values in thetes3.weathertable.
switchTransition⚓︎
Transitions the weather to the provided weather parameter based on the weather controller settings.
myObject:switchTransition(weatherId)
Parameters:
weatherId(tes3.weather): Maps to values in thetes3.weathertable.
updateVisuals⚓︎
Updates the weather controller visuals. This should be called after any weather transitions.
myObject:updateVisuals()
Parameters: