How to setup Full Moon Nights

Hello.
I'm hosting my server at DayZ.ST. Unfortunately I can't modify the HiveExt.ini file because it get overwritten every restart.
So i was searching for an alternative way to set a static date by modifying the server.pbo file and found this:
Code:
https://github.com/ayan4m1/DayZ-Private/issues/429#issuecomment-10260625
Sadly it doesn't work as expected. After applying the code the server starts, but I've get an Wait for Host message.
Can anyone point me to the right direction?

Did you just paste the code in or did you replace this section

//Set the Time
_key = "CHILD:307:";
_result = [_key] call server_hiveReadWrite;
_outcome = _result select 0;
if (_outcome == "PASS") then {
_date = _result select 1;
if (isDedicated) then {
setDate _date;
dayzSetDate = _date;
publicVariable "dayzSetDate";
};

diag_log("HIVE: Local Time set to " + str(_date));
};


I'm going to try the same thing on my DayZ.st host tonight any way so I'll let you know if it doesn't work
 
Hello.
I'm hosting my server at DayZ.ST. Unfortunately I can't modify the HiveExt.ini file because it get overwritten every restart.
So i was searching for an alternative way to set a static date by modifying the server.pbo file and found this:
Code:
https://github.com/ayan4m1/DayZ-Private/issues/429#issuecomment-10260625
Sadly it doesn't work as expected. After applying the code the server starts, but I've get an Wait for Host message.
Can anyone point me to the right direction?

I host through DayZ.st as well, and i have been trying to achieve the same results as yourself. I have inserted this code you have posted. And i have already inserted it and tested it, it does not give a "full moon" its gives just over a half moon, with a bright night, but still not full moon by any means.

If you have a wait for host issue, that will more than likely be a DayZ.st issue as they were having problems with many customers getting that error after restarting their server.

For DayZ.st customers; i believe this is currently the only way to get Full moon nights unless on taviana 2.0. I was aware of this method, but dayz.st does not allow access to the dayz_code.pbo
www(dot)opendayz.net/index.php?threads/change-weather-server-side.6702/
 
I've managed to get this code working but its somehow bugged. After some time the...ekhm...time suddenly syncs (propably with the HiveExt.ini) and instantly - bam - time back to normal. Clearly visible in hours such as 18:30 when in summer time its still bright and suddenly it's night.

It maybe related to server_cleanup.fsm

Code:
/*%FSM<LINK "time_sync">*/
        class time_sync
        {
          priority = 1.000000;
          to="sync_the_time";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"((time - _lastSyncTime) > 3600)"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/"_lastSyncTime = time;"/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
 
I've managed to get this code working but its somehow bugged. After some time the...ekhm...time suddenly syncs (propably with the HiveExt.ini) and instantly - bam - time back to normal. Clearly visible in hours such as 18:30 when in summer time its still bright and suddenly it's night.

It maybe related to server_cleanup.fsm

Code:
/*%FSM<LINK "time_sync">*/
        class time_sync
        {
          priority = 1.000000;
          to="sync_the_time";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"((time - _lastSyncTime) > 3600)"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/"_lastSyncTime = time;"/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/

I've been nagging day.st for a while to put an option into the control panel for a static date, it's just a config file change :(

I'm seeing the same issues as you currently let me know if you get it going.
 
I've managed to get this code working but its somehow bugged. After some time the...ekhm...time suddenly syncs (propably with the HiveExt.ini) and instantly - bam - time back to normal. Clearly visible in hours such as 18:30 when in summer time its still bright and suddenly it's night.

It maybe related to server_cleanup.fsm

Code:
/*%FSM<LINK "time_sync">*/
        class time_sync
        {
          priority = 1.000000;
          to="sync_the_time";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"((time - _lastSyncTime) > 3600)"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/"_lastSyncTime = time;"/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/

I too have full moon working with the same issue. I have looked at the Cleanup time and cant seem to figure if this is the cause of what I call the "night flash." I am going to try and change the date to [2012,12,28] and see if it still happens. I think it is because of the longer summer times. Not sure how this would matter if the date is set and the time is universal.

Any help on this would be great.
 
After looking closer at the full moon script addition, I think the time is set parallel to the date.

Code:
//Set the Time
_key = "CHILD:307:";
_result = [_key] call server_hiveReadWrite;
_outcome = _result select 0;
if (_outcome == "PASS") then {
    _date = [2012,12,28,(_result select 1) select 3, (_result select 1) select 4];
    if (isDedicated) then {
        setDate _date;
        dayzSetDate = _date;
        publicVariable "dayzSetDate";
    };
 
    diag_log("HIVE: Local Time set to " + str(_date));
};

The key line being:
Code:
diag_log("HIVE: Local Time set to " + str(_date));

From Github Link earlier in the thread:
Code:
diag_log("SERVER: Local Time set to " + str(_date));

Edit:

Added the code from a github link on page 1. Notice the SERVER vs HIVE in the bottom line. Going to try it and will report back.
 
Running as SERVER now. Wont know if it worked until tomorrow at 1845 :( But it is running as normal for now. I'll update soon.
 
Think I have found the fix. It is part of the server cleanup process but a different section. Going to try it out soon. If anyone wants to give it a go here is the code.

dayz_server\system\server_cleanup.fsm
Should be line 246 - _date = _result select 1; \n

Code:
    /*%FSM<STATE "sync_the_time">*/
    class sync_the_time
    {
      name = "sync_the_time";
      init = /*%FSM<STATEINIT""">*/"//Send request" \n
      "_key = ""CHILD:307:"";" \n
      "_result = [_key] call server_hiveReadWrite;" \n
      "_outcome = _result select 0;" \n
      "if(_outcome == ""PASS"") then {" \n
      "    _date = [2012,12,28,(_result select 1) select 3, (_result select 1) select 4]; " \n
      "    _dateDiff = (dateToNumber(_date) - dateToNumber(date)) * 365 * 24 * 60;" \n
      "    if (abs(_dateDiff) > 5) then {" \n
      "        setDate _date;" \n
      "        dayzSetDate = _date;" \n
      "        publicVariable ""dayzSetDate"";" \n
      "        diag_log (""TIME SYNC: Local Time set to "" + str(_date));" \n
      "    };" \n
      "};" \n

Change to
_date = [2012,12,28,(_result select 1) select 3, (_result select 1) select 4]; " \n

Change the date to whatever you want. This combined with the Server_Monitor code should take care of the "Night Flash" issue. Unconfirmed at the moment. Will update soon.
 
I have it running on 1 of my servers and it seems to be fixed. I haven't experienced any side affects my self. I'll have to see what the players say soon. So far so good! :)
 
Think I have found the fix. It is part of the server cleanup process but a different section. Going to try it out soon. If anyone wants to give it a go here is the code.

dayz_server\system\server_cleanup.fsm
Should be line 246 - _date = _result select 1; \n

Code:
    /*%FSM<STATE "sync_the_time">*/
    class sync_the_time
    {
      name = "sync_the_time";
      init = /*%FSM<STATEINIT""">*/"//Send request" \n
      "_key = ""CHILD:307:"";" \n
      "_result = [_key] call server_hiveReadWrite;" \n
      "_outcome = _result select 0;" \n
      "if(_outcome == ""PASS"") then {" \n
      "    _date = [2012,12,28,(_result select 1) select 3, (_result select 1) select 4]; " \n
      "    _dateDiff = (dateToNumber(_date) - dateToNumber(date)) * 365 * 24 * 60;" \n
      "    if (abs(_dateDiff) > 5) then {" \n
      "        setDate _date;" \n
      "        dayzSetDate = _date;" \n
      "        publicVariable ""dayzSetDate"";" \n
      "        diag_log (""TIME SYNC: Local Time set to "" + str(_date));" \n
      "    };" \n
      "};" \n

Change to
_date = [2012,12,28,(_result select 1) select 3, (_result select 1) select 4]; " \n

Change the date to whatever you want. This combined with the Server_Monitor code should take care of the "Night Flash" issue. Unconfirmed at the moment. Will update soon.
Don't think it's helped mate, still get that flash to night time :/
 
The code above works perfectly fine. Keep in mind that this doesn't guarantee a clear weather so not every night will be crystal clear.
Thanks a lot TorturedChunk
 
Sweet I guess this didnt work last time I tried it because the night was overcast I have custom weather already so I will try again tomorrow with overcast at 0.

What date is everyone using?
 
You're doing it wrong

Firt, open server_monitor.sqf which is in dayz_server.pbo\system

Find the line:

Code:
//Set the Time
_key = "CHILD:307:";

You'll see a line:

Code:
    _date = _result select 1;

Change that to:

Code:
    _date = [2012,8,31,(_result select 1) select 3, (_result select 1) select 4];

where 2012,8,31 is the date you prefer

Next open up server_cleanup.sqf which is laso in dayz_server.pbo\system

Find:

Code:
      "_key = ""CHILD:307:"";" \n

underneath you will see:

Code:
      "    _date = _result select 1; " \n

Change that to:

Code:
      "    _date = [2012,8,31,(_result select 1) select 3, (_result select 1) select 4]; " \n

also with the date you prefer

Repack the server.pbo and you're ready to go
 
Back
Top