How to change the weather and add snow on Dayz Standalone Server Print

  • Dayz Standalone, DayZ, How to change server weather in Dayz, Dayz weather, DayZ Snow, Configuration, Weather
  • 0

 
This articles shows you how to set weather on your Dayz Standalone server including snow.
 
Firstly, access the Citadel Servers Game Panel
Once there proceed to file manager,
Your server's settings are typically found inside /instance/ locate and navigate to this folder,
you will then see various files including cfgweather.xml

File name: cfgweather.xml

Overview

There are several ways of adjusting behaviour of the weather within DayZ.

  • Modding script weather state machine (overriding WorldData::WeatherOnBeforeChange method, see 4_World\Classes\Worlds\Enoch.c for example).
  • Calling MissionWeather( true ) on weather object in the mission init.c ( main() ) and then using selected Weather API calls (see 3_Game\Weather.c for extensive documentation).
  • Using cfgweather.xml file in the mission folder (or world files).

By default, all vanilla server-side missions are using the scripted weather state machine. If you want to adjust the weather behaviour, we recommend to use the cfgweather.xml.

Using cfgweather XML file

Following example shows a full (and later partial) cfgweather XML file alongside with the description of each parameters. All of these parameters do reflect the Weather script API, which can be found in 3_Game\Weather.c.



<?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) -->
        <limits 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>



cfggameplay.json

 

In this file you will find various world settings, if you want to change the average temperatures of the world you can do so here.

Here's an example to make the world permanently cold, resulting in a more snow like world, which would resemble northern Canada, northern Sweden etc.

 

Json configuration of temperature

Snowy world parameters:

"environmentMinTemps": [-20, -20, -16, -8, 0, 4, 8, 9, 4, -4, -12, -18],
"environmentMaxTemps": [-11, -11, -7, 0, 6, 12, 15, 15, 11, 3, -4, -9]

 

 


Was this answer helpful?

« Back