DZAI Bodies are disappearing nearly instantly - 2

koriaba

New Member
Server Dayz Vanilla 1.8.4.1

I read this topic,
but did not understand the solution to the problem.

Problem - the body of a dead bot disappears for about 30 seconds, do not have time to run.
On Epoch everything is working fine.

''''
//Note: Other cleanup scripts might interfere by cleaning up dead AI bodies/vehicles!
I put - DZAI_cleanupDelay = 1200;

I suspect that affects domestic cleaner, probably in some of these files:
server_cleanup.fsm or server_cleanup.sqf

server_cleanup.fsm
server_cleanup.sqf

Help me please ...
 
Last edited:
Do this:
  1. Disable DZAI in server_monitor.sqf or server_functions.sqf (from whichever file they are called from).
  2. Enable WAI in the same file.
  3. Check if the bodies are being deleted.
If they ARE then the issue is in the Dayz cleanup script. If they are NOT then its an error specific to DZAI. As buttface commented on the post you referred to there is a time setting for how long before they are deleted. Other than that, there was no solution and the subject seemed to have been dropped.

So do that first. Help us find out if the error is part of DZAI excusively or its a generic body cleanup affecting all AI bodies and then we can find the error. As that post in the dayz 1.8.4 support thread said, if it is in fact DZAI then its not their problem, but if you can show that its ALL ai bodies, then it is their problem and you can post it as such.
 
After killing a dynamic AI I checked the RPT and these lines are probably indicative of what is happening (I think)...


0:16:03 ["z\addons\dayz_server\system\scheduler\sched_corpses.sqf","Corpse has been moved! CID#","?","from:",[11439.8,7437.99,0.00143433],"to:",[-18700,25800,0]]
0:16:03 "z\addons\dayz_server\system\scheduler\sched_corpses.sqf: Deleted 0 uncontrolled zombies, 0 uncontrolled animals, 0 dead character bodies and 1 empty groups. Added 1 flies."
 
Last edited:
okay, there you go. it is the dayz cleanup script
@hive\AddOns\dayz_server\system\scheduler\sched_corpses.sqf

Here is your fix:
this line right here is what is used to determine if the body has been on the map long enough to be deleted and its causing the DZAI problems because that variable (sched_co_deathtime) is not assigned to the DZAI at all.
Code:
_deathTime = _x getVariable ["sched_co_deathTime", -1];

DZAI has a variable added to each killed AI
_victim setVariable ["DZAI_deathTime",(diag_tickTime + DZAI_cleanupDelay)];
so if we check for that variable to be definedthen the script should skip over AI bodies.
So in sched_corpses.sqf change line 41 from
Code:
  if (_x isKindOf "CAManBase") then {
to
Code:
  if ((_x isKindOf "CAManBase") && (isNil {_x getVariable "DZAI_deathTime"})) then {

That SHOULD work. If DZAI_deathTime has NOT been defined (dead body is not dzai ai that has been killed) then the isNil will return true because it is not defined and the cleanup process will continue to handle that body.
On the other hand, if that variable has been defined then isNil will be false and (because that variable is NOT nil) the entire cleanup block will be skipped for this body. Which is good because DZAI has its own cleanup to handle AI.
 
okay, there you go. it is the dayz cleanup script
@hive\AddOns\dayz_server\system\scheduler\sched_corpses.sqf

Here is your fix:
..........................

Stops at "waiting server identification"
In the log no loading DZAI
need something more ...

tried to reconfigure WAI, but he's only in Epoch, same -"waiting server identification"
 
Last edited:
I made the change to sched_corpses.sqf that you detailed above and just tested it. I haven't had a dynamic AI group attack me yet but I shot down an AI Air vehicle (MH6J) and the AI pilot was on the ground and was not cleaned.

I would say the fix is working, though I will do some more testing. The only line in the RPT I got related to the sched_corpses.sqf were two lines:

"z\addons\dayz_server\system\scheduler\sched_corpses.sqf: Deleted 0 uncontrolled zombies, 0 uncontrolled animals, 0 dead character bodies and 1 empty groups. Added 0 flies."

*** UPDATE ***
I have killed a dynamic group and their bodies were not cleaned up by the DayZ clean up, but were correctly cleaned up by the DZAI cleanup, so I would say this problem is resolved.

I will continue to test things out and report back, but thanks for the fix ShootingBlanks!!
 
Last edited:
Now you will have to add the same type of logic to include dzms and or wai ..

Sorry, I misled you.
everything works fine!
I did not pack a file $PREFIX$ , just $PBOPREFIX$
Because of this constant identity of the server.
Thank you so much, man, the game was full! :)
An excellent solution to this nasty problem!
 
Yes, that prefix and pboprefix has been causing a lot of trouble lately. I do not know why $pboprefix$ is included at all, as far as I know, that is completely outdated and non-functional.
 
Back
Top