[Help] Map Edited Vehicles Disappear

Cloud Filth

New Member
Update: Fixed it, was looking at wrong file. - If anyone needs help with this just toss a post here and i'll help



Problem: Vehicles spawned through map editor disappear when I enter them, to be more specific they are also AI driven.

Update
More Info: I don't need it to persist AFTER restart, I just want it to last until then.

Arma2Server.RPT Error: 23:48:32 "Deleting object Mi17_Civilian with invalid ID at pos [12050.6,12674.2,-0.0540009]"

Both empty & actual aligned units seem to be the same result. - I'm thinking it's in the server_cleanup.fsm but I am not sure, I already have put a stop to them exploding when you enter.

Server Info
Bliss 1.7.4.4
Addons: Rmod
Other: Active AI
Hosting: Dayz.st

If anyone could point me in the right direction that would be great .
 
Yeah, I know that it has something to do with not being in the DB.

The Arma2Server RPT Error is

23:48:32 "Deleting object Mi17_Civilian with invalid ID at pos [12050.6,12674.2,-0.0540009]"

So I need to find which file is deleting them or find a way to give them a valid ID.
 
Well, haven't yet made much progress, I added some info to the main post. - Wanted people to better understand what I am trying to do.

I don't need the vehicles to persist or save after restarts, I just want them to stop disappearing during gameplay. After restart it's fine that they go back to their original location placed in the mission file because it's irrelevant to what I am trying to do here.
 
Alright, found a solution. took days, but I found it! I will be posting a more detailed thread tomorrow, right now, after days of troubleshooting and fighting against this quirky engine... I have a massive headache! :)
 
I've narrowed it down to the object.sqf in the server file but i didn't want to mess with anything in there as i would probably do more harm then good. Would appreciate your work around on this when you get a change dr as cloud seems to have forgotten this thread and won't respond to pms.
 
I've narrowed it down to the object.sqf in the server file but i didn't want to mess with anything in there as i would probably do more harm then good. Would appreciate your work around on this when you get a change dr as cloud seems to have forgotten this thread and won't respond to pms.

I'm going to create a thred with this info and more detailed information soon-ish, until then here is how. But you were on the ballpark!


Download your dayz_server.pbo from your server(I'm using dayz.st). And unpack it.

Then, go to the folder compile and open server_updateobject.sqf (use notepad 64 or ++ to help you)

And look for
Code:
//if (!_parachuteWest) then {
    if (_objectID == "0" && _uid == "0") then
    {
        _object_position = getPosATL _object;
            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]);
            _isNotOk = true;
    };
};
 
if (_isNotOk) exitWith { deleteVehicle _object; };


And comment it out by adding // . It should be at the top of the file if you are having problems finding it

make it look like this

Code:
//if (!_parachuteWest) then {
    //if (_objectID == "0" && _uid == "0") then
    //{
    //    _object_position = getPosATL _object;
    //        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]);
        //    _isNotOk = true;
    //};
//};
 
//if (_isNotOk) exitWith { deleteVehicle _object; };


annnndddddddd then just pack it and upload to your server and you are good to go!(Don't forget to fix the explosion problem beforehand!)

This may decrease the security of the playing environment, but really, hackers will spawn whatever they feel or wish for with or without this code being enabled.
 
Thanks wolf this is what i figured but was looking for a more focused approach. It will work for now till we can figure out something different. Thanks though =)
 
Try doing this:
Code:
_uid =        _object getVariable ["ObjectUID","0"];
 
//Check if object has an ignore flag, set to false as the default//
_ignoreThis =    _object getVariable ["ignoreThis",false];
if (_ignoreThis) exitWith {};
 
if ((typeName _objectID != "string") || (typeName _uid != "string")) then

Then when you create your temp vehicle set the following flag:

Code:
_object setVariable ["ignoreThis", true, true];

Basically we just put our own stop check in there instead of scraping the original.

The revised server_updateObject.sqf file would look like the following:
Code:
/*
[_object,_type] spawn server_updateObject;
*/
private ["_object","_type","_objectID","_uid","_lastUpdate","_needUpdate","_object_position","_object_inventory","_object_damage","_isNotOk"];
 
_object =    _this select 0;
_type =    _this select 1;
_parachuteWest = typeOf _object == "ParachuteWest";
_isNotOk = false;
 
_objectID =    _object getVariable ["ObjectID","0"];
_uid =        _object getVariable ["ObjectUID","0"];
 
//Check if object has an ignore flag, set to false as the default//
_ignoreThis =    _object getVariable ["ignoreThis",false];
if (_ignoreThis) exitWith {};
 
if ((typeName _objectID != "string") || (typeName _uid != "string")) then
{
    diag_log(format["Non-string Object: ID %1 UID %2", _objectID, _uid]);
    //force fail
    _objectID = "0";
    _uid = "0";
};
if (!_parachuteWest) then {
    if (_objectID == "0" && _uid == "0") then
    {
        _object_position = getPosATL _object;
            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]);
            _isNotOk = true;
    };
};
 
if (_isNotOk) exitWith { deleteVehicle _object; };
 
_lastUpdate = _object getVariable ["lastUpdate",time];
_needUpdate = _object in needUpdate_objects;
 
_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];
    diag_log ("HIVE: WRITE: "+ str(_key));
    _key call server_hiveWrite;
};
 
_object_inventory = {
    private["_inventory","_previous","_key"];
    _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;
    };
};
 
_object_damage = {
    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]]};
    } forEach _hitpoints;
    _key = format["CHILD:306:%1:%2:%3:",_objectID,_array,_damage];
    diag_log ("HIVE: WRITE: "+ str(_key));
    _key call server_hiveWrite;
    _object setVariable ["needUpdate",false,true];
};
 
_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": {
        if ( (time - _lastUpdate) > 5 && !_needUpdate ) then {
            call _object_damage;
        } else {
            if ( !_needUpdate ) then {
                needUpdate_objects set [count needUpdate_objects, _object];
            };
        };
    };
    case "repair": {
        call _object_damage;
    };
};
 
I would absolutley love to know how you fixed this to work. I am able to somewhat get it to work, but only if i spawn in vehicles through my database and then use a waypoint with a "git in closest" function. But then when the server resets the AI doesnt have a bird to fly and roams around by foot.
 
wow xyberviri, i have seen you in many posts.. your doing great. i hope to be as good as you..

anyway..
so instead of commenting out the code.. simply take your code and completely overwrite mine with yours..

basically.... select all from original... then delete, and paste your code from above , save and upload.

i just want to confirm.
i run epoch server.
 
Hi All,
Please excuse my noob knowledge when it comes to editing.......
I have recently been working on an edited map for our server (Panthera).
I have not uploaded it yet because a friend was saying that the vehicles I have (strategically) placed will not work.
I came across your thread.

I have gone to my files, but I do not have a server_updateobject.sqf file. Is this because I have not uploaded my edited map yet?

(all vehicles/buildings until now have been placed using the admin console DayZ.st)

Regards,
X
 
Yeah Im not too sure mate......Someone was telling me last night to go through and edit them into the database one by one, but I looked and have several hundred now.
That seems a bit crazy to do it this way??
 
Our server is with survivalservers.com, and we have that same sqf, but the script inside it is a little different, would anyone be willing to help me with this?
 
Back
Top