[FIX] Tent Saving Issues for 1.8 - Problem

Thanks for the confirmation! I can also verify that the Dometent is a seperate item. Being added into the loot table in 1.8.0.1
 
Running Chenarus 1.8.0.3
Does this look correct for server_monitor.sqf? Your version didn't show "if (_object isKindOf "TentStorage" ||..."

Code:
if (_damage < 1) then {
                //diag_log format["OBJ: %1 - %2,%3,%4,%5,%6,%7,%8", _idKey,_type,_ownerID,_worldspace,_inventory,_hitPoints,_fuel,_damage];
 
            dayz_nonCollide = ["DomeTentStorage","TentStorage","CamoNet_DZ"];
         
                      //Create it
                      _object = createVehicle [_type, _pos, [], 0, if (_type in dayz_nonCollide) then {"NONE"} else {"CAN_COLLIDE"}];
                      _object setVariable ["lastUpdate",time];
                      // Don't set objects for deployables to ensure proper inventory updates
            if (_ownerID == "0") then {
                _object setVariable ["ObjectID", str(_idKey), true];
            } else {
                _object setVariable ["ObjectUID", _worldspace call dayz_objectUID2, true];
            };
            _object setVariable ["CharacterID", _ownerID, true];
 
                if (_object isKindOf "TentStorage" || _object isKindOf "CamoNet_DZ" || _object isKindOf "Land_A_tent") then {
                    _pos set [2,0];
                    _object setpos _pos;
                    _object addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}];
                };
               
                _object setdir _dir;
                _object setDamage _damage;
 
That's right yeah. Sorry about that, don't know how I missed that haha.

Edit: Turns out it's because that section of code is further down on mine.
 
My default server monitor does not look like either of the examples in the updated thread. This is what my server_monitor.sqf looks like around that line
Code:
            if (_damage < 1) then { // create object
                // for tents: non colliding position
                _entity = createVehicle [_class, _point, [], 0,
                    if (_class=="TentStorage") then {"NONE"} else {"CAN_COLLIDE"}
                ];
                _entity setVariable ["ObjectID", _ObjectID, true];
                _entity setVariable ["CharacterID", _CharacterID, true];
                _entity setVariable ["lastUpdate",time];
                _entity setDamage _damage;
 
                if (_class == "TentStorage" || _class == "CamoNet_DZ") then {
                    _entity addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}];
                };
                //diag_log ("DW_DEBUG " + _class + " #" + str(_ObjectID) + " pos=" +      (_point call fa_coor2str) + ", damage=" + str(_damage)  );
            }
            else { // delete object -- this has been comented out: object are never really deleted from hive
            /*    _key = format["CHILD:306:%1:%2:%3:", _ObjectID, [], 1];
                _rawData = "HiveEXT" callExtension _key;
                _key = format["CHILD:304:%1:",_ObjectID]; // delete by ID (not UID which is handler 310)
                _rawData = "HiveEXT" callExtension _key;*/
 
Seems like everybody has a different version of this file these days...

Replace this part
Code:
 if (_damage < 1) then { // create object
                // for tents: non colliding position
                _entity = createVehicle [_class, _point, [], 0,
                    if (_class=="TentStorage") then {"NONE"} else {"CAN_COLLIDE"}
                ];
                _entity setVariable ["ObjectID", _ObjectID, true];
                _entity setVariable ["CharacterID", _CharacterID, true];
                _entity setVariable ["lastUpdate",time];

With this
Code:
 if (_damage < 1) then { // create object
                // for tents: non colliding position
                _entity = createVehicle [_class, _point, [], 0,
                    if (_class=="TentStorage") then {"NONE"} else {"CAN_COLLIDE"}
                ];
                _entity setVariable ["lastUpdate",time];
                // Don't set objects for deployables to ensure proper inventory updates
                if (_ownerID == "0") then {
                    _object setVariable ["ObjectID", str(_idKey), true];
                } else {
                    _object setVariable ["ObjectUID", _worldspace call dayz_objectUID2, true];
                };
                _object setVariable ["CharacterID", _ownerID, true];
 
Dont know if its realated but I put weapon creates in bases on my server

for some reason, the server keeps deleting my weapon creates.

does this fix that?
 
hi guys...just wondered if you could poss help me out...ive recently installed taviana and am having problems with tents completely disappearing on restart, any chance of being pointed in the right direction......
 
This would be the right place but not sure if itll work for taviana. Try reading this thread and comparing.
 
Dont know if its realated but I put weapon creates in bases on my server

for some reason, the server keeps deleting my weapon creates.

does this fix that?

If you added them via the deployable table, you'd need to make sure they exist in the instance deployable table otherwise they wont be saved. You'd also need to add them to the safe_objects list in variables.sqf.

hi guys...just wondered if you could poss help me out...ive recently installed taviana and am having problems with tents completely disappearing on restart, any chance of being pointed in the right direction......


Taviana uses an older version of DayZ still. This fix wouldn't fix them if they are completely disappearing though, it only fixes them not being udpated after a server restart. You'd need to make sure they are actually publishing to the DB, may be they aren't added to the deployable table, or the safe_objects in variables.sqf.
 
I checked through posts and my code is basically the same as mentioned by kravok...ive check through deployables and itemtent is mentioned but land'a'tent isn't mentioned... as for safe_objects I cant see anything of that nature mentioned in variables..
 
I checked through posts and my code is basically the same as mentioned by kravok...ive check through deployables and itemtent is mentioned but land'a'tent isn't mentioned... as for safe_objects I cant see anything of that nature mentioned in variables..

The deployable table entry for tents should be 'TentStorage', if it's listed as 'itemTent' then that's your problem.
 
Hmmm, well I just checked and the older versions don't have a list of safe_objects so it's not that either. Your best bet would be to check the server RPT log when you try to place a tent. If it's not writing to the DB it must be having some problem that it's probably reporting in the log.
 
Hmmm, well I just checked and the older versions don't have a list of safe_objects so it's not that either. Your best bet would be to check the server RPT log when you try to place a tent. If it's not writing to the DB it must be having some problem that it's probably reporting in the log.
I might have to do this as well.
 
well I correctly tested the original and the first fix you gave me, they did not work. So I then made the changes that you gave me the second time last night. Im going to go move stuff out of the tents right now and my server is due to restart within the next hour and a half so if it doesn't work Im out of ideas haha
 
Back
Top