Jump to content
  • 0

Need maintenance help


Pro_Speedy

Question

Hello,

 

I have done this to my maintain_area.sqf

if (DZE_ActionInProgress) exitWith { cutText [(localize "STR_EPOCH_ACTIONS_2") , "PLAIN DOWN"]; };
DZE_ActionInProgress = true;

player removeAction s_player_maintain_area;
s_player_maintain_area = 1;
player removeAction s_player_maintain_area_preview;
s_player_maintain_area_preview = 1;

_target = cursorTarget; // Plastic_Pole_EP1_DZ

_objectClasses = DZE_maintainClasses;
_range = DZE_maintainRange; // set the max range for the maintain area
_objects = nearestObjects [_target, _objectClasses, _range];

//filter to only those that have 10% damage
//_objects_filtered = [];
//{
//    if (damage _x >= DZE_DamageBeforeMaint) then {
//        _objects_filtered set [count _objects_filtered, _x];
//   };
//} forEach _objects;
//_objects = _objects_filtered;

// TODO dynamic requirements based on used building parts?
_count = count _objects;

if (_count == 0) exitWith {
	cutText [format[(localize "STR_EPOCH_ACTIONS_22"), _count], "PLAIN DOWN"];
	DZE_ActionInProgress = false;
	s_player_maintain_area = -1;
	s_player_maintain_area_preview = -1;
};

_requirements = [];
switch true do {
        case (_count <= 15):  {_requirements = []};
        case (_count <= 20):  {_requirements = []};
        case (_count <= 25):  {_requirements = []};
        case (_count <= 30):  {_requirements = []};
        case (_count <= 40):  {_requirements = []};
        case (_count <= 50):  {_requirements = []};
        case (_count <= 75):  {_requirements = []};
        case (_count <= 100): {_requirements = []};
        case (_count <= 125): {_requirements = []};
        case (_count <= 150): {_requirements = []};
        case (_count <= 200): {_requirements = []};
        case (_count <= 250): {_requirements = []};
        case (_count <= 300): {_requirements = []};
        case (_count > 350):  {_requirements = []};
};

I have commented out the filtering part to only maintain damaged objects so it can be maintained regardless

 

I'm not sure how maintaining works in the first place does it update the object on the DB and anything that hasn't been updated gets deleted after the time set in Hiveext.ini

 

Because i am not seeing the walls and that updating in the last updated tab?

 

Please Help

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0

How many posts to this problem do you have? I answered already something to the post in  'How it's done'.

Now I see that you already achieved some parts of it here. Just lost time, sorry.

 

LOL 

 

That other post was mainly asking if i can get bases indestructible and have bases cleaned up at the same time this post is me trying to get help because when i maintained the objects weren't get updated in the DB.

 

I think i may have sorted it will see later after restart :D

 

Just one question that i asked before the Hiveext.ini file that you set the days to cleanup, does it delete objects bases on the lastupdated tab or a different way?

 

Thanks

Link to comment
Share on other sites

  • 0

Hm, I guess so but I am not 100% sure. Could not imagine what else it could check. I mean if you maintain these objects they should not get deleted...so last_updated sounds good to me.

 

Ok one more thing that i hope you can help with, The DZE_Plotpole What does the second number change e.g [40,10<--] And does the maintain range change with the radius i change to plotpole or do  i have to change it somewhere so people can maintain there whole base in one?

 

Thanks

Link to comment
Share on other sites

  • 0

Hi,

 

first parameter is the radius the plotpole 'reaches'...the second, I am not 100% sure, the distance how far the next plotpole needs to be away. Not sure, as always...just guessing what could make sense. 80% chance that it fits ,)

Link to comment
Share on other sites

  • 0

Hi,

 

first parameter is the radius the plotpole 'reaches'...the second, I am not 100% sure, the distance how far the next plotpole needs to be away. Not sure, as always...just guessing what could make sense. 80% chance that it fits ,)

 

I thought that also but it doesn't change that, still stays at 45m?

 

What about maintain range?

Link to comment
Share on other sites

  • 0

Where did you change that values? In init.sqf? Maybe you change it back with calling variables.sqf (if it's also in there) below your change and it got written back to the default values??

 

I think i figured it out it wasn't resetting it the second value is for something else. Maybe Height?

 

The maintain range form what i read is 20m more then your plotpole range so that should be fine

 

One last thing would it be better to use an event in the DB to delete buildables that haven't been updated/maintained rather than the hiveext.ini and also i should be able to use indest. bases with that correct?

 

Thanks <3

Link to comment
Share on other sites

  • 0

Hm, I do not use hive. I am using the linux version. But think doing things in the DB directly should be always better from a performance point of view.

 

But...if you use indestructable bases...what will you update then? You can only maintain things if there is some damage. You would need to change the maintain_area.sqf script I guess to allow maintenance even if there is no damage.

It's just setting the if condition to always true where it checks how much damage the objects have (did not have a look into the code now). And you need to check if the objects get updated if there is no change...but they should.

It's too late here currently...I could have a look tomorrow if you cannot figure it out for yourself.

Link to comment
Share on other sites

  • 0

Hm, I do not use hive. I am using the linux version. But think doing things in the DB directly should be always better from a performance point of view.

 

But...if you use indestructable bases...what will you update then? You can only maintain things if there is some damage. You would need to change the maintain_area.sqf script I guess to allow maintenance even if there is no damage.

It's just setting the if condition to always true where it checks how much damage the objects have (did not have a look into the code now). And you need to check if the objects get updated if there is no change...but they should.

It's too late here currently...I could have a look tomorrow if you cannot figure it out for yourself.

 

I use 

DZE_DamageBeforeMaint = 0;
Link to comment
Share on other sites

  • 0

Ok got a problem here, i am using the standard cleanup process and maintenance but sandbags and tank traps ect don't seem to be getting maintained. Like if you place one down the amount of objects you maintain are the same?

 

So what will happen is all the sandbags will disappear from a base as they can't be maintained

 

Any ideas why?

 

Thanks

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