Jump to content
Derleth

Does cfgweather.xml work as intended?

Recommended Posts

It seems to me that if this file is enabled the weather will simply slide towards the maximum values for overcast, fog and rain and then stay there more or less constantly. So if you have not edited the file you will sit at 100% overcast, fog, rain and wind permanently unless you enable reset to get fair weather at server restart. Occasionally the rain actually does decrease a bit, but it will soon be pouring down again, and the fog has not lifted from the server in days. So, has anyone found a way to configure this file so the weather extremes are possible but not a constant certainty?

Share this post


Link to post
Share on other sites

Interesting, the community server I'm playing on now has no rain or overcast at all. Didn't know that the only weather options are Spain or UK. 

Edited by General Zod

Share this post


Link to post
Share on other sites

How long do you have between your resets?

I believe it clears up allright on my server, but I'll try to doublecheck and replicate the issue if possible.

I think I might have changed some of the rain values, but I don't really remember tbh. (Have been looking through so many files lately that it's kind of a blur by now)

Here's what I use:

Spoiler

<?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="0">
    <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="60" duration="120" />
        <!-- 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>

Edit: As I posted this, I just noticed that 'enable' is set to 0, so theoretically this file isn't even loaded.

I'll do some testing and get back.

Best of luck

Edited by indijdev

Share this post


Link to post
Share on other sites
9 minutes ago, indijdev said:

How long do you have between your resets?

I believe it clears up allright on my server, but I'll try to doublecheck and replicate the issue if possible.

I have server restarts once a day, low traffic server so I have never needed more. I had set weather to be persistent (don't like server restart interfering with anything) but had to change that. In the end I simply disabled the file again and let it run on default weather. 

Share this post


Link to post
Share on other sites

After initial testing, I think you were spot in your OP. This functions seems totally broken.

I can confirm that the values will just slide towards the max value and stay there. After 45 mins. the weather was locked at a constant 100% for fog and rain.

Furthermore, the overcast was at 0 (which is way below the min threshold for rain), but it did not stop anyway. Additionally, all my clothes went from wet to dry after server restart, so it seems the function is also interfering with something else.

Here is the configuration I have tested:

Spoiler

<?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.15" 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="300" max="600" />
        <!-- How much should the overcast change (0..1) -->
        <changelimits min="0.0" max="0.9" />
    </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="300" max="300" />
        <!-- 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="60" duration="120" />
        <!-- 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="0.8" end="30" />
    </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>

Currently doing 2nd round of tests. It's still raining with 0% overcast and climbing.

I'll post further results later.

-indij

Share this post


Link to post
Share on other sites

Upon further testing, here are my findings:

The function actually do seem to work (maybe a couple of restarts were needed) and there do seem to be some randomness involved in everything except the wind.

I think the issue might be that the vanilla config has overcast target set at .45 and the threshold for rain at .5, which means that the weather will hover on the border of rain and overcast most of the time.

Additionally, if I remember correctly, the vanilla times for changes in values is set pretty high, so bad weather can last a long time.

I've changed my setting a bit and this seems to work somewhat.

Spoiler

<?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="1" enable="1">
    <overcast>
        <!-- Initial conditions of the overcast (target value, time to change, how long will it stay) -->
        <current actual="0.35" 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="300" max="600" />
        <!-- 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="300" max="600" />
        <!-- 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="60" duration="120" />
        <!-- 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="0.8" end="30" />
    </rain>
    <wind>
        <!-- Maximum wind speed (in m/s) -->
        <maxspeed>24</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="10" />
    </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>

I'm still adjusting the values and keeping an eye on it, but my server has a 4hr reset cycle (HW can't handle once pr. 24) so it's hard for me to replicate your exact circumstances.

I'll give an update when I've become a bit wiser.

Best of luck!

-indij

Share this post


Link to post
Share on other sites

After my latest testing I'm back to being confused about this. Can't really get a handle on this file.

The best solution I've come up with, to accomplish your goal of the worst weather being a *possibility* but not on a certain cycle, is to use vanilla settings and set server-date to late summer/start fall.

Currently I use 23/7 and I get occasional drizzle and sometimes a more severe storm. That's the best solution I've found. Sorry I couldn't be of more help.

-indij

Share this post


Link to post
Share on other sites
On 1/21/2022 at 1:14 AM, indijdev said:

After my latest testing I'm back to being confused about this. Can't really get a handle on this file.

The best solution I've come up with, to accomplish your goal of the worst weather being a *possibility* but not on a certain cycle, is to use vanilla settings and set server-date to late summer/start fall.

Currently I use 23/7 and I get occasional drizzle and sometimes a more severe storm. That's the best solution I've found. Sorry I couldn't be of more help.

-indij

Yeah, I've been testing this for a while now and I am pretty convinced the cfgweather.xml file is not working as intended. Since most people using it are using it to get rid of bad weather entirely it seems not many people have noticed. @Kyiara Is this something the team could investigate? The customisation options of the file are pretty pointless if the server is more or less constantly stuck att the extreme end of whatever limitations you have set.

As an example - I am running an experimental (unmodded) server right now and for the first few days I used default weather, then after the update today I enabled cfgweather.xml - in the name of science. In less than an hour it had shifted to torrential rain, thunder and dense fog and has stayed there. I did not edit the weather file at all.

Edited by Derleth

Share this post


Link to post
Share on other sites

Has anyone, ever been successful at adjusting the weather to have LESS rain? I'm not looking for Zero rain, just less frequent and shorter duration. I've experimented with various changes to cfgweather.xml to no avail. At times I thought I had it working only to discover that we are getting wet/drenched on a bright sunny day. In my opinion this file is not working properly or is just not intuitive enough. It would be nice if they offered sample configurations for various weather scenarios on the documentation page at https://community.bistudio.com/wiki?title=DayZ:Weather_Configuration'

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×