Jump to content
Sign in to follow this  
BL1P

How to make it always sunny on altis over weeks?

Recommended Posts

Currently we use these settings in the mission.sqm

On a mission that can and does run nonstop for weeks on end, mission updates, game updates and mod updates permitting.

	startWeather=0;
	startWind=0;
	startWindDir=275;
	forecastWeather=0;
	forecastWind=0;
	forecastWaves=0;
	forecastWindDir=80;
	year=2035;
	month=7;
	day=6;
	hour=0;
	minute=0;
	startFogDecay=0;
	forecastFogDecay=0;

We have also tried =1; in all the above code.

When we start the mission its a very clear day.

But after about 3 days it starts to get foggy and rainy.

Also when people join after the first 3 days there is anywhere between a 10-20 min dysynch in the weather between players.

The fog and rain will then last days without stopping.

Unsure but I think after about a week the rain stops for a few days then restarts.

We run no other weather altering scripts except whats in the mission.sqm.

We don't mind the weather so much but we hate the dislocated weather differences between players.

Even that we kinda put up with but after 2 or 3 days of constant rain ingame, most people no longer wish to play and would rather restart the mission.

which is a shame as its designed to be played over many Days / Weeks.

So for us a constant non changing weather is a good solution.

Obviously this is a pain in the arse to test because of the real life timescales.

Any help or suggestions welcome !

We would prefer to not use constantly looping scripts to update the weather as the mission is quite intensive performance wise as is.

BL1P.

Edited by BL1P

Share this post


Link to post
Share on other sites

Guess no one knows.

maybe its a bug ?

Share this post


Link to post
Share on other sites

Hmm. Does bis fnc mp not work to sync fogs and such? ie;

[[0,[0, 0, 0]], "setFog"] call BIS_fnc_mp; // setFog array - remove fog

Maybe execute that every so often on the server? Cheers.

---------- Post added at 00:41 ---------- Previous post was at 00:37 ----------

Something like

if (!(isServer)) exitWith {};
while { true } do {
waitUntil { fog > 0 };
[[0,[0, 0, 0]], "setFog"] call BIS_fnc_mp;
};

---------- Post added at 00:54 ---------- Previous post was at 00:41 ----------

We would prefer to not use constantly looping scripts to update the weather as the mission is quite intensive performance wise as is.

No way around it really. There's no vanilla eventhandler for weather changes. You could simply enable the debugConsole and execute the code when it starts to get foggy.

Share this post


Link to post
Share on other sites
Hmm. Does bis fnc mp not work to sync fogs and such? ie;

[[0,[0, 0, 0]], "setFog"] call BIS_fnc_mp; // setFog array - remove fog

Maybe execute that every so often on the server? Cheers.

---------- Post added at 00:41 ---------- Previous post was at 00:37 ----------

Something like

if (!(isServer)) exitWith {};
while { true } do {
waitUntil { fog > 0 };
[[0,[0, 0, 0]], "setFog"] call BIS_fnc_mp;
};

That would send traffic quite often, especially since weather variables are rarely integers, no matter if you set them to 0. I'd add a sleep of a reasonable time.

Share this post


Link to post
Share on other sites
That would send traffic quite often...

It would only send traffic when the fog value returns bigger than 0. Else the server wait's there evaluating the condition on each frame, not sending ant network traffic at all... If anything, I'd put a sleep in the waitUntil and increase the condition from 0 to 0.2 or the like, to reduce network traffic even further. A value of 0.2 - 0.5 should work just fine even without a sleep, unless you don't want on each frame evaluation.

Ofcourse, if there's other scripts/code running that KEEP setting the fog to a value higher than the condition, then ofcourse it will keep sending code across the network as the condition will constantly be returning true.

Something like this should be okay. Essentially resetting the fog to 0 once per day.

if (!(isServer)) exitWith {};
while { true } do {
   waitUntil { sleep 86400; fog > 0 }; // Evaluate the condition once a day
   [[0,[0, 0, 0]], "setFog"] call BIS_fnc_mp;
};  

Edited by Iceman77

Share this post


Link to post
Share on other sites

I meant the variable itself wouldn't stay as 0, due to weather behavior or whatnot. But I had been using skipTime - using it changes overcast, fog and rain values to fractions along the day.

Share this post


Link to post
Share on other sites

Yup. Fog probably not gonna stay @ 0 for long if any amount of time at all. So a value of 0.2 - 0.5 should be just fine in that case. Or really any desired number.

Share this post


Link to post
Share on other sites

shouldnt we be able to just set the weather at clear and forecast clear and not have the weather change ?

rather than running scripts to do what the engine should do anyway ?

Thanks for the script and all but as the editor has a start weather state and a forecast state should they not actually work ?

Hmm still sounds bad THANKS for the script :) love you long time !

Edited by BL1P
  • Like 1

Share this post


Link to post
Share on other sites

They should work. That's a shame really. They obviously aren't though :p. Maybe manually set the start weather and forecast via script instead of relying on the editor's settings that apparently aren't working? Or monitor and set the conditions accordingly. Sorry I couldn't offer a better solution. Maybe someone else has a more suitable solution. You should make a new ticket though if the editor settings aren't working correctly. Cheers.

Share this post


Link to post
Share on other sites
They should work. That's a shame really. They obviously aren't though :p. Maybe manually set the start weather and forecast via script instead of relying on the editor's settings that apparently aren't working? Or monitor and set the conditions accordingly. Sorry I couldn't offer a better solution. Maybe someone else has a more suitable solution. You should make a new ticket though if the editor settings aren't working correctly. Cheers.

You solution was fine Ice and thanks for helping.

I will make a ticket though at some point as the Editor settings do not work seem to work when a mission runs for days.

Edited by BL1P

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
Sign in to follow this  

×