Jump to content
  • 0

Plot maintain not working.


Hooty

Question

8 answers to this question

Recommended Posts

  • 0

it wil lonly maintain if the objects have damage on them. Id suggest checking the database of a specific item that you know should have damage on it...

If thats the case, the SQL events might not be turned on

Link to comment
Share on other sites

  • 0

If it's not working then I would be checking your SQL event is working correctly, This is what does the damage on the objects.

The maintain script then checks all objects on the plot pole radius and adds them to an array: https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/actions/maintain_area.sqf#L126-L133

Need to make sure your SQL event is setting damage to greater or equal to: DZE_DamageBeforeMaint https://github.com/EpochModTeam/DayZ-Epoch/blob/992ab199ddd21fd8bca5ebca9a4fff075691458d/SQF/dayz_code/configVariables.sqf#L17

Link to comment
Share on other sites

  • 0

I have this for doors/plots

Spoiler

BEGIN

UPDATE `object_data`

SET `Damage` = IF( `Damage` = 0.0, 0.1, `Damage` + 0.1 )

WHERE `Classname` IN ('Plastic_Pole_EP1_DZ','CinderWallDoorSmallLocked_DZ','CinderWallDoorLocked_DZ','CinderWallSmallDoorway_DZ','CinderWallDoorway_DZ','Land_DZE_WoodDoorLocked','CinderWallDoor_DZ','CinderWallDoorSmall_DZ','Land_DZE_WoodDoor','Land_DZE_GarageWoodDoor','Land_DZE_GarageWoodDoorLocked','Land_DZE_LargeWoodDoorLocked','Land_DZE_LargeWoodDoor','WoodLargeWallDoor_DZ')

AND `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 DAY)

AND `Inventory` != '[]';

END

and this for everything else

Spoiler

BEGIN

UPDATE `object_data`

SET `Damage` = IF( `Damage` = 0.0, 0.1, `Damage` + 0.1 )

WHERE `LastUpdated` <= DATE_SUB(NOW(), INTERVAL 1 DAY)

AND `ObjectUID` <> 0

AND `CharacterID` <> 0

AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') );

END

I've also placed this to see if it would help but no

Spoiler

BEGIN

UPDATE `object_data`

SET `Damage`=0.2

WHERE `ObjectUID` <> 0

AND `CharacterID` <> 0

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

AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') );

END

hive= CleanupPlacedAfterDays = 10

config= DZE_DamageBeforeMaint = 0.09; // Min damage built items must have before they can be maintained

Link to comment
Share on other sites

  • 0
2 hours ago, salival said:

If it's not working then I would be checking your SQL event is working correctly, This is what does the damage on the objects.

The maintain script then checks all objects on the plot pole radius and adds them to an array: https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/actions/maintain_area.sqf#L126-L133

Need to make sure your SQL event is setting damage to greater or equal to: DZE_DamageBeforeMaint https://github.com/EpochModTeam/DayZ-Epoch/blob/992ab199ddd21fd8bca5ebca9a4fff075691458d/SQF/dayz_code/configVariables.sqf#L17

do i need to bring maintain_area.sqf mission side or keep it server side

Link to comment
Share on other sites

  • 0
7 hours ago, Hooty said:

do i need to bring maintain_area.sqf mission side or keep it server side

maintain_area is always going to be client side, it's already in dayz_code and you don't need it unless you make changes to it.

to me it looks like your events are messed up, maintaining definitely works correctly but you are using some funky system to put incremental damage on objects instead of a flat damage amount.

To test that maintaining is working correctly, go into the database and find your base (if you have one) or a base you have access to and manually set the damage field in the database to >= what you have DZE_DamageBeforeMaint set to in your mission. (default is 0.09) on a few objects belonging to that base (i.e the plot pole or some doors or similar)

Then start the server and goto the plot pole for the base that you set the damaged objects to, IF maintaining is working correctly, you should be able to maintain single objects aswell as force maintaining.

Link to comment
Share on other sites

  • 0
7 hours ago, salival said:

maintain_area is always going to be client side, it's already in dayz_code and you don't need it unless you make changes to it.

to me it looks like your events are messed up, maintaining definitely works correctly but you are using some funky system to put incremental damage on objects instead of a flat damage amount.

To test that maintaining is working correctly, go into the database and find your base (if you have one) or a base you have access to and manually set the damage field in the database to >= what you have DZE_DamageBeforeMaint set to in your mission. (default is 0.09) on a few objects belonging to that base (i.e the plot pole or some doors or similar)

Then start the server and goto the plot pole for the base that you set the damaged objects to, IF maintaining is working correctly, you should be able to maintain single objects aswell as force maintaining.

Thanks @salival will test now

 

Link to comment
Share on other sites

  • 0
On 5/21/2017 at 3:57 AM, salival said:

maintain_area is always going to be client side, it's already in dayz_code and you don't need it unless you make changes to it.

to me it looks like your events are messed up, maintaining definitely works correctly but you are using some funky system to put incremental damage on objects instead of a flat damage amount.

To test that maintaining is working correctly, go into the database and find your base (if you have one) or a base you have access to and manually set the damage field in the database to >= what you have DZE_DamageBeforeMaint set to in your mission. (default is 0.09) on a few objects belonging to that base (i.e the plot pole or some doors or similar)

Then start the server and goto the plot pole for the base that you set the damaged objects to, IF maintaining is working correctly, you should be able to maintain single objects aswell as force maintaining.

Fixed it thanks again @salival and to everyone else for trying.

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