Jump to content
nayo1416

How to disable rains in server

Recommended Posts

Im an owner of a private server,I dont want rains in my server,how? I tried to modify init.c but it didnt work.

Share this post


Link to post
Share on other sites

Why? It’s a survival game and dynamic weather conditions play an important role on how to deal with changing conditions. Our character’s have to be played to adapt to those changes — it’s what makes Day Z, Day Z.

I own a server and have been modding it, but haven’t seen anything about weather behavior yet — so we might not be able to affect it. But if I see something in the xml files I’ll let ya know.

Share this post


Link to post
Share on other sites

You used to be able to configure the weather as you see fit in the init.c file, but I think since Livonia came out, that doesn't work anymore -- not sure how to do it now.

Share this post


Link to post
Share on other sites

Editing the init.c file does not seem to work after the patch.

Edited by RuffZ

Share this post


Link to post
Share on other sites

Bump, please someone has to have an answer for reducing or eliminating the rain in Livonia.

 

Share this post


Link to post
Share on other sites

So for everyone who wants to have a functioning weather system on their server: The weather must come after the hive. It is a mistake on Bohemia's part to put it before the hive. As an example, it should look like this for you:

	//INIT ECONOMY--------------------------------------
	Hive ce = CreateHive();
	if ( ce )
		ce.InitOffline();
	//INIT WEATHER AFTER ECONOMY INIT------------------------
	Weather weather = g_Game.GetWeather();

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

	weather.GetOvercast().SetLimits( 0.0 , 0.9 );
	weather.GetRain().SetLimits( 0.0 , 0.0 );
	weather.GetFog().SetLimits( 0.0 , 0.1 );
	
	weather.GetOvercast().Set( Math.RandomFloatInclusive(0.02, 0.9), 1, 0);
	//weather.GetRain().Set( 0, 0, 0);
	weather.GetRain().Set( Math.RandomFloatInclusive(0.0, 0.1), 1, 0);
	weather.GetFog().Set( Math.RandomFloatInclusive(0.0, 0.1), 1, 0);

    weather.GetOvercast().SetForecastTimeLimits( 1800 , 1800 );
    weather.GetRain().SetForecastTimeLimits( 600 , 600 );
    weather.GetFog().SetForecastTimeLimits( 600 , 600 );
		
    weather.SetWindMaximumSpeed( 20 );
    weather.SetWindFunctionParams( 0, 0, 1 );

the rain value is now 0 - weather.GetRain (). SetLimits (0.0, 0.0);
the next line would be from nothing to maximum
weather.GetRain (). SetLimits (0.0, 1.0);

If you only want 50% heavy rain, use the weather.GetRain (). SetLimits (0.0, 0.5);

With the line: weather.GetRain (). Set (Math.RandomFloatInclusive (0.0, 0.1), 1, 0); gives her the chance of chance when it rains how strong he is. So if weather.GetRain (). SetLimits (0.0, 0.5); only 10% of the 50% will rain.

 

Best regards, your Shark272  https://discord.gg/mYhq3jt

  • Like 1

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

×