Jump to content

Forums Announcement

Read-Only Mode for Announcements & Changelogs

Dear Survivors, we'd like to inform you that this forum will transition to read-only mode. From now on, it will serve exclusively as a platform for official announcements and changelogs.

For all community discussions, debates, and engagement, we encourage you to join us on our social media platforms: Discord, Twitter/X, Facebook.

Thank you for being a valued part of our community. We look forward to connecting with you on our other channels!

Stay safe out there,
Your DayZ Team

Sign in to follow this  
Audio Rejectz

Make it snow on your server

Recommended Posts

A few people have been asking for this, so thought id make a fresh post as the other one wasn't specifically aimed at this. PLEASE NOTE - in doing this you will need to change a few of your scripts as BE will kick for script rescription #21 and i think one more. You will need to edit these to let people join

http://www.youtube.com/watch?v=wD2wlYwkE2Q&hd=1

Anyway. here it is.

Open your mission file and create a file called effects.sqf and then put in the code below

effects.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;
};

Then in your ini file put this:

// SnowStorm:
if (!isDedicated) then {
[] execVM "effects.sqf";
};

There you go clear.png

Please note that the way i have this set up is for quite an extreme storm, it really adds some tense moments not being able to see people within a few hundred meters

If you want just the snow, and not the effect i use then delete this from the top code

setviewdistance 900;
bis_fog = 0.8;

setviewdistance 900;
0 setovercast 0.9;
0 setrain 1;
//0 setfog 0.8;
0 setfog bis_fog

Or you can play with the settings to your likeing, setfog 1 is max fog, where as setfog 0 is obviously nothing. The reason i setview distance to 900, is to add performance. As on our server you cant see that far anyway

On another note - If you would like to force your sever to have no fog at all, and let people see over 6000 meters, put this into the effects ini

setviewdistance 9000;
bis_fog = 0;

setviewdistance 9000;
0 setovercast 0;
0 setrain 1;
//0 setfog 0;
0 setfog bis_fog

With the settings above, there will be no fog AT ALL, it wont ever rain and will always be clear skies.

Once you made all your changes, pack it all back into a pbo and all done

Hope this helps

For support on this ill be easier to find here http://opendayz.net/index.php?threads/adding-snow-to-your-server.6960/#post-11455

Edited by Audio Rejectz
  • Like 3

Share this post


Link to post
Share on other sites

It snows in vanilla ArmA 2/OA if you set the date to January or December and make it crappy weather.

Share this post


Link to post
Share on other sites

It snows in vanilla ArmA 2/OA if you set the date to January or December and make it crappy weather.

Yeah i know mate, all though that's not an option for most Dayz users. So wanted to give them the option to have something fitting for the time of year :D

Share this post


Link to post
Share on other sites
Sign in to follow this  

×