Weather params


The following constants/macroes can be used by natives such as CreateExtraWeather, SetExtraWeatherParam_RGB, SetExtraWeatherParam_RGBA, and the like. Now, it is important that you understand how the in-game timecycle works, as this page is written under the assumption that you do so. See our Into TheTimecycle - the fundamental concepts which make up the in-game atmosphere guide for more info.

Generally speaking, there are two kinds of weather parameters - those that are part of a colour set, and those which are attributes of the weather types itself. The latter can be set by CreateExtraWeather, SetExtreWeatherParam_Flags, and SetExtraWeatherParam_Windyness respectively.

Parameters part of a colour set

The following parameters are part of a colour set, and have to be set for each in-game hour.


RGB parameters

RGB parameters can be set using SetExtraWeatherParam_RGB.


Constant Description
WEATHERPARAM_RGB_AMBIENT The ambient colour used for static map objects (or "buildings" as R* calls them).
WEATHERPARAM_RGB_AMBIENT_OBJ The ambient colour used for dynamic map objects.
WEATHERPARAM_RGB_AMBIENT_BL Same as WEATHERPARAM_RGB_AMBIENT, however this value is only used when trails are enabled, and the weather handling type is set to WEATHER_HANDLING_GTAVC.
WEATHERPARAM_RGB_AMBIENT_OBJ_BL Same as WEATHERPARAM_RGB_AMBIENT_OBJ, however this value is only used when trails are enabled, and the weather handling type is set to WEATHER_HANDLING_GTAVC.
WEATHERPARAM_RGB_MATERIALMULT An RGB multiplier for the material colours. It is only used when the Leeds building pipeline is attached to a model (e.g. the VCS neons)
WEATHERPARAM_RGB_DIRECTIONAL The colour of the directional light.
WEATHERPARAM_RGB_SKYTOP The top colour of the sky gradient.
WEATHERPARAM_RGB_SKYBOT The bottom colour of the sky gradient.
WEATHERPARAM_RGB_FOG The colour of the D3D fog.
WEATHERPARAM_RGB_SUNCORE The colour of the "core" of the sun.
WEATHERPARAM_RGB_SUNCORONA The colour of the "corona" of the sun.
WEATHERPARAM_RGB_LOWCLOUDS The colour of the low, thinly stretched clouds.
WEATHERPARAM_RGB_FLUFFYCLOUDSBOT The colour of the lower fluffy clouds. It is used for the San Andreas clouds if the weather is created with WEATHER_HANDLING_DEFAULT, and is used for fluffy clouds if it is not.
WEATHERPARAM_RGB_FLUFFYCLOUDSTOP The colour of the upper fluffy clouds. The colour will be ignored if the handling type is set to WEATHER_HANDLING_DEFAULT.

RGBA parameters

RGBA parameters can be set using SetExtraWeatherParam_RGBA. It should be noted that the alpha component is a float, while the RGB components are integers.


Constant Description
WEATHERPARAM_RGBA_WATER The colour of the in-game water.
WEATHERPARAM_RGBA_POSTFX1 The colour of the primary postfx filter colour.
WEATHERPARAM_RGBA_POSTFX2 The colour of the secondary postfx filter colour.

Integer parameters

Integer parameters can be set using SetExtraWeatherParam_Int.


Constant Description
WEATHERPARAM_INT_SHADOWSTRENGTH Generic shadow strength (used everywhere except where the other shadow strength fields are used). The value can be anything between 0 and 255.
WEATHERPARAM_INT_LIGHTSHDSTRENGTH Intensity for player shadows (CShadows::RenderExtraPlayerShadows). The name is from timecyc.dat, and is of course quite misleading. The value can be anything between 0 and 255.
WEATHERPARAM_INT_POLESHDSTRENGTH Pole shadow strength (used only for lamppost1, lamppost2, lamppost3, doublestreetlght1, and vgsstriptlights1). The value can be anything between 0 and 255.
WEATHERPARAM_INT_WATERFOGALPHA The intensity of the water fog effect. Setting this to 255 will be great for a typical lighthouse scene at night, with lots of fog everywhere.
WEATHERPARAM_INT_RADIOSITYINT The radiosity intensity. It will be ignored unless VCS postfx is used. The value can be anything between 0 and 255. (6)
WEATHERPARAM_INT_RADIOSITYINTLIMIT The intensity limit for the radiosity effect. The value can be anything between 0 and 255. (6)

Float parameters

Float parameters can be set using SetExtraWeatherParam_Float.


Constant Description
WEATHERPARAM_FLOAT_SUNSIZE The size of the in-game sun.
WEATHERPARAM_FLOAT_SPRITESIZE The size of 2dfx coronas.
WEATHERPARAM_FLOAT_SPRITEBGHT The brightness of 2dfx coronas.
WEATHERPARAM_FLOAT_FARCLIP The far clipping distance.
WEATHERPARAM_FLOAT_FOGSTART The distance at which fog will start appearing (not related to D3D fog). It is used for the fogging distance on the world camera: RwCameraSetFogDistance(Scene.m_pRwCamera, CTimeCycle::GetFogStart());
WEATHERPARAM_FLOAT_LIGHTGROUNDBGHT Brightness multiplier for pointlights.
WEATHERPARAM_FLOAT_NIGHTFACTOR An auxiliary multiplier for the ambient RGB colours which makes the game world darker at nighttime. It is ony used when your extra weather uses WEATHER_HANDLING_BULLY as its interpreting type. Interestingly enough, a value of 1.0 should be used at daytime.
WEATHERPARAM_FLOAT_CLOUDALPHA The transparency of the GTA: SA cloud layer. Setting this to 0.0 if you aren't working with GTA: SA weather data is recommended.
WEATHERPARAM_FLOAT_BLUROFFSET The blurring offset for the GTA: VCS trails. It is ignored unless the weather handling type is set to WEATHER_HANDLING_GTAVCS and the colour filter to COLOURFILTER_LEEDS.

Parameters part of the weather type itself

The following parameters are part of the weather type itself (and affect how colour set parameters are used).


Weather handling types

The weather handling type is assigned to a weather type when creating it through CreateExtraWeather. Weather handling types are used to tell the game how to interpret the weather data (as-in, which 3D era game).


Constant Description
WEATHER_HANDLING_DEFAULT Interpret the data as GTA:SA data.
WEATHER_HANDLING_GTAIII Interpret the data as GTA:III data.
WEATHER_HANDLING_GTAVC Interpret the data as GTA:VC data.
WEATHER_HANDLING_GTALCS Interpret the data as GTA:LCS data.
WEATHER_HANDLING_GTAVCS Interpret the data as GTA:VCS data.
WEATHER_HANDLING_BULLY Interpret the data as Bully:SE data.

Weather (base) types

The weather (base) type is assigned to a weather type when creating it through CreateExtraWeather. Weather (base) types should not be confused with weather types. The following constants tell the game if the weather type is rainy, foggy, sunny, snowy, and so on. This means they can not be used by SetWeather and SetPlayerWeather.


Constant Description
WEATHERTYPE_DEFAULT The "default" weather (base) type. It should be used for sunny weather.
WEATHERTYPE_RAINY The created weather type is a rainy weather type. There will be lightning, heavy rainfall, road reflections, decreased traction, cars turning on their headlights, and San Andreas radio DJs will comment about stormy/rainy weather.
WEATHERTYPE_CLOUDY The created weather type is a cloudy weather type. It does not have any effect, but we still recommend using it should this change in the future.
WEATHERTYPE_FOGGY The created weather type is a foggy weather type. Moving fog will be visible, and San Andreas radio DJs will comment about foggy weather.
WEATHERTYPE_HURRICANE The created weather type is a hurricane. It is pretty much the same as WEATHERTYPE_RAINY. Hurricane weather types exist in GTA: VC and GTA: VCS (leftovers can be found on Bully: SE and GTA: LCS) and behave in the same manner. On GTA: UG, all hurricane weathers use WEATHERTYPE_HURRICANE, and so should you.
WEATHERTYPE_SNOWY It will start snowing once used. Like WEATHERTYPE_RAINY, there will be reduced traction and cars will turn on their headlights. (1)
WEATHERTYPE_SNOWSTORM Like WEATHERTYPE_HURRICANE, it does not really differ from WEATHERTYPE_SNOWY. Only Bully's snowstorm weather type uses this. (1)
WEATHERTYPE_SANDSTORM The created weather type is a sandstorm weather type. Brown moving fog will appear, and San Andreas radio DJs will comment about the sandstorm(s).

Colour filter types

The colour filter type is assigned to a weather type when creating it through CreateExtraWeather. Pretty much all 3D era games use a colour filter. All of them take the values from WEATHERPARAM_RGBA_POSTFX1 (WEATHERPARAM_RGBA_POSTFX2 for SA) as input. The colour used is calculated for each pixel on the screen, and the calculation method differs for each colour filter type. Some use a pixel shader, while others do not.


Constant Description
COLOURFILTER_NONE No colour filter will be drawn.
COLOURFILTER_DEFAULT The "default" colour filter. It should NOT be confused with COLOURFILTER_SA. (2)
COLOURFILTER_III The colour filter used in GTA: III. (3)
COLOURFILTER_VC The colour filter used in GTA: VC. (3) (4)
COLOURFILTER_SA The colour filter used in GTA: SA (and in GTA: UG on San Andreas weather types).
COLOURFILTER_LEEDS The colour filter used in GTA: LCS and GTA: VCS. (5)

Flags

Flags can be set using SetExtraWeatherParam_Flags. You can combine multiple flags (it is a bitfield).


Constant Description
WEATHERPARAM_FLAG_HEATHAZE Enables a heat haze effect at daytime.
WEATHERPARAM_FLAG_SUNGLARE Enables a sunglare effect. In Vice City, it is visible on vehicles, while it can also be seen on the in-game water.
WEATHERPARAM_FLAG_NOCLOUDCOVERAGE If this flag is set, clouds will not appear. This is typically used to separate SUNNY weather types from EXTRASUNNY types.
WEATHERPARAM_FLAG_EXTRASUNNYNESS Whether or not this weather is an 'extra sunny' weather type. It is only (indirectly) used for the thin, low clouds and the fluffy clouds which can be enabled/disabled through ToggleLowClouds and ToggleFluffyClouds.
WEATHERPARAM_FLAG_CANHAVERAINBOWS Allows this weather to create rainbows. This flag is typically set if the weather type is either rainy or sunny.
WEATHERPARAM_FLAG_BEASTIE An unknown effect from GTA: VC which is present on EXTRASUNNY_MIAMI.

Notes

  • (1): If you set the wind speed to 0.0, snow will behave like it does in GTA: LCS. If you start increasing the wind speed, it will behave less and less like it does in GTA: LCS, and snowflakes will be affected more and more by the in-game wind speed and direction.
  • (2): The "default" colour filter is labeled as such for the following reasons:
    • It is the most basic colour filter. It uses a pixel shader which blends the source colour with the interpolated WEATHERPARAM_RGBA_POSTFX1 value.
    • Using COLOURFILTER_DEFAULT on a GTA: VC weather should give you the same results as COLOURFILTER_VC, but the trails option will be ignored.
    • Using COLOURFILTER_DEFAULT on a Leeds (GTA:VCS/GTA:LCS) weather should give you the same results as COLOURFILTER_LEEDS, but the trails option will be ignored.
  • (3): Once used, trails can be enabled/disabled in the pause menu.
  • (4): Bully weather currently uses COLOURFILTER_VC as well, however they currently look very obnoxious. We still need to find a proper solution (it is not a bug!!), which may or may not result in changes to the weather parameters or even the natives themselves in a future update.
  • (5): You should use this on Leeds (GTA:VCS/GTA:LCS) weather types. GTA:VCS has custom radiosity and trails, while GTA:LCS does not. See note (6) to find out how to disable it.
  • (6): GTA: SA and GTA: VCS both have a radiosity effect. You can disable it by setting WEATHERPARAM_INT_RADIOSITYINT to 0, and WEATHERPARAM_INT_RADIOSITYINTLIMIT to 255. This method may change in a future update.