Hello fellow survivors,
Disclaimer: I am very much an amateur, I do this in my spare time with no professional background, so if I get anything wrong I apologise. That said, this has worked for me.
I have been trying to remove rain/fog on my server, with middling results. Editing the values in the init.c file resulted in no rain but the sound of rainfall, didn't seem to affect the fog at all. Tried unpacking the scripts.pbo and editing Weather.c in 3_Game.. all to no avail. Then, I tried something stupid.
In the init.c file at the top, it should look something like this:
void main() {
//INIT WEATHER BEFORE ECONOMY INIT------------------------
Weather weather = g_Game.GetWeather();
weather.MissionWeather(false); // false = use weather controller from Weather.c
weather.GetOvercast().Set( Math.RandomFloatInclusive(0.4, 0.6), 1, 0);
weather.GetRain().Set( 0, 0, 1);
weather.GetFog().Set( Math.RandomFloatInclusive(0.05, 0.1), 1, 0);
//INIT ECONOMY--------------------------------------
Hive ce = CreateHive();
if ( ce )
ce.InitOffline();
//DATE RESET AFTER ECONOMY INIT-------------------------
int year;
int month;
int day;
int hour;
int minute;
GetGame().GetWorld().GetDate(year, month, day, hour, minute);
if (((month <= 9) && (day < 20)) || ((month >= 10) && (day > 20)))
{
month = 9;
day = 20;
GetGame().GetWorld().SetDate(year, month, day, hour, minute);
}
}
I replaced it with the lines from the 0.63 init.c file, so now looks like this:
void main() {
Hive ce = CreateHive();
if (ce)
ce.InitOffline();
Weather weather = g_Game.GetWeather();
weather.GetOvercast().SetLimits(0.0, 0.0);
weather.GetRain().SetLimits(0.0, 0.0);
weather.GetFog().SetLimits(0.0, 0.0);
weather.GetOvercast().SetForecastChangeLimits(0.0, 0.0);
weather.GetRain().SetForecastChangeLimits(0.0, 0.0);
weather.GetFog().SetForecastChangeLimits(0.0, 0.0);
weather.GetOvercast().SetForecastTimeLimits(0, 0);
weather.GetRain().SetForecastTimeLimits(0, 0);
weather.GetFog().SetForecastTimeLimits(0, 0);
weather.GetOvercast().Set(Math.RandomFloatInclusive(0.0, 0.0), 0, 0);
weather.GetRain().Set(Math.RandomFloatInclusive(0.0, 0.0), 0, 0);
weather.GetFog().Set(Math.RandomFloatInclusive(0.0, 0.0), 0, 0);
weather.SetWindMaximumSpeed(15);
weather.SetWindFunctionParams(0.1, 0.3, 50);
}
Loaded my server and instant clear blue sky! This is with an unmodified scripts.pbo as well. I'm guessing if you wanted stock 0.63 weather make the values thus:
void main() {
Hive ce = CreateHive();
if (ce)
ce.InitOffline();
Weather weather = g_Game.GetWeather();
weather.GetOvercast().SetLimits(0.0, 1.0);
weather.GetRain().SetLimits(0.0, 1.0);
weather.GetFog().SetLimits(0.0, 0.25);
weather.GetOvercast().SetForecastChangeLimits(0.0, 0.2);
weather.GetRain().SetForecastChangeLimits(0.0, 0.1);
weather.GetFog().SetForecastChangeLimits(0.15, 0.45);
weather.GetOvercast().SetForecastTimeLimits(1800, 1800);
weather.GetRain().SetForecastTimeLimits(600, 600);
weather.GetFog().SetForecastTimeLimits(1800, 1800);
weather.GetOvercast().Set(Math.RandomFloatInclusive(0.0, 0.3), 0, 0);
weather.GetRain().Set(Math.RandomFloatInclusive(0.0, 0.2), 0, 0);
weather.GetFog().Set(Math.RandomFloatInclusive(0.0, 0.1), 0, 0);
weather.SetWindMaximumSpeed(15);
weather.SetWindFunctionParams(0.1, 0.3, 50);
}
Note: when I replaced the init.c with the 1.0 version (more like 0.64, amirite) to try and replicate the foggy conditions in an effort to confirm my fix is actually a fix... I could not get the fog back.
Anyway, I hope this can help out some other people that have been having the same issue - I've found no other workarounds so far!
If not and it doesn't work, I'm sorry, I'm not sure how much more help I can offer. Good luck!