Weather

This page describes **weather**, conditions that alter the appearance of the game and which can have other effects too. It also describes fogs, which are transparent pictures overlaid on the screen to depict fog, mist, etc.

## Overworld weather

Overworld weather is weather that appears in the game as the player walks around maps, as in the picture above. There are seven kinds of weather, plus the generic "no weather" type. These are defined in the script section **Weather** as follows:

Even though overworld weather types have ID numbers, they are always referred to by their IDs (names as symbols, i.e. with a colon in front of their name) in the scripts, and by their names in the PBS file "map\_metadata.txt".

The ID (symbol) of the current overworld weather is stored in `$game_screen.weather_type`.

Each weather type has its own animation, as described above. The parameters for these animations are (mostly) defined in the script section **Weather**.

Certain types of overworld weather can determine the default in-battle terrain for battles that take place in that weather. In the script section **Overworld\_BattleStarting** is `def prepare_battle`, which sets this. The setting `OVERWORLD_WEATHER_SETS_BATTLE_TERRAIN` determines whether in-battle terrain can be created by the overworld weather. This terrain will be permanent, but only applies if there is no other terrain in effect (caused by a move/ability).

Each type of overworld weather has a category. The category determines the default in-battle weather for battles that take place in that weather. In the script section **Overworld\_BattleStarting** is `def prepare_battle`, which sets the in-battle weather depending on the overworld weather's category. This weather will be permanent, but only applies if there is no other weather in effect (caused by a move/ability).

When entering a map with weather in the `:Rain` category, all berry plants on that map will be automatically watered at that time. Overworld weather has no other effects.

### Setting weather for a map

*Main article: Map metadata*
Each map has its own metadata, defined in the PBS file "map\_metadata.txt". There is one map metadata property called "Weather", which defines the weather for that map. This metadata has two fields: the weather type, and the probability of it occurring (out of 100). For example:

```
Weather = Snow,50

```

This means that, when the map is entered, there is a 50% chance that it will start to snow.

The weather's probability is checked each time the player enters the map, which means if the probability isn't 100%, the player could simply leave and re-enter the map to change whether the weather exists. This is generally considered undesirable.

## In-battle weather

In-battle weather is a lingering effect, similar to lingering move effects (e.g. Spikes, Stealth Rock).

There are three ways to have in-battle weather:

* Use a move that induces the weather (lasts for 5 turns).
* Have a Pokémon in battle with a weather-inducing ability (lasts for 5 turns, indefinitely or until that Pokémon switches out, depending on the version of the battle mechanics used and the ability that causes it).
* Enter a battle on a map where there is overworld weather (lasts indefinitely).

The types of in-battle weather are defined in the script section **BattleWeather**. They are as follows:

* :None
* :Sun
* :Rain
* :Sandstorm
* :Hail
* :HarshSun
* :HeavyRain
* :StrongWinds
* :ShadowSky

These weather types have a variety of effects, which will not be described here.

## Fogs

Fogs are semi-transparent images that are overlaid on the screen to give the impression of a fog, mist, cloud shadows, beams of sunlight, etc. filling the map.

These fog images are stored in the folder "Graphics/Fogs". The image will be tiled, so you don't need an image as big as the map.

To display the fog for a map, you will need to use the event command "Change Map Settings" (choosing "Fog Graphic"). The event that contains this command should have a trigger of Parallel Process, which means that the event will run (and the fog appear) as soon as the player enters the map. Only perform this event command if the fog hasn't already been set, though, to avoid lag.