Change weather server side.

Is there a way to get the weather state? I would like to change my house lighting based on weather :)

I have looked a DynamicWeatherEffects.sqf and am adding public variables, as hints, into my mission. So far drn_AskServerDynamicWeatherEventArgs returns true (am assuming that is: true, yes there is weather). Am now trying drn_var_DynamicWeather_Rain, currently returns a zero, am waiting for it to rain and hoping that changes to a one.

What I would really like is to detect thunder..

EDIT: Yes, it's raining and I have a value of 0.51738 returned for my drn_var_DynamicWeather_Rain variable..
 
Ok here is my issue I used the no fog, no weather script works great but when people join it reverts back to having rain and fog how do I get rid of that

this is what I have:

setviewdistance 3500;
bis_fog = 0;

setviewdistance 3500;
0 setovercast 0;
0 setrain 0;
//0 setfog 0;
0 setfog bis_fog;

[] spawn {
_delay = 50;
sleep 0.05;
while {true} do {
_delay setovercast 0.5;
_delay setrain 0;
_delay setfog bis_fog;
sleep _delay ;
};
};
 
Just to says those delay and sleep numbers were lower but when I edited them higher it helped a little but the rain and fog come back at random
 
Ok I did it like your link said to and it works for one player then the second player joins and the weather effects that were turned off come back on for the first player. The third player joins and it gets worse for the second player. Also at random rain appears when rain us set to 0. I would like all the weather to be off for all 50 players all the time. Can anyone help with that?

Thank you in advance
 
all this weather stuff in your init.sqf needs to be gone. everything has to be adjusted in the dynamic weather script file.
 
All this stuff is in a file called nofog.sqf and in the init file is the code to execute never said it was in the init file
 
you dont need that, do what is said in the other post and adjust the values in the dynamicweatherscript ... NOTHING else has to be done only the file you need to put in the fixes folder has to be editted in order to change the weather
 
That would be great if I had access to dayz_code but I do not. I have to use the mission.pbo file to edit weather. This is why I am using the nofog.sqf.

Also doing it this way means people have to download my modified dayz_code.pbo to play on my server manually. With edits to the mission.pbo the client downloads directly from the server.
 
which map and version are you using?


no it will not make them download it, you didnt understand my post where i explained it.
you extract the necessary files, put them in the mission file and call it instead of the default ones. it works and i know it, i use it on my server and my weather is always sunny for everybody
 
ahhh so I unpack the dayz_code.pbo take the dynamic weather stuff out and put it in the mission.pbo if I am understanding this right
 
i dont know if i have the right compiles.sqf for you but if you get me a 1.7.4.4 one i can make so that you can implement it without problems in you mission file
 
Hey ventzero
Any way randomly call this snow script i have instead of rain from the dynamic weather sqf?

I've got a winter map I'm making and I'm trying to figure out how to get it to snow instead of rain
 
I got it to work thank you for pointing me to the correct instructions. No rain, no fog, no wind, no over cast with full moon all the time at night
 
Thanks for the great info ventzero. I was able to change my server's weather, but the viewdistance eludes me. Keep getting "Kicked for Script Restriction #84" (dayz.st) no matter where I try to alter view distance. oh well.
 
Hey guys if you are doing this mod make sure you get the new compiles.sqf and DynamicWeatherEffects.sqf from the new dayz_code in 1.7.5.1 since it appears they have changed them.
Correct, get the file from the current Client Code.
 
Back
Top