DayZ Mission System

mind sharing what you tried? so we can leave out that as an option?

also is it both vehicles and crates you have issues with or just the crates?
 
im not sure about 1.8 as i still work out of the 1.7 code myself.

but im guessing you already took a look at the allowed objects in server_functions? and added the according object
 
yes i did, but i only insert the USBasicAmmunitionBox_EP1 to it, i'm using them as a tent-replacer for my regular players.
Whats interessting i just found out is, the crates only disappear if there is no player around them.

Confirm: Mission that just started have crates and after a while they disappear
 
does the RPT really not say anything about the removal of that object? ive looked through all the files for an error that would cause some sort of cleanup... from what i can see it should work perfectly with these settings.
 
Just switch to DZAI and use the code the author provides, I wanted to keep Sarge on my server but couldn't get it going with the mission system, so I just had to switch over, DZAI is pretty great also.
 
I've got it now! I switched to DZAI, but this wasnt the solution.
The Problem was that i had a box loaded in with mission.sqm and this caused the whole problem.
I will let run DZAI on my Server now, because the Perfomance is alot better.

Thank you guys alot:)

EDIT Nope this didnt help either :(
Back on start
 
What I've got so far is:
As soon as a line like this shows up in my RPT:
Code:
Server: Object 5:91 not found (message 70)

The boxes disappear.

I've insert the boxes in my deployable and made a exception in my BE Filters
Code:
5 "box" !"USBasicAmmunitionBox_EP1" !"USVehicleBox" !"USLaunchersBox" !"RULaunchersBox" !"MedBox0"

but nothing prevent them from disappearing :confused:

EDIT just checked my normal Ammo-Crates without mission-system and they also disappear after a time.
 
ok i just tested it with some edits in my server_updateObject.sqf. They still disappear after a while but at least there is no error anymore in my RPT like:

Server: Object 5:91 not found (message 70)

here is my server_updateObject.sqf

Code:
/*
[_object,_type] spawn server_updateObject;
*/
private ["_object","_type","_objectID","_uid","_lastUpdate","_needUpdate","_object_position","_object_inventory","_object_damage","_isNotOk"];
 
#include "\z\addons\dayz_server\compile\server_toggle_debug.hpp"
 
_object =    _this select 0;
_type =    _this select 1;
_forced = false;
if (count _this > 2) then {
    _forced = _this select 2;
};
_parachuteWest = typeOf _object == "ParachuteWest";
_isNotOk = false;
 
_objectID = "0";
_uid = "0";
 
if (!((isNil "_object") OR {(isNull _object)})) then {
    _objectID = _object getVariable ["ObjectID","0"];
    _uid = _object getVariable ["ObjectUID","0"];
};
 
if ((typeName _objectID != "string") || (typeName _uid != "string")) then
{
#ifdef OBJECT_DEBUG
    diag_log(format["Non-string Object: ID %1 UID %2", _objectID, _uid]);
#endif
    //force fail
    _objectID = "0";
    _uid = "0";
};
 
if (_object getVariable "Mission" == 1) exitWith {};
 
if (!_parachuteWest) then {
    if ((typeOf _object) in SafeObjects) then {
 
    } else {
        if (_objectID == "0" && _uid == "0") then
        {
            _object_position = getPosATL _object;
            #ifdef OBJECT_DEBUG
                diag_log(format["Deleting object %1 with invalid ID at pos [%2,%3,%4]",
                typeOf _object,
                _object_position select 0,
                _object_position select 1,
                _object_position select 2]);
            #endif
                _isNotOk = true;
        };
    };
};
 
if (_isNotOk) exitWith { deleteVehicle _object; };
 
_lastUpdate = _object getVariable ["lastUpdate",diag_tickTime];
_needUpdate = _object in needUpdate_objects;
 
// TODO ----------------------
_object_position = {
    private["_position","_worldspace","_fuel","_key"];
    _position = getPosATL _object;
    _worldspace = [
        round(direction _object),
        _position
    ];
    _fuel = 0;
    if (_object isKindOf "AllVehicles") then {
        _fuel = fuel _object;
    };
    _key = format["CHILD:305:%1:%2:%3:",_objectID,_worldspace,_fuel];
    #ifdef OBJECT_DEBUG
    diag_log ("HIVE: WRITE: "+ str(_key));
    #endif
 
    _key call server_hiveWrite;
};
 
// ###COPY START
_object_inventory = {
// ### BASE BUILDING 1.2 ### START
//This forces object to write to database changing the inventory of the object twice
// so it updates the object from operate_gates.sqf
 
    private["_inventory","_previous","_key"];
    // This writes to database if object is buildable
    if (typeOf(_object) in allbuildables_class) then {
    //First lets make inventory [[[],[]],[[],[]],[[],[]]] so it updates object in DB
            _inventory = [[[],[]],[[],[]],[[],[]]];
        if (_objectID == "0") then {
            _key = format["CHILD:309:%1:%2:",_uid,_inventory];
        } else {
            _key = format["CHILD:303:%1:%2:",_objectID,_inventory];
        };
        diag_log ("HIVE: Buildable: "+ str(_key));
        _key call server_hiveWrite;
    //Since we cant actually read from DB, lets make inventory this [], than write it again, to insure its updated to DB
            _inventory = [];
        if (_objectID == "0") then {
            _key = format["CHILD:309:%1:%2:",_uid,_inventory];
        } else {
            _key = format["CHILD:303:%1:%2:",_objectID,_inventory];
        };
        diag_log ("HIVE: Buildable: "+ str(_key));
        _key call server_hiveWrite;
// DO DEFAULT server_updateObject if not a buildable
    } else {
            _inventory = [
            getWeaponCargo _object,
            getMagazineCargo _object,
            getBackpackCargo _object
        ];
 
 
        _previous = str(_object getVariable["lastInventory",[]]);
        if (str(_inventory) != _previous) then {
            _object setVariable["lastInventory",_inventory];
            if (_objectID == "0") then {
                _key = format["CHILD:309:%1:%2:",_uid,_inventory];
            } else {
                _key = format["CHILD:303:%1:%2:",_objectID,_inventory];
            };
            diag_log ("HIVE: WRITE: "+ str(_key));
            _key call server_hiveWrite;
        };
    };
};
// ### BASE BUILDING 1.2 ### END
// ###COPY END
 
_object_damage = {
    //Allow dmg process
    private["_hitpoints","_array","_hit","_selection","_key","_damage"];
    _hitpoints = _object call vehicle_getHitpoints;
    _damage = damage _object;
    _array = [];
    {
        _hit = [_object,_x] call object_getHit;
        _selection = getText (configFile >> "CfgVehicles" >> (typeOf _object) >> "HitPoints" >> _x >> "name");
        if (_hit > 0) then {
            _array set [count _array,[_selection,_hit]];
            //diag_log format ["Section Part: %1, Dmg: %2",_selection,_hit];
        } else {
            _array set [count _array,[_selection,0]];
        };
 
 
 
    } forEach _hitpoints;
 
    if (_forced) then {
        if (_object in needUpdate_objects) then {
            needUpdate_objects = needUpdate_objects - [_object];
        };
 
        if (_objectID == "0") then {
            _key = format["CHILD:306:%1:%2:%3:",_uid,_array,_damage];
        } else {
            _key = format["CHILD:306:%1:%2:%3:",_objectID,_array,_damage];
        };
        diag_log ("HIVE: WRITE: "+ str(_key));
        _key call server_hiveWrite;
 
    } else { 
        if (!(_object in needUpdate_objects)) then {
            //#ifdef OBJECT_DEBUG
                diag_log format["DEBUG: Monitoring: %1",_object];
            //#endif
            needUpdate_objects set [count needUpdate_objects, _object];
        };
    };
};
 
_object_killed = {
    _object setDamage 1;
    call _object_damage;
};
 
_object setVariable ["lastUpdate",time,true];
switch (_type) do {
    case "all": {
        call _object_position;
        call _object_inventory;
        call _object_damage;
    };
    case "position": {
        call _object_position;
    };
    case "gear": {
        call _object_inventory;
    };
    case "damage"; case "repair" : {
        call _object_damage;
    };
    case "killed": {
        call _object_killed;
    };
};

Maybe one of you guys can see something :)

EDIT: I've edit my updateObject.sfq and now my Ammo-Boxes stay where they are:

here are my changes:
Code:
if (!_parachuteWest) then {
  if (_objectID == "0" && _uid == "0" && (vehicle _object getVariable ["Sarge",0] != 1)) then
  {
      _object_position = getPosATL _object;
      #ifdef OBJECT_DEBUG
          diag_log format ["DEBUG: Deleting object %1 with invalid ID at [%2,%3,%4]“, typeOf _object, _object_position select 0, _object_position select 1,
        typeOf _object,
        _object_position select 0,
        _object_position select 1,
        _object_position select 2]);
      #endif
        _isNotOk = true;
  };
};

Only Problem for now: Vehicle damage wont get updated
here is what is in my RPT after i blow up a SUV:
Code:
15:46:05 "OBJ: 1 - SUV_DZ,0,[194,[9618.97,11950,-0.0003815]],[[[],[]],[["PipeBomb"],[1]],[[],[]]],[["wheel_1_1_steering",0.912],["wheel_1_2_steering",1],["wheel_2_1_steering",0.501],["wheel_2_2_steering",1],["palivo",0.8],["motor",0.284],["glass1",0.513],["glass2",0.211],["glass3",0.136],["glass4",0.023]],0.982,0"
15:46:05 class HitPoints::HitRGlass not found in SUV_DZ
15:46:05 class HitPoints::HitLGlass not found in SUV_DZ
15:46:05 class HitPoints::HitBody not found in SUV_DZ
15:46:05 class HitPoints::HitLF2Wheel not found in SUV_DZ
15:46:05 class HitPoints::HitRF2Wheel not found in SUV_DZ
15:46:05 class HitPoints::HitLMWheel not found in SUV_DZ
15:46:05 class HitPoints::HitRMWheel not found in SUV_DZ
15:46:06 Error in expression <compile format ["%1", _data];
_status = _result select 0;
 
msgList = [];
_msgCou>
15:46:06  Error position: <_result select 0;
 
msgList = [];
_msgCou>
15:46:06  Error Undefined variable in expression: _result
15:46:06 File z\addons\dayz_server\system\server_monitor.sqf, line 58

EDIT:
Changed it to:
Code:
if (!_parachuteWest) then {
  if (_objectID == "0" && _uid == "0" && (vehicle _object getVariable ["Sarge",0] != 1)) then
  {
      _object_position = getPosATL _object;
        #ifdef OBJECT_DEBUG
                diag_log(format["Deleting object %1 with invalid ID at pos [%2,%3,%4]",
                typeOf _object,
                _object_position select 0,
                _object_position select 1,
                _object_position select 2]);
            #endif
        _isNotOk = true;
  };
};

Thought i had it, but still disappear :(
 
This is the line you should add to server cleanup, do not add sarge anywhere if you are not using sarge...
" if(vehicle _x != _x && (vehicle _x getVariable [""Mission"",0] != 1) && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n //Mission system
 
I just comment the whole section out, so i know its defently not because of the cleanup

Code:
      "//Check for hackers" \n
      "// {" \n
      "//    if(vehicle _x != _x && (vehicle _x getVariable [""Sarge"",0] != 1) && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n
      "//        diag_log (""CLEANUP: KILLING A HACKER "" + (name _x) + "" "" + str(_x) + "" IN "" + (typeOf vehicle _x));" \n
      "//            (vehicle _x) setDamage 1;" \n
      "//            _x setDamage 1;" \n
      "//    };" \n
      "// } forEach allUnits;" \n
      "" \n
      "dayz_serverObjectMonitor = _safety;"/*%FSM</STATEINIT""">*/;
 
Back
Top