Jump to content
  • 0

please explain DB event removeObjectEmpty


ekroemer

Question

Hi there,

 

on our server we, too, have the problem that after 24 days basebuilding objects disappear regardless of our maintenance related settings.

 

Looking at the DB events I found that removeObjectEmpty reads

DELETE FROM `object_data` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 24 DAY) AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') OR (`Inventory` = '[[[],[]],[[],[]],[[],[]]]') )

To my knowledge this would not only delete "abandoned storage objects and vehicles" but anything that has an inventory string '[]'. This holds for _any_ object, cinderwalls, ladders, ...

 

So, misunderstanding on my part or bug?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hi there,

 

on our server we, too, have the problem that after 24 days basebuilding objects disappear regardless of our maintenance related settings.

 

Looking at the DB events I found that removeObjectEmpty reads

DELETE FROM `object_data` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 24 DAY) AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') OR (`Inventory` = '[[[],[]],[[],[]],[[],[]]]') )

To my knowledge this would not only delete "abandoned storage objects and vehicles" but anything that has an inventory string '[]'. This holds for _any_ object, cinderwalls, ladders, ...

 

So, misunderstanding on my part or bug?

 

You're understanding it correctly, but it sounds like your maintenance isn't working properly.  Performing maintenance on an object should update both LastUpdated and Datestamp for that object to the current timestamp.  Once a building object is placed, it doesn't update (generally speaking) unless maintenance is performed, so if your script for applying damage to objects so maintenance is required isn't set correctly, you could definitely lose objects.

 

More detail in this thread:

 

GT

Link to comment
Share on other sites

  • 0

Our decay/maintenance intervals are set to 60/30 days but we regularly had items disappearing much earlier, after 24 days.

 

But now that you say it - maybe the reason nobody has complained about this event, before, is that most servers run at decay intervals shorter than 24 days....

Link to comment
Share on other sites

  • 0

To 'answer' my own question:

 

having received no answer here, I filed an issue https://github.com/vbawol/DayZ-Epoch/issues/1212 and now got a comment from vbawol:

 

 

This is simply another cleanup to catch any objects that slipped by the normal cleanup system.

 

 

So, to summarize my understanding: if you want to customize your cleanup intervall, you have to

  • define CleanupPlacedAfterDays in your hiveext.ini
  • adjust the intervall used by the DB event setDamageOnAgeMaintain to a value smaller than CleanupPlacedAfterDays so your players get the maintain option in time

  • and check that the intervall used in the DB event removeObjectEmpty is not smaller than CleanupPlacedAfterDays

Seeing that you have to manually adjust 3 parameters that are connected logically but stored separately makes me support the suggestion for expanding the DB to hold configuration parameters. This way it would be possible to derive all cleanup connected variables from a single parameter.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...