Jump to content
  • 0

Help!! with plotpole, decay rate etc.


Ventana

Question

What I want to do.

 

1 Require plot pole for building (to keep bases withing 30 m)

2 No maintenance for 30 -60 days

3. delete items not touched in 30

 

What I have set right now.

 

DZE_BuildingLimit = 300;

DZE_requireplot = 1;

 

CleanupPlacedAfterDays = 180

 

Can anyone help?

Link to comment
Share on other sites

19 answers to this question

Recommended Posts

  • 0

Cleanup placed after days is located in your hiveext.ini file. just look for the line you have above and set the number to what you want. 

 

As for the no maintenance after days I don't really know how to work that. But I'm pretty sure that there are a few things you can try to work out what you want.

 

what I know works is if you add this under your Epoch Config secion in your init.sqf:

DZE_GodModeBase = true;


This way players do not have to worry about maintaining their stuff but I do not know how that will conflict with the cleanupplacedafterdays.

Link to comment
Share on other sites

  • 0

Kinda wondering about this one myself/ I have my hivext.ini CleanupPlacedAfterDays = 30.

 

There are some items I have built which are now 28 days old, and still when I check the maintenance preview, it still states 0 items within range. Kinda concerned that huge portions of my base (and other players) will start to vanish pretty soon. I thought there was some point at which items could be maintained that was less than the Cleanup Days setting?

Link to comment
Share on other sites

  • 0

you need to run the maintain event in your database:

/*setDamageOnAgeMaintain: This will set Damage to enable the Maintain function in Epoch*/
CREATE EVENT setDamageOnAgeMaintain
    ON SCHEDULE EVERY 1 DAY
    DO
      UPDATE `object_data` SET `Damage`=0.11 WHERE `ObjectUID` <> 0 AND `CharacterID` <> 0 AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') )
;

The "INTERVAL 14 DAY" part you have to edit to your liking. It is recommended to set it to half the value of "CleanupPlaceAfterDays".

e.g. "CleanupPlaceAfterDays = 28" and "INTERVAL 14 DAY", which means that 14 days after something has been build, the players will get the option to maintain it at the plot pole. If they dont maintain it, it will despawn after 28 days.

 

hope that helps

 

cheers

Link to comment
Share on other sites

  • 0

Cleanup placed after days is located in your hiveext.ini file. just look for the line you have above and set the number to what you want. 

 

As for the no maintenance after days I don't really know how to work that. But I'm pretty sure that there are a few things you can try to work out what you want.

 

what I know works is if you add this under your Epoch Config secion in your init.sqf:

DZE_GodModeBase = true;


This way players do not have to worry about maintaining their stuff but I do not know how that will conflict with the cleanupplacedafterdays.

 

Pretty sure all this flag does is make it immune to external damage from players, vehicles, etc...  Don't think it gets around the CleanupPlacedAfterDays setting and definitely doesn't affect the maintenance queries if they are installed in the DB and running.

Link to comment
Share on other sites

  • 0

Pretty sure all this flag does is make it immune to external damage from players, vehicles, etc...  Don't think it gets around the CleanupPlacedAfterDays setting and definitely doesn't affect the maintenance queries if they are installed in the DB and running.

Lol I know what they all do. I don't know exactly how to help him with what he wants so I'm just trying to help him out with what I know.

Link to comment
Share on other sites

  • 0
Here's a more definitive answer (based on how I interpret the various functions work... if anyone knows of anything in this that is incorrect, please correct me)...
 
Install (run) this script to create database "events" (basically scheduled jobs) in your database.  Be aware that case does matter for database table and field names, so if your database names are different from what is in the script you will need to modify the scripts appropriately... otherwise, the jobs won't work.:
 
 
Here's what the ones that are most pertinent to your question do. (Note they are all set up to run once a day.):
-- ----------------------------
-- Event structure for removeDamagedVehicles
-- ----------------------------
DROP EVENT IF EXISTS `removeDamagedVehicles`;
DELIMITER ;;
CREATE EVENT `removeDamagedVehicles` ON SCHEDULE EVERY 1 DAY COMMENT 'Removes damaged vehicles' DO DELETE FROM `Object_DATA` WHERE Damage = 1
;;
DELIMITER ;

Removes any object in the database (not just vehicles) that has been destroyed (i.e. has a damage of "1", or 100%).  (This also provides a "catch-all" for objects that the server cleanup function didn't remove for whatever reason...)

-- ----------------------------
-- Event structure for removeObjectEmpty
-- ----------------------------
DROP EVENT IF EXISTS `removeObjectEmpty`;
DELIMITER ;;
CREATE EVENT `removeObjectEmpty` ON SCHEDULE EVERY 1 DAY COMMENT 'Removes abandoned storage objects and vehicles' DO 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` = '[[[],[]],[[],[]],[[],[]]]') )
;;
DELIMITER ;

Basically removes anything with an empty inventory that has not been "touched' in some way within the past 14 days, and is older than 24 days.  Although this says storage objects and vehicles, the way it is written would also cause it to remove all constructed objects that match the date filters if you don't have the setDamageOnAge event running.  (more on this later...)
-- ----------------------------
-- Event structure for removeObjectOld
-- ----------------------------
DROP EVENT IF EXISTS `removeObjectOld`;
DELIMITER ;;
CREATE EVENT `removeObjectOld` ON SCHEDULE EVERY 1 DAY COMMENT 'Removes old objects and vehicles' DO DELETE FROM `Object_DATA` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 24 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 42 DAY)
;;
DELIMITER ;

This removes ALL objects in your database that have not been "touched" in 24 days and are older than 42 days.  This INCLUDES vehicles, safes, lockboxes, gun racks, etc. with items stored in them, not just items with empty inventory (which the prior job excludes).
-- ----------------------------
-- Event structure for setDamageOnAge
-- ----------------------------
DROP EVENT IF EXISTS `setDamageOnAge`;
DELIMITER ;;
CREATE EVENT `setDamageOnAge` ON SCHEDULE EVERY 1 DAY COMMENT 'This sets damage on a wall so that it can be maintained' DO UPDATE `Object_DATA` SET `Damage`=0.1 WHERE `ObjectUID` <> 0 AND `CharacterID` <> 0 AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 3 DAY) AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') )
;;
DELIMITER ;

Now, here's the "magic" one.  What this does is looks for all objects in your database that are older than 3 days.  It then sets the damage on those objects to .1 (10%) so that it will trigger the "maintenance" code invoked by using the plot pole maintenance function.  As a side effect, by setting the damage on an object, it also updates the LastUpdated field for that object in the database, which prevents those objects from being deleted by other jobs.  That is why it's critical that this job is in place.

 

Relative to the other settings:
 
"DZE_BuildingLimit" determines the number of items that can be built in the radius of a plot pole.
 
"DZE_PlotPole" determines the radius a plot pole covers, and the radius of the restriction on placing other plot poles. 
 
"DZE_DamageBeforeMaint" determines how much damage is required before the maintenance option will be displayed.
 
"DZE_requireplot" determines whether a plot pole is required to build, and if true prevents building by others within the restriction range.
 
"DZE_GodModeBase" determines whether built objects take damage from external factors, such as players, vehicles, etc.  Important to note is that this doesn't affect the `setDamageOnAge`  job, it will still add damage to built objects.
 
"DZE_maintainClasses" determines which objects require that maintenance be paid and the `setDamageOnAge` job affects. In order to set this, you have to override the default value with a custom variables.sqf file.  (it's good to know what is in this however, as it appears the items that will require maintenance will be increasing with Epoch 1.0.5).
 
"CleanupPlacedAfterDays" determines how many days placed objects will last before they are deleted by the system.  I am unclear whether this uses the 'LastUpdated'  or `Datestamp` field from the database for an object as the value it refers to when it looks for items to clean up.  (If anyone could shed light on this, that would be awesome!)  I always set this to -1 to disable it, and this setting is fairly common.  If you set this to a different value, there is a chance it may end up overriding your scheduled event jobs in the database (based on the time intervals you specify in the different jobs).
 
Hope this provides clarification on what things can be "tuned" (both the variables settings, as well as the times, in number of days, contained in the various database jobs) in order to meet your goals for your server object lifetimes and building maintenance.
 
GT
Link to comment
Share on other sites

  • 0

I'm pretty sure it only gives the option if the item is damaged. I think that even if you maintain the item it will still despawn after 30 days. I wouldn't know though because I have it off. (set CleanupPlaceAfterDays = -1)

I run a dayz.st panthera epoch server and I have been told that some buildables are disappearing like some floors and sandbags. dayz.st says there is no need for maintain they disabled it. 

I ran this event and I think its causing stuff to disappear.   how does this actually work does a player have to touch everything in his or her base ?? or just be near it  ?? for it not to be considered old

 

DROP EVENT IF EXISTS removeObjectOld;
CREATE EVENT removeObjectOld
ON SCHEDULE EVERY 1 DAY
COMMENT 'Removes old objects and vehicles'
DO
DELETE FROM `Object_DATA` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY);
 
 
If I add (set CleanupPlaceAfterDays = -1) will that disable the drop event I  added ??? does it go in init.sqf ???  if so whhat actually goes in there                  set CleanupPlaceAfterDays = -1                    or                  CleanupPlaceAfterDays = -1
Link to comment
Share on other sites

  • 0

 

Here's a more definitive answer (based on how I interpret the various functions work... if anyone knows of anything in this that is incorrect, please correct me)...
 
Install (run) this script to create database "events" (basically scheduled jobs) in your database.  Be aware that case does matter for database table and field names, so if your database names are different from what is in the script you will need to modify the scripts appropriately... otherwise, the jobs won't work.:
 
 
Here's what the ones that are most pertinent to your question do. (Note they are all set up to run once a day.):
-- ----------------------------
-- Event structure for removeDamagedVehicles
-- ----------------------------
DROP EVENT IF EXISTS `removeDamagedVehicles`;
DELIMITER ;;
CREATE EVENT `removeDamagedVehicles` ON SCHEDULE EVERY 1 DAY COMMENT 'Removes damaged vehicles' DO DELETE FROM `Object_DATA` WHERE Damage = 1
;;
DELIMITER ;

Removes any object in the database (not just vehicles) that has been destroyed (i.e. has a damage of "1", or 100%).  (This also provides a "catch-all" for objects that the server cleanup function didn't remove for whatever reason...)

-- ----------------------------
-- Event structure for removeObjectEmpty
-- ----------------------------
DROP EVENT IF EXISTS `removeObjectEmpty`;
DELIMITER ;;
CREATE EVENT `removeObjectEmpty` ON SCHEDULE EVERY 1 DAY COMMENT 'Removes abandoned storage objects and vehicles' DO 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` = '[[[],[]],[[],[]],[[],[]]]') )
;;
DELIMITER ;

Basically removes anything with an empty inventory that has not been "touched' in some way within the past 14 days, and is older than 24 days.  Although this says storage objects and vehicles, the way it is written would also cause it to remove all constructed objects that match the date filters if you don't have the setDamageOnAge event running.  (more on this later...)
-- ----------------------------
-- Event structure for removeObjectOld
-- ----------------------------
DROP EVENT IF EXISTS `removeObjectOld`;
DELIMITER ;;
CREATE EVENT `removeObjectOld` ON SCHEDULE EVERY 1 DAY COMMENT 'Removes old objects and vehicles' DO DELETE FROM `Object_DATA` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 24 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 42 DAY)
;;
DELIMITER ;

This removes ALL objects in your database that have not been "touched" in 24 days and are older than 42 days.  This INCLUDES vehicles, safes, lockboxes, gun racks, etc. with items stored in them, not just items with empty inventory (which the prior job excludes).
-- ----------------------------
-- Event structure for setDamageOnAge
-- ----------------------------
DROP EVENT IF EXISTS `setDamageOnAge`;
DELIMITER ;;
CREATE EVENT `setDamageOnAge` ON SCHEDULE EVERY 1 DAY COMMENT 'This sets damage on a wall so that it can be maintained' DO UPDATE `Object_DATA` SET `Damage`=0.1 WHERE `ObjectUID` <> 0 AND `CharacterID` <> 0 AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 3 DAY) AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') )
;;
DELIMITER ;

Now, here's the "magic" one.  What this does is looks for all objects in your database that are older than 3 days.  It then sets the damage on those objects to .1 (10%) so that it will trigger the "maintenance" code invoked by using the plot pole maintenance function.  As a side effect, by setting the damage on an object, it also updates the LastUpdated field for that object in the database, which prevents those objects from being deleted by other jobs.  That is why it's critical that this job is in place.

 

Relative to the other settings:
 
"DZE_BuildingLimit" determines the number of items that can be built in the radius of a plot pole.
 
"DZE_PlotPole" determines the radius a plot pole covers, and the radius of the restriction on placing other plot poles. 
 
"DZE_DamageBeforeMaint" determines how much damage is required before the maintenance option will be displayed.
 
"DZE_requireplot" determines whether a plot pole is required to build, and if true prevents building by others within the restriction range.
 
"DZE_GodModeBase" determines whether built objects take damage from external factors, such as players, vehicles, etc.  Important to note is that this doesn't affect the `setDamageOnAge`  job, it will still add damage to built objects.
 
"DZE_maintainClasses" determines which objects require that maintenance be paid and the `setDamageOnAge` job affects. In order to set this, you have to override the default value with a custom variables.sqf file.  (it's good to know what is in this however, as it appears the items that will require maintenance will be increasing with Epoch 1.0.5).
 
"CleanupPlacedAfterDays" determines how many days placed objects will last before they are deleted by the system.  I am unclear whether this uses the 'LastUpdated'  or `Datestamp` field from the database for an object as the value it refers to when it looks for items to clean up.  (If anyone could shed light on this, that would be awesome!)  I always set this to -1 to disable it, and this setting is fairly common.  If you set this to a different value, there is a chance it may end up overriding your scheduled event jobs in the database (based on the time intervals you specify in the different jobs).
 
Hope this provides clarification on what things can be "tuned" (both the variables settings, as well as the times, in number of days, contained in the various database jobs) in order to meet your goals for your server object lifetimes and building maintenance.
 
GT

 

 

Best breakdown of Maintenance that I've found. Great post.

Link to comment
Share on other sites

  • 0

GeneralTragedy

I don't get it.I am trying to make it so you have to maintain every 30 days but I want players to have 5 days to do this before the base is removed.

But if I set the setDamageOnAge to 30 so that players can do this after 30 days and set the removeObjectOld to 35 wont the removeObjectOld be reset back to 35 if the setDamageOnAge interacts with it

there fore creating a loop that causes buildings to never be removed?

Link to comment
Share on other sites

  • 0

 

Here's a more definitive answer (based on how I interpret the various functions work... if anyone knows of anything in this that is incorrect, please correct me)...
 
Install (run) this script to create database "events" (basically scheduled jobs) in your database.  Be aware that case does matter for database table and field names, so if your database names are different from what is in the script you will need to modify the scripts appropriately... otherwise, the jobs won't work.:
 
 
Here's what the ones that are most pertinent to your question do. (Note they are all set up to run once a day.):
-- ----------------------------
-- Event structure for removeDamagedVehicles
-- ----------------------------
DROP EVENT IF EXISTS `removeDamagedVehicles`;
DELIMITER ;;
CREATE EVENT `removeDamagedVehicles` ON SCHEDULE EVERY 1 DAY COMMENT 'Removes damaged vehicles' DO DELETE FROM `Object_DATA` WHERE Damage = 1
;;
DELIMITER ;

Removes any object in the database (not just vehicles) that has been destroyed (i.e. has a damage of "1", or 100%).  (This also provides a "catch-all" for objects that the server cleanup function didn't remove for whatever reason...)

-- ----------------------------
-- Event structure for removeObjectEmpty
-- ----------------------------
DROP EVENT IF EXISTS `removeObjectEmpty`;
DELIMITER ;;
CREATE EVENT `removeObjectEmpty` ON SCHEDULE EVERY 1 DAY COMMENT 'Removes abandoned storage objects and vehicles' DO 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` = '[[[],[]],[[],[]],[[],[]]]') )
;;
DELIMITER ;

Basically removes anything with an empty inventory that has not been "touched' in some way within the past 14 days, and is older than 24 days.  Although this says storage objects and vehicles, the way it is written would also cause it to remove all constructed objects that match the date filters if you don't have the setDamageOnAge event running.  (more on this later...)
-- ----------------------------
-- Event structure for removeObjectOld
-- ----------------------------
DROP EVENT IF EXISTS `removeObjectOld`;
DELIMITER ;;
CREATE EVENT `removeObjectOld` ON SCHEDULE EVERY 1 DAY COMMENT 'Removes old objects and vehicles' DO DELETE FROM `Object_DATA` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 24 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 42 DAY)
;;
DELIMITER ;

This removes ALL objects in your database that have not been "touched" in 24 days and are older than 42 days.  This INCLUDES vehicles, safes, lockboxes, gun racks, etc. with items stored in them, not just items with empty inventory (which the prior job excludes).
-- ----------------------------
-- Event structure for setDamageOnAge
-- ----------------------------
DROP EVENT IF EXISTS `setDamageOnAge`;
DELIMITER ;;
CREATE EVENT `setDamageOnAge` ON SCHEDULE EVERY 1 DAY COMMENT 'This sets damage on a wall so that it can be maintained' DO UPDATE `Object_DATA` SET `Damage`=0.1 WHERE `ObjectUID` <> 0 AND `CharacterID` <> 0 AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 3 DAY) AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') )
;;
DELIMITER ;

Now, here's the "magic" one.  What this does is looks for all objects in your database that are older than 3 days.  It then sets the damage on those objects to .1 (10%) so that it will trigger the "maintenance" code invoked by using the plot pole maintenance function.  As a side effect, by setting the damage on an object, it also updates the LastUpdated field for that object in the database, which prevents those objects from being deleted by other jobs.  That is why it's critical that this job is in place.

 

Relative to the other settings:
 
"DZE_BuildingLimit" determines the number of items that can be built in the radius of a plot pole.
 
"DZE_PlotPole" determines the radius a plot pole covers, and the radius of the restriction on placing other plot poles. 
 
"DZE_DamageBeforeMaint" determines how much damage is required before the maintenance option will be displayed.
 
"DZE_requireplot" determines whether a plot pole is required to build, and if true prevents building by others within the restriction range.
 
"DZE_GodModeBase" determines whether built objects take damage from external factors, such as players, vehicles, etc.  Important to note is that this doesn't affect the `setDamageOnAge`  job, it will still add damage to built objects.
 
"DZE_maintainClasses" determines which objects require that maintenance be paid and the `setDamageOnAge` job affects. In order to set this, you have to override the default value with a custom variables.sqf file.  (it's good to know what is in this however, as it appears the items that will require maintenance will be increasing with Epoch 1.0.5).
 
"CleanupPlacedAfterDays" determines how many days placed objects will last before they are deleted by the system.  I am unclear whether this uses the 'LastUpdated'  or `Datestamp` field from the database for an object as the value it refers to when it looks for items to clean up.  (If anyone could shed light on this, that would be awesome!)  I always set this to -1 to disable it, and this setting is fairly common.  If you set this to a different value, there is a chance it may end up overriding your scheduled event jobs in the database (based on the time intervals you specify in the different jobs).
 
Hope this provides clarification on what things can be "tuned" (both the variables settings, as well as the times, in number of days, contained in the various database jobs) in order to meet your goals for your server object lifetimes and building maintenance.
 
GT

 

GeneralTragedy

I don't get it.I am trying to make it so you have to maintain every 30 days but I want players to have 5 days to do this before the base is removed.

But if I set the setDamageOnAge to 30 so that players can do this after 30 days and set the removeObjectOld to 35 wont the removeObjectOld be reset back to 35 if the setDamageOnAge interacts with it

there fore creating a loop that causes buildings to never be removed?

Link to comment
Share on other sites

  • 0

GeneralTragedy

I don't get it.I am trying to make it so you have to maintain every 30 days but I want players to have 5 days to do this before the base is removed.

But if I set the setDamageOnAge to 30 so that players can do this after 30 days and set the removeObjectOld to 35 wont the removeObjectOld be reset back to 35 if the setDamageOnAge interacts with it

there fore creating a loop that causes buildings to never be removed?

EDIT

Okay so I set CleanupPlacedAfterDays = 35 , setDamageOnAge to 30 and removeObjectOld to 35 and I removed the removeObjectEmpty because I do not feel it is needed being that removeObjectOld 

will do the same after 35 days and I want it all to clean on the same day.Will this work?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...