Morrowind Mod:XSetWeatherFog

The UESPWiki – Your source for The Elder Scrolls since 1995
Jump to: navigation, search

A function added by MGE XE.

XSetWeatherFog sets the fog color. You can also do it by editing morrowind.ini.
New values are not stored in savegames and will be lost when you exit the game. Setting weather data takes effect immediately.

Syntax[edit]

XSetWeatherFog weatherID(float) time_enum(float) red(float) green(float) blue(float)
weatherID -> weather type as used in ChangeWeather
time_enum -> sunrise = 0, day = 1, sunset = 2, night = 3
rgb -> 0-255

Example[edit]

short skycolor
short rn
short rn1
short rn2
short rn3
short rn4
short rn5
short rn6
short rn7
short rn8
short rn9
short rn10
short rn11
short weather
short timeofday
whilex ( skycolor )
        set rn to random 255                    ;random 256 crashes the game
        set rn1 to random 255
        set rn2 to random 255
        set rn3 to random 255
        set rn4 to random 255
        set rn5 to random 255
        set rn6 to random 255
        set rn7 to random 255
        set rn8 to random 255
        set rn9 to random 255
        set rn10 to random 255
        set rn11 to random 255
        XSetWeatherSky          weather timeofday rn rn1 rn2                    
        XSetWeatherFog          weather timeofday rn3 rn4 rn5                   
        XSetWeatherAmbient      weather timeofday rn6 rn7 rn8   
        XSetWeatherSun          weather timeofday rn9 rn10 rn11         
        set timeofday to ( timeofday + 1 )
        if ( timeofday == 4 )
                set weather to ( weather + 1 )
                set timeofday to 0
        endif
        if ( weather == 10 )
                set skycolor to 0
        endif   
endwhile

See Also[edit]

XSetWeatherSky
XSetWeatherAmbient
XSetWeatherScattering
XSetWeatherSun