Ground Fog - Guide

im working on dayz CC 1.8.3 server.

I wanted to spawn fog all over the map

from 19:00 till 7:00

fog NEVER appaers ..

my mission.sqm

by default looks like this :
Code:
#include "\z\addons\dayz_code\system\mission\mission.sqm"

if someone of you got this script working on 1.8.3 chernarus please send me your files
Cheers andrew for replying. Is it possible to be slightly more specific about what I haven't done correctly?
Code:
    };
    class Groups
    {
        items=9;
        class Item0
        {

Code:
class Item1
        {
            side="LOGIC";
            class Vehicles
            {
                items=1;
                class Item0
                {
                    position[]={8810.7705,138.52499,11751.518};
                    id=50;
                    side="LOGIC";
                    vehicle="FunctionsManager";
                    leader=1;
                    lock="UNLOCKED";
                    skill=0.60000002;
                };
            };
        };
        class Item2
        {
            side="LOGIC";
            class Vehicles
            {
                items=1;
                class Item0
                {
                    position[]={8246.3184,9,15485.867};
                    id=1;
                    side="LOGIC";
                    vehicle="Logic";
                    leader=1;
                    skill=0.60000002;
                    init="[this,20000,20000, 19, 7] exec ""fog.sqs""";
                };
            };
        };
        class Item3
        {
            side="LOGIC";
            class Vehicles
            {
                items=1;
                class Item0
                {
                    position[]={15506.952,5.7515168,13229.368};
                    id=2;
                    side="LOGIC";
                    vehicle="Logic";
                    leader=1;
                    skill=0.60000002;
                    init="[this,20000,20000, 19, 7] exec ""fog.sqs""";
                };
            };
        };
        class Item4
        {
            side="LOGIC";
            class Vehicles
            {
                items=1;
                class Item0
                {
                    position[]={12399.751,5.7515168,5074.5273};
                    id=3;
                    side="LOGIC";
                    vehicle="Logic";
                    leader=1;
                    skill=0.60000002;
                    init="[this,20000,20000, 19, 7] exec ""fog.sqs""";
                };
            };
        };
        class Item5
        {
            side="LOGIC";
            class Vehicles
            {
                items=1;
                class Item0
                {
                    position[]={10398.626,5.7515168,8279.4619};
                    id=4;
                    side="LOGIC";
                    vehicle="Logic";
                    leader=1;
                    skill=0.60000002;
                    init="[this,20000,20000, 19, 7] exec ""fog.sqs""";
                };
            };
        };
        class Item6
        {
            side="LOGIC";
            class Vehicles
            {
                items=1;
                class Item0
                {
                    position[]={5149.9814,5.7515168,4864.1191};
                    id=5;
                    side="LOGIC";
                    vehicle="Logic";
                    leader=1;
                    skill=0.60000002;
                    init="[this,20000,20000, 19, 7] exec ""fog.sqs""";
                };
            };
        };
        class Item7
        {
            side="LOGIC";
            class Vehicles
            {
                items=1;
                class Item0
                {
                    //test spawn on my char
                    position[]={18444.3,5773.45,8.08704};
                    id=6;
                    side="LOGIC";
                    vehicle="Logic";
                    leader=1;
                    skill=0.60000002;
                    init="[this,20000,20000, 19, 7] exec ""fog.sqs""";
                };
            };
        };
        class Item8
        {
            side="LOGIC";
            class Vehicles
            {
                items=1;
                class Item0
                {
                    position[]={2122.7954,5773.45,7807.9878};
                    id=7;
                    side="LOGIC";
                    vehicle="Logic";
                    leader=1;
                    skill=0.60000002;
                    init="[this,20000,20000, 19, 7] exec ""fog.sqs""";
                };
            };
        };

Code:
_Center = _this select 0
_dist1=_this select 1
_dist2= _this select 2

?(count _this > 3):_endNight=_this select 3;_startNight=_this select 4; goto "nighttest"
?(count _this == 3):goto "bigloop"

#nighttest
_hours = Date select 3
?((_hours>=_endNight) && (_hours<_startNight)): goto "waittoactivate"

#bigloop
@(Player distance _Center)<_dist2
_i=0
#loop
_height=-0.3
_Rradius=180
_Cloudalpha=1
?((Player distance _Center)>_dist1):_Cloudalpha= 1-(((Player distance _Center) - _dist1)/(_dist2- _dist1))
_radius=(random 10)+random _Rradius
_angle=(random 360)
_size = 20
_col = 1
_CC=[_col,_col,_col,.3*_Cloudalpha]
drop ["\ca\data\cl_basic", "", "Billboard", 8+random 1,8+random 1,  [(getpos Player select 0)+_radius*(sin(_angle)),(getpos Player select 1)+_radius*(cos(_angle)),_height],[0,0,0],5 , 0.2, 0.1568, 0,[_size], [[_col,_col,_col,0],_CC,_CC,_CC,_CC,_CC,_CC,[_col,_col,_col,0]], [0],0,0,"", "",""]
_i=_i+1
?(_i<1800):goto "loop"
~1
?(count _this == 3): goto "bigloop"
goto "nighttest"



#waittoactivate
~300
goto "[B][COLOR=#ff0000]nighttest[/COLOR][/B]"

For Ganeski - You have to pull the file from the dayz code which is linked to you in the mission.sqm. Basically pull that one and edit it to the first post and you should be good to go..


As for vikingr you have a simple problem here..

#waittoactivate
~300
goto "nighttest"


Just replace the goto "nighttest" line with goto "nighttest"
This is basically your problem because it has forum color codes in it because it is red..

(this is the line non red - goto "[B.][COLOR..=#ff0000]nighttest[/..COLOR][/..B]" )
it should be
goto "nighttest"


Its a mistake many make because in that post he is showing you where to put it, just gotta watch out, basically remove that and you should be good to go! Let me know if this works for you and post back if you need any further help
 
Ok guys for those for whom fog doesnt works even without errors, ive found the reason of this problem.

Standard DayZ Mod 1.8.0.3 in coordinates x/z/y "z" as height for fog effect. so if your fog doesnt appear try to
switch y with z cords.

if you spawn fog for example with cords like that : 5149.9814,4864.1191,5.7515168 where z= "4864.1191,5" your fog will spawn high up in the sky, then just switch y with z


in arma 2 y is height only for objects, cars units 3d models.
but for effects z is height.



ive made working my only night fog on entire map.
here you go my script:

mission.sqm
Code:
    };
    class Groups
    {
        items=3;
        class Item0
        {
            side="WEST";
            class Vehicles
            {
                items=100;
                class Item0
                {



Code:
class Item1
        {
            side="LOGIC";
            class Vehicles
            {
                items=1;
                class Item0
                {
                    position[]={708.96582,35.858719,3533.1272};
                    id=50;
                    side="LOGIC";
                    vehicle="FunctionsManager";
                    leader=1;
                    lock="UNLOCKED";
                    skill=0.60000002;
                };
            };
       };
        class Item2
        {
            side="LOGIC";
            class Vehicles
            {
                items=1;
                class Item0
                {
                    position[]={5149.9814,5.7515168,4864.1191};
                    id=1;
                    side="LOGIC";
                    vehicle="Logic";
                    leader=1;
                    skill=0.60000002;
                    init="[this,20000,20000,7,19] exec ""fog.sqs""";
                };
            };
        };
    };



and fog.sqs

Code:
_Center = _this select 0
_dist1=_this select 1
_dist2= _this select 2

?(count _this > 3):_endNight=_this select 3;_startNight=_this select 4; goto "nighttest"
?(count _this == 3):goto "bigloop"

#nighttest
_hours = Date select 3
?((_hours>=_endNight) && (_hours<_startNight)): goto "waittoactivate"

#bigloop
@(Player distance _Center)<_dist2
_i=0
#loop
_height=-0.8
_Rradius=180
_Cloudalpha=1
?((Player distance _Center)>_dist1):_Cloudalpha= 1-(((Player distance _Center) - _dist1)/(_dist2- _dist1))
_radius=(random 10)+random _Rradius
_angle=(random 360)
_size = 6
_col = 1
_CC=[_col,_col,_col,.3*_Cloudalpha]
drop ["\ca\data\cl_basic", "", "Billboard", 8+random 1,8+random 1,  [(getpos Player select 0)+_radius*(sin(_angle)),(getpos Player select 1)+_radius*(cos(_angle)),_height],[0,0,0],5 , 0.2, 0.1568, 0,[_size], [[_col,_col,_col,0],_CC,_CC,_CC,_CC,_CC,_CC,[_col,_col,_col,0]], [0],0,0,"", "",""]
_i=_i+1
?(_i<1800):goto "loop"
~1
?(count _this == 3): goto "bigloop"
goto "nighttest"



#waittoactivate
~120
goto "nighttest"


so, if fog doesnt show up, and there are no errors. Try to change and experiment with coords z/y
 
Just save this as .sqf and put in your mission folder. [] execVM "fog.sqf"; and your good to go (forked from a mission file from an arrogant server admin or owner):
Code:
// Ground Fog - TorturedChunk - j0k3r5 - mmmyum @ OpenDayZ.net
waitUntil {!isNull player};
doofog = {
private ["_obj","_pos","_fog1","_fog2","_fog3","_inVehicle"];
        _inVehicle = (vehicle player != player);
        if (_inVehicle) then {
            _obj = (vehicle player);
        } else {
            _obj = player;
        };
        _pos = position _obj;
        _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;
        _this setVariable ["playerfog", floor time + 5];
        sleep 30;
        deleteVehicle _fog1;
        deleteVehicle _fog2;
        deleteVehicle _fog3;
    };
[] spawn {
    while {true} do {
        if(daytime < 5 || daytime > 18) then {
            if (player getVariable ["playerfog", -1] < time) then {
                player setVariable ["playerfog", floor time + 5];
                player spawn doofog;
                sleep 30;
            };
        };
    };
};

It actually works very well...comparable to that in the OP screenshots if not better.

On a positive note, at least this server owner didn't claim the script as his/hers.
 
Last edited:
The script above was actually written and modified by those in the credit line in a different thread. I was using this in DayZ Mercenary when I was still developing it and it worked quite well. Looked great with Axeman's lights at night time.

If anyone needs help with the script above let me know. Or should you want to use anything from DayZ Mercenary, just hit me up. I dont want $$, just credit for the scripts :)


Good to see OpenDayZ is still thriving!



EDIT: Here is the original Discussion for the script Chris posted.
http://opendayz.net/threads/creepy-night-fog.11205/
 
Last edited:
i was wondering if there is an easy way to set this fog on an static position rather then spawn it around the player.

i tried to call it from the mission sqm and made a few changes:
mission.sqm init line:
Code:
init=" this execvm ""Scripts\ground_fog.sqf"";";

and here is the changed code:
Code:
// Ground Fog - TorturedChunk - j0k3r5 - mmmyum @ OpenDayZ.net
waitUntil {!isNull player};
doofog = {
private ["_obj","_pos","_fog1","_fog2","_fog3","_inVehicle"];
      
        _obj = _this select 0;
        _pos = position _obj;
        _fog1 = "#particlesource" createVehicle _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" createVehicle _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" createVehicle _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;
        _this setVariable ["playerfog", floor time + 5];
        sleep 30;
        deleteVehicle _fog1;
        deleteVehicle _fog2;
        deleteVehicle _fog3;
    };
[] spawn {
    while {true} do {
        if(daytime < 5 || daytime > 21) then {
            if (_obj getVariable ["playerfog", -1] < time) then {
                _obj setVariable ["playerfog", floor time + 5];
                _obj spawn doofog;
                sleep 30;
            };
        };
    };
};

No erros in the RPT but sadly either no fog visible.
Hope someone can help me with it =)

Cheers
 
i was wondering if there is an easy way to set this fog on an static position rather then spawn it around the player.
We abandoned this type of system originally because the fog doesn't saturate well when you try to cover the entire map in it at once. Having it follow the player required less resources and allowed it to have greater density. When we covered the whole map with it the density started doing really weird stuff for reasons we could never determine.
 
I would also really like to have this just on static positions, I can't seem to get the one in the OP to work but I don't really care which one I use I'd just like to get static fog over certain high PVP areas at night to increase the eeriness of it all and heighten the senses of players attempting to loot high value areas. Having it appear only when there's a player around really does give away too much tactically.
 
The actual Installation of this mod was very poorly made, any chance someone could revise it to be step by step, and to actually make sense with directories of where things go? like the other mods posted..
 
I am not sure, thats how it was when I originally found it and modified it, the weird quotation marks work though, feel free to try with only one on each side though, I am sure it wont make much of a difference

that is because when you look at the beginning next to init. you will see just 1 "

then at the begining of the call line were it tell the file itself you see this again ( " ).. you need to close both to call it

so "" for the call file and then another one " for ending the call line.

think they have done it like that.

but i would rather start the line with {" text "}; if that makes it less confusing
 
If you want help then better post what you have done and the RPT log from your server otherwise we can not help you
 
nothing i do gets this to work :/

Okey let me explain you how you need to install this.

1st of all we start by making the script. Call it fog.sqs

Code:
_Center = _this select 0

_dist1=_this select 1
_dist2= _this select 2
_height=-0.3
_Rradius=250
#bigloop
@(Player distance _Center)<_dist2
_i=0
#loop
_Cloudalpha=1
?((Player distance _Center)>_dist1):_Cloudalpha= 1-(((Player distance _Center) - _dist1)/(_dist2- _dist1))
_radius=(random 10)+random _Rradius
_angle=(random 360)
_size = 5
_col = 1
_CC=[_col,_col,_col,.3*_Cloudalpha]
drop ["\ca\data\cl_basic", "", "Billboard", 8+random 1,8+random 1,  [(getpos Player select 0)+_radius*(sin(_angle)),(getpos Player select 1)+_radius*(cos(_angle)),_height],[0,0,0],5 , 0.2, 0.1568, 0,[_size], [[_col,_col,_col,0],_CC,_CC,_CC,_CC,_CC,_CC,[_col,_col,_col,0]], [0],0,0,"", "",""]
_i=_i+1
?(_i<1800):goto "loop"
~1
goto "bigloop"

2 = Make a map in your custom and call it fog and place the fog.sqs from above in this map

3 = Now we need to define were the fog should be located in your mission.sqm..
NOTE: that you can not make pockets of fog.. then it does NOT shw up
instead we are going to make this go over the hole map.


go to your Mission.sqm and find this
Code:
        class Item1
        {
            side="LOGIC";
            class Vehicles
            {
                items=1;
                class Item0
                {
                    position[]={-143.93861,0.52647489,2319.5012};
                    id=50;
                    side="LOGIC";
                    vehicle="FunctionsManager";
                    leader=1;
                    lock="UNLOCKED";
                    skill=0.60000002;
                };
            };
        };
};  === Note that this last bracket needs to be at the bottom after you insert the fog call line ===

Below this we add

Code:
 class Item2
        {
            side="LOGIC";
            class Vehicles
            {
                items=1;
                class Item0
                {
                    position[]={4902.23,2408.26,0};
                    id=3;
                    side="LOGIC";
                    vehicle="Logic";
                    leader=1;
                    skill=0.60000002;
                    init="[this,10000,10000] exec ""custom\fog\fog.sqs""";
                };
            };
        };
     };

Make sure you make your class items going in order.. so if the last one if 1 then the nd one =2

cords already in there are from cherno ( middle of the map ) if you need some other cords get in the game and find your worldmap cords were you want the fog to be starting.

init="[this,10000,10000] exec ""custom\fog.sqs"""; Defines 10000m of fog going from this point in all directions.

4 = then at top of your mission.sqm you find this

Code:
class Groups
    {
        items=2;
        class Item0
        {
            side="WEST";
            class Vehicles
            {
                items=100;
                class Item0
                {
                    position[]={-7244.9355,365.97467,19534.543};
                    azimut=-17.0839;
                    id=11;
                    side="WEST";
                    vehicle="Survivor1_DZ";
                    player="PLAY CDG";
                    skill=0.60000002;
                    init="this enableSimulation false;this allowDammage false;this disableAI 'FSM';this disableAI 'ANIM';this disableAI 'MOVE';";
                };

Chance the 2 into 3 ( cause you defined an extra class ) always make sure your class reads +1 then the actual classes you have.. otherwise it wound load your mission

=========================================================================

And thats it.. Now you should have fog around and it should look like this

2quq24k.jpg



But i think the default is very annoying. also others dont like it cause its to thick - and it takes down your visibility.

instead i have made the clouds bigger and dragged them down into the ground so it becomes more smooth. yet that always stay in pockets.. so its not even.

Dont try it.. it doesnt work.

But this should be an better one

====fog.sqs ====


Code:
_Center = _this select 0
_dist1=_this select 1
_dist2= _this select 2
_height=-1.2
_Rradius=250
#bigloop
@(Player distance _Center)<_dist2
_i=0
#loop
_Cloudalpha=1
?((Player distance _Center)>_dist1):_Cloudalpha= 1-(((Player distance _Center) - _dist1)/(_dist2- _dist1))
_radius=(random 10)+random _Rradius
_angle=(random 360)
_size = 8
_col = 1
_CC=[_col,_col,_col,.3*_Cloudalpha]
drop ["\ca\data\cl_basic", "", "Billboard", 8+random 1,8+random 1,  [(getpos Player select 0)+_radius*(sin(_angle)),(getpos Player select 1)+_radius*(cos(_angle)),_height],[0,0,0],5 , 0.2, 0.1568, 0,[_size], [[_col,_col,_col,0],_CC,_CC,_CC,_CC,_CC,_CC,[_col,_col,_col,0]], [0],0,0,"", "",""]
_i=_i+1
?(_i<1800):goto "loop"
~1
goto "bigloop"

I hopes this helps for you.

I do got to say it eats down your FPS.. and after a few days it will get very annoying.. special on doing missions.

as a host i have taken it out on request of many ppl. takes down there fps and it does not realy make the game better.

But it looks nicer though ;)

Good luck my friend.. hope you enjoy it

General Gizmo


TGP Gaming - Napf - Custom OverPOch - Full Militarized - Real Survival experiance

IP = 69.162.72.162
Port = 7102

 
Thanks Gen. Gizmo, it just seems that everything I do even AFTER deleting the fog.sqs and removing the copied text from the mission file, I cannot log into my server and I have a "wait for host" error.

Apparently I am extremely newb when it comes to editing any Arma files, as the past has proven to be very frustrating. Even following tutorials line by line. I do not understand why adjusting anything in Arma needs to be any other process than drag and drop then editing variables like back in the day. :(

I digress... the servers down, can't bring it back up. If I can fix this error along with adding the fog script, that'd be awesome.

I am using BinPBO to pack, P:\EPOCH\DayZ_1.Chernarus

FOG.SQS -- https://dl.dropboxusercontent.com/u/46786541/EPOCH/fog.sqs
MISSION.SQM -- https://dl.dropboxusercontent.com/u/46786541/EPOCH/mission.sqm
 
I have never had any luck with any pbo program except pbo manager 1.4. One of the packers would produce pbos that were not the same size as the original, corrupted files left and right.
When you have errors like this, if you dont provide your RPT log its very hard for anyone to see if we can help you.
 
Back
Top