Jump to content
Ghostrider-GRG

Epoch 0.5 / static weather

Recommended Posts

I've been wrestling with getting static weather to work with this build of epoch. Thus far I have:

set up static weather parameters in @epochhive\epochconfig.hpp:  WeatherStaticForecast[] = {68,0,{0,0,0},0,{0.3,0.3},0};   // Note the added 0 for lightening.

Commented out the "ChangeWeather" event in this same file:    // { 18000000, "ChangeWeather", 1 , 1},

Is there anything I am missing?

Many thanks in advance.

Share this post


Link to post
Share on other sites

Works for me on Altis with:

WeatherStaticForecast[] = {75.5,0,{0,0,0},0.4,{1,1},0}; // Default: {75.5,0,{0,0,0},0,{1,1}}; // Clear day; {19,1,{1,1,40},1,{5,5}}; // Cold Foggy Rainy Overcast Windy; Format: {temp <scalar>,rain <scalar>,fog <array>,overcast <scalar>,wind <array>}
events[] = {
    //{ 3600, "CarnivalSpawner", 0 , 1}, // SECOND <scalar>, EVENT <string>, INIT <scalar> 1 = run script at startup, 0 normal delay, PREPOSTFIX <scalar> 1 = use pre/postfix path (inside epoch settings pbo) 0 = use full file path
    // { 1800, "PaydayEvent", 0, 1},
    // { 1200, "MessageServer", 0, 1},
    { 2700, "AirDrop", 0 , 1},
    { 2400, "EarthQuake", 0 , 1},
    //{ 900, "ChangeWeather", 1 , 1},
    { 1200, "ContainerSpawner", 0 , 1},
    { 300, "PlantSpawner", 0 , 1} //No comma on last Entry
};

 

Share this post


Link to post
Share on other sites
1 minute ago, Grahame said:

Works for me on Altis with:

WeatherStaticForecast[] = {75.5,0,{0,0,0},0.4,{1,1},0}; // Default: {75.5,0,{0,0,0},0,{1,1}}; // Clear day; {19,1,{1,1,40},1,{5,5}}; // Cold Foggy Rainy Overcast Windy; Format: {temp <scalar>,rain <scalar>,fog <array>,overcast <scalar>,wind <array>}
events[] = {
    //{ 3600, "CarnivalSpawner", 0 , 1}, // SECOND <scalar>, EVENT <string>, INIT <scalar> 1 = run script at startup, 0 normal delay, PREPOSTFIX <scalar> 1 = use pre/postfix path (inside epoch settings pbo) 0 = use full file path
    // { 1800, "PaydayEvent", 0, 1},
    // { 1200, "MessageServer", 0, 1},
    { 2700, "AirDrop", 0 , 1},
    { 2400, "EarthQuake", 0 , 1},
    //{ 900, "ChangeWeather", 1 , 1},
    { 1200, "ContainerSpawner", 0 , 1},
    { 300, "PlantSpawner", 0 , 1} //No comma on last Entry
};

Thanks for the quick response - I will give that a try. I no doubt made a silly error somewhere.

 

Share this post


Link to post
Share on other sites
22 hours ago, Grahame said:

Yeah, not sure what the problem would be since what you said you'd done seemed syntactically correct... If you are copying mine for a clear day note that I comment out the carnival spawner :ph34r:

Thanks, these settings worked fine for me.

Share this post


Link to post
Share on other sites
28 minutes ago, 82ndAB_Bravo17 said:

It looks like the changeweather script is supposed to set the static weather settings if they are provided, but for some reason it appears to be ignoring them and always setting its own weather.

Not for me... My Altis server is completely rain free on 0.5 with the above settings. Of course if you don't comment (or increase the timeout) of the ChangeWeather script's execution then it changes the weather and you only get your static settings until it does

Share this post


Link to post
Share on other sites

As far as I can tell, the params statement at line 26 of ChangeWeather,sqf is producing values that are only valid within the if statement because

diag_log format ["Static Weather is %1", EPOCH_WeatherStaticForecast];
if !(EPOCH_WeatherStaticForecast isEqualTo []) then {
    EPOCH_WeatherStaticForecast params ["_tempOVRD","_rainOVRD","_fogOVRD","_overcastOVRD","_windOVRD","_lightningOVRD"];
    diag_log format["Temp %1 Rain %2 Fog %3 Overcast %4 Wind %5 Lightning %6",_tempOVRD,_rainOVRD,_fogOVRD,_overcastOVRD,_windOVRD,_lightningOVRD];
} else {
	// Make database call to get "Weather:InstanceID" that can be set in the database to allow for weather controls outside of the game.
	_response = ["Weather", (call EPOCH_fn_InstanceID)] call EPOCH_fnc_server_hiveGETRANGE;
	if ((_response select 0) == 1 && (_response select 1) isEqualType [] && !((_response select 1) isEqualTo[])) then {
		_arr = _response select 1;
        _arr params ["_tempOVRD","_rainOVRD","_fogOVRD","_overcastOVRD","_windOVRD","_lightningOVRD"];
	};
};
diag_log format["Temp %1 Rain %2 Fog %3 Overcast %4 Wind %5 Lightning %6",_tempOVRD,_rainOVRD,_fogOVRD,_overcastOVRD,_windOVRD,_lightningOVRD];

Produces this

19:31:05 "Static Weather is [75.5,0,[0,0,0],0,[2,2],0]"
19:31:05 "Temp 75.5 Rain 0 Fog [0,0,0] Overcast 0 Wind [2,2] Lightning 0"
19:31:05 "Temp any Rain any Fog any Overcast any Wind any Lightning any"

 

Share this post


Link to post
Share on other sites

@82ndAB_Bravo17 You are 100% correct, I made this mistake. params make the variables local to the innermost code block and the reason most of the privates are done at the top of a script, instead of at the instantiation point of a variable.

it is just like using:

private _variableName = "somedata";

have fixed this for the next experimental build: https://github.com/EpochModTeam/Epoch/blob/experimental/Sources/epoch_server_settings/EpochEvents/ChangeWeather.sqf#L26-L36

Share this post


Link to post
Share on other sites
3 hours ago, vbawol said:

@82ndAB_Bravo17 You are 100% correct, I made this mistake. params make the variables local to the innermost code block and the reason most of the privates are done at the top of a script, instead of at the instantiation point of a variable.

it is just like using:

private _variableName = "somedata";

have fixed this for the next experimental build: https://github.com/EpochModTeam/Epoch/blob/experimental/Sources/epoch_server_settings/EpochEvents/ChangeWeather.sqf#L26-L36

Bizarre... I guess my weather is being set to that defined in mission.sqm and never changing because ChangeWeather.sqf is commented? Or have I just been really lucky? Because initially I'd forgotten to comment ChangeWeather after the new release and it started raining. Commenting it has left Altis sunny and bright...

Share this post


Link to post
Share on other sites
9 hours ago, Grahame said:

Bizarre... I guess my weather is being set to that defined in mission.sqm and never changing because ChangeWeather.sqf is commented? Or have I just been really lucky? Because initially I'd forgotten to comment ChangeWeather after the new release and it started raining. Commenting it has left Altis sunny and bright...

@Grahame we miss you in arma2 forums :laugh:

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Similar Content

    • By Warburgg
      I installed the dynamic climate script and it happens that it rains on the server but only lasts 10 seconds and stops. Is it because I use the script that speeds server time? I currently use Control Time which allows the server to have 2 hours of day and 1 hour night.
      The other climates such as overcast and fog last the forecast time 5-20 minutes but the rain does not.
      In my logs show: 16:52:30 "39:2 Debug: Rain set to 0.92421 for 10.6582 minutes". It rains until it rains but soon stops.
    • By tinboye
      I remember reading somewhere that if you changed the dynamic weather in the epochconfig.hpp that it breaks things. is this still true?
      or can i change 
      WeatherChangeTime = 1200; // This controls how fast the weather changes as well as how fast shipping containers and earthquakes happen.
      WeatherStaticForecast[] = {}; // Default: {75.5,0,{0,0,0},0,{1,1}}; // Clear day; {19,1,{1,1,40},1,{5,5}}; // Cold Foggy Rainy Overcast Windy; Format: {temp <scalar>,rain <scalar>,fog <array>,overcast <scalar>,wind <array>}
      I want to remove rain completely. but want some fog once in awhile.
       
      WeatherStaticForecast[] = {{19,0,{1,1,40},0,{5,5}};
      this should make it temp of 19, no rain, fog, no overcast, wind
      if i understand correct?
      i would like weather to be dynamic, but no rain at all.
    • By Sebu
      I've noticed that there are many servers that have a clear bright weather all the time. On my server there are clouds all the time and the weather feels depressing. Could someone guide me on how to set my weather so that it would be clear all the time?
       
      Thanks!
    • By blackwiddow
      Hi guys.
       
      I am desperately looking for help to add the Eagle Wings effects to my Epoch server.
       
      I have added so much custom stuff that this would really round it off nicely.
      I tried but it ended up just causing the server to search for hosts.
       
      Is it possible?
       
      This is the link to the effects I would like to add to my server...
       
      http://www.kylania.com/ex/?p=128
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...