Jump to content

More weather functions to replace setWeather() and setTime()


Recommended Posts

Multi Theft Auto supports setting weather to IDs over 19, even though these cause strange weathers that (I believe) you don't normally see in-game. That suggests the ambient effects of a weather type may be controllable individually, but Multi Theft Auto doesn't have enough functions for that.

With more functions for additional control of the weather, it would be possible to write a weather manager resource that avoids the use of setWeather(), setWeatherBlended() and setTime() entirely by emulating the existing weather types, allowing for defining custom weather and custom day/night effects. setTime() would still be used to control the clock on the top-right, but it wouldn't have an effect on anything else, as the weather manager overrides the rest of its effects by automatically setting the sky and illumination levels.

According to the wiki, we already have setSkyGradient(), setSunColor(), setSunSize(), setWindVelocity(), setFogDistance(), setFarClipDistance(), setRainLevel(), and setHeatHaze(), but setWeather() seems to affect several other effects that cannot be controlled with these functions.

Here's a list of suggested functions I've thought of, based on what I've seen when browsing through weather IDs. Please note that I have no idea how weather actually works in-game or whether any of them can be included, I'm just guessing what the editable parameters would be:

  • setWorldIllumination(int Red, int Green, int Blue): Changes the illumination of the world. For example, this function could be used to decrease the visibility of objects during night hours, or make everything look reddish when the sky turns red for some reason.
  • setObjectIllumination(int Red, int Green, int Blue): Like setWorldIllumination, but for elements like peds and vehicles. Weather effects seem to affect objects and the world separately; for example, on weather ID 188/700, the buildings are reddish, while my ped and all of the vehicles seem to be dark cyan...
  • setOvercastColor(int Red, int Green, int Blue): Some weather IDs have overcast clouds that take on their own color (usually blue or dark green), even when the sky is differently colored.
  • setOvercastVelocity(float x, float y): Modifies the speed at which the overcast clouds move.
  • setOvercastVisibility(boolean Visible)
  • setRingCloudColor(int Red, int Green, int Blue): The color of the ring of distant clouds in the background change with time, becoming redder in the evening.
  • setRingCloudVisibility(boolean Visible)
  • setStarColor(int aRed, int aGreen, int aBlue, int bRed, int bGreen, int bBlue): They may be balls of light similar to the sun, in which case their color could be edited, or made invisible by setting them to (0, 0, 0, 0, 0, 0).
  • setStarVisibility(boolean Visible)
  • setSunPosition(float Position)
  • setSunVisibility(boolean Visible)
  • setMoonPosition(float Position)
  • setMoonVisibility(boolean Visible)
  • setMistLevel(float Level): In some places you can see fog clouds close to the ground, like high up on a mountain or during a sandstorm. I'm not sure if the color of the mist differs between weather IDs, or whether the velocity differs.
  • setThunderstormLevel(float Level): Some weather IDs have stormy weather, accompanied with lightning flashes and thunderbooms.

There would be corresponding get* and reset* functions as well.

Link to comment
  • 4 weeks later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...