Adding snow to your server

Does the snow require us to use heatpacks and warm clothing? I run it on chernarus so curious if i should add warm clothing.
 
@graz
mind sharing your random function? ive taken the snow script removed some lines so it wouldn't interfer and placed it in the dynamic weather sqf in day_code however since theres no randomness to it it just runs all the time.

Wow that's a great idea, I'll try put it up tomorrow, if not Saturday for sure.

Yeah I'll dish it up, it's nothing fancy but that means there's nothing complicated to break. I'll put in some lines for the Dynamic_Weather.sqf so it keeps it overcast when snow falls ect ect. I was going to remove overcast unless it was raining but I haven't got round to it yet!
 
Wow that's a great idea, I'll try put it up tomorrow, if not Saturday for sure.

Yeah I'll dish it up, it's nothing fancy but that means there's nothing complicated to break. I'll put in some lines for the Dynamic_Weather.sqf so it keeps it overcast when snow falls ect ect. I was going to remove overcast unless it was raining but I haven't got round to it yet!

That's exactly what I was gonna work on tonight. I figured I can link it to the overcast something like if overcast is > .3 then it will run the snow script.

I was working on isinbuilding portion of it last night so it won't snow inside.
 
That's exactly what I was gonna work on tonight. I figured I can link it to the overcast something like if overcast is > .3 then it will run the snow script.

I was working on isinbuilding portion of it last night so it won't snow inside.

Sounds like a bit of combining might work out here. I'm very unfamiliar with the actual snow script but instead of turning it off, I'm sure most players would prefer the snow to 'fall' 100m away or something like that, so it's still snowing when your inside but it's not actually snowing inside.
 
Sounds like a bit of combining might work out here. I'm very unfamiliar with the actual snow script but instead of turning it off, I'm sure most players would prefer the snow to 'fall' 100m away or something like that, so it's still snowing when your inside but it's not actually snowing inside.

Yea that's what I meant. Not completely off that would be weird :).
 
Looking forward to this being part of the random weather cycle. I love the snow but people don't seem to appreciate it being on all the time :) they have a habit of leaving, especially after trying to fly a chopper in it..
 
on my server ppl enjoy the snow, they just wish it would be a little more random... sometimes none, sometimes a bit, sometimes a ton.

Would be nice to implement a cold factor to it as well.
 
The issue I'm having is with public variables.

It seems that it's not publishing properly.

Cold and randomization are easy, I just don't know how to get all the scripts talking to each other >_<
 
@Graz

Here's what I've been doing so far. As I'm reading the dynamic weather script I see how rain, overcast and wind are all defined and I'm figuring why not just add snow as an option in there as well.

So I've been going down the code adding where I see the variables for those codes then adding in the snow code so for instance _maximumRain I add one in for _maximumSnow.

I had to change the selection numbers as well to adjust for snow so at the top of the file where debug was 4 it is now 5. Then at the bottom after the script for set rain I copied and pasted it then turned all the rain variables to snow and added spawn "my snow script file"

Idk it makes sense to me but so far I haven't been able to get it to work when I set the variable for starting the server with snow so it's not working yet.

I spent like 4 hrs last night just coding in all lines into the script. After it didn't work I went back and found some lines left open that needed a };

I think there's still something I'm either missing or just maybe misspelled. Ill keep you posted. Also if this work it would require an additional folder (I called mine scripts) to be placed inside the dayz_code folder.
 
Interesting.

I used a server script called Storm_pulse.sqf
Note: This currently doesn't work
Code:
private ["_stormchance"];
//Allow players to settle in - 10 minutes
sleep 600;
 
While {true} do {
Snowstorm = False;
    _stormchance = floor (random 100);
   
    if (_stormchance >= 90) then {
            //posibly later => Add light snow for transition
        SnowStom = True;
    };
    publicVariable "Snowstorm";
    //Wait 30 minutes to check again
    sleep 1800;

The all the snowstorm script has to do is check for Snowstorm == true.
It also makes temperature easy as it just checks for the public variable. I have no idea why this isn't working though >_<
 
Ok I think I got it! I'm gonna do some further testing to see how it works but I set my variables to start with snow on server start and it was working with a random light snow. Ill post how I got it working after some more testing
 
Ok I think I got it! I'm gonna do some further testing to see how it works but I set my variables to start with snow on server start and it was working with a random light snow. Ill post how I got it working after some more testing

Awesome. I really love the snow, but at some point it has to stop or slow down. Tell us how the test goes.
 
Ok I think I got it! I'm gonna do some further testing to see how it works but I set my variables to start with snow on server start and it was working with a random light snow. Ill post how I got it working after some more testing

Excellent. Thanks for picking up the slack there m1lkm8n!!! It appears that writing scripts at 2am isn't the best idea. I've made the temperature adjustments, as I've written warm clothes and Icewindo's hazmats as some what protections against snow.

If milkman gets the public variable I ballsed up working then checking for "snow" is very easy.
So at the top of the temperature page you will see a bunch of weather factors.
Add _snow_factor like this: (Note this is 1.7.5 celle so the variables will be different in your files!)
Add another local variable _is_snowing to track if it's snowing or not. You can use the public variable but I prefer to keep it simple.
Code:
//negative effects
_snow_factor=-20; //[I]Add snow variable[/I]
_water_factor=-50;//Cold water is cold!
_rain_factor        =-10;//In Building, Hazmat & /or Vehicle : 0
_night_factor=-5;
_wind_factor        =-3;//In Building or Vehicle : 0
//    _chill_factor        =  0;  Future Variable
 
_difference= 0;
_hasfireffect= false;
_isinbuilding= false;
_isinvehicle= false;
 
 
 _is_snowing  = if (Snowstorm) then {_is_snowing = true} else {_is_snowing = false};
_raining= if(rain > 0) then {true} else {false};
_sunrise= call world_sunRise;

So you now have a snow factor and a variable to track snow.

Adding the factor into the temperature equation is very, very simple.

You'll see in the positive effects there's a variable called _difference , Your temperature gauge is changed according to this number every minute. The bigger difference, the faster your temperature drops or rises.

Anyway go half way down the page to //negative effects and add this to check factor in snow.

Code:
//NEGATIVE  EFFECTS
 
//Snow
if (_is_snowing) then {
_difference = _difference + _snow_factor;
};
//You'll know it's in the right place if this is below:
//water
if(surfaceIsWater getPosATL player || dayz_isSwimming) then {
_difference = _difference + _water_factor;
};

If it's snowing it'll effect your temperature
 
If you want to not be effected by snow in buildings and/or vehicles

Change
if (_is_snowing) then {


To:
Code:
if (_is_snowing && !_isinbuilding && !_isinvehicle) then {
 
Does this simply take the rain and make it snow instead - Will that mean the snow can vary in density?

And Graz was talking about adding cold to the snow - I'm assuming by changing rain to snow, this gets implemented on its own or am i mistaken?

I will def give this a go tmrw as for now, sleep.
 
When I was running it it seems to have different density. As I was running around it tapered off.

As far as cold goes it still needs a cold script implementation as its not running the setRain function it's spawning the snow script.

Edit- @manatee
I've been thinking since I change the function _rain to _snow if you change it where Graz has it listed above it should work. I'm not really that proficient at this he knows more that I do so hopefully he'll shed some light on ur question. I've gotta stop messing around and focus on finishing up my island so then I can delve more into scripting.

But doing it this way prob isn't the best for everyone because it kills the rain. But for me since my island is all snow it works.
 
Back
Top