DayZ Base Building 1.3 Discussion

If they are extendable objects it should be using setPosATL, here's the code that sets the object positions in the dayzmod 1.8 server_monitor at least

Code:
                //Restore extendable objects to whatever their position is supposed to be
                if (typeOf(_object) in allExtendables && typeOf(_object) != "Grave") then {
                    _object setposATL [(getposATL _object select 0),(getposATL _object select 1), (getposATL _object select 2)];
                };
            
                //Restore non extendable objects and make sure they follow the land contours
                if (!(typeOf(_object) in allExtendables) && (_object isKindOf "Static") && !(_object isKindOf "TentStorage") && typeOf(_object) != "Grave") then {
                    _object setpos [(getposATL _object select 0),(getposATL _object select 1), 0];
                };

Maybe the overwatch server_monitor has some code after this that is running on all objects including the basebuilding objects and isn't taking height into account.


So it appears in my server_monitor that Overwatch uses _entity and non Overwatch uses _object.

This is all the code in my server_montor.sqf AFTER the BB 1.3 code. Do you see anything that could be causing an issue.?
Code:
                if (_class == "TentStorage" || _class == "CamoNet_DZ") then {
                    _entity addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}];
                };
            } else {
#ifdef OBJECT_DEBUG
                diag_log (format["IGNORED %1 oid#%2 cid:%3 ",
                    _class, _ObjectID, _CharacterID ]);
#endif
            };
        };
        if (_damage < 1 AND !(isNil ("_entity"))) then {
            _entity setdir _dir;
            _entity setPos _point;
            if (_entity isKindOf "TrapItems") then {
                _entity setVariable ["armed", _inventory select 0, false];
            } else {
                if (!(typeOf(_entity) in allbuildables_class) && !(typeOf(_entity) in BBAllFlagTypes) && !(typeOf(_entity) in BBAllZShieldTypes)) then {
                    [_entity, _inventory] call fa_populateCargo;
                };
            };
            dayz_serverObjectMonitor set [count dayz_serverObjectMonitor, _entity];
            if (_action == "CREATED") then {
                _key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:", dayZ_instance,
                    _class, _damage , 1,
                    [_dir, _point],
                    [getWeaponCargo _entity, getMagazineCargo _entity ,getBackpackCargo _entity],
                    _hitpoints, _fuel, _ObjectID
                ];
                _rawData = "HiveEXT" callExtension _key;
            };
            if (_action == "SPAWNED" || _action == "DAMAGED") then {};
            if (_action == "SPAWNED") then {
                _key = format["CHILD:309:%1:%2:", _ObjectID,
                    [getWeaponCargo _entity, getMagazineCargo _entity, getBackpackCargo _entity]];
                _rawData = "HiveEXT" callExtension _key;
            };
            if (_action == "MOVED" || _action == "SPAWNED") then {
                [_entity, "position"] call server_updateObject;
            };
        };
        sleep 0.01;
    } forEach _objectArray;
    createCenter civilian;
    if (isDedicated) then {endLoadingScreen;};
    allowConnection = true;
    [3, 4, 3, (40 * 60), (15 * 60), 0.75, 'center', 4000, true, false] spawn server_spawnCrashSite;
    call compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\fa_antiwallhack.sqf";
    sm_done = true;
    publicVariable "sm_done";
    [300] call server_plantSpawner;
    [] call {
        private ["_array","_array2","_array3","_script","_armed"];
        _array = str dayz_traps;
        _array2 = str dayz_traps_active;
        _array3 = str dayz_traps_trigger;
        while { true } do {
            if ((str dayz_traps != _array) || (str dayz_traps_active != _array2) || (str dayz_traps_trigger != _array3)) then {
                _array = str dayz_traps;
                _array2 = str dayz_traps_active;
                _array3 = str dayz_traps_trigger;

                diag_log "DEBUG: traps";
                diag_log format["dayz_traps (%2) -> %1", dayz_traps, count dayz_traps];
                diag_log format["dayz_traps_active (%2) -> %1", dayz_traps_active, count dayz_traps_active];
                diag_log format["dayz_traps_trigger (%2) -> %1", dayz_traps_trigger, count dayz_traps_trigger];
                diag_log "DEBUG: end traps";
            };
            {
                if (isNull _x) then {
                    dayz_traps = dayz_traps - [_x];
                };
                _script = call compile getText (configFile >> "CfgVehicles" >> typeOf _x >> "script");
                _armed = _x getVariable ["armed", false];
                if (_armed) then {
                    if !(_x in dayz_traps_active) then {
                        ["arm", _x] call _script;
                    };
                } else {
                    if (_x in dayz_traps_active) then {
                        ["disarm", _x] call _script;
                    };
                };
            } forEach dayz_traps;
        };
    };
};
 
So i did this in my server_monitor.sqf, and it does show up in the RPT.

Code:
//Restore extendable objects to whatever their position is supposed to be
                if (typeOf(_entity) in allExtendables && typeOf(_entity) != "Grave") then {
                    diag_log ("SERVER: in allExtendables:" + typeOf(_entity) + "<----------");
                    _entity setposATL [(getposATL _entity select 0),(getposATL _entity select 1), (getposATL _entity select 2)];
                };
 
So it appears in my server_monitor that Overwatch uses _entity and non Overwatch uses _object.

This is all the code in my server_montor.sqf AFTER the BB 1.3 code. Do you see anything that could be causing an issue.?
Code:
                if (_class == "TentStorage" || _class == "CamoNet_DZ") then {
                    _entity addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}];
                };
            } else {
#ifdef OBJECT_DEBUG
                diag_log (format["IGNORED %1 oid#%2 cid:%3 ",
                    _class, _ObjectID, _CharacterID ]);
#endif
            };
        };
        if (_damage < 1 AND !(isNil ("_entity"))) then {
            _entity setdir _dir;
            _entity setPos _point;
            if (_entity isKindOf "TrapItems") then {
                _entity setVariable ["armed", _inventory select 0, false];
            } else {
                if (!(typeOf(_entity) in allbuildables_class) && !(typeOf(_entity) in BBAllFlagTypes) && !(typeOf(_entity) in BBAllZShieldTypes)) then {
                    [_entity, _inventory] call fa_populateCargo;
                };
            };
            dayz_serverObjectMonitor set [count dayz_serverObjectMonitor, _entity];
            if (_action == "CREATED") then {
                _key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:", dayZ_instance,
                    _class, _damage , 1,
                    [_dir, _point],
                    [getWeaponCargo _entity, getMagazineCargo _entity ,getBackpackCargo _entity],
                    _hitpoints, _fuel, _ObjectID
                ];
                _rawData = "HiveEXT" callExtension _key;
            };
            if (_action == "SPAWNED" || _action == "DAMAGED") then {};
            if (_action == "SPAWNED") then {
                _key = format["CHILD:309:%1:%2:", _ObjectID,
                    [getWeaponCargo _entity, getMagazineCargo _entity, getBackpackCargo _entity]];
                _rawData = "HiveEXT" callExtension _key;
            };
            if (_action == "MOVED" || _action == "SPAWNED") then {
                [_entity, "position"] call server_updateObject;
            };
        };
        sleep 0.01;
    } forEach _objectArray;
    createCenter civilian;
    if (isDedicated) then {endLoadingScreen;};
    allowConnection = true;
    [3, 4, 3, (40 * 60), (15 * 60), 0.75, 'center', 4000, true, false] spawn server_spawnCrashSite;
    call compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\fa_antiwallhack.sqf";
    sm_done = true;
    publicVariable "sm_done";
    [300] call server_plantSpawner;
    [] call {
        private ["_array","_array2","_array3","_script","_armed"];
        _array = str dayz_traps;
        _array2 = str dayz_traps_active;
        _array3 = str dayz_traps_trigger;
        while { true } do {
            if ((str dayz_traps != _array) || (str dayz_traps_active != _array2) || (str dayz_traps_trigger != _array3)) then {
                _array = str dayz_traps;
                _array2 = str dayz_traps_active;
                _array3 = str dayz_traps_trigger;

                diag_log "DEBUG: traps";
                diag_log format["dayz_traps (%2) -> %1", dayz_traps, count dayz_traps];
                diag_log format["dayz_traps_active (%2) -> %1", dayz_traps_active, count dayz_traps_active];
                diag_log format["dayz_traps_trigger (%2) -> %1", dayz_traps_trigger, count dayz_traps_trigger];
                diag_log "DEBUG: end traps";
            };
            {
                if (isNull _x) then {
                    dayz_traps = dayz_traps - [_x];
                };
                _script = call compile getText (configFile >> "CfgVehicles" >> typeOf _x >> "script");
                _armed = _x getVariable ["armed", false];
                if (_armed) then {
                    if !(_x in dayz_traps_active) then {
                        ["arm", _x] call _script;
                    };
                } else {
                    if (_x in dayz_traps_active) then {
                        ["disarm", _x] call _script;
                    };
                };
            } forEach dayz_traps;
        };
    };
};

_entity setdir _dir;
_entity setPos _point;

This part doesn't need to happen for the basebuilding objects

try changing

if (_damage < 1 AND !(isNil ("_entity"))) then {

to

if (_damage < 1 AND !(isNil ("_entity")) AND (!(typeOf(_object) in allbuildables_class))) then {
 
i checked now all my files twice and cant find the cause of the problem why its getting written twice to my database.
When i try it with the same files on Pwnoz0r private files on my Test-Server everything is working like it should.
Only on puplic Server its getting written twice =/
Already checked my Database structure but this wasnt it either

PS: Even Tents and anything else what sould get written to instance_deployable is now written twice
 
This part doesn't need to happen for the basebuilding objects

try changing



to


Shouldn't it be

(_damage < 1 AND !(isNil ("_entity")) AND (!(typeOf(_entity) in allbuildables_class))) then {

instead of

if (_damage < 1 AND !(isNil ("_entity")) AND (!(typeOf(_object) in allbuildables_class))) then {

because _object isn't declared, and it comes up as an error in the rpt. im going to change it and see if that helps.
 
Last edited:
i checked now all my files twice and cant find the cause of the problem why its getting written twice to my database.
When i try it with the same files on Pwnoz0r private files on my Test-Server everything is working like it should.
Only on puplic Server its getting written twice =/
Already checked my Database structure but this wasnt it either

PS: Even Tents and anything else what sould get written to instance_deployable is now written twice


it sounds like there is double code somewhere, maybe you server side files that you are supposed to modify.
 
Comparing my current server_monitor.sqf to an original Overwatch 0.2.5 server_monitor.sqf there is a big difference... this must of happened a long time ago with BB 1.2 mods or something. any way, il make the BB 1.3 changes to original and try it on my server.
 
still not working. Couldn't I just create a new sqf and put in the BB 1.3 code that is in the server_monitor.sqf and call if separately from server_functions.sqf?
 
Ok so as I run through this install (my co-admin did the previous), I'm noticing that I do not currently have a server_updateNearbyObjects.sqf file in my compile directory. Does there need to be a step to copy it over for Epoch?
 
Alright so my promised update goes like this: I installed this and ran it without updating the MYSQL - we were not using bb1.2 - on epoch 1.0.4.2.
  • Objects are moved, both laterally and sunken into the ground slightly.
  • Gear becomes inaccessible in objects that have other objects now clipped into them (at least that is the reasoning I can come up with-other objects have accessible gear and may be clipped, I just can't tell.).
  • No epoch modular building items are able to be removed. This is due to the fact that the fn_selfactions.sqf is edited to remove that in order to allow bb 1.3 removes to work.
As stated above, the instructions on installing this ask for actions to be taken on files that may or may not exist. They also reference files from the 'master' directory within a directory structure that doesn't exist. That being said, it might be because of the convoluted layout of the instructions or the fact that this script was written for a version of the mod that is several versions out of date.

Thoughts?
 
Well I tried something that I really thought would cause a lot of errors and not work, but lol its working, my buildings are now in the position i set them to. I replaced my server_monitor.sqf with the example one that is in BaseBuilding_1.3_Community-master\dayz_server\system which I am pretty sure is not from Overwatch. Just need to keep testing and hope it does not mess up anything else.

So, i suggest if you are having probs, try replace yours with the examples to see what happens.
 
Now a small issue. sometimes, when I spawn an object to be built it disappears right away. but it still acts like it is there, and i can still build it, and if i build it after a restart it will show up.
 
Anyone have an issue with gates not hiding when you open gate from keypad? mine makes the noise, but gates dont disappear.
 
How is it useless?

There are many many conflicts with the current version of Epoch and this, resulting in many strange behaviors and bugs that break core features of Epoch, resulting in undesirable game play. Or, to put it another way, it's currently useless with the latest Epoch.
 
Back
Top