Ground Fog - Guide

Is a time set possible for other weather effects such as the snow effect? or the colour corrections? - Can the snow exist in only one part of the map if desired?
 

Attachments

  • effects.sqf
    2.5 KB · Views: 48
  • snowstorm.sqf
    4.5 KB · Views: 46
To make the fog look better, The Radius is how far a player can see it, so for example 250 means the player can see the "puffs" only 250m away after that its clear, SO mine i put radius at 1000 so i can see fog as far as i can see..

also the height of the cloud change it to make it taller, then farther down is size, this is how big each cloud is in meters.. i think default is 5m
you can mess with these settings to your liking.

_height=-0.3 <----- How tall each cloud is. in Meters
_Rradius=250 <----- How far away a player can see it. in Meters
#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 <--- Diameter in meters
_col = 1
_CC=[_col,_col,_col,.3*_Cloudalpha]
 
I added what you guys said and credited you guys in the main post if thats alright with you, just to help people out :D
 
Is a time set possible for other weather effects such as the snow effect? or the colour corrections? - Can the snow exist in only one part of the map if desired?
I am not sure about that, look at the changes deezit made to the fog.sqs and you might be able to use that code in your effects :p
 
If I wanted to add several individual spawn points for the fog, how do I get the Arma2 coordinates? I just have a bunch of worldspace coordinates.
 
To find arma coords I placed a bunch of characters where i wanted fog to be placed in the editor in arma 2 OA then open with notepad ++ in documents/arma2 other profiles/ingamename/missions then what you saved it as
 
To find arma coords I placed a bunch of characters where i wanted fog to be placed in the editor in arma 2 OA then open with notepad ++ in documents/arma2 other profiles/ingamename/missions then what you saved it as

Thanks - I loaded up the editor. In the video below, grabbed coordinates are basically where I'm standing, using default fog.sqs. Are the fog patches behaving the way they should? They seem to pop in and out and animate rather quickly:

 
No they should be more still and it should be like the picture I posted, try changing the data values around in fog.sqs like size of fog etc, so far we have been seeing problems on non cherno dayz so I would try editing the size and radius that you can see in fog.sqs posted above
 
No they should be more still and it should be like the picture I posted, try changing the data values around in fog.sqs like size of fog etc, so far we have been seeing problems on non cherno dayz so I would try editing the size and radius that you can see in fog.sqs posted above

Yeah could be something in DayZ2017 is conflicting with it. Will try to adjust the values around, thanks :)
 
Modification for night only ground fogs :

your fogs.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 = 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
?(count _this == 3): goto "bigloop"
goto "nighttest"
 
 
 
#waittoactivate
~300
goto "[B][COLOR=#ff0000]nighttest[/COLOR][/B]"

mission.sqm for fogs ONLY FROM 7pm to 7am :
Code:
init="[this, 10000, 10000, 7, 19] exec ""fogs.sqs""";

mission.sqm for fogs ALL THE TIME :
Code:
init="[this, 10000, 10000] exec ""fogs.sqs""";

If you have set the hours for the night, it will recheck each 5 minutes (line 35)

I also have modified the radius on my server, set to 180, looks better for me. Hope it helps !
Result : http://imgur.com/a/PcONs
EDIT: last line its not : goto "bigloop" but goto "nighttest"

I have fixed a bug that happened each 5 minutes :) now its ok. Feel free to test

I added what you guys said and credited you guys in the main post if thats alright with you, just to help people out :D
I'm okay, tell me if u have problems
 
I've gotten this to work.

Question now is how to make the fog look nice and dense and not like smoke grenades all over?

Didn't have as much time as I would have liked today to mess around with this, but I tried the following:

Code:
_height=-0.5
_Rradius=0
 
_size = 5

Fog looks quite thick immediately around you, but with very limited range. Anytime I try to expand it, I get that smoke grenade effect you mentioned. Not sure if there's anything else that can be changed but will play some more tomorrow I guess.
 
If anyone finds the best looking setup, something that looks eerie, post it! - Been fiddling with this a bit with mediocre results.
 
If anyone finds the best looking setup, something that looks eerie, post it! - Been fiddling with this a bit with mediocre results.
You ain't gonna find one, since the fog in this script is static, also wind and elevation doesn't affect it.
You would need to use something like that FSM script from armaholic that someone posted in the other thread.
 
How resource intensive is this mechanic?

Many players have problems running ARMA2 already, if I add this in, will it cause signficant FPS loss for my lower-end computer players?

EDIT

Don't get me wrong! It looks great. I just want to know if people will suffer for it.
 
Sorry for the late reply.. I haven't found much problems with lag at all for this, best works at night too, but you would have to ask your players if you were to add it if they noticed any difference, but for a good computer, I noticed no change.
 
I noticed no performance difference at all, but it might be a different story for folks with older PC's. Best bet is to check with them after you put fog in.
 
Works a treat on Reality DayZ 1.7.6.1.

I can't find a tool to give co ordinates taken from the database ie [292,[4399.66,10395.1,0.001]] and convert them into the co ordinates used here, but it works as described here.

Many thanks.
 
Works a treat on Reality DayZ 1.7.6.1.

I can't find a tool to give co ordinates taken from the database ie [292,[4399.66,10395.1,0.001]] and convert them into the co ordinates used here, but it works as described here.

Many thanks.

I use the editor and place markers to see the region they cover.. And take that info and put it in the mission.sqm
 
Back
Top