diff --git a/SQF/dayz_code/Configs/cfgLoot.hpp b/SQF/dayz_code/Configs/cfgLoot.hpp index ef136c1de..ef0e53de3 100644 --- a/SQF/dayz_code/Configs/cfgLoot.hpp +++ b/SQF/dayz_code/Configs/cfgLoot.hpp @@ -575,4 +575,38 @@ class CfgLoot { 0.33, } }; + backpacks[] = { + { + "DZ_Assault_Pack_EP1", // 1-12 + "DZ_Czech_Vest_Puch", // 1-12 + "DZ_TerminalPack_EP1", // 1-15 + "DZ_ALICE_Pack_EP1", // 2-20 + "DZ_TK_Assault_Pack_EP1", // 2-22 + "DZ_CompactPack_EP1", // 2-25 + }, + { + 0.22, + 0.20, + 0.18, + 0.16, + 0.13, + 0.11, + } + }; + militarybackpacks[] = { + { + "DZ_British_ACU", // 3-30 + "DZ_GunBag_EP1", // 3-35 + "DZ_CivilBackpack_EP1", //4-40 + "DZ_Backpack_EP1", //5-50 + "DZ_LargeGunBag_EP1" // 6-60 + }, + { + 0.30, + 0.25, + 0.20, + 0.15, + 0.10, + } + }; }; \ No newline at end of file diff --git a/SQF/dayz_code/compile/spawn_loot.sqf b/SQF/dayz_code/compile/spawn_loot.sqf index 7e14fb164..00d4a1d9e 100644 --- a/SQF/dayz_code/compile/spawn_loot.sqf +++ b/SQF/dayz_code/compile/spawn_loot.sqf @@ -49,6 +49,19 @@ switch (_iClass) do _canType = _itemTypes select _index; _item addMagazineCargoGlobal [_canType,1]; }; + case "backpack": + { + //Item is single backpack + _itemTypes = [] + ((getArray (configFile >> "cfgLoot" >> _iItem)) select 0); + _index = dayz_CLBase find _iItem; + _weights = dayz_CLChances select _index; + _cntWeights = count _weights; + _index = floor(random _cntWeights); + _index = _weights select _index; + _iItem = _itemTypes select _index; + + _item = createVehicle [_iItem, _iPos, [], _radius, "CAN_COLLIDE"]; + }; case "weapon": { diff --git a/SQF/dayz_code/compile/spawn_loot_small.sqf b/SQF/dayz_code/compile/spawn_loot_small.sqf index cf4de824d..5b137ee94 100644 --- a/SQF/dayz_code/compile/spawn_loot_small.sqf +++ b/SQF/dayz_code/compile/spawn_loot_small.sqf @@ -26,9 +26,11 @@ switch (_iClass) do }; case "weapon": { - //Item is a weapon, and spawns no mags + //do nothing for now + /* _item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"]; _item addWeaponCargoGlobal [_iItem,1]; + */ }; case "magazine": { @@ -36,6 +38,15 @@ switch (_iClass) do _item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"]; _item addMagazineCargoGlobal [_iItem,1]; }; + + case "weaponnomags": + { + //do nothing for now + }; + case "backpack": + { + //do nothing for now + }; case "object": { //do nothing for now diff --git a/SQF/dayz_code/config.cpp b/SQF/dayz_code/config.cpp index 8784f4bc6..c08e165ed 100644 --- a/SQF/dayz_code/config.cpp +++ b/SQF/dayz_code/config.cpp @@ -534,11 +534,7 @@ class CfgBuildingLoot { { "","generic" }, { "LeeEnfield","weapon" }, { "revolver_EP1","weapon" }, - {"DZ_Assault_Pack_EP1","object"}, // 12 - {"DZ_Czech_Vest_Puch","object"}, // 12-0 - {"DZ_ALICE_Pack_EP1","object"}, // 16 - {"DZ_TK_Assault_Pack_EP1","object"}, // 16 - {"DZ_British_ACU","object"}, // 18 + { "backpacks","backpack" }, { "Winchester1866","weapon" }, { "tents","single" }, { "","military" }, @@ -564,14 +560,10 @@ class CfgBuildingLoot { 0.01, 0.04, 0.01, - 0.32, + 0.36, 0.03, 0.02, - 0.02, - 0.02, - 0.02, - 0.01, - 0.01, + 0.04, 0.01, 0.01, 0.02, @@ -607,11 +599,7 @@ class CfgBuildingLoot { { "","generic" }, { "LeeEnfield","weapon" }, { "revolver_EP1","weapon" }, - {"DZ_Assault_Pack_EP1","object"}, // 12 - {"DZ_Czech_Vest_Puch","object"}, // 12-0 - {"DZ_ALICE_Pack_EP1","object"}, // 16 - {"DZ_TK_Assault_Pack_EP1","object"}, // 16 - {"DZ_British_ACU","object"}, // 18 + { "backpacks","backpack" }, { "Winchester1866","weapon" }, { "tents","single" }, { "","military" }, @@ -640,15 +628,11 @@ class CfgBuildingLoot { 0.31, 0.03, 0.02, - 0.02, - 0.02, - 0.02, - 0.01, - 0.01, + 0.04, 0.01, 0.01, 0.02, - 0.14, + 0.18, 0.01, 0.02, 0.02, @@ -780,7 +764,6 @@ class CfgBuildingLoot { { "ItemFishingPole","weapon" }, { "ItemLightBulb","magazine"}, { "ItemSledgeHandle","magazine"} - }; itemChance[] = { 0.05, @@ -821,20 +804,14 @@ class CfgBuildingLoot { { "","generic" }, { "LeeEnfield","weapon" }, { "revolver_EP1","weapon" }, - {"DZ_Assault_Pack_EP1","object"}, // 12 - {"DZ_Czech_Vest_Puch","object"}, // 12-0 - {"DZ_ALICE_Pack_EP1","object"}, // 16 - {"DZ_TK_Assault_Pack_EP1","object"}, // 16 - {"DZ_British_ACU","object"}, // 18 - {"DZ_CompactPack_EP1","object"}, // - {"DZ_TerminalPack_EP1","object"}, // + { "backpacks","backpack" }, { "Winchester1866","weapon" }, { "tents","single" }, { "","food" }, { "","trash" }, {"Crossbow_DZ","weapon"}, { "Binocular","weapon" }, - { "PartWoodPile","magazine" }, + { "PartPlywoodPack","magazine" }, {"MR43","weapon"} }; itemChance[] = { @@ -852,17 +829,11 @@ class CfgBuildingLoot { 0.04, 0.01, 0.01, - 0.04, - 0.03, - 0.02, - 0.02, - 0.01, - 0.01, - 0.01, + 0.07, 0.01, 0.01, 0.30, - 0.13, + 0.20, 0.01, 0.05, 0.02, @@ -1027,15 +998,7 @@ class HeliCrash_No50s: Default { { "ItemKnife","military" }, { "ItemGPS","weapon" }, { "ItemMap","military" }, - - {"DZ_ALICE_Pack_EP1","object"}, // 16 - {"DZ_TK_Assault_Pack_EP1","object"}, // 16 - {"DZ_British_ACU","object"}, // 18 - {"DZ_CivilBackpack_EP1","object"}, // 24 - {"DZ_Backpack_EP1","object"}, // 24 - {"DZ_GunBag_EP1","object"}, // 8-6 - - //Normal + { "militarybackpacks","backpack" }, { "","medical" }, { "","generic" }, { "","military" }, @@ -1073,20 +1036,15 @@ class HeliCrash_No50s: Default { 0.01, 0.01, 0.02, - 0.04, - 0.04, + 0.05, 0.03, - 0.02, + 0.1, + 0.35, 0.01, 0.01, 0.02, - 0.07, - 0.3, - 0.01, - 0.01, 0.02, 0.01, - 0.01, 0.02, 0.01 }; @@ -1123,15 +1081,7 @@ class HeliCrash_No50s: Default { { "ItemKnife","military" }, { "ItemGPS","weapon" }, { "PartVRotor","magazine" }, - - {"DZ_ALICE_Pack_EP1","object"}, // 16 - {"DZ_TK_Assault_Pack_EP1","object"}, // 16 - {"DZ_British_ACU","object"}, // 18 - {"DZ_CivilBackpack_EP1","object"}, // 24 - {"DZ_Backpack_EP1","object"}, // 24 - {"DZ_GunBag_EP1","object"}, // 8-6 - - //Normal + { "militarybackpacks","backpack" }, { "","medical" }, { "","generic" }, { "","military" }, @@ -1171,26 +1121,20 @@ class HeliCrash_No50s: Default { 0.04, 0.01, 0.01, - 0.02, - 0.04, - 0.04, 0.03, - 0.01, - 0.01, - 0.01, - 0.02, - 0.01, + 0.05, + 0.03, + 0.06, 0.35, 0.01, 0.01, 0.02, - 0.01, + 0.03, 0.01, 0.01, 0.01, 0.01, 0.01 - }; }; class MilitarySpecial: Default { @@ -1227,29 +1171,18 @@ class HeliCrash_No50s: Default { { "M4A1_HWS_GL_camo","weapon" }, { "Mk_48_DZ","weapon" }, { "M4A3_CCO_EP1","weapon" }, - //Ammo { "AmmoBoxSmall_556","object" }, { "AmmoBoxSmall_762","object" }, - - //{"NVGoggles","weapon"}, { "Binocular","weapon" }, { "ItemFlashlightRed","military" }, { "ItemKnife","military" }, { "ItemGPS","weapon" }, { "ItemMap","military" }, { "Binocular_Vector","military" }, - - {"DZ_ALICE_Pack_EP1","object"}, // 16 - {"DZ_TK_Assault_Pack_EP1","object"}, // 16 - {"DZ_British_ACU","object"}, // 18 - {"DZ_CivilBackpack_EP1","object"}, // 24 - {"DZ_Backpack_EP1","object"}, // 30 - {"DZ_LargeGunBag_EP1","object"}, // 45 - + { "militarybackpacks","backpack" }, { "","medical" }, { "","generic" }, { "","military" }, - //{"Body","object"}, {"PipeBomb","magazine"}, {"Sa58V_RCO_EP1","weapon"}, {"Sa58V_CCO_EP1","weapon"}, @@ -1257,8 +1190,16 @@ class HeliCrash_No50s: Default { {"M40A3","weapon"}, {"100Rnd_762x54_PK","magazine"}, { "militaryclothes","single" }, + {"NVGoggles","weapon"}, }; itemChance[] = { + 0.01, + 0.01, + 0.01, + 0.02, + 0.01, + 0.01, + 0.01, 0.01, 0.01, 0.01, @@ -1286,15 +1227,11 @@ class HeliCrash_No50s: Default { 0.01, 0.01, 0.01, - 0.02, - 0.02, - 0.02, - 0.01, - 0.01, - 0.01, + 0.05, 0.03, 0.08, - 0.31, + 0.34, + 0.01, 0.01, 0.01, 0.01,