DayZ Base Building 1.3 Discussion

Base building 1.3 seems to be working great. I did not do an upgrade since it would be cleaner and i built off fresh PBOs. One problem that seems to have reared it's ugly head that I haven't seen for a while is player duplication when standing holding a pistol. (when a player reconnects, theres a copy of their body dead standing there).

I don't recall the fix for this, but I thought it was 1.8+ that fixed it. Any ideas on what I might have forgotten, or where to look to fix it?
 
have looked in the safe-objects of your variables.sqf/server_updateNearbyObjects/server_functions.sqf/server_playerSync and sever_Cleanup.fsm for the boxes?
yeah that sounds like something is preventing them from being loaded on restart if they are still saving to the db.
 
Base building 1.3 seems to be working great. I did not do an upgrade since it would be cleaner and i built off fresh PBOs. One problem that seems to have reared it's ugly head that I haven't seen for a while is player duplication when standing holding a pistol. (when a player reconnects, theres a copy of their body dead standing there).

I don't recall the fix for this, but I thought it was 1.8+ that fixed it. Any ideas on what I might have forgotten, or where to look to fix it?
i havent experienced that in a long time :/ i have a clean install on 1.8 and overwatch and i have yet to see that. It could be something in your server files that may have been clipped or some mis click, i do it all the time :/
 
If you look at the update/publish server files you will see if statements like these which decide how the inventory format is stored

if (_object isKindOf "TrapItems") then {

if (typeOf(_object) in allbuildables_class) then {

The problem you have is that your tents need to be included in the final else statement for all non trap/non buildable items. But because you have added them to allbuldables_class so they are always going to use the same inventory system as all the other BB objects. You need something like this for basebuilding objects I'm guessing.

((typeOf(_object) in allbuildables_class) && (typeOf(_object) != 'DomeTentStorage'))

It''s pretty basic really though and I can't talk you through every single step good luck.

Works, only prob is after restart it updated inventory from db, tents are empty and lost the position i set them to, meaning they are default attach position. I have not touched server_monitor.sqf yet, could this be why?
 
Is there a redeclaration of the _allowedObjects in BB1.3s code? My _allowedObjects (server_functions.sqf):

Code:
    _allowedObjects = ["USOrdnanceBox_EP1","TentStorage", "Hedgehog_DZ", "Sandbag1_DZ", "BearTrap_DZ", "Wire_cat1", "StashSmall", "StashMedium", "DomeTentStorage", "CamoNet_DZ", "Trap_Cans", "TrapTripwireFlare", "TrapBearTrapSmoke", "TrapTripwireGrenade", "TrapTripwireSmoke", "TrapBearTrapFlare"];

I restored my pre BB1.3 db, mission, and server pbo. Then applied the newInstall sql to the db and played. The Ordnanace boxes are there so it's something in the code.
 
have looked in the safe-objects of your variables.sqf/server_updateNearbyObjects/server_functions.sqf/server_playerSync and sever_Cleanup.fsm for the boxes?


variables.sqf:
Code:
SafeObjects = ["USOrdnanceBox_EP1","Land_Fire_DZ", "TentStorage", "Wire_cat1", "Sandbag1_DZ", "Hedgehog_DZ", "StashSmall", "StashMedium", "BearTrap_DZ", "DomeTentStorage", "CamoNet_DZ", "Trap_Cans", "TrapTripwireFlare", "TrapBearTrapSmoke", "TrapTripwireGrenade", "TrapTripwireSmoke", "TrapBearTrapFlare"];

server_updateNearbyObjects:
Code:
} forEach nearestObjects [_pos, ["USOrdnanceBox_EP1", "Car", "Helicopter", "Motorcycle", "Ship", "TentStorage", "StashSmall", "StashMedium"], 10];

server_functions.sqf (in my previous post)

server_playerSync.sqf:
Code:
        } forEach nearestObjects [_pos, ["USOrdnanceBox_EP1", "Car", "Helicopter", "Motorcycle", "Ship", "TentStorage", "StashSmall","StashMedium"], 10];

server_cleanup was modified to ignore Ordnance boxes
 
if the boxes are gone after time it has to do something with your clenup.fsm if they are not even spawning it has to do something with these files.
Do you have 2 variables.sqf in your mission folder?
 
with BB1.3s yea. I have the custom one with fixes and the BB1.3 one. called from the init like the instructions say:

Code:
//Load in compiled functions
call compile preprocessFileLineNumbers "fixes\variables.sqf";                //Initilize the Variables (IMPORTANT: Must happen very early)
call compile preprocessFileLineNumbers "dayz_code\init\variables.sqf";                            //Initializes custom variables
progressLoadingScreen 0.1;

The cleanup.fsm is unchanged from preBB1.3. Works well, doesn't delete the Boxes. http://codeviewer.org/view/code:3db3

EDIT: Yea, they don't even show up when the server 1st startsup and im next to where they are supposed to be.
 
omg there is a SafeObjects variable in BB1.3 variables.sqf. I uploaded it into website to show you and I was gonna say its not redeclared, but it is!! ;) http://codeviewer.org/view/code:3db4 Line 39! I'll add the box classname and try. That MUST be it!! Thanks SchwEde!! I'll report back if it worked.

EDIT: IT WORKED! I must have passed that variable 20 times with my eyes. Maybe because it was indented and tucked under a comment.

THANKS SchwEde!
 
Last edited:
How to install it to dayz epoch server 1.0.4.2? There is no server_updateNearbyObjects.sqf in this version of Epoch mod.
 
If you look at the update/publish server files you will see if statements like these which decide how the inventory format is stored

if (_object isKindOf "TrapItems") then {

if (typeOf(_object) in allbuildables_class) then {

The problem you have is that your tents need to be included in the final else statement for all non trap/non buildable items. But because you have added them to allbuldables_class so they are always going to use the same inventory system as all the other BB objects. You need something like this for basebuilding objects I'm guessing.

((typeOf(_object) in allbuildables_class) && (typeOf(_object) != 'DomeTentStorage'))

It''s pretty basic really though and I can't talk you through every single step good luck.

Seaweeduk, the server_updateObject.sqf is the script that will pull the inventory from the db to update the object correct? this what I have in mine, and this is not working for some reason. the inventory saves in the db, but does not reflect in the tent in game.

Code:
//####----####----####---- Base Building 1.3 Start ----####----####----####
_object_inventory = {
    private["_inventory","_previous","_key"];
    if (_object isKindOf "TrapItems") then {
        _inventory = [_object getVariable ["armed", false]];
    } else {
//        if (typeOf(_object) in allbuildables_class) then
        if ((typeOf(_object) in allbuildables_class) && (typeOf(_object) != 'DomeTentStorage')) then
        {
            _inventory = _object getVariable ["AuthorizedUID", []]; //Shouldn't need to specify which array since it's all being updated here
            _authorizedOUID = (_inventory select 0) select 0;
            _key = format["CHILD:309:%1:%2:",_authorizedOUID,_inventory]; //was _uid,_inventory
            diag_log ("HIVE: WRITE: "+ str(_key));
            _key call server_hiveWrite;
        } 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.3 End ----####----####----####
 
Seaweeduk, the server_updateObject.sqf is the script that will pull the inventory from the db to update the object correct? this what I have in mine, and this is not working for some reason. the inventory saves in the db, but does not reflect in the tent in game.

Code:
//####----####----####---- Base Building 1.3 Start ----####----####----####
_object_inventory = {
    private["_inventory","_previous","_key"];
    if (_object isKindOf "TrapItems") then {
        _inventory = [_object getVariable ["armed", false]];
    } else {
//        if (typeOf(_object) in allbuildables_class) then
        if ((typeOf(_object) in allbuildables_class) && (typeOf(_object) != 'DomeTentStorage')) then
        {
            _inventory = _object getVariable ["AuthorizedUID", []]; //Shouldn't need to specify which array since it's all being updated here
            _authorizedOUID = (_inventory select 0) select 0;
            _key = format["CHILD:309:%1:%2:",_authorizedOUID,_inventory]; //was _uid,_inventory
            diag_log ("HIVE: WRITE: "+ str(_key));
            _key call server_hiveWrite;
        } 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.3 End ----####----####----####

Server_monitor populates the inventory on server startup. This thread is really for supporting the mod itself not your own additions.
 
I switched my gates to use setPosATL since hideObject isn't synced to clients who logged in or died after it ran. It's antihack that interferes with hideObject.
Could you share yours operate_gates.sqf and operate_roofs.sqf ?
I have problem on my server that the gate disappears, but nobody still can go through.
I using that old codefree.sqf :(
 
Could you share yours operate_gates.sqf and operate_roofs.sqf ?
I have problem on my server that the gate disappears, but nobody still can go through.
I using that old codefree.sqf :(

Your antihack is interfering with rhideObject.

Instead of this

Code:
                _nic = [nil, _x, "per", rHideObject, false] call RE;

Do something like this

Code:
                _posATL =  getPosATL _x;                       
                _z = _posATL select 2;
                _z = _z+6; 
                _posATL set [2,_z];
                _x setPosATL _posATL;

For raising the gates, or

Code:
                _posATL =  getPosATL _x;                        
                _z = _posATL select 2;
                _z = _z-6; 
                _posATL set [2,_z];
                _x setPosATL _posATL;

For lowering them.
 
Your antihack is interfering with rhideObject.

Instead of this

Code:
                _nic = [nil, _x, "per", rHideObject, false] call RE;

Do something like this

Code:
                _posATL =  getPosATL _x;                    
                _z = _posATL select 2;
                _z = _z+6;
                _posATL set [2,_z];
                _x setPosATL _posATL;

For raising the gates, or

Code:
                _posATL =  getPosATL _x;                     
                _z = _posATL select 2;
                _z = _z-6;
                _posATL set [2,_z];
                _x setPosATL _posATL;

For lowering them.

Yes, found parts of commented code like that in scripts, so it was made that style before. will try to uncomment ant test.
But may be it is possible to somehow whitelist this style in antihack?
I found next code mentioned some posts above:
BIS_MPF_remoteExecutionServer2 = compile preprocessFile (BIS_MP_Path + BIS_PATH_SQF + 'remExServer.sqf');
BIS_MPF_remoteExecutionServer =
{
_input = (_this select 1) select 2;
if (_input in ['switchmove','playmove','say','jipexec','execvm','spawn','titleCut','titleText']) then {_this call BIS_MPF_remoteExecutionServer2;};
};
Looks like this only allows that actions to be called in structures, finishing with '...call RE;'
so may be i can add HideObject there, say, before 'switchmove'? Will also try and post here about result if any, and if nobody mind :)
 
Yes, found parts of commented code like that in scripts, so it was made that style before. will try to uncomment ant test.
But may be it is possible to somehow whitelist this style in antihack?
I found next code mentioned some posts above:
Looks like this only allows that actions to be called in structures, finishing with '...call RE;'
so may be i can add HideObject there, say, before 'switchmove'? Will also try and post here about result if any, and if nobody mind :)

The commented out code won't be quite correct as it doesn't use ATL if I recall correctly so doors above ground level will have issues returning to the correct height. You'll also need a couple of setPos exceptions in BE. I looked at whitelisting the command in my antihack a long time back but I believe it just introduces extra vulnerabilities allowing clients to use it. We also found the issues with it not being sync'd if you die/login after its run to be way too much of a pain in the ass.
 
Off cource i will use A/M style with setposATL, i just wanted to mention, that i found something like that in scripts. Now waiting for server to restart and test whitelisting hideobject in AH. But if you say, that it is "extra vulnerabilities", then i will use your style. Anyway, it will be some experience if it works by whitelisting :) will test both ways, and use yours if possible :)

UPD-1: Whitelisting 'Hideobject' in AH didn't help. Now trying SetPosATL.
UPD-2: PosATL Works great. now everything is ok.
BTW, i also had to whitelist some extra in battleye - looks like author forgot some objects :)
 
Last edited:
Back
Top