Recently few of my players complained about my night cycle, that even though there were street and houselights they are of no help in the woods. I searched around a bit and couldn't find a way to get nights clearer, so I did it myself! (All the available solutions made daytime also no overcast etc, and I don't want that)
What you have to do is open up dayz_code.pbo from the DayZ mod itself, and find system\DynamicWeatherEffects.sqf
Copy that file to somewherere in your mission file, I copied it to a folder called "fixes"
Now open that sqf, and find a part where it says
It should be lines 148-155
Then edit that part to be like this
That makes it so that between 19:00 and 6:00 server time, there will be no overcast, no fog and no rain. You can mess with the values if you want something else.
Oh and you need to have your compiles.sqf overriden too, get that from dayz_code\init and put it to your missionfile also, I have it on the root of the missionfile.
Then make init.sqf load
and edit compiles.sqf to load
And that's it! If someone has a better way of doing this, I'd love to hear it! But this seems to work just fine. Hope this helps someone else!
What you have to do is open up dayz_code.pbo from the DayZ mod itself, and find system\DynamicWeatherEffects.sqf
Copy that file to somewherere in your mission file, I copied it to a folder called "fixes"
Now open that sqf, and find a part where it says
Code:
_currentOvercast = _this select 0;
_currentFog = _this select 1;
_currentRain = _this select 2;
_currentWeatherChange = _this select 3;
_targetWeatherValue = _this select 4;
_timeUntilCompletion = _this select 5;
_currentWindX = _this select 6;
_currentWindZ = _this select 7;
Then edit that part to be like this
Code:
if(daytime<6||daytime>19)then {
_currentOvercast = 0;
_currentFog = 0;
_currentRain = 0;
_currentWeatherChange = _this select 3;
_targetWeatherValue = _this select 4;
_timeUntilCompletion = _this select 5;
_currentWindX = _this select 6;
_currentWindZ = _this select 7;
}
else {
_currentOvercast = _this select 0;
_currentFog = _this select 1;
_currentRain = _this select 2;
_currentWeatherChange = _this select 3;
_targetWeatherValue = _this select 4;
_timeUntilCompletion = _this select 5;
_currentWindX = _this select 6;
_currentWindZ = _this select 7;
};
Oh and you need to have your compiles.sqf overriden too, get that from dayz_code\init and put it to your missionfile also, I have it on the root of the missionfile.
Then make init.sqf load
Code:
call compile preprocessFileLineNumbers "compiles.sqf";
Code:
execVM "fixes\DynamicWeatherEffects.sqf";
And that's it! If someone has a better way of doing this, I'd love to hear it! But this seems to work just fine. Hope this helps someone else!