Weather is (mostly) unhardcoded as of 1.80.8193.14. This will explain how weather works in relation to the limited existing weather types and new ones that could be added.

weathertypes.2da

See weathertypes.2da for how to add new weather lines.

When does Weather Change

The % Snow and % Rain amounts in the area properties will set WEATHER_SNOW or WEATHER_RAIN lines on if the % chance is met every time a player enters the area.

Alternatively you use SetWeather. If so it is suggested the chances for weather (except lightning, see below) are set to 0.

Lightning Note

A quick note here: lightning will happen throughout a single weather cycle (ie until changed, eg; by entering the area again, or by scripting) if the % for lightning is met in the area properties - ie: If it is set to 50% it means if the random number generator says 25, this means lightning fires continually through that weather.

Therefore if this is set to 0% lightning will be impossible, in spite of what weather line is chosen. There is no way to script this. Basically if you want lightning to occur set it to 100%, if not then 0%. If you want to program this in it might be possible using progfx or attach_to_scene and the skybox, or having the lighting attached to the general weather animation.

New Weathers

The game doesn't include any proper "ready to fit" visual effects for new weathers. This is because the fx_rain and fx_snow setup a constant, looping animation of falling things around the player.

The game essentially has 4 spawn points that are fitted into the PC's vision, and follow the player around. They are relative to the player, so snow for instance looks like it is moving with the player. Keep this in mind when creating new ones and look at fx_rain and fx_snow for examples.

  • No labels