[1.7.7.1 HOTFIX] Fix for server side FPS and Loot not spawning

[GSG] Az

Member
https://github.com/azmodii/DayZ-Sou...7.1/SQF/dayz_server/system/server_cleanup.fsm

Replace your server_cleanup.fsm with this one.

The patch notes say:

Code:
* [FIXED] - Loot Cleanup has now been fully resolved. Old loot piles will now be cleaned every 60 minutes and no players within 250 meters(WIP). (Server performance boost)

But server cleanup shows it set to 60 seconds (Bohemia actually lists this value as ms, not s but w/e):

Code:
/*%FSM<LINK "too_many_objects">*/
        class too_many_objects
        {
          priority = 2.000000;
          to="cleanup_objects";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"((diag_tickTime - _timeNem) > 60)"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/"_timeNem = diag_tickTime;"/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/

Changing this line to 3600 seconds:

Code:
/*%FSM<LINK "too_many_objects">*/
        class too_many_objects
        {
          priority = 2.000000;
          to="cleanup_objects";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"((diag_tickTime - _timeNem) > 3600)"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/"_timeNem = diag_tickTime;"/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/

Resolves the server side lag/desync/unplayability and also resolves no loot spawning correctly.
 
You know this as working? I'm not seeing in my RPT anything about it clearing the loot bags, either. which would be:

Code:
    "diag_log (""CLEANUP:TOTAL "" + str(_qty) + "" LOOT BAGS"");" \n
      "" \n
      "_delQty = 0;" \n
      "{" \n
      "    _keep = _x getVariable [""permaLoot"",false];" \n
      "    _nearby = {isPlayer _x} count (_x nearEntities [[""CAManBase""], 250]);" \n
      "" \n
      "    _created = (_x getVariable [""created"",-0.1]);" \n
      "" \n
      "    if (_created == -0.1) then {" \n
      "        _x setVariable [""created"",(DateToNumber date)];" \n
      "    };" \n
      "" \n
      "    _age = ((DateToNumber date) - _created) * 525948;" \n
      "" \n
      "//diag_log format [""Pile : %1, Created: %2, Age: %3"", _x,  _created, _age];" \n
      "" \n
      "    if ( (!_keep) && (_nearby==0) && (_age > 60) ) then {" \n
      "        deleteVehicle _x;" \n
      "        _delQty = _delQty + 1;" \n
      "    };" \n
      "" \n
      "} forEach _missionObjs;" \n
      "" \n
      "if (_delQty > 0) then {" \n
      "    diag_log (""CLEANUP: DELETED "" + str(_delQty) + "" LOOT BAGS"");" \n

Wouldn't changing age > 60 fix this here?

Going to test your fix.
 
I've tested this and I can confirm it works. Technically all I have done is implement the fix that was meant to be applied in 1.7.7

Age > 60 would fix the loot deleting (somewhat, I'd imagine this number would be hard to predict - ((DateToNumber date) - _created) * 525948) - What it will not fix is the function executing every 60 seconds which is slowing the server down.

R4ZOR also noted that it would check if players were 250m away (WIP). I'll look at implementing that.

I'm also working on a fix for:

Code:
 9:54:56 "Second Hand Zombie Initialized: [[6399.91,3188.87,0.00126839],Agent 0x238b4080,true]"
 9:54:56 "CLEANUP: DELETE UNCONTROLLED ZOMBIE: z_new_worker2 OF: Agent 0x238b4080"

Seems it's recycling a zombie and then deleting it almost immediately.
 
thanks for this, do i need to replace the server_cleanup.fsm or can i just amend the 3600 seconds:
when i replace my server cleanup the game just says waiting for host. using dayzst hosting if this makes a difference
 
thanks for this, do i need to replace the server_cleanup.fsm or can i just amend the 3600 seconds:
when i replace my server cleanup the game just says waiting for host. using dayzst hosting if this makes a difference
Just change that value "60" from your original server_cleanup.sfm but I would recommend for going with something more practical like "600" (10 minutes).
 
I have tried this for Epoch 1.0.2.5, but there is no such line.
Maybe it have another name?
Can some one please help me?

Greetz Ace
 
hello I am on 1.8.0.3

I am in a situation where we use care packages for the server so the loot spawns are not needed...

how can I make loot STOP spawning on my server? thanks
 
This is a really old thread guys!

This was simply a workaround for a buggy release. The new code I assure you does not have the same issues.
 
Back
Top