Patrix87 210 Report post Posted November 12, 2015 Hi,I've modified ExileServer_system_weather_initialize.sqf and the Time class from Exile_Server\config.cppThe goal was to be able to use a static date or a static time independently and also to allow time zone adjustments.In the process I've removed useRealTime because it was redundant since useStaticTime is the opposite.I've also integrated a parameter to set a time shift that can be used with real time to push the night a little later.New Time Class : class Time { // Use a static server start time instead of the server UTC time. useStaticTime = 0; // Use a static server start date instead of the server UTC date. useStaticDate = 0; //Time Zone adjustment in hours. Will be applied regardless of previous settings. timeZone = -5; //Time shift adjustment in hours. Will be applied on to of the previous settings. Use it to delay night time. timeShift = -4; // time in ARMA FORMAT << CONFIG // https://community.bistudio.com/wiki/setDate staticTime[] = {05,30}; staticDate[] = {2039,06,24}; };The new : ExileServer_system_weather_initialize.sqf/** * Exile Mod * exile.majormittens.co.uk * © 2015 Exile Mod Team * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. */ private["_useStaticTime","_staticTime","_useStaticDate","_staticDate","_changetime","_dateTime","_startTime","_timeZone","_timeShift"]; call ExileServer_system_weather_thread_weatherSimulation; _useStaticTime = getNumber (configFile >> "CfgSettings" >> "Time" >> "useStaticTime"); _staticTime = getArray (configFile >> "CfgSettings" >> "Time" >> "staticTime"); _useStaticDate = getNumber (configFile >> "CfgSettings" >> "Time" >> "useStaticDate"); _staticDate = getArray (configFile >> "CfgSettings" >> "Time" >> "staticDate"); _timeZone = getNumber (configFile >> "CfgSettings" >> "Time" >> "timeZone"); _timeShift = getNumber (configFile >> "CfgSettings" >> "Time" >> "timeShift"); _dateTime = []; _startTime = ExileServerStartTime; _float = 0; if(_useStaticDate isEqualTo 1)then { _dateTime append _staticDate; } else { _dateTime append (_startTime select [0,3]); }; if(_useStaticTime isEqualTo 1)then { _dateTime append _staticTime; } else { _dateTime append (_startTime select [3,2]); }; //Time ajustement _dateTime set [3,((_dateTime select 3) + (_timeZone + _timeShift))]; setDate _dateTime; forceWeatherChange; _changetime = round(getNumber (configFile >> "CfgSettings" >> "Weather" >> "interval") * 60); [_changetime, ExileServer_system_weather_thread_weatherSimulation, [], true] call ExileServer_system_thread_addTask; trueI'm currently using the function overwrite to use this one.Thank you 1 Share this post Link to post Share on other sites
Patrix87 210 Report post Posted November 12, 2015 (edited) . Edited December 21, 2015 by Patrix87 Share this post Link to post Share on other sites