From b79fc95b7e86c5b665587cac223d9bdbd7287607 Mon Sep 17 00:00:00 2001 From: Zac Surplice Date: Sun, 6 Oct 2013 05:42:04 +1100 Subject: [PATCH 1/4] create CfgLootSmall --- SQF/dayz_code/Configs/CfgLootSmall.hpp | 468 +++++++++++++++++++++++++ SQF/dayz_code/Configs/cfgLoot.hpp | 432 ++--------------------- 2 files changed, 488 insertions(+), 412 deletions(-) create mode 100644 SQF/dayz_code/Configs/CfgLootSmall.hpp diff --git a/SQF/dayz_code/Configs/CfgLootSmall.hpp b/SQF/dayz_code/Configs/CfgLootSmall.hpp new file mode 100644 index 000000000..d09e1b9c2 --- /dev/null +++ b/SQF/dayz_code/Configs/CfgLootSmall.hpp @@ -0,0 +1,468 @@ +class CfgLootSmall { + trash[] = { + { + "TrashTinCan", + "TrashJackDaniels", + "ItemSodaEmpty", + "ItemTrashToiletpaper", + "ItemTrashRazor" + }, + { + 0.5, + 0.05, + 0.25, + 0.10, + 0.1 + } + }; + civilian[] = { + { + "FoodCanUnlabeled", + "TrashJackDaniels", + "ItemSodaEmpty", + "ItemSodaCoke", + "ItemSodaPepsi", + "FoodCanBakedBeans", + "FoodCanSardines", + "FoodCanFrankBeans", + "FoodCanPasta", + "8Rnd_9x18_Makarov", + "7Rnd_45ACP_1911", + "2Rnd_shotgun_74Slug", + "2Rnd_shotgun_74Pellets", + "ItemBandage", + "ItemPainkiller", + "FoodBioMeat", + "8Rnd_9x18_MakarovSD" + }, + { + 0.07, + 0.09, + 0.09, + 0.1, + 0.09, + 0.05, + 0.05, + 0.05, + 0.05, + 0.07, + 0.05, + 0.05, + 0.05, + 0.06, + 0.06, + 0.01, + 0.01 + } + }; + office2[] = { + { + "FoodCanUnlabeled", + "TrashJackDaniels", + "ItemSodaEmpty", + "ItemSodaCoke", + "ItemSodaPepsi", + "FoodCanBakedBeans", + "FoodCanSardines", + "FoodCanFrankBeans", + "FoodCanPasta", + "8Rnd_9x18_Makarov", + "7Rnd_45ACP_1911", + "2Rnd_shotgun_74Slug", + "2Rnd_shotgun_74Pellets", + "ItemBandage", + "ItemPainkiller", + "FoodBioMeat", + "8Rnd_9x18_MakarovSD" + }, + { + 0.07, + 0.09, + 0.09, + 0.09, + 0.09, + 0.05, + 0.05, + 0.05, + 0.05, + 0.07, + 0.05, + 0.05, + 0.05, + 0.06, + 0.06, + 0.01, + 0.01 + } + }; + food[] = { + { + //trash + "TrashTinCan", + "TrashJackDaniels", + "ItemSodaEmpty", + "ItemSodaCoke", + "ItemSodaPepsi", + "FoodCanBakedBeans", + "FoodCanSardines", + "FoodCanFrankBeans", + "FoodCanPasta", + "FoodCanUnlabeled", + // food Bags + "FoodPistachio", + "FoodNutmix" + }, + { + //trash + 0.09, + 0.12, + 0.12, + 0.09, + 0.11, + 0.07, + 0.07, + 0.07, + 0.07, + 0.1, + // food Bags + 0.05, + 0.04 + } + }; + office[] = { + { + "FoodCanUnlabeled", + "ItemSodaEmpty", + "ItemSodaCoke", + "ItemSodaPepsi", + "TrashJackDaniels", + "FoodCanBakedBeans", + "FoodCanSardines", + "FoodCanFrankBeans", + "FoodCanPasta", + "ItemWaterbottleUnfilled", + "ItemWaterbottle", + "ItemBandage", + "7Rnd_45ACP_1911", + "5x_22_LR_17_HMR", + "10x_303", + "6Rnd_45ACP", + "2Rnd_shotgun_74Slug", + "2Rnd_shotgun_74Pellets", + "8Rnd_9x18_Makarov", + "15Rnd_W1866_Slug", + "WoodenArrow", + "HandRoadFlare", + "ItemPainkiller", + "HandChemGreen", + "HandChemBlue", + "HandChemRed", + "ItemHeatPack" + }, + { + 0.06, + 0.06, + 0.06, + 0.04, + 0.04, + 0.01, + 0.01, + 0.01, + 0.01, + 0.01, + 0.01, + 0.08, + 0.03, + 0.01, + 0.04, + 0.04, + 0.05, + 0.05, + 0.09, + 0.02, + 0.04, + 0.07, + 0.02, + 0.01, + 0.03, + 0.03, + 0.03 + } + }; + generic[] = { + { + "FoodCanUnlabeled", + "ItemSodaEmpty", + "ItemSodaCoke", + "ItemSodaPepsi", + "TrashJackDaniels", + "FoodCanBakedBeans", + "FoodCanSardines", + "FoodCanFrankBeans", + "FoodCanPasta", + "ItemWaterbottleUnfilled", + "ItemWaterbottle", + "ItemBandage", + "7Rnd_45ACP_1911", + "5x_22_LR_17_HMR", + "10x_303", + "6Rnd_45ACP", + "2Rnd_shotgun_74Slug", + "2Rnd_shotgun_74Pellets", + "8Rnd_9x18_Makarov", + "15Rnd_W1866_Slug", + "WoodenArrow", + "HandRoadFlare", + "ItemPainkiller", + "HandChemGreen", + "HandChemBlue", + "HandChemRed", + "ItemHeatPack" + }, + { + 0.06, + 0.06, + 0.06, + 0.04, + 0.04, + 0.01, + 0.01, + 0.01, + 0.01, + 0.01, + 0.01, + 0.11, + 0.03, + 0.01, + 0.04, + 0.04, + 0.05, + 0.05, + 0.09, + 0.02, + 0.04, + 0.07, + 0.02, + 0.01, + 0.03, + 0.03, + 0.04 + } + }; + medical[] = { + { + "ItemBandage", + "ItemPainkiller", + "ItemMorphine", + "ItemEpinephrine", + "ItemAntibiotic", + "ItemHeatPack" + }, + { + 0.4, + 0.15, + 0.2, + 0.1, + 0.1, + 0.05 + } + }; + hospital[] = { + { + "ItemBandage", + "ItemPainkiller", + "ItemMorphine", + "ItemEpinephrine", + "ItemBloodbag", + "ItemAntibiotic" + }, + { + 0.33, + 0.16, + 0.13, + 0.09, + 0.17, + 0.12 + } + }; + military[] = { + { + "FoodCanUnlabeled", + "ItemSodaEmpty", + "ItemSodaCoke", + "ItemSodaPepsi", + "ItemBandage", + "ItemAntibiotic", + "ItemPainkiller", + "ItemMorphine", + "30Rnd_556x45_Stanag", + "20Rnd_762x51_DMR", + "17Rnd_9x19_glock17", + "15Rnd_9x19_M9SD", + "15Rnd_9x19_M9", + "30Rnd_762x39_AK47", + "30Rnd_545x39_AK", + "5Rnd_762x51_M24", + "5Rnd_86x70_L115A1", + "8Rnd_B_Beneli_74Slug", + "1Rnd_HE_M203", + "FlareWhite_M203", + "FlareGreen_M203", + "1Rnd_Smoke_M203", + "200Rnd_556x45_M249", + "HandGrenade_west", + "HandGrenade_east", + "SmokeShell", + "SmokeShellRed", + "SmokeShellGreen", + "8Rnd_B_Beneli_Pellets", + "30Rnd_556x45_StanagSD", + "30Rnd_9x19_MP5", + "30Rnd_9x19_MP5SD", + "100Rnd_762x51_M240", + "HandChemGreen", + "HandChemBlue", + "HandChemRed", + "ItemHeatPack", + "8Rnd_9x18_MakarovSD", + "20Rnd_B_765x17_Ball", + "30Rnd_9x19_UZI_SD" + }, + { + 0.09, + 0.04, + 0.01, + 0.01, + 0.04, + 0.04, + 0.04, + 0.01, + 0.04, + 0.04, + 0.05, + 0.01, + 0.02, + 0.04, + 0.04, + 0.01, + 0.01, + 0.04, + 0.01, + 0.01, + 0.01, + 0.01, + 0.01, + 0.01, + 0.01, + 0.04, + 0.02, + 0.02, + 0.04, + 0.01, + 0.02, + 0.01, + 0.01, + 0.02, + 0.02, + 0.02, + 0.04, + 0.01, + 0.04, + 0.01, + } + }; + policeman[] = { + { + "ItemBandage", + "7Rnd_45ACP_1911", + "6Rnd_45ACP", + "15Rnd_W1866_Slug", + "8Rnd_B_Beneli_Pellets", + "HandRoadFlare", + "8Rnd_9x18_MakarovSD", + "ItemComboLock", + "SmokeShell", + "ItemHotwireKit" + }, + { + 0.3, + 0.08, + 0.08, + 0.14, + 0.17, + 0.08, + 0.01, + 0.05, + 0.04, + 0.01 + } + }; + hunter[] = { + { + "FoodMRE" + }, + { + 0.01 + } + }; + + worker[] = { + { + "FoodCanUnlabeled", + "TrashJackDaniels", + "ItemSodaEmpty", + "ItemSodaCoke", + "ItemSodaPepsi", + "FoodCanBakedBeans", + "FoodCanSardines", + "FoodCanFrankBeans", + "FoodCanPasta", + "ItemBandage", + "ItemPainkiller", + "ItemComboLock", + "ItemSledgeHead" + }, + { + 0.09, + 0.10, + 0.10, + 0.11, + 0.10, + 0.06, + 0.06, + 0.06, + 0.06, + 0.1, + 0.06, + 0.04, + 0.02 + } + }; + + clothes[] = { + { }, + { } + }; + + militaryclothes[] = { + { }, + { } + }; + specialclothes[] = { + { }, + { } + }; + + tents[] = { + { }, + { } + }; + backpacks[] = { + { }, + { } + }; + militarybackpacks[] = { + { }, + { } + }; +}; \ No newline at end of file diff --git a/SQF/dayz_code/Configs/cfgLoot.hpp b/SQF/dayz_code/Configs/cfgLoot.hpp index 3749a4ed4..2138e1db9 100644 --- a/SQF/dayz_code/Configs/cfgLoot.hpp +++ b/SQF/dayz_code/Configs/cfgLoot.hpp @@ -1,469 +1,77 @@ class CfgLoot { trash[] = { - { - "TrashTinCan", - "TrashJackDaniels", - "ItemSodaEmpty", - "ItemTrashToiletpaper", - "ItemTrashRazor" - }, - { - 0.5, - 0.05, - 0.25, - 0.10, - 0.1 - } + { }, + { } }; civilian[] = { - { - "FoodCanUnlabeled", - "TrashJackDaniels", - "ItemSodaEmpty", - "ItemSodaCoke", - "ItemSodaPepsi", - "FoodCanBakedBeans", - "FoodCanSardines", - "FoodCanFrankBeans", - "FoodCanPasta", - "8Rnd_9x18_Makarov", - "7Rnd_45ACP_1911", - "2Rnd_shotgun_74Slug", - "2Rnd_shotgun_74Pellets", - "ItemBandage", - "ItemPainkiller", - "FoodBioMeat", - "8Rnd_9x18_MakarovSD" - }, - { - 0.07, - 0.09, - 0.09, - 0.1, - 0.09, - 0.05, - 0.05, - 0.05, - 0.05, - 0.07, - 0.05, - 0.05, - 0.05, - 0.06, - 0.06, - 0.01, - 0.01 - } + { }, + { } }; office2[] = { { - "FoodCanUnlabeled", - "TrashJackDaniels", - "ItemSodaEmpty", - "ItemSodaCoke", - "ItemSodaPepsi", - "FoodCanBakedBeans", - "FoodCanSardines", - "FoodCanFrankBeans", - "FoodCanPasta", - "8Rnd_9x18_Makarov", - "7Rnd_45ACP_1911", - "2Rnd_shotgun_74Slug", - "2Rnd_shotgun_74Pellets", - "ItemBandage", - "ItemPainkiller", - "FoodBioMeat", - "8Rnd_9x18_MakarovSD", "ItemBriefcaseEmpty" }, { - 0.07, - 0.09, - 0.09, - 0.09, - 0.09, - 0.05, - 0.05, - 0.05, - 0.05, - 0.07, - 0.05, - 0.05, - 0.05, - 0.06, - 0.06, - 0.01, - 0.01, 0.01 } }; food[] = { - { - //trash - "TrashTinCan", - "TrashJackDaniels", - "ItemSodaEmpty", - "ItemSodaCoke", - "ItemSodaPepsi", - "FoodCanBakedBeans", - "FoodCanSardines", - "FoodCanFrankBeans", - "FoodCanPasta", - "FoodCanUnlabeled", - // food Bags - "FoodPistachio", - "FoodNutmix" - }, - { - //trash - 0.09, - 0.12, - 0.12, - 0.09, - 0.11, - 0.07, - 0.07, - 0.07, - 0.07, - 0.1, - // food Bags - 0.05, - 0.04 - } + { }, + { } }; office[] = { { - "FoodCanUnlabeled", - "ItemSodaEmpty", - "ItemSodaCoke", - "ItemSodaPepsi", - "TrashJackDaniels", - "FoodCanBakedBeans", - "FoodCanSardines", - "FoodCanFrankBeans", - "FoodCanPasta", - "ItemWaterbottleUnfilled", - "ItemWaterbottle", - "ItemBandage", - "7Rnd_45ACP_1911", - "5x_22_LR_17_HMR", - "10x_303", - "6Rnd_45ACP", - "2Rnd_shotgun_74Slug", - "2Rnd_shotgun_74Pellets", - "8Rnd_9x18_Makarov", - "15Rnd_W1866_Slug", - "WoodenArrow", - "HandRoadFlare", - "ItemPainkiller", - "HandChemGreen", - "HandChemBlue", - "HandChemRed", - "ItemHeatPack", "ItemLockbox" }, { - 0.06, - 0.06, - 0.06, - 0.04, - 0.04, - 0.01, - 0.01, - 0.01, - 0.01, - 0.01, - 0.01, - 0.08, - 0.03, - 0.01, - 0.04, - 0.04, - 0.05, - 0.05, - 0.09, - 0.02, - 0.04, - 0.07, - 0.02, - 0.01, - 0.03, - 0.03, - 0.03, 0.04 } }; generic[] = { - { - "FoodCanUnlabeled", - "ItemSodaEmpty", - "ItemSodaCoke", - "ItemSodaPepsi", - "TrashJackDaniels", - "FoodCanBakedBeans", - "FoodCanSardines", - "FoodCanFrankBeans", - "FoodCanPasta", - "ItemWaterbottleUnfilled", - "ItemWaterbottle", - "ItemBandage", - "7Rnd_45ACP_1911", - "5x_22_LR_17_HMR", - "10x_303", - "6Rnd_45ACP", - "2Rnd_shotgun_74Slug", - "2Rnd_shotgun_74Pellets", - "8Rnd_9x18_Makarov", - "15Rnd_W1866_Slug", - "WoodenArrow", - "HandRoadFlare", - "ItemPainkiller", - "HandChemGreen", - "HandChemBlue", - "HandChemRed", - "ItemHeatPack" - }, - { - 0.06, - 0.06, - 0.06, - 0.04, - 0.04, - 0.01, - 0.01, - 0.01, - 0.01, - 0.01, - 0.01, - 0.11, - 0.03, - 0.01, - 0.04, - 0.04, - 0.05, - 0.05, - 0.09, - 0.02, - 0.04, - 0.07, - 0.02, - 0.01, - 0.03, - 0.03, - 0.04 - } + { }, + { } }; medical[] = { - { - "ItemBandage", - "ItemPainkiller", - "ItemMorphine", - "ItemEpinephrine", - "ItemAntibiotic", - "ItemHeatPack" - }, - { - 0.4, - 0.15, - 0.2, - 0.1, - 0.1, - 0.05 - } + { }, + { } }; hospital[] = { - { - "ItemBandage", - "ItemPainkiller", - "ItemMorphine", - "ItemEpinephrine", - "ItemBloodbag", - "ItemAntibiotic" - }, - { - 0.33, - 0.16, - 0.13, - 0.09, - 0.17, - 0.12 - } + { }, + { } }; military[] = { { - "FoodCanUnlabeled", - "ItemSodaEmpty", - "ItemSodaCoke", - "ItemSodaPepsi", - "ItemBandage", - "ItemAntibiotic", - "ItemPainkiller", - "ItemMorphine", - "30Rnd_556x45_Stanag", - "20Rnd_762x51_DMR", - "17Rnd_9x19_glock17", - "15Rnd_9x19_M9SD", - "15Rnd_9x19_M9", - "30Rnd_762x39_AK47", - "30Rnd_545x39_AK", - "5Rnd_762x51_M24", - "5Rnd_86x70_L115A1", - "8Rnd_B_Beneli_74Slug", - "1Rnd_HE_M203", - "FlareWhite_M203", - "FlareGreen_M203", - "1Rnd_Smoke_M203", - "200Rnd_556x45_M249", - "HandGrenade_west", - "HandGrenade_east", - "SmokeShell", - "SmokeShellRed", - "SmokeShellGreen", - "8Rnd_B_Beneli_Pellets", - "30Rnd_556x45_StanagSD", - "30Rnd_9x19_MP5", - "30Rnd_9x19_MP5SD", - "100Rnd_762x51_M240", - "HandChemGreen", - "HandChemBlue", - "HandChemRed", - "ItemHeatPack", - "FoodMRE", - "8Rnd_9x18_MakarovSD", - "20Rnd_B_765x17_Ball", - "30Rnd_9x19_UZI_SD" + "FoodMRE" }, { - 0.09, - 0.04, - 0.01, - 0.01, - 0.04, - 0.04, - 0.04, - 0.01, - 0.04, - 0.04, - 0.05, - 0.01, - 0.02, - 0.04, - 0.04, - 0.01, - 0.01, - 0.04, - 0.01, - 0.01, - 0.01, - 0.01, - 0.01, - 0.01, - 0.01, - 0.04, - 0.02, - 0.02, - 0.04, - 0.01, - 0.02, - 0.01, - 0.01, - 0.02, - 0.02, - 0.02, - 0.04, - 0.03, - 0.01, - 0.04, - 0.01, + 0.03 } }; policeman[] = { { - "ItemBandage", - "7Rnd_45ACP_1911", - "6Rnd_45ACP", - "15Rnd_W1866_Slug", - "8Rnd_B_Beneli_Pellets", - "HandRoadFlare", - "8Rnd_9x18_MakarovSD", - "ItemComboLock", - "SmokeShell", - "FoodMRE", - "ItemHotwireKit" + "FoodMRE" }, { - 0.3, - 0.08, - 0.08, - 0.14, - 0.17, - 0.08, - 0.01, - 0.05, - 0.04, - 0.04, - 0.01 + 0.04 } }; hunter[] = { { - "ItemBandage", - "5x_22_LR_17_HMR", - "7Rnd_45ACP_1911", - "10x_303", - "ItemWaterbottleUnfilled", - "WoodenArrow", - "ItemHeatPack", - "FoodMRE", - "FoodNutmix" + "FoodMRE" }, { - 0.4, - 0.17, - 0.03, - 0.1, - 0.05, - 0.2, - 0.02, - 0.01, - 0.02 + 0.01 } }; worker[] = { { - "FoodCanUnlabeled", - "TrashJackDaniels", - "ItemSodaEmpty", - "ItemSodaCoke", - "ItemSodaPepsi", - "FoodCanBakedBeans", - "FoodCanSardines", - "FoodCanFrankBeans", - "FoodCanPasta", - "ItemBandage", - "ItemPainkiller", "ItemWire", - "ItemTankTrap", - "ItemComboLock", - "ItemSledgeHead" + "ItemTankTrap" }, { - 0.09, - 0.10, - 0.10, - 0.11, - 0.10, - 0.06, - 0.06, - 0.06, - 0.06, - 0.1, - 0.06, 0.01, - 0.03, - 0.04, - 0.02 + 0.03 } }; From 19f326c30da92dbeab0161d051cbca65b205e35b Mon Sep 17 00:00:00 2001 From: Zac Surplice Date: Sun, 6 Oct 2013 08:10:48 +1100 Subject: [PATCH 2/4] CfgLootSmall update --- SQF/dayz_code/Configs/cfgLoot.hpp | 432 ++++++++++++++++++++++++++++-- SQF/dayz_code/config.cpp | 383 +++++++++++++++++++++++--- 2 files changed, 757 insertions(+), 58 deletions(-) diff --git a/SQF/dayz_code/Configs/cfgLoot.hpp b/SQF/dayz_code/Configs/cfgLoot.hpp index 2138e1db9..3749a4ed4 100644 --- a/SQF/dayz_code/Configs/cfgLoot.hpp +++ b/SQF/dayz_code/Configs/cfgLoot.hpp @@ -1,77 +1,469 @@ class CfgLoot { trash[] = { - { }, - { } + { + "TrashTinCan", + "TrashJackDaniels", + "ItemSodaEmpty", + "ItemTrashToiletpaper", + "ItemTrashRazor" + }, + { + 0.5, + 0.05, + 0.25, + 0.10, + 0.1 + } }; civilian[] = { - { }, - { } + { + "FoodCanUnlabeled", + "TrashJackDaniels", + "ItemSodaEmpty", + "ItemSodaCoke", + "ItemSodaPepsi", + "FoodCanBakedBeans", + "FoodCanSardines", + "FoodCanFrankBeans", + "FoodCanPasta", + "8Rnd_9x18_Makarov", + "7Rnd_45ACP_1911", + "2Rnd_shotgun_74Slug", + "2Rnd_shotgun_74Pellets", + "ItemBandage", + "ItemPainkiller", + "FoodBioMeat", + "8Rnd_9x18_MakarovSD" + }, + { + 0.07, + 0.09, + 0.09, + 0.1, + 0.09, + 0.05, + 0.05, + 0.05, + 0.05, + 0.07, + 0.05, + 0.05, + 0.05, + 0.06, + 0.06, + 0.01, + 0.01 + } }; office2[] = { { + "FoodCanUnlabeled", + "TrashJackDaniels", + "ItemSodaEmpty", + "ItemSodaCoke", + "ItemSodaPepsi", + "FoodCanBakedBeans", + "FoodCanSardines", + "FoodCanFrankBeans", + "FoodCanPasta", + "8Rnd_9x18_Makarov", + "7Rnd_45ACP_1911", + "2Rnd_shotgun_74Slug", + "2Rnd_shotgun_74Pellets", + "ItemBandage", + "ItemPainkiller", + "FoodBioMeat", + "8Rnd_9x18_MakarovSD", "ItemBriefcaseEmpty" }, { + 0.07, + 0.09, + 0.09, + 0.09, + 0.09, + 0.05, + 0.05, + 0.05, + 0.05, + 0.07, + 0.05, + 0.05, + 0.05, + 0.06, + 0.06, + 0.01, + 0.01, 0.01 } }; food[] = { - { }, - { } + { + //trash + "TrashTinCan", + "TrashJackDaniels", + "ItemSodaEmpty", + "ItemSodaCoke", + "ItemSodaPepsi", + "FoodCanBakedBeans", + "FoodCanSardines", + "FoodCanFrankBeans", + "FoodCanPasta", + "FoodCanUnlabeled", + // food Bags + "FoodPistachio", + "FoodNutmix" + }, + { + //trash + 0.09, + 0.12, + 0.12, + 0.09, + 0.11, + 0.07, + 0.07, + 0.07, + 0.07, + 0.1, + // food Bags + 0.05, + 0.04 + } }; office[] = { { + "FoodCanUnlabeled", + "ItemSodaEmpty", + "ItemSodaCoke", + "ItemSodaPepsi", + "TrashJackDaniels", + "FoodCanBakedBeans", + "FoodCanSardines", + "FoodCanFrankBeans", + "FoodCanPasta", + "ItemWaterbottleUnfilled", + "ItemWaterbottle", + "ItemBandage", + "7Rnd_45ACP_1911", + "5x_22_LR_17_HMR", + "10x_303", + "6Rnd_45ACP", + "2Rnd_shotgun_74Slug", + "2Rnd_shotgun_74Pellets", + "8Rnd_9x18_Makarov", + "15Rnd_W1866_Slug", + "WoodenArrow", + "HandRoadFlare", + "ItemPainkiller", + "HandChemGreen", + "HandChemBlue", + "HandChemRed", + "ItemHeatPack", "ItemLockbox" }, { + 0.06, + 0.06, + 0.06, + 0.04, + 0.04, + 0.01, + 0.01, + 0.01, + 0.01, + 0.01, + 0.01, + 0.08, + 0.03, + 0.01, + 0.04, + 0.04, + 0.05, + 0.05, + 0.09, + 0.02, + 0.04, + 0.07, + 0.02, + 0.01, + 0.03, + 0.03, + 0.03, 0.04 } }; generic[] = { - { }, - { } + { + "FoodCanUnlabeled", + "ItemSodaEmpty", + "ItemSodaCoke", + "ItemSodaPepsi", + "TrashJackDaniels", + "FoodCanBakedBeans", + "FoodCanSardines", + "FoodCanFrankBeans", + "FoodCanPasta", + "ItemWaterbottleUnfilled", + "ItemWaterbottle", + "ItemBandage", + "7Rnd_45ACP_1911", + "5x_22_LR_17_HMR", + "10x_303", + "6Rnd_45ACP", + "2Rnd_shotgun_74Slug", + "2Rnd_shotgun_74Pellets", + "8Rnd_9x18_Makarov", + "15Rnd_W1866_Slug", + "WoodenArrow", + "HandRoadFlare", + "ItemPainkiller", + "HandChemGreen", + "HandChemBlue", + "HandChemRed", + "ItemHeatPack" + }, + { + 0.06, + 0.06, + 0.06, + 0.04, + 0.04, + 0.01, + 0.01, + 0.01, + 0.01, + 0.01, + 0.01, + 0.11, + 0.03, + 0.01, + 0.04, + 0.04, + 0.05, + 0.05, + 0.09, + 0.02, + 0.04, + 0.07, + 0.02, + 0.01, + 0.03, + 0.03, + 0.04 + } }; medical[] = { - { }, - { } + { + "ItemBandage", + "ItemPainkiller", + "ItemMorphine", + "ItemEpinephrine", + "ItemAntibiotic", + "ItemHeatPack" + }, + { + 0.4, + 0.15, + 0.2, + 0.1, + 0.1, + 0.05 + } }; hospital[] = { - { }, - { } + { + "ItemBandage", + "ItemPainkiller", + "ItemMorphine", + "ItemEpinephrine", + "ItemBloodbag", + "ItemAntibiotic" + }, + { + 0.33, + 0.16, + 0.13, + 0.09, + 0.17, + 0.12 + } }; military[] = { { - "FoodMRE" + "FoodCanUnlabeled", + "ItemSodaEmpty", + "ItemSodaCoke", + "ItemSodaPepsi", + "ItemBandage", + "ItemAntibiotic", + "ItemPainkiller", + "ItemMorphine", + "30Rnd_556x45_Stanag", + "20Rnd_762x51_DMR", + "17Rnd_9x19_glock17", + "15Rnd_9x19_M9SD", + "15Rnd_9x19_M9", + "30Rnd_762x39_AK47", + "30Rnd_545x39_AK", + "5Rnd_762x51_M24", + "5Rnd_86x70_L115A1", + "8Rnd_B_Beneli_74Slug", + "1Rnd_HE_M203", + "FlareWhite_M203", + "FlareGreen_M203", + "1Rnd_Smoke_M203", + "200Rnd_556x45_M249", + "HandGrenade_west", + "HandGrenade_east", + "SmokeShell", + "SmokeShellRed", + "SmokeShellGreen", + "8Rnd_B_Beneli_Pellets", + "30Rnd_556x45_StanagSD", + "30Rnd_9x19_MP5", + "30Rnd_9x19_MP5SD", + "100Rnd_762x51_M240", + "HandChemGreen", + "HandChemBlue", + "HandChemRed", + "ItemHeatPack", + "FoodMRE", + "8Rnd_9x18_MakarovSD", + "20Rnd_B_765x17_Ball", + "30Rnd_9x19_UZI_SD" }, { - 0.03 + 0.09, + 0.04, + 0.01, + 0.01, + 0.04, + 0.04, + 0.04, + 0.01, + 0.04, + 0.04, + 0.05, + 0.01, + 0.02, + 0.04, + 0.04, + 0.01, + 0.01, + 0.04, + 0.01, + 0.01, + 0.01, + 0.01, + 0.01, + 0.01, + 0.01, + 0.04, + 0.02, + 0.02, + 0.04, + 0.01, + 0.02, + 0.01, + 0.01, + 0.02, + 0.02, + 0.02, + 0.04, + 0.03, + 0.01, + 0.04, + 0.01, } }; policeman[] = { { - "FoodMRE" + "ItemBandage", + "7Rnd_45ACP_1911", + "6Rnd_45ACP", + "15Rnd_W1866_Slug", + "8Rnd_B_Beneli_Pellets", + "HandRoadFlare", + "8Rnd_9x18_MakarovSD", + "ItemComboLock", + "SmokeShell", + "FoodMRE", + "ItemHotwireKit" }, { - 0.04 + 0.3, + 0.08, + 0.08, + 0.14, + 0.17, + 0.08, + 0.01, + 0.05, + 0.04, + 0.04, + 0.01 } }; hunter[] = { { - "FoodMRE" + "ItemBandage", + "5x_22_LR_17_HMR", + "7Rnd_45ACP_1911", + "10x_303", + "ItemWaterbottleUnfilled", + "WoodenArrow", + "ItemHeatPack", + "FoodMRE", + "FoodNutmix" }, { - 0.01 + 0.4, + 0.17, + 0.03, + 0.1, + 0.05, + 0.2, + 0.02, + 0.01, + 0.02 } }; worker[] = { { + "FoodCanUnlabeled", + "TrashJackDaniels", + "ItemSodaEmpty", + "ItemSodaCoke", + "ItemSodaPepsi", + "FoodCanBakedBeans", + "FoodCanSardines", + "FoodCanFrankBeans", + "FoodCanPasta", + "ItemBandage", + "ItemPainkiller", "ItemWire", - "ItemTankTrap" + "ItemTankTrap", + "ItemComboLock", + "ItemSledgeHead" }, { + 0.09, + 0.10, + 0.10, + 0.11, + 0.10, + 0.06, + 0.06, + 0.06, + 0.06, + 0.1, + 0.06, 0.01, - 0.03 + 0.03, + 0.04, + 0.02 } }; diff --git a/SQF/dayz_code/config.cpp b/SQF/dayz_code/config.cpp index a100f65b3..63dc8c764 100644 --- a/SQF/dayz_code/config.cpp +++ b/SQF/dayz_code/config.cpp @@ -508,6 +508,8 @@ class CfgBuildingLoot { lootPosZombie[] = {}; itemType[] = {}; itemChance[] = {}; + itemTypeSmall[] = {}; + itemChanceSmall[] = {}; hangPos[] = {}; vehPos[] = {}; }; @@ -526,34 +528,34 @@ class CfgBuildingLoot { lootChance = 0.4; lootPos[] = {}; itemType[] = { - { "ItemSodaMdew","magazine" }, - { "ItemSodaRbull","magazine" }, - { "ItemSodaOrangeSherbet","magazine" }, - { "ItemWatch","generic" }, - { "ItemCompass","generic" }, - { "ItemMap","weapon" }, - { "Makarov","weapon" }, - { "MakarovSD","weapon" }, - { "Colt1911","weapon" }, - { "ItemFlashlight","generic" }, - { "ItemKnife","generic" }, - { "ItemMatchbox","generic" }, - { "","generic" }, - { "LeeEnfield","weapon" }, - { "revolver_EP1","weapon" }, - { "backpacks","backpack" }, - { "Winchester1866","weapon" }, - { "tents","single" }, - { "","military" }, - { "","trash" }, - { "Crossbow_DZ","weapon" }, - { "Binocular","weapon" }, - { "PartPlywoodPack","magazine" }, - { "clothes","single" }, - { "specialclothes","single" }, - { "WeaponHolder_MeleeCrowbar","object" }, - {"MR43","weapon"}, - }; + { "ItemSodaMdew","magazine" }, + { "ItemSodaRbull","magazine" }, + { "ItemSodaOrangeSherbet","magazine" }, + { "ItemWatch","generic" }, + { "ItemCompass","generic" }, + { "ItemMap","weapon" }, + { "Makarov","weapon" }, + { "MakarovSD","weapon" }, + { "Colt1911","weapon" }, + { "ItemFlashlight","generic" }, + { "ItemKnife","generic" }, + { "ItemMatchbox","generic" }, + { "","generic" }, + { "LeeEnfield","weapon" }, + { "revolver_EP1","weapon" }, + { "backpacks","backpack" }, + { "Winchester1866","weapon" }, + { "tents","single" }, + { "","military" }, + { "","trash" }, + { "Crossbow_DZ","weapon" }, + { "Binocular","weapon" }, + { "PartPlywoodPack","magazine" }, + { "clothes","single" }, + { "specialclothes","single" }, + { "WeaponHolder_MeleeCrowbar","object" }, + {"MR43","weapon"}, + }; itemChance[] = { 0.01, 0.01, @@ -582,6 +584,52 @@ class CfgBuildingLoot { 0.01, 0.03, 0.01 + }; + itemTypeSmall[] = { + { "ItemSodaMdew","magazine" }, + { "ItemSodaRbull","magazine" }, + { "ItemSodaOrangeSherbet","magazine" }, + { "ItemWatch","generic" }, + { "ItemCompass","generic" }, + { "ItemMap","weapon" }, + { "Makarov","weapon" }, + { "MakarovSD","weapon" }, + { "Colt1911","weapon" }, + { "ItemFlashlight","generic" }, + { "ItemKnife","generic" }, + { "ItemMatchbox","generic" }, + { "","generic" }, + { "revolver_EP1","weapon" }, + { "backpacks","backpack" }, + { "tents","single" }, + { "","military" }, + { "","trash" }, + { "Binocular","weapon" }, + { "clothes","single" }, + { "specialclothes","single" }, + }; + itemChanceSmall[] = { + 0.01, + 0.01, + 0.01, + 0.04, + 0.03, + 0.02, + 0.05, + 0.01, + 0.02, + 0.01, + 0.04, + 0.01, + 0.36, + 0.02, + 0.04, + 0.01, + 0.02, + 0.14, + 0.02, + 0.01, + 0.01 }; }; class Office: Default { @@ -618,7 +666,7 @@ class CfgBuildingLoot { { "specialclothes","single" }, { "WeaponHolder_MeleeCrowbar","object" }, { "ItemBriefcaseEmpty","magazine" }, - }; + }; itemChance[] = { 0.01, 0.01, @@ -648,6 +696,52 @@ class CfgBuildingLoot { 0.03, 0.01 }; + itemTypeSmall[] = { + { "ItemSodaMdew","magazine" }, + { "ItemSodaRbull","magazine" }, + { "ItemSodaOrangeSherbet","magazine" }, + { "ItemWatch","generic" }, + { "ItemCompass","generic" }, + { "ItemMap","weapon" }, + { "Makarov","weapon" }, + { "MakarovSD","weapon" }, + { "Colt1911","weapon" }, + { "ItemFlashlight","generic" }, + { "ItemKnife","generic" }, + { "ItemMatchbox","generic" }, + { "","generic" }, + { "revolver_EP1","weapon" }, + { "backpacks","backpack" }, + { "tents","single" }, + { "","military" }, + { "","trash" }, + { "Binocular","weapon" }, + { "clothes","single" }, + { "specialclothes","single" }, + }; + itemChanceSmall[] = { + 0.01, + 0.01, + 0.01, + 0.04, + 0.03, + 0.02, + 0.06, + 0.01, + 0.02, + 0.01, + 0.04, + 0.01, + 0.31, + 0.02, + 0.04, + 0.01, + 0.02, + 0.18, + 0.02, + 0.01, + 0.01 + }; }; class Industrial: Default { zombieChance = 0.4; @@ -677,7 +771,7 @@ class CfgBuildingLoot { {"ItemKeyKit","weapon"}, {"CinderBlocks","magazine"}, {"MortarBucket","magazine"} - }; + }; itemChance[] = { 0.01, 0.01, @@ -701,6 +795,20 @@ class CfgBuildingLoot { 0.03, 0.01 }; + itemTypeSmall[] = { + { "","generic" }, + { "","trash" }, + { "","military" }, + { "ItemKnife","military" }, + {"ItemKeyKit","weapon"} + }; + itemChanceSmall[] = { + 0.16, + 0.25, + 0.04, + 0.07, + 0.01 + }; }; class IndustrialFuel: Default { zombieChance = 0.4; @@ -727,7 +835,7 @@ class CfgBuildingLoot { { "ItemWire","magazine" }, {"ItemTankTrap","magazine"}, {"ItemKeyKit","weapon"} - }; + }; itemChance[] = { 0.01, 0.01, @@ -748,6 +856,20 @@ class CfgBuildingLoot { 0.04, 0.01 }; + itemTypeSmall[] = { + { "","generic" }, + { "","trash" }, + { "","military" }, + { "ItemKnife","military" }, + {"ItemKeyKit","weapon"} + }; + itemChanceSmall[] = { + 0.18, + 0.28, + 0.04, + 0.07, + 0.01 + }; }; class Farm: Default { zombieChance = 0.3; @@ -771,7 +893,7 @@ class CfgBuildingLoot { { "ItemFishingPole","weapon" }, { "ItemLightBulb","magazine"}, { "ItemSledgeHandle","magazine"} - }; + }; itemChance[] = { 0.05, 0.3, @@ -789,6 +911,16 @@ class CfgBuildingLoot { 0.02, 0.01 }; + itemTypeSmall[] = { + { "","generic" }, + { "","trash" }, + { "ItemSledgeHandle","magazine"} + }; + itemChanceSmall[] = { + 0.3, + 0.26, + 0.01 + }; }; class Supermarket: Default { lootChance = 0.6; @@ -820,7 +952,7 @@ class CfgBuildingLoot { { "Binocular","weapon" }, { "PartPlywoodPack","magazine" }, {"MR43","weapon"} - }; + }; itemChance[] = { 0.01, 0.01, @@ -846,6 +978,46 @@ class CfgBuildingLoot { 0.02, 0.01 }; + itemTypeSmall[] = { + { "ItemSodaMdew","magazine" }, + { "ItemSodaRbull","magazine" }, + { "ItemSodaOrangeSherbet","magazine" }, + { "ItemWatch","generic" }, + { "ItemCompass","generic" }, + { "ItemMap","weapon" }, + { "Makarov","weapon" }, + { "Colt1911","weapon" }, + { "ItemFlashlight","generic" }, + { "ItemKnife","generic" }, + { "ItemMatchbox","generic" }, + { "","generic" }, + { "revolver_EP1","weapon" }, + { "backpacks","backpack" }, + { "tents","single" }, + { "","food" }, + { "","trash" }, + { "Binocular","weapon" }, + }; + itemChanceSmall[] = { + 0.01, + 0.01, + 0.01, + 0.07, + 0.02, + 0.04, + 0.02, + 0.01, + 0.01, + 0.02, + 0.04, + 0.04, + 0.01, + 0.07, + 0.01, + 0.30, + 0.20, + 0.05 + }; }; class HeliCrash: Default { zombieChance = 0.4; @@ -972,7 +1144,7 @@ class HeliCrash_No50s: Default { 0.01, 0.01, 0.01, - 0.01, + 0.01 }; }; class Hospital: Default { @@ -986,12 +1158,20 @@ class HeliCrash_No50s: Default { { "","trash" }, { "","hospital" }, {"MedBox0","object"} - }; + }; itemChance[] = { 0.1, 0.7, 0.2 }; + itemTypeSmall[] = { + { "","trash" }, + { "","hospital" } + }; + itemChanceSmall[] = { + 0.1, + 0.9 + }; }; class Military: Default { zombieChance = 0.3; @@ -1036,7 +1216,7 @@ class HeliCrash_No50s: Default { {"Sa58P_EP1","weapon"}, {"Sa58V_EP1","weapon"}, {"BAF_L85A2_RIS_Holo","weapon"} - }; + }; itemChance[] = { 0.01, 0.01, @@ -1075,6 +1255,38 @@ class HeliCrash_No50s: Default { 0.02, 0.01 }; + itemTypeSmall[] = { + { "M9","weapon" }, + { "M9SD","weapon" }, + { "glock17_EP1","weapon" }, + { "Binocular","weapon" }, + { "ItemFlashlightRed","military" }, + { "ItemKnife","military" }, + { "ItemGPS","weapon" }, + { "ItemMap","military" }, + { "militarybackpacks","backpack" }, + { "","medical" }, + { "","generic" }, + { "","military" }, + { "UZI_SD_EP1","weapon"}, + { "ItemEtool","weapon" } + }; + itemChanceSmall[] = { + 0.01, + 0.01, + 0.02, + 0.03, + 0.04, + 0.01, + 0.01, + 0.02, + 0.05, + 0.03, + 0.1, + 0.35, + 0.01, + 0.02 + }; }; class MilitaryIndustrial: Default { zombieChance = 0.3; @@ -1121,8 +1333,7 @@ class HeliCrash_No50s: Default { {"BAF_L85A2_RIS_Holo","weapon"}, {"ItemFuelBarrel","magazine"}, {"ItemFuelPump","magazine"} - - }; + }; itemChance[] = { 0.01, 0.01, @@ -1163,6 +1374,38 @@ class HeliCrash_No50s: Default { 0.01, 0.01 }; + itemTypeSmall[] = { + { "M9","weapon" }, + { "M9SD","weapon" }, + { "UZI_EP1","weapon" }, + { "glock17_EP1","weapon" }, + { "Binocular","weapon" }, + { "ItemFlashlightRed","military" }, + { "ItemKnife","military" }, + { "ItemGPS","weapon" }, + { "militarybackpacks","backpack" }, + { "","medical" }, + { "","generic" }, + { "","military" }, + { "UZI_SD_EP1","weapon"}, + { "ItemEtool","weapon" } + }; + itemChanceSmall[] = { + 0.01, + 0.01, + 0.02, + 0.02, + 0.03, + 0.04, + 0.01, + 0.01, + 0.05, + 0.03, + 0.06, + 0.35, + 0.01, + 0.02 + }; }; class MilitarySpecial: Default { zombieChance = 0.4; @@ -1275,6 +1518,54 @@ class HeliCrash_No50s: Default { 0.01, 0.01, }; + itemTypeSmall[] = { + { "M9SD","weapon" }, + { "glock17_EP1","weapon" }, + { "AmmoBoxSmall_556","object" }, + { "AmmoBoxSmall_762","object" }, + { "Binocular","weapon" }, + { "ItemFlashlightRed","military" }, + { "ItemKnife","military" }, + { "ItemGPS","weapon" }, + { "ItemMap","military" }, + { "Binocular_Vector","military" }, + { "militarybackpacks","backpack" }, + { "","medical" }, + { "","generic" }, + { "","military" }, + {"100Rnd_762x54_PK","magazine"}, + { "militaryclothes","single" }, + {"NVGoggles","weapon"}, + {"2000Rnd_762x51_M134","magazine"}, + {"29Rnd_30mm_AGS30","magazine"}, + {"50Rnd_127x107_DSHKM","magazine"}, + {"48Rnd_40mm_MK19","magazine"}, + {"100Rnd_127x99_M2","magazine"}, + }; + itemChanceSmall[] = { + 0.04, + 0.04, + 0.02, + 0.02, + 0.02, + 0.01, + 0.03, + 0.04, + 0.03, + 0.03, + 0.05, + 0.03, + 0.09, + 0.32, + 0.03, + 0.03, + 0.03, + 0.02, + 0.03, + 0.03, + 0.03, + 0.03 + }; }; class Hunting: Default { zombieChance = 0.4; @@ -1305,6 +1596,22 @@ class HeliCrash_No50s: Default { 0.02, 0.5 }; + itemTypeSmall[] = { + {"ItemMap","weapon"}, + {"ItemFlashlight","generic"}, + {"ItemKnife","generic"}, + {"ItemMatchbox","generic"}, + {"","military"}, + {"","hunter"} + }; + itemChanceSmall[] = { + 0.02, + 0.02, + 0.02, + 0.04, + 0.4, + 0.5 + }; }; class Church: Residential { minRoaming = 1; From a86568934e703478a255d95fbb03c12e48defb82 Mon Sep 17 00:00:00 2001 From: Zac Surplice Date: Sun, 6 Oct 2013 08:12:16 +1100 Subject: [PATCH 3/4] CfgLootSmall Update2 --- SQF/dayz_code/Configs/cfgLoot.hpp | 2 ++ SQF/dayz_code/config.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/SQF/dayz_code/Configs/cfgLoot.hpp b/SQF/dayz_code/Configs/cfgLoot.hpp index 3749a4ed4..0502091b7 100644 --- a/SQF/dayz_code/Configs/cfgLoot.hpp +++ b/SQF/dayz_code/Configs/cfgLoot.hpp @@ -1,3 +1,5 @@ +#include "CfgLootSmall.hpp" + class CfgLoot { trash[] = { { diff --git a/SQF/dayz_code/config.cpp b/SQF/dayz_code/config.cpp index 63dc8c764..4db1a9a92 100644 --- a/SQF/dayz_code/config.cpp +++ b/SQF/dayz_code/config.cpp @@ -1516,7 +1516,7 @@ class HeliCrash_No50s: Default { 0.01, 0.01, 0.01, - 0.01, + 0.01 }; itemTypeSmall[] = { { "M9SD","weapon" }, From 8ae2fbb588eccdd95fe331d6cfa8e9ba7f613807 Mon Sep 17 00:00:00 2001 From: Zac Surplice Date: Sun, 6 Oct 2013 09:53:08 +1100 Subject: [PATCH 4/4] small loot spawns --- SQF/dayz_code/compile/building_spawnLoot.sqf | 6 +-- SQF/dayz_code/init/loot_init.sqf | 43 +++++++++++++++++++- 2 files changed, 45 insertions(+), 4 deletions(-) diff --git a/SQF/dayz_code/compile/building_spawnLoot.sqf b/SQF/dayz_code/compile/building_spawnLoot.sqf index 9e392b486..75861949f 100644 --- a/SQF/dayz_code/compile/building_spawnLoot.sqf +++ b/SQF/dayz_code/compile/building_spawnLoot.sqf @@ -36,14 +36,14 @@ _positionsSmall = [] + getArray (_config >> "lootPosSmall"); _iPos = _obj modelToWorld _x; _nearBy = nearestObjects [_iPos, ["ReammoBox","WeaponHolder","WeaponHolderBase"], 1]; if (count _nearBy == 0) then { - _index = dayz_CBLBase find _type; + _index = dayzE_CBLSBase find _type; //diag_log format["Found %2 at index: %1", _index,_type]; - _weights = dayz_CBLChances select _index; + _weights = dayzE_CBLSChances select _index; _cntWeights = count _weights; _index = floor(random _cntWeights); _index = _weights select _index; _itemType = _itemTypes select _index; - [_itemType select 0, _itemType select 1 , _iPos, 0.0] call spawn_loot_small; + [_itemType select 0, _itemType select 1 , _iPos, 0.0] call spawn_loot_small; _obj setVariable ["created",(DateToNumber date),true]; }; }; diff --git a/SQF/dayz_code/init/loot_init.sqf b/SQF/dayz_code/init/loot_init.sqf index a35fba0e0..a2ed91016 100644 --- a/SQF/dayz_code/init/loot_init.sqf +++ b/SQF/dayz_code/init/loot_init.sqf @@ -2,11 +2,13 @@ private["_cfgCount","_config","_i","_itemChances","_itemCount","_weighted","_j", dayz_CBLChances = []; dayz_CBLBase = []; +dayzE_CBLSChances = []; +dayzE_CBLSBase = []; + _config = configFile >> "CfgBuildingLoot"; for "_i" from 0 to ((count _config) - 1) do { _classname = toLower(configName (_config select _i)); _itemChances = [] + getArray (_config >> _classname >> "ItemChance"); - _itemChancesSmall = [] + getArray (_config >> _classname >> "ItemChanceSmall"); _itemCount = count _itemChances; if (_itemCount > 0) then { if (dayz_CBLBase find _classname < 0) then { @@ -26,6 +28,27 @@ for "_i" from 0 to ((count _config) - 1) do { dayz_CBLChances set [count dayz_CBLChances, [0]]; dayz_CBLBase set [count dayz_CBLBase, _classname]; }; + + _itemChancesSmall = [] + getArray (_config >> _classname >> "ItemChanceSmall"); + _itemCountSmall = count _itemChancesSmall; + if (_itemCountSmall > 0) then { + if (dayzE_CBLSBase find _classname < 0) then { + _weighted = []; + _j = 0; + for "_l" from 0 to ((count _itemChancesSmall) - 1) do { + _weight = round ((_itemChancesSmall select _l) * 100); + for "_k" from 0 to _weight - 1 do { + _weighted set [_j + _k, _l]; + }; + _j = _j + _weight; + }; + dayzE_CBLSChances set [count dayzE_CBLSChances, _weighted]; + dayzE_CBLSBase set [count dayzE_CBLSBase, _classname]; + }; + } else { + dayzE_CBLSChances set [count dayzE_CBLSChances, [0]]; + dayzE_CBLSBase set [count dayzE_CBLSBase, _classname]; + }; }; dayz_CLChances = []; @@ -46,6 +69,24 @@ for "_i" from 0 to ((count (_config)) - 1) do { dayz_CLChances set [count dayz_CLChances, _weighted]; }; +dayzE_CLSChances = []; +dayzE_CLSBase = []; +_config = configFile >> "cfgLootSmall"; +for "_i" from 0 to ((count (_config)) - 1) do { + _itemChances = (getArray (_config select _i)) select 1; + _weighted = []; + _j = 0; + for "_l" from 0 to ((count _itemChances) - 1) do { + _weight = round ((_itemChances select _l) * 100); + for "_k" from 0 to _weight - 1 do { + _weighted set [_j + _k, _l]; + }; + _j = _j + _weight; + }; + dayzE_CLSBase set [count dayzE_CLSBase, configName (_config select _i)]; + dayzE_CLSChances set [count dayzE_CLSChances, _weighted]; +}; + private["_i","_type","_config","_canZombie","_canLoot"]; dayz_ZombieBuildings = []; dayz_LootBuildings = [];