Jump to content
  • 0

Plot management not showing option to maintain, bases still decaying.


DangerRuss

Question

So I've recently moved my server over to a dedicated box and we're just noticing a bit of a problem For some reason, the plot management is not showing that objects need to be maintained. However, the bases are still decaying and being removed.

Here is the database query I use
UPDATE `Object_DATA` SET `Damage`=0.11 WHERE `ObjectUID` <> 0 AND `CharacterID` <> 0 AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 3 DAY) AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') )

UPDATE `Object_DATA` SET `Damage`=0.11 WHERE `ObjectUID` <> 0 AND `CharacterID` <> 0 AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 3 DAY) AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') )

I noticed my HiveExt.ini had to cleanup commented out.

;CleanupPlacedAfterDays = 14

Would that have caused this? I did end up putting it back in but still no option to maintain. I checked the objects in the database and they're definitely older than 3 days.

I haven't made any changes to plot management that Im aware of and I never had this issues on my old server.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

well i struggled long with the darn base decay to get it to work properly. Fisrt for the management to show parts, the parts need "damage", Otherwise plot management will say 0 parts need to be maintained.

I got rid of all the events from the database, and created a SQL with the events i needed, then on each restart, firedeamon starts the bat files that takes care of the events.

This is my SQL file.  First day adds 16% damage, then 6% damage each day after that when its NOT maintained. Total of 100%, and the last event deletes it.  For some reason, if the damage goes above 100% (in the database its 1), it wont delete it. so the first couple weeks i had to manually delete bases lol

You can also add all the events you want, the ones here are the only ones i use

Spoiler

USE cherno;
UPDATE `object_data`
    SET `Damage` = IF( `Damage` = 0.0, 0.16, `Damage` + 0.06 )
    WHERE `LastUpdated` <= DATE_SUB(NOW(), INTERVAL 1 DAY)
        AND `Classname` REGEXP 'wall|floor|door|ladder|stair'
        AND `ObjectUID` <> 0
        AND `CharacterID` <> 0
        AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') );
        
        
        
/* Delete all vehicles not touched in 21 days */
DELETE FROM `object_data`
WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 21 DAY)
AND `Classname`
NOT REGEXP 'barrier|storage|shed|bench|wall|floor|fence|pump|wood|hrescue|stick|pole|generator|panel|house|rack|bag|stand|barrel|canvas|wire|hedgehog|net|trap|ramp|fort|sand|scaffold|nest';

/* Delete destroyed objects */
DELETE FROM `object_data`
WHERE Damage = 1;

And this is the bat file i use to run it

Spoiler

@echo off

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: CONFIG - begin
set mysql_exe_path=D:\xampp\mysql\bin"
:: CONFIG - end
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Run MySQL database maintenance scripts
cd /d %mysql_exe_path%

:: Apply damage  to buildable objects
mysql.exe --user=CHANGEME --password=CHANGEME --host=127.0.0.1 --port=3306 --database=CHANGEME < D:\Servers\Cleanups\setDamage.sql
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


:: We're done here.
@exit

I cant remember where i found this, but it works great.  I dont take credit for this lol just sharing what i found

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...