# DayZ Weather Control (cfgweather.xml) — Force Sunny, Disable Rain (/docs/dayz/weather)



DayZ's weather (overcast, rain, fog, wind) is driven by `cfgweather.xml` in your mission folder. The default weather is grey and rainy, so the most common request is forcing **clear, sunny skies** — this is how.

File Location [#file-location]

In your active mission folder:

```
mpmissions/dayzOffline.chernarusplus/cfgweather.xml
```

First: Enable the File [#first-enable-the-file]

The root element has two attributes:

```xml
<weather reset="1" enable="1">
```

| Attribute | Meaning                                                                                                                   |
| --------- | ------------------------------------------------------------------------------------------------------------------------- |
| `enable`  | **`1` = this file controls the weather.** If `0`, the engine uses default weather and your edits do nothing.              |
| `reset`   | `1` = start from the values in this file each boot; `0` = resume weather from storage. Use `1` while dialing in settings. |

> Many default missions ship with `enable="0"` — so **step one is setting `enable="1"`**, or nothing you change below takes effect.

How Each Weather Type Works [#how-each-weather-type-works]

Every section (`overcast`, `fog`, `rain`, `windMagnitude`) shares the same structure:

```xml
<overcast>
    <current actual="0.45" time="120" duration="240" />
    <limits min="0.0" max="1.0" />
    <timelimits min="600" max="900" />
    <changelimits min="0.0" max="1.0" />
</overcast>
```

| Element                     | Meaning                                                                                  |
| --------------------------- | ---------------------------------------------------------------------------------------- |
| `current actual`            | Starting value (0–1).                                                                    |
| `current time` / `duration` | How long to reach it / how long it holds (seconds).                                      |
| `limits min/max`            | The **range the value is allowed to reach**. Capping `max` is how you limit bad weather. |
| `timelimits`                | How long a transition between values takes.                                              |
| `changelimits`              | How much it can change per cycle.                                                        |

**Key interaction:** rain has a `<thresholds min="0.6" max="1.0" .../>` — rain can only occur when **overcast is at least 0.6**. So capping overcast alone also kills rain.

Force Permanent Sunny Weather [#force-permanent-sunny-weather]

Set `enable="1"`, then cap the "bad weather" ranges to zero. The simplest reliable recipe:

```xml
<weather reset="1" enable="1">
    <overcast>
        <current actual="0.0" time="60" duration="99999" />
        <limits min="0.0" max="0.0" />
        <timelimits min="600" max="900" />
        <changelimits min="0.0" max="0.0" />
    </overcast>
    <fog>
        <current actual="0.0" time="60" duration="99999" />
        <limits min="0.0" max="0.0" />
        <timelimits min="600" max="900" />
        <changelimits min="0.0" max="0.0" />
    </fog>
    <rain>
        <current actual="0.0" time="60" duration="99999" />
        <limits min="0.0" max="0.0" />
        <timelimits min="60" max="120" />
        <changelimits min="0.0" max="0.0" />
        <thresholds min="1.0" max="1.0" end="60" />
    </rain>
    <!-- keep your windMagnitude / windDirection sections as-is -->
</weather>
```

With overcast, fog, and rain all pinned to `0` (and their `max` at `0` so they can't rise), the sky stays clear.

Just Disable Rain (keep some clouds) [#just-disable-rain-keep-some-clouds]

Leave overcast as-is but cap rain so it never falls — set the rain `limits max="0.0"`, or raise its `thresholds min` above your overcast max so the threshold is never met:

```xml
<rain>
    <limits min="0.0" max="0.0" />
    ...
</rain>
```

Notes [#notes]

* Snow (`snowfall`) only applies on the winter map **Sakhal** — edit that mission's `cfgweather.xml` for snow control.
* Validate the XML before saving — a broken tag reverts you to default weather.
* Edit with the server stopped, then start it.

Related Guides [#related-guides]

* [cfggameplay.json Reference](/docs/dayz/cfggameplay)
* [Central Economy & Loot (types.xml)](/docs/dayz/central-economy)
* [Server Configuration (serverDZ.cfg)](/docs/dayz/server-config)
