Ghostrider-GRG Posted April 11, 2017 Report Share Posted April 11, 2017 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. Link to comment Share on other sites More sharing options...
Grahame Posted April 11, 2017 Report Share Posted April 11, 2017 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 }; Ghostrider-GRG and blueman 2 Link to comment Share on other sites More sharing options...
Ghostrider-GRG Posted April 11, 2017 Author Report Share Posted April 11, 2017 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. Link to comment Share on other sites More sharing options...
Grahame Posted April 11, 2017 Report Share Posted April 11, 2017 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 Ghostrider-GRG 1 Link to comment Share on other sites More sharing options...
Ghostrider-GRG Posted April 11, 2017 Author Report Share Posted April 11, 2017 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 Thanks, these settings worked fine for me. Link to comment Share on other sites More sharing options...
zxbutchxz Posted April 11, 2017 Report Share Posted April 11, 2017 Setting WeatherStaticForecast[] = {75.5,0,{0,0,0},0.4,{1,1},0}; works if parameter { 900, "ChangeWeather", 1 , 1}, is set to { 14400, "ChangeWeather", 0 , 1}, On my server, I have always clear weather. Link to comment Share on other sites More sharing options...
82ndAB_Bravo17 Posted April 11, 2017 Report Share Posted April 11, 2017 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. Link to comment Share on other sites More sharing options...
Grahame Posted April 11, 2017 Report Share Posted April 11, 2017 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 Link to comment Share on other sites More sharing options...
82ndAB_Bravo17 Posted April 11, 2017 Report Share Posted April 11, 2017 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" Link to comment Share on other sites More sharing options...
vbawol Posted April 12, 2017 Report Share Posted April 12, 2017 @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 Link to comment Share on other sites More sharing options...
Grahame Posted April 12, 2017 Report Share Posted April 12, 2017 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... juandayz 1 Link to comment Share on other sites More sharing options...
juandayz Posted April 13, 2017 Report Share Posted April 13, 2017 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 Cherdenko 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now