Jump to content
  • 0

[Work] Maintain for free / SQL Event delete the Walls/Floors in x Days


freakystyle

Question

16 answers to this question

Recommended Posts

  • 0

Add this to your init.qf in your default mission file:

DZE_requireplot = 0;

So your config section in your init.sqf looks like this:

// DayZ Epoch config
spawnShoremode = 1; // Default = 1 (on shore)
spawnArea= 1500; // Default = 1500
MaxHeliCrashes= 10; // Default = 5
MaxVehicleLimit = 500; // Default = 50
MaxDynamicDebris = 100; // Default = 100
dayz_MapArea = 14000; // Default = 10000
dayz_maxLocalZombies = 30; // Default = 30
DZE_requireplot = 0;

Then go to your HiveExt.ini and add this to your "Objects" section:

CleanupPlacedAfterDays = -1

So it looks like this:

[Objects]
;Flag indicating whether hiveext should detect vehicles out of map boundaries (X < 0, or Y > 15360) and reset their position to []
;Note: YOU MUST have a proper dayz_server.pbo that supports this feature, otherwise you will get script errors
;You can find that file under the SQF directory for your server version
;ResetOOBObjects = false
CleanupPlacedAfterDays = -1
Link to comment
Share on other sites

  • 0

If you want people to maintain their base for free  you can do the following:

1. Go to your @DayZ_Epoch folder, find dayz_code.pbo and extract maintain_area.sqf from the Actions folder. 

2. Add said file to your mission.pbo folder(if you have a folder called custom, scripts or something similar just drop it in one of those. 

3. You're gonna need a custom compiles.sqf and fn_selfAction.sqf. is the link on how to fix that. Once you have "installed" those two files, open your new fn_selfActions and search for this: "s_player_maintain_area = player addAction [format". Should be line 223. Once you have found it find this: \z\addons\dayz_code\actions\maintain_area.sqf and replace it with "custom\maintain_area.sqf". You have to do it two times, the second one is just below the first one.

4. Now for making the maintenance free. Open your new maintain_area.sqf and go to line 37. Replace the following code from line 37-53 with this, or download this file and it'll already be fixed.

5. Compile your mission.pbo and try it out.
 

 

Link to comment
Share on other sites

  • 0

I use 7 DaysUnusedVehicleDelete  :

DELETE FROM `object_data` WHERE

`LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 7 DAY)

AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 7 DAY)

AND (Classname = 'AH6X_DZ' OR Classname = 'AN2_DZ' OR Classname = 'ArmoredSUV_PMC_DZE' OR Classname = 'ATV_CZ_EP1' OR Classname = 'ATV_US_EP1' OR Classname = 'C130J_US_EP1' OR Classname = 'car_hatchback' OR Classname = 'car_sedan' OR Classname = 'CH_47F_EP1_DZE' OR Classname = 'CSJ_GyroC' OR Classname = 'datsun1_civil_1_open' OR Classname = 'datsun1_civil_2_covered' OR Classname = 'datsun1_civil_3_open' OR Classname = 'GAZ_Vodnik_MedEvac' OR Classname = 'GLT_M300_LT' OR Classname = 'GLT_M300_ST' OR Classname = 'hilux1_civil_1_open' OR Classname = 'hilux1_civil_2_covered' OR Classname = 'hilux1_civil_3_open_EP1' OR...............

 

and indestructibel Cinder and metal after restart.

 

Isn`t this a problem? will this work with your event ?

Link to comment
Share on other sites

  • 0

freakystyle: there is a link in your screenshot "Search in Google". What does it say if you press it.

Everything I've found to this was regarding calling the event in a procedure or something.

 

When do you get this error. I guess posting the error message is not enough to find s.o. helping you to solve it. It's easier if s.o. know when it exactly shows up.

Link to comment
Share on other sites

  • 0
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 30 DAY)
 
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.2 WHERE `ObjectUID` <> 0 AND `CharacterID` <> 0 AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 3 DAY) AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') )

I give this in my Sql event and the Problem see my Pitcure^^ Jahangirl13

Link to comment
Share on other sites

  • 0

Hi All, 

I'm looking at introducing free base maintenance on to my servers due to a high rate of base abandonment

And I've got the free maintenance on the plot poles working fine. 

I'm just curios about these sql queries. 

In particular, setDamageOnAge

so this sql query, sets a damage of 0.2 on buildables so that they are able to be maintained, this i understand.

But running this query would update the last modified date would it not? 

 

And in turn, the SQL query to remove the old, unmaintained objects would be nullified. as every buildable would be showing 0.2 damage, last modified yesterday? 

 

would we need to add something that checks for damage of 0 also? or am I reading this completely wrong?

 

also using these two SQL queries, would i need to use 

 

CleanupPlacedAfterDays = -1

 

Or would I  better off setting a value of say, 14? 

Link to comment
Share on other sites

  • 0

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 30 DAY)
 
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.2 WHERE `ObjectUID` <> 0 AND `CharacterID` <> 0 AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 3 DAY) AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') )
I give this in my Sql event and the Problem see my Pitcure^^ Jahangirl13

Is your server running when you run this? Shut down the server, and then from your SQL manager, run this script:

DELETE FROM `object_data`
WHERE `LastUpdated` <= DATE_SUB(NOW(), INTERVAL 14 DAY)
AND `Classname` REGEXP 'wall|floor|door|ladder|stair'
Hope that helps! ;)

=170= Sven2157

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
  • Discord

×
×
  • Create New...