---
description: >-
  Weather can be tricky to handle! Even if it may seem daunting, this guide will
  walk you through each step in the weather election process
---

# Weather Selection & Forecasting

## Weather Selection Modes

COZY has 4 weather selection modes that the weather module uses to decide how weather is modified at runtime.

* **Forecast**: The default weather selection mode. Automatically changes the weather taking in all parameters
* **Daily Forecast**: Same as the forecast mode, with the caveat that the weather will only and always change at midnight.
* **Automatic**: Handles transitions between weather profiles automatically but will not change the weather unless told to.
* **Manual**: used for custom weather module solutions only. **Requires C# code to function**

## Forecast Ahead

Use the forecast ahead value to pre-schedule weather profiles in advance. This is useful for displaying information to your players on what weather profile will be played next.

## Weather Selection Process

The weather selection process can seem complex and confusing, but it is really quite simple! The following guide assumes that no forecast is pre-made, but this is useful for understanding that as well.

### Weather Timer Runs Out

Before the next weather plays, the weather timer must reach 0. The weather timer is a simple timer that keeps track of how long a weather profile has been playing.

### Possible Weather Profile Array Established

Based on the currently playing weather profile, an array of weather profiles is generated that can follow it. This is based on the _Forecast Modifier Method_ parameter and can be any one of three options.

1. **Forecast Any Profile Next**: adds all of the weather profiles on the forecast profile to the possible weather profile array.
2. **Forecast Next**: Only the profiles in the Forecast Next array can be added to the possible weather profile array.
3. **Don't Forecast Next**: Adds all the weather profiles on the forecast profile _except_ the profiles in the Don't Forecast Next array.

### Weather Chances Evaluated

Now that the array of possible weather profiles is generated, the chance of each profile is evaluated by condensing the Weighted Random Chance of each profile. For the simplest chance, you can remove all chance effectors and only use the base chance. For more complex results, the chance effectors can be evaluated and multiplied with the base chance allowing for specific weather for time, season, temperature, etc.

### A Random Weather is Selected

Using the chance effectors, a random weather profile is selected. You can read more about how this process works in the [weighted-random-chance-wrc](weighted-random-chance-wrc "mention") page!

### The Weather Timer is Reset

The weather timer is then set to a value between the minimum and maximum time set by the chosen profile. After this amount of time, the weather will change again!
