Deployable Ammo Crates and 1.7.7

i have that one and it works just fine, not sure whats wrong or how it was fixed tbh


So just to be clear, now your ammo crates such as:

UNBasicAmmunitionBox_EP1
USBasicAmmunitionBox_EP1
USOrdnanceBox_EP1
USVehicleBox_EP1

Work fine now on your DayZ.ST map?

Can you post a couple database entries for boxes you've verified working to help us out? Thanks!
 
old ones appeared along with all other deployables.. but i rebuilt my pbos and now they were working, will look into a fix because I had them working for some reason.. (still have pbo that they appeared on)
 
AmmoBoxSmall is the type of the crate the other guy was referring to. If you can get it to spawn, I am sure you could use it the same way we have been using the other crate types. Iirc there were two files in the server pbo where you had to add the type of crate to the same line as Tents (updateNearbyObjects and another file).

I will test when I get home today, and will also see if the other crates are working again.
 
I am also trying to figure out how to get the ammo and medical boxes back on my server after the 1.7.7 patch.

I started a thread here and was able to get my custom buildings back, but cannot get the ammo/medical boxes to work.

http://opendayz.net/threads/custom-deployables-ignored-after-1-7-7-server-patch.11198/

I tried to edit the files that were suggested above, but with no success.

In server_player_Sync.sqf:

[_x, "gear"] call server_updateObject;
} forEach nearestObjects [_pos, ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage", "StashSmall","StashMedium","MedBox0"], 10];
//[_charPos] call server_updateNearbyObjects;

In server_updateNearbyObjects.sqf:

} forEach nearestObjects [_pos, ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage", "StashSmall", "StashMedium", "MedBox0"], 10];

I only tried the MedBox0 class for testing.

Here is an snippet of my RPT file:

18:47:30 "IGNORED MedBox0 oid#1111112 cid:1 "
18:47:30 "IGNORED USBasicWeaponsBox oid#1111113 cid:1 "
18:47:30 "IGNORED USSpecialWeaponsBox oid#1111114 cid:1 "
18:47:30 "IGNORED USSpecialWeaponsBox oid#9999995 cid:1 "
18:47:30 "IGNORED ReammoBox oid#1111118 cid:1 "
18:47:30 "IGNORED MedBox0 oid#1111119 cid:1 "

If anyone has a solution, I would appreciate it.
 
Updating the server_player_Sync.sqf and server_updateNearbyObjects.sqf is only required to make them usable, it has nothing to do with making them spawn. First we need to get them to spawn, then we can add them to those files to use them. I am at the same point you are, I can't get them to spawn.

Did they modify the code to only allow certain objects in the deployable table to prevent hackers from spawning in boxes? Not sure if this helps any or not.
nope, u can still spawn boxes in with hacks. The only thing u can not spawn in via hacks are non dayz vehs now.

check_publishobject = {
private["_allowed","_allowedObjects","_object"];

_object = _this select 0;
_playername = _this select 1;
_allowedObjects = ["TentStorage", "Hedgehog_DZ", "Sandbag1_DZ", "TrapBear", "Wire_cat1", "StashSmall", "StashMedium"];
_allowed = false;

diag_log format ["DEBUG: Checking if Object: %1 is allowed published by %2", _object, _playername];

if ((typeOf _object) in _allowedObjects) then {
diag_log format ["DEBUG: Object: %1 published by %2 is Safe",_object, _playername];
_allowed = true;
};

_allowed
};

Has anyone tried to add crates into this code snippet?
 
Same as hardcoding the map I guess. When I tested that earlier the server would auto spawn items in those crates, and you could not use them to store things in (erased on reboot). Are you using yours for custom storage, or no?
 
Haven't tried using them as storage, just added a few camping tents and deploy those for storage.

Also I'm on Dayz.ST FYI to the guy asking earlier for someone on .st with working ammo crates.

Anyone happen to know of an empty box that can be used for storage by chance?
 
Ok guys i got mine working from deployable for 1.7.7.1

what i have done:

server_playersyc I added ,"USBasicAmmunitionBox" to the end of
} forEach nearestObjects [_pos, ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage", "StashSmall","StashMedium"

server_updateNearbyObjects I did the same as above

init\server_functions
_allowedObjects = ["TentStorage", "Hedgehog_DZ", "Sandbag1_DZ", "TrapBear", "Wire_cat1", "StashSmall", "StashMedium","USBasicAmmunitionBox_EP1"];

server_cleanup.fsm
"//Check for Ammobox" \n
"// {" \n
"//if(!(_x isKindOf ""WeaponHolder"")) then {" \n
"//diag_log (""CLEANUP: DELETING AN AMMOBOX "" + (typeOf _x));" \n
"//deleteVehicle _x;" \n
"//};" \n
"//} forEach allMissionObjects ""ReammoBox"";" \n
"//*/" \n
""// \n

then in deployable table put ammo box as USBasicAmmunitionBox_EP1

In the mission.pbo in variables if you have it set up from your code change
SafeObjects = ["Land_Fire_DZ", "TentStorage", "Wire_cat1", "Sandbag1_DZ", "Hedgehog_DZ", "StashSmall", "StashMedium","USBasicAmmunitionBox_EP1"];

don't know how much is needed but got mine working going to take bits out see how much is needed
 
  • Like
Reactions: Cur
I thought I had it, but then I missed adding the classnames into the safeObjects, triple checked, ready to upload, but now server is filling up... will have to get back with results later. It certainly looks like it has potential!
 
Updating the server_player_Sync.sqf and server_updateNearbyObjects.sqf is only required to make them usable, it has nothing to do with making them spawn. First we need to get them to spawn, then we can add them to those files to use them. I am at the same point you are, I can't get them to spawn.

nope, u can still spawn boxes in with hacks. The only thing u can not spawn in via hacks are non dayz vehs now.



Has anyone tried to add crates into this code snippet?


Adding them through the mission.sqm gets them to spawn fine, they are just deleted in about 15 seconds by some code elsewhere. I tried all of Timmy_kirton's edits above and mine still get deleted.

22:03:28 "Deleting object USBasicAmmunitionBox_EP1 with invalid ID at pos [12542.2,12536.8,0]"
22:03:28 "Deleting object USBasicAmmunitionBox_EP1 with invalid ID at pos [12544.1,12536.8,0.000198364]"
22:03:28 "Deleting object USBasicAmmunitionBox_EP1 with invalid ID at pos [12540.2,12536.8,0]"
 
Back
Top