Page MenuHomeFeedback Tracker

Default cfgweather.xml (when enabled) makes it rain without getting an overcast
Assigned, NormalPublic

Description

We wanted to play around with the new weather settings in cfgweather.xml and therefore enabled the default config that ships with the new mission files in the 1.15 update (resulting in the default config, only the enable property was set to 1 instead of 0, see the Additional info for the config we use).

Before doing any changes, our server restarted and the settings got applied, so we knew what the current settings looked like and what we need to change. However, unfortunately, these default settings result in a weird phenom:
It is raining while there is absolutely no overcast. There was no overcast before or after the rain started (it seems therefore not to be the configuration for the thresholds end seconds).

I then started a DayZ server locally with the same mission configuration, but without any mod that could even remotely interfere with the weather configuration. However, even there I observed the same issue.

That's how it looks throughout the rain is active, it's perfectly sunny, no cloud there and there (it also does not change while it is raining).

Here is another example (sunny + rain + no overcast):

Details

Severity
None
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Config
Additional Information

cfgweather.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!-- 'reset' and 'enable' are a bool, and therefore supports: 0/1, true/false, yes/no -->
<!-- 'reset' controls whether you want to load in the weather from storage or not (false by default) -->
<!-- 'enable' controls whether this file is enabled or not (true by default) -->
<weather reset="0" enable="1">
    <overcast>
        <!-- Initial conditions of the overcast (target value, time to change, how long will it stay) -->
        <current actual="0.45" time="120" duration="240" />
        <!-- What is the range of the overcast value (0..1) -->
        <limits min="0.0" max="1.0" />
        <!-- How long does it take to the overcast to change from one value to other (time in seconds) -->
        <timelimits min="900" max="1800" />
        <!-- How much should the overcast change (0..1) -->
        <changelimits min="0.0" max="1.0" />
    </overcast>
    <fog>
        <!-- Initial conditions of the fog (target value, time to change, how long will it stay) -->
        <current actual="0.1" time="120" duration="240" />
        <!-- What is the range of the fog value (0..1) -->
        <limits min="0.0" max="1.0" />
        <!-- How long does it take to the fog to change from one value to other (time in seconds) -->
        <timelimits min="900" max="1800" />
        <!-- How much should the fog change (0..1) -->
        <changelimits min="0.0" max="1.0" />
    </fog>
    <rain>
        <!-- Initial conditions of the rain (target value, time to change, how long will it stay), restricted by thresholds (see below) -->
        <current actual="0.0" time="120" duration="240" />
        <!-- What is the range of the rain value (0..1) -->
        <limit min="0.0" max="1.0" />
        <!-- How long does it take to the rain to change from one value to other (time in seconds) -->
        <timelimits min="300" max="600" />
        <!-- How much should the rain change (0..1) -->
        <changelimits min="0.0" max="1.0" />
        <!-- What range of the overcast value allows the rain to be preset (min, max overcast value, time in seconds it takes for rain to stop if the overcast is outside of the specified range) -->
        <thresholds min="0.5" max="1.0" end="120" />
    </rain>
    <wind>
        <!-- Maximum wind speed (in m/s) -->
        <maxspeed>20</maxspeed>
        <!-- Min and max (relative 0..1) for the wind speed range, frequency of the wind changes -->
        <params min="0.0" max="1.0" frequency="30" />
    </wind>
    <!-- Lightning density (0..1), threshold for the lightning appearance (tied to the overcast value, 0..1), time (seconds) between the lightning strikes -->
    <storm density="1.0" threshold="0.7" timeout="25"/>
</weather>

Event Timeline

Geez changed the task status from New to Assigned.Dec 13 2021, 10:14 AM

Btw.: Just as a side note as well: We tried to initially get rid of the rain (and from there enable it in small iterations until it fits our needs). However, we tried it with the following config:

<!-- 'reset' controls whether you want to load in the weather from storage or not (false by default) -->
<!-- 'enable' controls whether this file is enabled or not (true by default) -->
<weather reset="0" enable="1">
    <rain>
        <!-- Initial conditions of the rain (target value, time to change, how long will it stay), restricted by thresholds (see below) -->
        <current actual="0.0" time="120" duration="240" />
        <!-- What is the range of the rain value (0..1) -->
        <limit min="0.0" max="0.0" />
        <!-- What range of the overcast value allows the rain to be preset (min, max overcast value, time in seconds it takes for rain to stop if the overcast is outside of the specified range) -->
        <thresholds min="1.0" max="1.0" end="120" />
    </rain>
</weather>

The idea there was: Limit in the rain object should make it impossible to make it rain in the game (as these are, from the documentation as I read it, the outer bounds of possible values).
However, sadly, the rain was not stopping at all, as if this config does not really do anything :/ Maybe we're just doing it wrong.

A second idea (which we not attempted right now), was to set the threshold (min, max) to a value, which is outside the limit (outer bounds) of the overcast:

<!-- 'reset' controls whether you want to load in the weather from storage or not (false by default) -->
<!-- 'enable' controls whether this file is enabled or not (true by default) -->
<weather reset="0" enable="1">
    <overcast>
        <!-- Initial conditions of the overcast (target value, time to change, how long will it stay) -->
        <current actual="0.45" time="120" duration="240" />
        <!-- What is the range of the overcast value (0..1) -->
        <limits min="0.0" max="0.9" />
        <!-- How long does it take to the overcast to change from one value to other (time in seconds) -->
        <timelimits min="900" max="1800" />
        <!-- How much should the overcast change (0..1) -->
        <changelimits min="0.0" max="1.0" />
    </overcast>
    <rain>
        <!-- Initial conditions of the rain (target value, time to change, how long will it stay), restricted by thresholds (see below) -->
        <current actual="0.0" time="120" duration="240" />
        <!-- What is the range of the rain value (0..1) -->
        <limit min="0.0" max="0.0" />
        <!-- What range of the overcast value allows the rain to be preset (min, max overcast value, time in seconds it takes for rain to stop if the overcast is outside of the specified range) -->
        <thresholds min="1.0" max="1.0" end="120" />
    </rain>
</weather>

In this case, it would, from my understanding of the documentation, get very cloudy as if it would start to rain, but actually never start to rain really.

There is, with that, the question, what I misunderstand about this configuration, so that this does not do what it is supposed to do.

Beavis added a subscriber: Beavis.EditedDec 18 2021, 8:46 PM

When looking around on the internet for answers I found out that the reset bool (whether or not the server should read weather data from storage when restarting) MUST be set to 1 (true) or the cfgweather.xml file will not be read. Just setting enable=1 is not enough. After I set both to 1 the weather behaves as expected from the settings in the file, before I did that it would slide to full extremes of everything (rain, fog and wind on 100%) and then never change. People were getting depressed on the server...

Beavis added a comment.EditedJan 15 2022, 7:54 PM

After trying to configure this file for a few weeks without seeing much difference to weather behaviour I have now decided to disable it for now. No matter what values I put in the file, if enabled the weather on the server will slide towards full overcast, fog and rain and then sit on a nearly permanent torrential downpour and thunderstorm. Occasionally it does decrease for a while, but soon goes back to hard rain. My guess is that whatever random function decides what to change when the weather state changes is heavily favouring going towards bad weather. I'd need to do some dedicated testing over time to get an approximation of the ratio, and I don't have the heart to expose the poor players on the servers to that.

For now I've gone back to letting the server use the vanilla settings. The file works if you want to disable weather entirely, but more advanced configuration is pretty much broken in its current state.

Beavis added a comment.EditedFeb 4 2022, 9:10 AM

No news about this? It would be nice if the config option actually worked.

As an example, I am currently running an unmodded 1.16 experimental server. The first few days I let it run on default weather, but after yesterdays update I swapped it over to cfgweather.xml (activated the file, unedited) and within an hour the weather on the server had changed to full torrential rain, storm, thunder and dense fog. And there it stayed until I restarted and disabled cfgweather again, after that it stopped raining after a while and went back to normal.

Using cfgweather.xml definitely has the same tendency as the old init.c method that weather hovers around the extremes of whatever limits you have set in the file. This can't be intended?

Still having this exact issue. Have abandoned the idea of using cfgweather.xml for now. Would be great if a fix could be prioritized. Weather is more important to my players than chain-mail, for example.

Have the same issue. This really needs to be addressed as it's been out since 1.15 and weather is really an important thing.

Beavis added a comment.EditedJul 31 2023, 10:26 PM

Still an issue a year and a half later, without acknowledgement. Cfgweather.json currently only serves to completely disable rain if you want to do that, if you try to use it to customise weather within reasonable limits - that is, you want storms and rain to happen, but perhaps less frequently than in vanilla config, or you want occasional thick fog - you're out of luck. The weather will constantly hover around the maximum allowed limits. Experimenting with my server now and it has been stuck on 100% overcast, rain, fog and wind for hours. And it has been like that since the file was implemented.