Scenic Posted November 30, 2013 Report Share Posted November 30, 2013 Explanation: Ever had the problem of low fps due rain on your server? Or you have a low visibility due to fog? In this thread I will explain how to correctly edit & implement a custom dynamicweathereffects.sqf Please read carefully! Difficulty and time taken: Approximately 10 minutes taken Relatively easy installation Premade setups: Skip to your choice by using CTRL + F and searching for the corresponding number! No Rain & Fog Slight Fog, No Rain Low Rain, Slight Fog Extreme rain & fog 1. (No rain or fog) http://pastebin.com/7AenujW7 2. (slight fog, no rain) http://pastebin.com/0E2H2Tgh 3. (Low Rain, Slight Fog) http://pastebin.com/Cts4qWZh 4. (Extreme rain & fog) http://pastebin.com/MYaeWPJf How to install your choice of weather: Create a new .sqf named: DynamicWeatherEffects.sqf Paste the pastebin of your choice into the .sqf Copy the contents of this pastebin: http://pastebin.com/bAcfmWC9 into another .sqf and name it: Compiles.sqf Place both DynamicWeatherEffects & Compiles in your mission.pbo Open your Init.sqf and find: call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; Replace it with: call compile preprocessFileLineNumbers "compiles.sqf"; Re .pbo your mission.pbo and upload it to your server, and it should be good to go! Note: (I'm not 100% sure but I think if you already have a custom compiles.sqf you can add this line) //Start Dynamic Weather execVM "DynamicWeatherEffects.sqf"; WEB11 and looter809 2 Link to comment Share on other sites More sharing options...
WEB11 Posted December 15, 2013 Report Share Posted December 15, 2013 Is there a way to adjust this so it only rains at night and you always get clear weather during day time? Link to comment Share on other sites More sharing options...
BushWookie Posted December 15, 2013 Report Share Posted December 15, 2013 Is there a way to adjust this so it only rains at night and you always get clear weather during day time? you could use the defualt version with a loop that checks if its night or day and while its day set the rain to 0 and when its night let it carry on randomly getting the rain value from the defined min max settings like it usually would WEB11 and Scenic 2 Link to comment Share on other sites More sharing options...
Scenic Posted December 15, 2013 Author Report Share Posted December 15, 2013 As BushWookie said, create a time check loop and have weather disabled until dark :) Link to comment Share on other sites More sharing options...
WEB11 Posted December 15, 2013 Report Share Posted December 15, 2013 Would you mind giving me an example on how to achieve this on a managed server? Would the check be done with BEC scheduler? What is the command it should execute to enable/disable weather? Also I got the OP script to work but it caused my bandages to stop working. Any idea why? Thanks Link to comment Share on other sites More sharing options...
Scenic Posted December 16, 2013 Author Report Share Posted December 16, 2013 Would you mind giving me an example on how to achieve this on a managed server? Would the check be done with BEC scheduler? What is the command it should execute to enable/disable weather? Also I got the OP script to work but it caused my bandages to stop working. Any idea why? Thanks I need to update the compiles.sqf that you need for the download, it appears it is outdated due to the epoch update Updated with new compiles.sqf http://pastebin.com/bAcfmWC9 WEB11 1 Link to comment Share on other sites More sharing options...
WEB11 Posted December 17, 2013 Report Share Posted December 17, 2013 I need to update the compiles.sqf that you need for the download, it appears it is outdated due to the epoch update Updated with new compiles.sqf http://pastebin.com/bAcfmWC9 Thank you for the fix, I didn't know the problem was in the compiles.sqf. I ran into this info on another post that helped me understand how this is done. Quoting it here so I can find it next time there is an update. To change the weather you need to change the complies.sqf ran to a copy version on server side in the Mission Files / BPO Example: call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; //Compile Regular Functions call compile preprocessFileLineNumbers "compiles.sqf"; //Compile Custom Functions and/or Weather If you put complies in a folder rename accordingly. call compile preprocessFileLineNumbers "folder\compiles.sqf"; //Compile Custom Functions and Weather Down the bottom of the compiles.sqf you will see this. initialized = true; Change that to this. //Start Dynamic Weather execVM "folder\DynamicWeatherEffects.sqf"; initialized = true; Link to comment Share on other sites More sharing options...
WEB11 Posted December 17, 2013 Report Share Posted December 17, 2013 nevermind it seems fine now. Link to comment Share on other sites More sharing options...
HellGamer115 Posted March 24, 2014 Report Share Posted March 24, 2014 how do i make heavy fog at night? can someone help please Link to comment Share on other sites More sharing options...
hambeast Posted March 26, 2014 Report Share Posted March 26, 2014 Figured I'd throw this out there, it is pretty obvious but it helps gain a couple fps. To disable all weather effects simply override your DynamicWeatherEffects.sqf with the following code // nothing to see here Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted April 9, 2014 Report Share Posted April 9, 2014 I have a custom complies.sqf. Instead of copying over the compiles.sqf with every Epoch update, I simply call the regular compiles.sqf AND the custom compiles.sqf: call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; //Compile regular functions progressLoadingScreen 0.5; call compile preprocessFileLineNumbers "server_traders.sqf"; //Compile trader configs call compile preprocessFileLineNumbers "custom\compiles.sqf"; //Compile custom compilesprogressLoadingScreen 1.0; My custom compiles.sqf looks like this: fnc_usec_selfActions = compile preprocessFileLineNumbers "custom\fn_selfActions.sqf"; // fnc_usec_selfActions - adds custom actions to dayz code player_build = compile preprocessFileLineNumbers "custom\snap_build\player_build.sqf"; player_buildControls = compile preprocessFileLineNumbers "custom\snap_build\player_buildControls.sqf"; snap_object = compile preprocessFileLineNumbers "custom\snap_build\snap_object.sqf"; So I simply add the line loading the DynamicWeatherEffects.sqf to the bottom of that? fnc_usec_selfActions = compile preprocessFileLineNumbers "custom\fn_selfActions.sqf"; // fnc_usec_selfActions - adds custom actions to dayz code player_build = compile preprocessFileLineNumbers "custom\snap_build\player_build.sqf"; player_buildControls = compile preprocessFileLineNumbers "custom\snap_build\player_buildControls.sqf"; snap_object = compile preprocessFileLineNumbers "custom\snap_build\snap_object.sqf"; //Start Dynamic Weather execVM "DynamicWeatherEffects.sqf"; Link to comment Share on other sites More sharing options...
Asian Kid Posted April 11, 2014 Report Share Posted April 11, 2014 Anyone have it so it snows? I want it Some fog and rain and little chance of snow showers Any way you could add this http://www.armaholic.com/page.php?id=13307 Link to comment Share on other sites More sharing options...
kassquatch Posted May 2, 2014 Report Share Posted May 2, 2014 just an update to this. The call to the compiles.sqf is wrong. You dont need to do anything with that. All you have to do is change your missions .pbo -> init.sqf from //Start Dynamic Weather execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; to //Start Dynamic Weather execVM "whereever\youput\yournew\DynamicWeatherEffects.sqf"; Link to comment Share on other sites More sharing options...
DangerRuss Posted May 3, 2014 Report Share Posted May 3, 2014 Anyone have it so it snows? I want it Some fog and rain and little chance of snow showers Any way you could add this http://www.armaholic.com/page.php?id=13307 There are plenty of snow scripts out there. Here's a couple I have. Snowstorm.sqf //Snow Storm //Modified by Audio Rejectz, all credits go to original creators JW - Snow script / BI - Wind & Dust particles "filmGrain" ppEffectEnable true; "filmGrain" ppEffectAdjust [0.02, 1, 1, 0.1, 1, false]; "filmGrain" ppEffectCommit 5; setviewdistance 900; bis_fog = 0.8; setviewdistance 900; 0 setovercast 0.9; 0 setrain 1; //0 setfog 0.8; 0 setfog bis_fog; [] spawn { _delay = 3; sleep 0.01; while {true} do { _delay setovercast 0.9; _delay setrain 1; _delay setfog bis_fog; sleep _delay ; }; }; //--- Wind & Dust [] spawn { waituntil {isplayer player}; setwind [0.201112,0.204166,true]; while {true} do { _ran = ceil random 5; playsound format ["wind_%1",_ran]; _obj = vehicle player; _pos = position _obj; //--- Dust setwind [0.201112*2,0.204166*2,false]; _velocity = [random 10,random 10,-1]; _color = [1.0, 0.9, 0.8]; _alpha = 0.02 + random 0.02; _ps = "#particlesource" createVehicleLocal _pos; _ps setParticleParams [["\Ca\Data\ParticleEffects\Universal\universal.p3d", 16, 12, 8], "", "Billboard", 1, 3, [0, 0, -6], _velocity, 1, 1.275, 1, 0, [9], [_color + [0], _color + [_alpha], _color + [0]], [1000], 1, 0, "", "", _obj]; _ps setParticleRandom [3, [30, 30, 0], [0, 0, 0], 1, 0, [0, 0, 0, 0.01], 0, 0]; _ps setParticleCircle [0.1, [0, 0, 0]]; _ps setDropInterval 0.01; sleep (random 1); deletevehicle _ps; _delay = 10 + random 20; sleep _delay; }; }; //Snow script setWind [0, -5, true]; _obj = player; _pos = position (vehicle _obj); _d = 15; _h = 12; _h1 = 8; _h2 = 4; _density = 20000; _fog1 = "#particlesource" createVehicleLocal _pos; _fog1 setParticleParams [ ["\Ca\Data\ParticleEffects\Universal\universal.p3d" , 16, 12, 13, 0], "", "Billboard", 1, 10, [0, 0, -6], [0, 0, 0], 1, 1.275, 1, 0, [7,6], [[1, 1, 1, 0], [1, 1, 1, 0.04], [1, 1, 1, 0]], [1000], 1, 0, "", "", _obj ]; _fog1 setParticleRandom [3, [55, 55, 0.2], [0, 0, -0.1], 2, 0.45, [0, 0, 0, 0.1], 0, 0]; _fog1 setParticleCircle [0.001, [0, 0, -0.12]]; _fog1 setDropInterval 0.01; _fog2 = "#particlesource" createVehicleLocal _pos; _fog2 setParticleParams [ ["\Ca\Data\ParticleEffects\Universal\universal.p3d" , 16, 12, 13, 0], "", "Billboard", 1, 10, [0, 0, -6], [0, 0, 0], 1, 1.275, 1, 0, [7,6], [[1, 1, 1, 0], [1, 1, 1, 0.04], [1, 1, 1, 0]], [1000], 1, 0, "", "", _obj ]; _fog2 setParticleRandom [3, [55, 55, 0.2], [0, 0, -0.1], 2, 0.45, [0, 0, 0, 0.1], 0, 0]; _fog2 setParticleCircle [0.001, [0, 0, -0.12]]; _fog2 setDropInterval 0.01; _fog3 = "#particlesource" createVehicleLocal _pos; _fog3 setParticleParams [ ["\Ca\Data\ParticleEffects\Universal\universal.p3d" , 16, 12, 13, 0], "", "Billboard", 1, 10, [0, 0, -6], [0, 0, 0], 1, 1.275, 1, 0, [7,6], [[1, 1, 1, 0], [1, 1, 1, 0.04], [1, 1, 1, 0]], [1000], 1, 0, "", "", _obj ]; _fog3 setParticleRandom [3, [55, 55, 0.2], [0, 0, -0.1], 2, 0.45, [0, 0, 0, 0.1], 0, 0]; _fog3 setParticleCircle [0.001, [0, 0, -0.12]]; _fog3 setDropInterval 0.01; while {true} do { _a = 0; while { _a < _density } do { _pos = position player; _fog1 setpos _pos; _fog2 setpos _pos; _fog3 setpos _pos; 0 setRain 0; _dpos = [((_pos select 0) + (_d - (random (2*_d))) + ((velocity vehicle player select 0)*1)),((_pos select 1) + (_d - (random (2*_d))) + ((velocity vehicle player select 0)*1)),((_pos select 2) + _h)]; drop ["\ca\data\cl_water", "", "Billboard", 1, 7, _dpos, [0,0,-1], 1, 0.0000001, 0.000, 0.7, [0.07], [[1,1,1,0], [1,1,1,1], [1,1,1,1], [1,1,1,1]], [0,0], 0.2, 1.2, "", "", ""]; _a = _a + 1; _dpos = [((_pos select 0) + (_d - (random (2*_d))) + ((velocity vehicle player select 0)*1)),((_pos select 1) + (_d - (random (2*_d))) + ((velocity vehicle player select 0)*1)),((_pos select 2) + _h1)]; drop ["\ca\data\cl_water", "", "Billboard", 1, 7, _dpos, [0,0,-1], 1, 0.0000001, 0.000, 0.7, [0.07], [[1,1,1,0], [1,1,1,1], [1,1,1,1], [1,1,1,1]], [0,0], 0.2, 1.2, "", "", ""]; _dpos = [((_pos select 0) + (_d - (random (2*_d))) + ((velocity vehicle player select 0)*1)),((_pos select 1) + (_d - (random (2*_d))) + ((velocity vehicle player select 0)*1)),((_pos select 2) + _h2)]; drop ["\ca\data\cl_water", "", "Billboard", 1, 7, _dpos, [0,0,-1], 1, 0.0000001, 0.000, 0.7, [0.07], [[1,1,1,0], [1,1,1,1], [1,1,1,1], [1,1,1,1]], [0,0], 0.2, 1.2, "", "", ""]; }; sleep 0.2; }; Also here is a way to use the snow script that Namalsk uses, which ties into your dynamicweather.sqf compliments of Vampire who created DZMS.. http://opendayz.net/threads/tutorial-snow-added-to-dynamic-weather.15294/ Link to comment Share on other sites More sharing options...
MrBombaaa Posted August 18, 2014 Report Share Posted August 18, 2014 Getting this error: 10:41:59 Error in expression <e { _weatherType = "FOG"; }; }; if (_weatherType == "FOG") then { drn_Dynam> 10:41:59 Error position: <_weatherType == "FOG") then { drn_Dynam> 10:41:59 Error Undefined variable in expression: _weathertype 10:41:59 File z\addons\dayz_code\external\DynamicWeatherEffects.sqf, line 333 Link to comment Share on other sites More sharing options...
insertcoins Posted August 18, 2014 Report Share Posted August 18, 2014 Getting this error: 10:41:59 Error in expression <e { _weatherType = "FOG"; }; }; if (_weatherType == "FOG") then { drn_Dynam> 10:41:59 Error position: <_weatherType == "FOG") then { drn_Dynam> 10:41:59 Error Undefined variable in expression: _weathertype 10:41:59 File z\addons\dayz_code\external\DynamicWeatherEffects.sqf, line 333 looks like you didn't follow the instructions there buddy. The error is generated by the dynamicweatherfile that should not be used. Link to comment Share on other sites More sharing options...
hamthejam Posted July 23, 2015 Report Share Posted July 23, 2015 same error as above: 10:09:16 Error in expression <e { _weatherType = "FOG"; }; }; if (_weatherType == "FOG") then { drn_Dynam> 10:09:16 Error position: <_weatherType == "FOG") then { drn_Dynam> 10:09:16 Error Undefined variable in expression: _weathertype 10:09:16 File mpmissions\DayZ_Epoch_24.Napf\custom\DynamicWeatherEffects.sqf, line 333 Link to comment Share on other sites More sharing options...
Disturbed2015 Posted July 28, 2015 Report Share Posted July 28, 2015 Same error19:21:25 Error in expression <e {_weatherType = "FOG";};}; if (_weatherType == "FOG") then { drn_Dynam>19:21:25 Error position: <_weatherType == "FOG") then { drn_Dynam>19:21:25 Error Undefined variable in expression: _weathertype19:21:25 File mpmissions\DayZ_Epoch_24.Napf\custom2\DynamicWeatherEffects.sqf, line 333 Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted July 28, 2015 Report Share Posted July 28, 2015 Here's a link to the DynamicWeatherEffects.sqf I use. It gives clear skies with no clouds all the time. Maybe that's what you guys are looking for: https://www.dropbox.com/s/vuiuoztrlx6lenz/DynamicWeatherEffects.sqf?dl=0 Put that in your mission pbo and call it from init.sqf, such as this: execVM "custom\weather\DynamicWeatherEffects.sqf"; Link to comment Share on other sites More sharing options...
Disturbed2015 Posted July 28, 2015 Report Share Posted July 28, 2015 No fog is what I'm looking for. And I have followed the guide and fog is o (off) but still see the fog ingame? Like it's "off" the map so to speak? Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted July 28, 2015 Report Share Posted July 28, 2015 No fog is what I'm looking for. And I have followed the guide and fog is o (off) but still see the fog ingame? Like it's "off" the map so to speak? What you are seeing is the view distance, most likely. There's a script around here that lets you adjust your view distance using binos and range finders. That way each player can adjust the view distance/fog to their own liking and performance. Link to comment Share on other sites More sharing options...
Disturbed2015 Posted July 30, 2015 Report Share Posted July 30, 2015 Figured I'd throw this out there, it is pretty obvious but it helps gain a couple fps. To disable all weather effects simply override your DynamicWeatherEffects.sqf with the following code // nothing to see here Does this work? Link to comment Share on other sites More sharing options...
hamthejam Posted August 3, 2015 Report Share Posted August 3, 2015 Here's a link to the DynamicWeatherEffects.sqf I use. It gives clear skies with no clouds all the time. Maybe that's what you guys are looking for: https://www.dropbox.com/s/vuiuoztrlx6lenz/DynamicWeatherEffects.sqf?dl=0 Put that in your mission pbo and call it from init.sqf, such as this: execVM "custom\weather\DynamicWeatherEffects.sqf"; thx man, no more errors in rpt ;) Link to comment Share on other sites More sharing options...
Jake SkyRunner Posted August 5, 2015 Report Share Posted August 5, 2015 Hello, I apologize for asking what most if not all of you will see as a very silly question, but I am a first time server owner, and have followed your instructions to the letter, however the part where it then says Edit you init.sql file, I cannot seem to locate this file. Could you possibly tell me the directory I would find that in, or, if I am meant to create it, where I should put it in the file structure on the server. I appreciate all help given. Jake Link to comment Share on other sites More sharing options...
hamthejam Posted August 6, 2015 Report Share Posted August 6, 2015 Hello, I apologize for asking what most if not all of you will see as a very silly question, but I am a first time server owner, and have followed your instructions to the letter, however the part where it then says Edit you init.sql file, I cannot seem to locate this file. Could you possibly tell me the directory I would find that in, or, if I am meant to create it, where I should put it in the file structure on the server. I appreciate all help given. Jake Hi Jake, it's in the MPMissions folder Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now