DayZ 天气编辑器(cfgweather.xml)
不用手写 XML 也能配置 DayZ 服务器的天气:挑一个预设,比如永远晴天或偶尔小雨,用滑块微调云量、雨、雪、雾、风和雷暴,看着动画天空预览实时反应——然后下载可直接使用的 cfgweather.xml,适用于 Chernarus、Livonia 或 Sakhal。
未发现问题——配置看起来是合理的。
提示:大约 20 % 以上就已经很浓了;50 % 及以上就是恐怖片级别的能见度。
服务器路径:mpmissions/dayzOffline.chernarusplus/cfgweather.xml · 上传前请先停服;改动会在重启后生效。
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="1" 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="600" max="900" />
<!-- 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.05" time="120" duration="240" />
<!-- What is the range of the fog value (0..1) -->
<limits min="0.02" max="0.08" />
<!-- How long does it take to the fog to change from one value to other (time in seconds) -->
<timelimits min="900" max="900" />
<!-- 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) -->
<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="60" max="120" />
<!-- 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.6" max="1.0" end="60" />
</rain>
<windMagnitude>
<!-- Initial conditions of the wind magnitude (target value, time to change, how long will it stay), restricted by thresholds (see below) -->
<current actual="8.0" time="120" duration="240" />
<!-- What is the range of the wind magnitude value in m/s -->
<limits min="0.0" max="20.0" />
<!-- How long does it take to the wind magnitude to change from one value to other (time in seconds) -->
<timelimits min="120" max="240" />
<!-- How much should the wind change -->
<changelimits min="0.0" max="20.0" />
</windMagnitude>
<windDirection>
<!-- Initial conditions of the wind direction(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 wind direction (angle in radians) -->
<limits min="-3.14" max="3.14" />
<!-- How long does it take to the wind direction to change from one value to other (time in seconds) -->
<timelimits min="60" max="120" />
<!-- How much should the wind change direction -->
<changelimits min="-1.0" max="1.0" />
</windDirection>
<snowfall>
<!-- Initial conditions of the snowfall (target value, time to change, how long will it stay), restricted by thresholds (see below) -->
<current actual="0.0" time="0" duration="32768" />
<!-- What is the range of the snowfall value (0..1) -->
<limits min="0.0" max="0.0" />
<!-- How long does it take to the snowfall to change from one value to other (time in seconds) -->
<timelimits min="300" max="3600" />
<!-- How much should the snowfall change (0..1) -->
<changelimits min="0.0" max="0.0" />
<!-- What range of the overcast value allows the snowfall to be preset (min, max overcast value, time in seconds it takes for snowfall to stop if the overcast is outside of the specified range) -->
<thresholds min="1.0" max="1.0" end="120" />
</snowfall>
<!-- 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.9" timeout="45"/>
</weather>
现成预设:永远晴天、偶尔小雨、多变、永久风暴、浓雾等等——并按各张地图自动适配(Sakhal 上是下雪而不是下雨)。
抢在玩家之前看到效果:动画天空场景加上模拟的 4 小时天气时间线,直观展示你的数值在游戏里到底意味着什么。
输出安全可靠:合理性检查会揪出根本不可能生效的设置,导出的文件与官方格式完全一致,连注释都保留。
使用方法
先选地图,再挑一个预设作为起点。简易模式覆盖了大多数服务器需要的一切:云量范围、雨量或雪量、雾、风和雷暴——全部是带实时反馈的滑块。
专业模式会开放 cfgweather.xml 的每一个原始数值(current、limits、timelimits、changelimits、thresholds 和 storm),并配有通俗解释,让你精确调节过渡速度和触发区间。
下载 cfgweather.xml,在服务器停止的状态下上传到 mpmissions/<your mission>/,然后重启。编辑器导出时会写入 reset="1" enable="1",这样文件才会真正生效。
常见问题
cfgweather.xml 要放在 DayZ 服务器的哪个位置?
放进任务文件夹:Chernarus 是 mpmissions/dayzOffline.chernarusplus/,Livonia 是 mpmissions/dayzOffline.enoch/,Sakhal 是 mpmissions/dayzOffline.sakhal/。替换文件前先停服,之后再重启——天气改动只有重启后才会生效。
为什么我的 cfgweather.xml 没有任何效果?
原版文件自带的是 enable="0",等于把它彻底关掉——服务器于是使用脚本里的默认天气。请设为 enable="1",并且同时设 reset="1",否则任务存档里保存的天气会覆盖你的起始数值。本编辑器默认导出时两个开关都是打开的。
怎样做到天气永远晴天?
用“永远晴天”预设:它把云量、雾和降水全部锁死为 0,风保持轻柔,并让闪电不可能出现(storm 阈值高于 1.0)。这种把 limits 的最小值和最大值设成相同的写法,正是社区永久锁定天气的标准手法。
怎样设置偶尔下的小雨?
用“偶尔小雨”预设:雨的强度上限约为 35 %,而且只有云量很高时才可能下雨(thresholds 最小值约 0.65),同时允许的云量范围大部分时间都低于这个值。较长的 timelimits 让两场雨之间的天气保持平静。
Chernarus 或 Livonia 上能下雪吗?
不能——下雪是 Sakhal 这类冬季地图的特性。原版文件在 Chernarus 和 Livonia 上明确把 snowfall 保持为 0,在 Sakhal 上则把 rain 保持为 0。编辑器会根据所选地图自动切换降水通道,如果某份配置把两者搞混了还会提醒你。
租一台自己的 DayZ 服务器
使用我们的合作链接,在 GPORTAL 下单每次都能享 10% 优惠——支持 PC、PlayStation 和 Xbox 的服务器。
领取 10% 优惠广告合作伙伴 · 合作链接:你省 10%,我们拿一份佣金。