Base Building DayZ 1.2 Released

Has any one managed to get a way of building stuff like for example "Castle" buildables but not spawning loot/zeds with it? I saw that if you use a classname starting with MAP_ and not Land_ it just spawns the building. Found it in some code on the web. Will this work with the buildables too?
 
Sorry to double post but this is really frustrating. How do I add buildings to base building but WITHOUT spawning loot/zeds please?
 
basically to get basebuilding working with epoch, you need to change the base build "playerbuild.sqf" name to another name (EG "playerbasebuild.sqf") and have base build call that instead of the "playerbuild.sqf"

illpost how i did it this weekend if time permits (have other commitments)

Ah ok, that's part of what I had to do for the 1.8 updated files I released so that makes sense. Like I said, I've never used Epoch so I've never installed it for Epoch either to give advice.

Has any one managed to get a way of building stuff like for example "Castle" buildables but not spawning loot/zeds with it? I saw that if you use a classname starting with MAP_ and not Land_ it just spawns the building. Found it in some code on the web. Will this work with the buildables too?


I still haven't had a chance to test this since I spoke to you yesterday. There is an incredibly easy way for you to test that theory though, change the buildables in your build list to the map_ prefix and see if it works.

@fallingsheep thats done by rosska with the player_build2.sqf rename , or i missed something ?

Epoch doesn't use 1.8, so they probably never thought to download my fixed files to see that. :)
 
Sorry to double post but this is really frustrating. How do I add buildings to base building but WITHOUT spawning loot/zeds please?

Not possible or at least I didn't succeeded ;) If you build an Arma building, it comes with loots...
Ah ok, that's part of what I had to do for the 1.8 updated files I released so that makes sense. Like I said, I've never used Epoch so I've never installed it for Epoch either to give advice.
Hum are sure about that ? Is that so simple ? I'll test it...
 
Sorry yes I agree with the renaming (I already made that). But I still have an issue with the plotpole and items not published to the DB. Maybe due to new variables from 1.0.2.4 that I missed... Do someone (Falling or Rosska) have a solution for this ? Maybe a working sqf file that I can compare with ?
 
Does any one have a list of buildables that do NOT spawn loot OR zombies? - There is ONE buildable included in BB already that spawns loot/zombies and thatis the tent.
 
Does any one have a list of buildables that do NOT spawn loot OR zombies? - There is ONE buildable included in BB already that spawns loot/zombies and thatis the tent.

There are quite literally hundreds of building classnames. The buildings that spawn loot will differ on a map to map basis, since it depends on what the loot tables for each map are configured for. For instance, that tent doesn't spawn loot on maps like Oring because they don't have tents in as map objects already so they aren't defined in the loot tables.

Sorry yes I agree with the renaming (I already made that). But I still have an issue with the plotpole and items not published to the DB. Maybe due to new variables from 1.0.2.4 that I missed... Do someone (Falling or Rosska) have a solution for this ? Maybe a working sqf file that I can compare with ?

If you check out the 1.8 fix in my sig, you can see what files need modified. Those files wont work for you as Epoch has different public event variables to standard DayZ, but it'll be the same files that need edited for the Epoch variables. I don't have time right now to do an Epoch install.
 
basically to get basebuilding working with epoch, you need to change the base build "playerbuild.sqf" name to another name (EG "playerbasebuild.sqf") and have base build call that instead of the "playerbuild.sqf"

illpost how i did it this weekend if time permits (have other commitments)

That's all?
 
Overwatch 0.2.4 Not save in DB issue, This work for me: Tuto +
You need to open the server_updateObject.sqf of mine that you're using and find
Code:
if (!_parachuteWest) then {
    if (_objectID == "0" && _uid == "0" && (vehicle _object getVariable ["Sarge",0] != 1)) then
    {
        _object_position = getPosATL _object;
            diag_log format ["DEBUG: Deleting object %1 with invalid ID at [%2,%3,%4]",
            typeOf _object,
            _object_position select 0,
            _object_position select 1,
            _object_position select 2];
            _isNotOk = true;
    };
};

Change that too
Code:
if (!_parachuteWest) then {
    if ((typeOf _object) in SafeObjects) then {
 
    } else {
        if (_objectID == "0" && _uid == "0" && (vehicle _object getVariable ["Sarge",0] != 1)) then
        {
            _object_position = getPosATL _object;
                diag_log format ["DEBUG: Deleting object %1 with invalid ID at [%2,%3,%4]",
                typeOf _object,
                _object_position select 0,
                _object_position select 1,
                _object_position select 2];
                _isNotOk = true;
        };
    };
};
The '//send to database' section? I did change it from :

_object setVariable ["characterID",dayz_characterID,true];
dayzPublishObj = [dayz_characterID,_object,[_dir,_location],_classname];
publicVariableServer "dayzPublishObj";
if (isServer) then {
dayzPublishObj call server_publishObj;
};
} else {cutText ["You need the EXACT amount of whatever you are trying to build without extras.", "PLAIN DOWN"];call _funcExitScript;};

To:

_object setVariable ["characterID",dayz_characterID,true];
PVDZ_obj_Publish = [dayz_characterID,_object,[_dir,_location],_classname];
publicVariableServer "PVDZ_obj_Publish";
} else {cutText ["You need the EXACT amount of whatever you are trying to build without extras.", "PLAIN DOWN"];call _funcExitScript;};





I'm also using the player_build2.sqf from the BB Edits for 1.8 i found on this site. should i be using both or only player_build or only Player_build2?

put this in your dayz code/ init/variables






safeObjects = ["Land_Fire_DZ", "TentStorage", "Hedgehog_DZ", "Sandbag1_DZ", "TrapBear", "Wire_cat1", "StashSmall", "StashMedium", "Grave", "Concrete_Wall_EP1", "Infostand_2_EP1", "WarfareBDepot", "Base_WarfareBBarrier10xTall", "WarfareBCamp", "Base_WarfareBBarrier10x", "Land_fortified_nest_big", "Land_Fort_Watchtower", "Land_fort_rampart_EP1", "Land_HBarrier_large", "Land_fortified_nest_small", "Land_BagFenceRound", "Land_fort_bagfence_long", "Land_Misc_Cargo2E", "Misc_Cargo1Bo_military", "Ins_WarfareBContructionSite", "Land_pumpa", "Land_CncBlock", "Misc_cargo_cont_small_EP1", "Land_prebehlavka", "Fence_corrugated_plate", "ZavoraAnim", "Land_tent_east", "Land_CamoNetB_EAST", "Land_CamoNetB_NATO", "Land_CamoNetVar_EAST", "Land_CamoNetVar_NATO", "Land_CamoNet_EAST", "Land_CamoNet_NATO", "Fence_Ind_long", "Fort_RazorWire", "Fence_Ind", "HeliH", "FlagCarrierUSA", "HeliHCivil"];


But now, objects no remove after restart, i do the fix in tuto.

Code:
//Player removes object successfully
if (!isNull _obj) then {
cutText [format["You removed a %1 successfully!",_text], "PLAIN DOWN"];
//    dayzDeleteObj = [_dir, _pos, _objectID, _objectUID];
    dayzDeleteObj = [_objectID,_objectUID];
publicVariableServer "dayzDeleteObj";
//if (isServer) then {
//    dayzDeleteObj call local_deleteObj;
//};
if (isServer) then {
dayzDeleteObj call server_deleteObj;
};
Any idea? I still work for a solution
 
Overwatch 0.2.4 Not save in DB issue, This work for me: Tuto +




But now, objects no remove after restart, i do the fix in tuto.

Code:
//Player removes object successfully
if (!isNull _obj) then {
cutText [format["You removed a %1 successfully!",_text], "PLAIN DOWN"];
//    dayzDeleteObj = [_dir, _pos, _objectID, _objectUID];
    dayzDeleteObj = [_objectID,_objectUID];
publicVariableServer "dayzDeleteObj";
//if (isServer) then {
//    dayzDeleteObj call local_deleteObj;
//};
if (isServer) then {
dayzDeleteObj call server_deleteObj;
};
Any idea? I still work for a solution

I don't know what version of DayZ the Overwatch 0.2.4 uses, but if you're running with a Reality hive then you'll need to apply the 'tent fix' as it actually affects all deployable items. Either the link in my sig will work, or maybe this one here if it's running an older version of DayZ still.
 
Hi again. Ok so I'm now trying to get the working with Overwatch 0.2.5, which i think is based off 1.8.0.3. I can build objects and they save to the db, and I get the scrollbar option to remove with a pin, but as the object owner I don't get the option to simply remove it. In this code in selfactions:

Code:
    // Remove Object from code
    if((typeOf(cursortarget) in allbuildables_class) && _canDo && removeObject && !procBuild && !remProc) then {
        _validObject = cursortarget getVariable ["validObject",false];
        if (_validObject) then {
            if (s_player_codeRemove < 0) then {
                s_player_codeRemove = player addaction [("<t color=""#8E11F5"">" + ("Base Owners Remove Object") +"</t>"),"dayz_code\actions\player_remove.sqf","",5,false,true,"",""];
            };
        } else {
            player removeAction s_player_codeRemove;
            s_player_codeRemove = -1;
        };
    } else {
        player removeAction s_player_codeRemove;
        s_player_codeRemove = -1;
    };

when I cursor over a valid object, _validObject is returning false and removeObject is also false. I don't know where removeObject is set cos its not done in selfactions. I've had a look at rosskas' file which is the same as above and I assume his is working, so I don't know...
 
fn_selfActions gives a removal option for anything with is in the "removeable" array, which is created from the build array.

When you select remove, it runs the player_remove.sqf and in there that checks whether you are the owner, whether you are trying to remove by code, or whether you are trying to remove an object you don't own.

The owner check is run by this piece of code which checks your character ID against the owner ID in the table,
Code:
if ( _ownerID == dayz_characterID ) then {
    call _func_ownerRemove;
};

If that returns positive, it calls the ownerRemove function, which is higher up in the script.

If you are removing by a code, the code enter window (the GUI) passes the code to code_compare, which verifies if it matches. If it does, it sends it to player_remove.sqf and this piece of code picks it up
Code:
    _validObject = _obj getVariable ["validObject",false];
if (removeObject && _validObject) then {
    call _func_ownerRemove;
};

As you can see, that also calls the ownerRemove function if the code is valid.

Anything that returns no match on ID or code, will run the default removal script which is the 'chance' system for removal.

Since removal by code is working, my guess would be that you've died since you built the item and your character ID no longer matches the deployable owner ID.
 
Thanks, I'm sure I haven't died - I can create an object and straight away try to remove it and I don't get the option. But even if I was a new char I should get the option to try to remove it with a chance to lose toolbox? I think overwatch is doing weird things again. I will continue to look at it, thanks for the info though, it will be useful no doubt.
 
So, you're not getting the option to remove items at all?

Did you delete the old removable section from fn_selfActions when you added the base building stuff in?
 
ahhh i seeeeee.... no that section was still in there, it is further down now in 1.8.0.3 so I didn't see it at first. I shall remove it and report back.
 
yeah that was the problem. I can now delete objects and get the components refunded... but the objects are now not being removed from the db, which is strange because that part of the code has not changed - I still get the "owner refunded for object..." which means that PVDZ_obj_Delete is being called.
 
In player_remove.sqf try changing
Code:
    if (isServer) then {
        PVDZ_obj_Delete call local_deleteObj;
    };

To
Code:
    if (isServer) then {
        PVDZ_obj_Delete call server_deleteObj;
    };

If that doesn't work, confirm whether you can remove tents from the DB or not, as it could be the standard reality deployable bug and not specific to base building.
 
yeah thanks once again... it was the tent fix. So everything seems to be working now - on my test server with BE disabled - so far anyway. thanks for all your help.

Now if only vilayer would just release the 0.2.5 update already... its been out for a week now. xstreamgaming released it the other day with a caveat along the lines of "here it is, but don't use it cos the BE filters are busted" or something like that lol.
 
Back
Top