Jump to content
kibaBG

How to gradually overcast (cloud cover) on dedi ?

Recommended Posts

Long story short I can successfully change the cloud cover in the beginning of mission  with 

sleep 0.5;
0 setOvercast 0.3;
0 setRain 0;
0 setFog 0; 
forceWeatherChange;

ran on server. But I am greedy and now I want the weather to change gradually over the mission time (around 2 hours). 
Without using forceWeatherChange the clouds are totally missing. 
I tried 

sleep 0.5;
0 setOvercast 0.3;
0 setRain 0;
0 setFog 0; 
forceWeatherChange;
sleep 60;
7200 setOvercast 0.8;
7200 setRain 0.5;
7200 setFog 0;
setWind [10, 0, true]; 

it changes everything but the clouds - shadows on surfaces, it starts raining little by little, wind changes immediately (I am ok with that).
But clouds are just like in the beginning ... I really need some help. 😟     

Share this post


Link to post
Share on other sites

Maybe something like:
 

// Initial values
private _startingOvercast = 0.3;
private _increment = 0.0208; // Increase per step
private _interval = 300; // 5 minutes in seconds


// Skip 24 hours to simulate mission start
skipTime -24;


// Set initial overcast to _startingOvercast (0.3) over 24 hours (86400 seconds)
[86400, _startingOvercast] remoteExec ["setOvercast", 0, true];


// Skip time forward 24 hours to make sure weather is applied
skipTime 24;


// Sync client weather to server
0 = 0 spawn {sleep 0.1; simulWeatherSync;};


// Overcast adjustment loop
[_startingOvercast, _increment] spawn {
    params ["_startingOvercast", "_increment"];

    for "_i" from 0 to 23 do { // 24 updates over 2 hours
        private _targetOvercast = _startingOvercast + (_i * _increment);
        
        // Set overcast to the calculated target value on all clients
        [0, _targetOvercast] remoteExec ["setOvercast", 0, true]; // Apply to both server and clients

		forceWeatherChange;
        
        sleep 300; // Wait 5 minutes before the next update
    };
};

remoteExecing overcast on JIP since syncing is broken. 

rest of changes are made with info on wiki:

1:
Arma 3's volumetric clouds cannot be instantly changed (it would take up to a few seconds to do a full recompute). Therefore, 0 setOvercast 0 will not have the desired effect. You can use skipTime to get to the desired cloud coverage.

NOTE: To get instant, seamless overcast change to overcast 1 advance the time 24 hours with skipTime while setting overcast transition time to 86400 seconds (24 hours) - Killzone_Kid (12:08, 15 August 2013) 

2: 
With removal of simulSetHumidity, in order to add instant cloud cover, execute simulWeatherSync with delay (for now).

  • Like 1

Share this post


Link to post
Share on other sites

The script is working fine, just the transitions are too visible and there is short lag spike on every transition. The initial overcast is not working at all, mission starts as its with overCast 0 (no single cloud).  I will test more.   

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×