Jump to content
Derleth

Weather settings

Recommended Posts

Is there any comprehensive guide or explanation of how to adjust the weather settings?

The below parameters I found online after googling a bit, the aim was to have a chance for really dense fog but what has happened is that the server simply drifts towards 100% overcast, rain and fog and then it stays there and will not change again. This is a tad harsh, even for me...

So, what could be causing this? Maybe something is missing that makes the weather change the other direction?

//INIT WEATHER BEFORE ECONOMY INIT------------------------
    Weather weather = g_Game.GetWeather();

    weather.MissionWeather(true);    // false = use weather controller from Weather.c

    weather.GetOvercast().SetLimits(0.0, 1.0);
    weather.GetRain().SetLimits(0.0, 1.0);
    weather.GetFog().SetLimits(0.0, 0.85);

    weather.GetOvercast().SetForecastChangeLimits(0.0, 0.4);
    weather.GetRain().SetForecastChangeLimits(0.0, 0.3);
    weather.GetFog().SetForecastChangeLimits(0.15, 0.40);

    weather.GetOvercast().SetForecastTimeLimits(900, 1800);
    weather.GetRain().SetForecastTimeLimits(300, 900);
    weather.GetFog().SetForecastTimeLimits(900, 1800);

    weather.GetOvercast().Set(Math.RandomFloatInclusive(0.0, 0.5), 0, 0);
    weather.GetRain().Set(Math.RandomFloatInclusive(0.0, 0.3), 0, 0);
    weather.GetFog().Set(Math.RandomFloatInclusive(0.0, 0.3), 0, 0);

    weather.SetWindMaximumSpeed(20);
    weather.SetWindFunctionParams(0.1, 0.4, 50);

 

Edited by Derleth

Share this post


Link to post
Share on other sites

Hi, this is a problem we are aware of, the weather adjusted in the init tends to move more around the maximum values.

We wrote our own method in the game, it's located in Scripts\4_World\Classes\Worlds\ChernarusPlus.c. There is also a file for Livonia

Override the method WeatherOnBeforeChange, this can be done via a server-side mod.

  • Thanks 1

Share this post


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

Hi, this is a problem we are aware of, the weather adjusted in the init tends to move more around the maximum values.

We wrote our own method in the game, it's located in Scripts\4_World\Classes\Worlds\ChernarusPlus.c. There is also a file for Livonia

Override the method WeatherOnBeforeChange, this can be done via a server-side mod.

Ok, thanks for the information! Will look into doing it that way instead.

Share this post


Link to post
Share on other sites

@ImpulZ Are there any additional steps I need to do in order for edits in the file ChernarusPlus.c (or its Livonia counterpart) to apply? Simply adjusting numbers and packing the "mod" and loading it on the server does not seem to be working. Is there some bool that needs to be changed somewhere or the settings will just be ignored?

Edited by Derleth

Share this post


Link to post
Share on other sites
12 hours ago, Derleth said:

weather.GetOvercast().Set(Math.RandomFloatInclusive(0.0, 0.5), 0, 0);

weather.GetRain().Set(Math.RandomFloatInclusive(0.0, 0.3), 0, 0);

weather.GetFog().Set(Math.RandomFloatInclusive(0.0, 0.3), 0, 0);

I don't know if this would work or not, but what about having these randoms include negative numbers like so:

weather.GetOvercast().Set(Math.RandomFloatInclusive(-0.5, 0.5), 0, 0);

weather.GetRain().Set(Math.RandomFloatInclusive(-0.3, 0.3), 0, 0);

weather.GetFog().Set(Math.RandomFloatInclusive(-0.3, 0.3), 0, 0);

The theory being this would fluctuate the level of cloud, rain and fog between increasing sometimes and decreasing other times?

I don't have a server setup right now, so haven't tested it myself, so this might do nothing at all.

Share this post


Link to post
Share on other sites

Negative values do not work. If you want to get a better idea on what individual methods do, you can look into \Scripts\3_Game\Weather.c, there is documentation on each method and what it does / how to use it.

Share this post


Link to post
Share on other sites
2 hours ago, ImpulZ said:

Negative values do not work. If you want to get a better idea on what individual methods do, you can look into \Scripts\3_Game\Weather.c, there is documentation on each method and what it does / how to use it.

Okay, good to know, thanks! However I don't seem to be able to get any tweaks (in the file you pointed me to in your first response) to work. The mod will load but doesn't seem to affect the weather at all. I have tested some stupidly extreme variants just to see what happens and...nothing happened. 😞

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

×