Epoch bb scroll menu question (removal of)

robbiedarza

Well-Known Member
Hello there, I have been trying to get indestructible base building on my server, I have seen the post on the epoch forum and have it sort of working, but if someone maintains an object it becomes destructible again.

I have tried a few things to no success. so my question is does anyone know how I can just remove the 'maintenance' option from the scroll wheel please?

Many thanks

Robbie
 
You could use database event to set object damage to zero. Then it doesn't give option to maintain.
 
Hi there, thanks for the reply but im sorry I dont know what that is! I am using dayz.st, do I need to go into the database and change a value somewhere?

many thanks

robbie
 
Go to your Epoch database and run this under SQF
Code:
CREATE EVENT ResetDamage
ON SCHEDULE EVERY 1 DAY
  COMMENT 'This sets damage to zero for all build objects'
  DO
  UPDATE `object_data` SET `Damage`=0 WHERE `ObjectUID` <> 0 AND `CharacterID` <> 0 AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') )
This runs once a day and sets damage to zero for all build objects. Problem is that you can still maintain if object is damaged between these updates. I guess you could run this more often than once a day. Maybe even every hour:
Code:
ON SCHEDULE EVERY 1 HOUR
 
..or do that :) Never used that mod and never will. My opinion is that indestructible bases ruins one of the best things in Epoch which is raid and f*ck up other players bases.
 
I used it on my hardcore PVP server to modify all the buildables to be 3x more durable instead of indestructible.
 
If you can just get part 4 to work, then the object that is there after maintaining will be indestructible.
 
Just tried part 4, have I got it correct? All i do, after part 2 is change my server_swapObject.sqf so it looks like this?

Code:
private ["_activatingplayerUID","_class","_uid","_charID","_object","_worldspace","_key","_allowed","_obj","_objectID","_objectUID"];
//[dayz_characterID,_tent,[_dir,_location],"TentStorage"]
_charID =        _this select 0;
_object =        _this select 1;
_worldspace =    _this select 2;
_class =        _this select 3;
_obj =        _this select 4;
_activatingplayerUID =        _this select 5;
 
_obj removeAllMPEventHandlers "MPKilled";
 
// Remove old object
deleteVehicle _obj;
 
_objectID =        _this select 5;
_objectUID =        _this select 6;
 
if(_objectID == "0" && _objectUID == "0") exitWith {diag_log ("Object not valid: "+ str(_object));};
 
[_objectID,_objectUID,_activatingplayerUID] call server_deleteObj;
 
_allowed = [_object, "Server"] call check_publishobject;
if (!_allowed) exitWith { deleteVehicle _object; };
 
// Publish variables
_object setVariable ["CharacterID",_charID,true];
       
//_object setVariable ["ObjectUID",_objectUID,true];
_object setVariable ["OEMPos",(_worldspace select 1),true];
 
//diag_log ("PUBLISH: Attempt " + str(_object));
 
//get UID
_uid = _worldspace call dayz_objectUID2;
 
//Send request
_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 , _charID, _worldspace, [], [], 0,_uid];
//diag_log ("HIVE: WRITE: "+ str(_key));
_key call server_hiveWrite;
 
_object setVariable ["lastUpdate",time];
_object setVariable ["ObjectUID", _uid,true];
// _object setVariable ["CharacterID",_charID,true];
 
_object addMPEventHandler ["MPKilled",{_this call object_handleServerKilled;}];
// Test disabling simulation server side on buildables only.
_object enableSimulation false;
// ### CPC Swap Object Fix
_object addEventHandler ["HandleDamage", {false}];
// ### CPC Swap Object Fix
PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_object];
 
//diag_log ("PUBLISH: Created " + (_class) + " with ID " + _uid);


Many thanks

Robbie
 
Naa doesn't work!! ive given up now!! its staring to really annoy me so ill leave it before my computer ends up through the window.


many thanks for all the help guys

Robbie
 
HI Sukkaed

in your post u mention running the Event in the DB under SQF, did you mean SQL?
also can I ask, what stops this event from including vehicles?
sorry if this is a dumb "Q", but I know sql, but still working round understanding the tables of dayz.

Cheers mate
Lee
 
HI Sukkaed

in your post u mention running the Event in the DB under SQF, did you mean SQL?
also can I ask, what stops this event from including vehicles?
sorry if this is a dumb "Q", but I know sql, but still working round understanding the tables of dayz.

Cheers mate
Lee

Right sorry SQL is what I meant. It doesn't include vehicles because those have inventory.
 
Last edited:
Hi Sukkaed, cheers for that mate, i have another little problem, my SQL is PHP, so no events allowed, do you know of the event handler for PHP off the top of your head, that would allow this, Thought i'd ask in case.


Cheers again for your reply.
 
Last edited:
Hi Sukkaed
in your post above you mentioned doing this

"Go to your Epoch database and run this under SQF"
Code:
CREATE EVENT ResetDamage
ON SCHEDULE EVERY 1 DAY

I have been running this every day on my server, and it says it has completed lines, but too my horror and some very annoyed players last night, on return to their bases, they were still decaying, thought you would like to know it does not work mate.

Cheers
Lee
 
That event doesn't stop decaying. Point was to remove the 'maintenance' option. You have to set your decay time to negative value from HiveEXT.ini or use event that updates the datestamp if you don't want any decaying.
Code:
CREATE EVENT preventCleanup
ON SCHEDULE EVERY 1 DAY
COMMENT 'prevents all cleanup by setting datestamp to current'
DO
UPDATE `object_data` SET `Datestamp`=CURRENT_TIMESTAMP WHERE `ObjectUID` <> 0 AND `CharacterID` <> 0 AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]')
 
Last edited:
Back
Top