Jump to content
  • 0

Base Maintenance (I feel bad posting this!)


Krankie

Question

Ok firstly I do really feel bad posting this, there seem to be loads of threads surrounding this issue but none of them appear to be resolving my issue.

 

We have an issue where peoples bases are de-spawning despite clean ups being turned off.

 

I am on a dedicated server and there are NO SQL events, CleanupPlacedAfterDays = 999 or -1 doesn't have an effect (it doesn't have ; in front of it) and DZE_DamageBeforeMaint = 0; is commented out.

 

My hiveext.ini looks like this:

[Date]
Type = static
Year = 2015
Month = 2
Date = 27

[Time]
Type = Static
Hour = 16

[Database]
Host = localhost
Type = MySQL
Port = 3306
Database = ******
Username = ******
Password = ******

CleanupPlacedAfterDays = 999

I currently have a spare VM spun up with an exact copy of the server and a copy of today's database.

 

If I set all buildables in the server to have 0.11 damage (I read 0.1 was buggy) and start the server all my items are there, no issues.
If I change the date in Windows on the server forward to the 31st of March, that's less than 5 days as far as the lastupdated column is concerned, everything de-spawns. (Today is 27th of March for anyone reading this later on)

 

My SQL for setting damage to 0.11:

UPDATE `object_data` SET `Damage`=0.11 WHERE `ObjectUID` <> 0 AND `CharacterID` <> 0 AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 DAY)
AND `Classname` IN (
'BagFenceRound_DZ','CinderWall_DZ','CinderWallDoorLocked_DZ','CinderWallDoorSmall_DZ','CinderWallDoorSmallLocked_DZ',
'CinderWallHalf_DZ','FireBarrel_DZ','GunRack_DZ','LightPole_DZ','MetalFloor_DZ','MetalPanel_DZ','OutHouse_DZ','TentStorage',
'TentStorageDomed','TentStorageDomed2','Sandbag1_DZ','Scaffolding_DZ','StickFence_DZ','StorageShed_DZ','WorkBench_DZ',
'WoodCrate_DZ','WoodFloor_DZ','WoodFloorQuarter_DZ','WoodLargeWall_DZ','WoodLargeWallWin_DZ','WoodShack_DZ','WoodSmallWall_DZ',
'WoodSmallWallThird_DZ','WoodSmallWallWin_DZ','Land_DZE_GarageWoodDoor','WoodFloorHalf_DZ','Fort_RazorWire','Land_DZE_LargeWoodDoorLocked',
'WoodStairsRails_DZ','WoodLadder_DZ','WoodStairsSans_DZ','M240Nest_DZ','Land_DZE_WoodDoor'
);

I have the following mods which might be affecting it:

 

Plot Pole for Life
Zupas Plot Management

Zupa/Souls Single Currency 2.0 with Souls hive

 

Any help would be greatly appreciated and it anyone wants to rdp to my test server I'm more than happy to let you on to have a nose.

 

- Krankie

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Ok I've kinda gotten around this just using SQL. It's dirty but hopefully anyone else who has this issue can use this as well.

 

Thanks to this thread: 

And Seeker who mentioned he just changes the date stamp every day.

 

How it works:

 

This SQL runs once a day at 1am.

It sets all the date stamps on anything with classname in object_data containing

 

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

 

It then increments the damage by 0.1 (0.0 -> 0.1 ->0.2 ~ 1.0).
Damage can be reset back to 0 by people maintaining their bases.

 

Any items that reach 1.0 will of been in the database for 10 days without being maintained and so will be deleted.

 

I plan on expanding this to unlock doors and safes which have damage of 0.7 meaning that they have been untouched for 7 days. (This could be open to abuse by people damaging doors to have them unlock next restart though)

 

Before running this I recommend you set all items to 0 damage with this SQL

 

UPDATE `object_data` SET `Damage`=0.0 WHERE `ObjectUID` <> 0 AND `CharacterID` <> 0 AND `Classname` 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';
 

Base Decay SQL

/* =================== Set Datestamp =================== */
UPDATE `Object_DATA` SET `Datestamp`=CURRENT_TIMESTAMP
WHERE `ObjectUID` <> 0 
		AND `CharacterID` <> 0 
		AND `Classname` REGEXP 'wall|floor|door|ladder|stairs';

/* =================== Set Damage =================== */
UPDATE `object_data` SET 
			`Damage` = CASE
			WHEN `Damage` = '0.0' THEN '0.1'
			WHEN `Damage` = '0.1' THEN '0.2'
			WHEN `Damage` = '0.2' THEN '0.3'
			WHEN `Damage` = '0.3' THEN '0.4'
			WHEN `Damage` = '0.4' THEN '0.5'
			WHEN `Damage` = '0.5' THEN '0.6'
			WHEN `Damage` = '0.6' THEN '0.7'
			WHEN `Damage` = '0.7' THEN '0.8'
			WHEN `Damage` = '0.8' THEN '0.9'
			WHEN `Damage` = '0.9' THEN '1.0'
			ELSE '1.0'
			END
WHERE  `Classname` 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'
		AND `ObjectUID` <> 0
		AND `CharacterID` <> 0;

/* =================== Remove Fully Damaged Objects =================== */
DELETE FROM `object_data`
WHERE `Damage` = '1.0' 
		AND `ObjectUID` <> 0 
		AND `CharacterID` <> 0
		AND `Classname` 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';

- Krankie

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