fixed weapon loot spawning

This commit is contained in:
[VB]AWOL
2014-06-01 12:23:07 -05:00
parent 00383dd8d0
commit 77697cd8ee
3 changed files with 70 additions and 53 deletions

View File

@@ -54,16 +54,13 @@ class CfgBuildingLoot {
lootChance = 0.4; lootChance = 0.4;
lootPos[] = {}; lootPos[] = {};
lootType[] = { lootType[] = {
{"ItemSodaMdew","magazine",0.01},
{"ItemSodaRbull","magazine",0.01},
{"ItemSodaOrangeSherbet","magazine",0.02},
{"ItemWatch","generic",0.04}, {"ItemWatch","generic",0.04},
{"ItemCompass","generic",0.03}, {"ItemCompass","generic",0.03},
{"ItemMap","weapon",0.02}, {"ItemMap","weapon",0.02},
{"ItemFlashlight","generic",0.01}, {"ItemFlashlight","generic",0.01},
{"ItemKnife","generic",0.04}, {"ItemKnife","generic",0.04},
{"ItemMatchbox_DZE","generic",0.01}, {"ItemMatchbox_DZE","generic",0.01},
{"","generic",0.36}, {"","generic",0.32},
{"backpacks","backpacks",0.04}, {"backpacks","backpacks",0.04},
{"tents","tents",0.01}, {"tents","tents",0.01},
{"","military",0.02}, {"","military",0.02},
@@ -72,7 +69,9 @@ class CfgBuildingLoot {
{"PartPlywoodPack","magazine",0.02}, {"PartPlywoodPack","magazine",0.02},
{"clothes","clothes",0.01}, {"clothes","clothes",0.01},
{"specialclothes","specialclothes",0.01}, {"specialclothes","specialclothes",0.01},
{"WeaponHolder_MeleeCrowbar","object",0.03} {"WeaponHolder_MeleeCrowbar","object",0.03},
{"pistols", "cfglootweapon", 0.04 },
{"shotgunsingleshot", "cfglootweapon", 0.04 }
}; };
lootTypeSmall[] = { lootTypeSmall[] = {
{ "ItemSodaMdew","magazine",0.01 }, { "ItemSodaMdew","magazine",0.01 },
@@ -100,9 +99,6 @@ class CfgBuildingLoot {
lootChance = 0.4; lootChance = 0.4;
lootPos[] = {}; lootPos[] = {};
lootType[] = { lootType[] = {
{"ItemSodaMdew","magazine",0.01},
{"ItemSodaRbull","magazine",0.01},
{"ItemSodaOrangeSherbet","magazine",0.02},
{"ItemWatch","generic",0.04}, {"ItemWatch","generic",0.04},
{"ItemCompass","generic",0.03}, {"ItemCompass","generic",0.03},
{"ItemMap","weapon",0.02}, {"ItemMap","weapon",0.02},
@@ -120,7 +116,7 @@ class CfgBuildingLoot {
{"specialclothes","specialclothes",0.01}, {"specialclothes","specialclothes",0.01},
{"WeaponHolder_MeleeCrowbar","object",0.03}, {"WeaponHolder_MeleeCrowbar","object",0.03},
{"ItemBriefcaseEmpty","magazine",0.01}, {"ItemBriefcaseEmpty","magazine",0.01},
{"ItemDocument","magazine",0.01} { "shotgunsingleshot", "cfglootweapon", 0.05},
}; };
lootTypeSmall[] = { lootTypeSmall[] = {
{ "ItemSodaMdew","magazine",0.01 }, { "ItemSodaMdew","magazine",0.01 },
@@ -221,14 +217,15 @@ class CfgBuildingLoot {
lootType[] = { lootType[] = {
{"ItemJerrycan","magazine",0.05}, {"ItemJerrycan","magazine",0.05},
{"","generic",0.3}, {"","generic",0.3},
{"","trash",0.26}, {"","trash",0.11},
{"PartPlankPack","magazine",0.06}, {"PartPlankPack","magazine",0.06},
{"WeaponHolder_ItemHatchet_DZE","object",0.05}, {"WeaponHolder_ItemHatchet_DZE","object",0.05},
{"ItemFuelBarrelEmpty","magazine",0.01}, {"ItemFuelBarrelEmpty","magazine",0.01},
{"WeaponHolder_ItemMachete","object",0.03}, {"WeaponHolder_ItemMachete","object",0.03},
{"ItemFishingPole","weapon",0.02}, {"ItemFishingPole","weapon",0.02},
{"ItemLightBulb","magazine",0.02}, {"ItemLightBulb","magazine",0.02},
{"ItemSledgeHandle","magazine",0.02} {"ItemSledgeHandle","magazine",0.02},
{ "farmweapons", "cfglootweapon", 0.15},
}; };
lootTypeSmall[] = { lootTypeSmall[] = {
{ "","generic", 0.79}, { "","generic", 0.79},
@@ -258,10 +255,11 @@ class CfgBuildingLoot {
{"backpacks","backpacks",0.07}, {"backpacks","backpacks",0.07},
{"tents","tents",0.01}, {"tents","tents",0.01},
{"","food",0.3}, {"","food",0.3},
{"","trash",0.23}, {"","trash",0.17},
{"Binocular","weapon",0.05}, {"Binocular","weapon",0.05},
{"PartPlywoodPack","magazine",0.02}, {"PartPlywoodPack","magazine",0.02},
{"ItemMixOil","magazine",0.02} { "pistols", "cfglootweapon", 0.04},
{ "shotgunsingleshot", "cfglootweapon", 0.04}
}; };
lootTypeSmall[] = { lootTypeSmall[] = {
{ "ItemSodaMdew","magazine",0.01 }, { "ItemSodaMdew","magazine",0.01 },
@@ -288,6 +286,10 @@ class CfgBuildingLoot {
lootChance = 0.5; lootChance = 0.5;
lootPos[] = {}; lootPos[] = {};
lootType[] = { lootType[] = {
{ "assaultrifles", "cfglootweapon", 0.10 },
{ "submachinegun", "cfglootweapon", 0.04 },
{ "sniperrifles", "cfglootweapon", 0.07 },
{ "machineguns", "cfglootweapon", 0.06 },
{"","military",0.3}, {"","military",0.3},
{"","medical",0.18}, {"","medical",0.18},
{"MAAWS","weapon",0.02}, {"MAAWS","weapon",0.02},
@@ -306,15 +308,19 @@ class CfgBuildingLoot {
lootChance = 0.5; lootChance = 0.5;
lootPos[] = {}; lootPos[] = {};
lootType[] = { lootType[] = {
{"","military",0.35}, { "assaultrifles", "cfglootweapon", 0.10 },
{"","medical",0.18}, { "submachinegun", "cfglootweapon", 0.04 },
{"MAAWS","weapon",0.02}, { "sniperrifles", "cfglootweapon", 0.07 },
{"MedBox0","object",0.05}, { "machineguns", "cfglootweapon", 0.06 },
{"NVGoggles","weapon",0.01}, { "", "military", 0.3 },
{"AmmoBoxSmall_556","object",0.03}, { "", "medical", 0.18 },
{"AmmoBoxSmall_762","object",0.03}, { "MAAWS", "weapon", 0.02 },
{"militaryclothes","militaryclothes",0.05}, { "MedBox0", "object", 0.05 },
{"militaryammo","militaryammo",0.06} { "NVGoggles", "weapon", 0.01 },
{ "AmmoBoxSmall_556", "object", 0.03 },
{ "AmmoBoxSmall_762", "object", 0.03 },
{ "militaryclothes", "militaryclothes", 0.05 },
{ "militaryammo", "militaryammo", 0.06 }
}; };
}; };
class Hospital: Default { class Hospital: Default {
@@ -341,6 +347,11 @@ class CfgBuildingLoot {
lootChance = 0.4; lootChance = 0.4;
lootPos[] = {}; lootPos[] = {};
lootType[] = { lootType[] = {
{ "pistols", "cfglootweapon", 0.04},
{ "assaultrifles", "cfglootweapon", 0.13 },
{ "sniperrifles", "cfglootweapon", 0.04 },
{ "shotgunsingleshot", "cfglootweapon", 0.06 },
{ "submachinegun", "cfglootweapon", 0.07 },
{"Binocular","weapon",0.03}, {"Binocular","weapon",0.03},
{"ItemFlashlightRed","military",0.04}, {"ItemFlashlightRed","military",0.04},
{"ItemKnife","military",0.01}, {"ItemKnife","military",0.01},
@@ -351,7 +362,8 @@ class CfgBuildingLoot {
{"","generic",0.1}, {"","generic",0.1},
{"","military",0.3}, {"","military",0.3},
{"ItemEtool","weapon",0.02}, {"ItemEtool","weapon",0.02},
{"ItemSandbag","magazine",0.02} {"ItemSandbag","magazine",0.02},
{ "machineguns", "cfglootweapon", 0.03 }
}; };
lootTypeSmall[] = { lootTypeSmall[] = {
{ "pistols","cfglootweapon",0.15 }, { "pistols","cfglootweapon",0.15 },
@@ -374,6 +386,13 @@ class CfgBuildingLoot {
lootChance = 0.4; lootChance = 0.4;
lootPos[] = {}; lootPos[] = {};
lootType[] = { lootType[] = {
{ "pistols", "cfglootweapon", 0.02 },
{ "assaultrifles", "cfglootweapon", 0.05 },
{ "PartGeneric", "magazine", 0.03 },
{ "sniperrifles", "cfglootweapon", 0.01 },
{ "shotgunsingleshot", "cfglootweapon", 0.05 },
{ "ItemGenerator", "magazine", 0.01 },
{ "submachinegun", "cfglootweapon", 0.05 },
{"PartGeneric","magazine",0.03}, {"PartGeneric","magazine",0.03},
{"ItemGenerator","magazine",0.01}, {"ItemGenerator","magazine",0.01},
{"PartWheel","magazine",0.02}, {"PartWheel","magazine",0.02},
@@ -389,7 +408,8 @@ class CfgBuildingLoot {
{"ItemEtool","weapon",0.03}, {"ItemEtool","weapon",0.03},
{"ItemSandbag","magazine",0.02}, {"ItemSandbag","magazine",0.02},
{"ItemFuelBarrelEmpty","magazine",0.03}, {"ItemFuelBarrelEmpty","magazine",0.03},
{"fuel_pump_kit","magazine",0.01} {"fuel_pump_kit","magazine",0.01},
{ "machineguns", "cfglootweapon", 0.01 }
}; };
lootTypeSmall[] = { lootTypeSmall[] = {
{ "pistols","cfglootweapon",0.12 }, { "pistols","cfglootweapon",0.12 },
@@ -411,6 +431,13 @@ class CfgBuildingLoot {
lootChance = 0.5; lootChance = 0.5;
lootPos[] = {}; lootPos[] = {};
lootType[] = { lootType[] = {
{ "pistols", "cfglootweapon", 0.02 },
{ "assaultrifles", "cfglootweapon", 0.05 },
{ "PartGeneric", "magazine", 0.03 },
{ "sniperrifles", "cfglootweapon", 0.01 },
{ "shotgunsingleshot", "cfglootweapon", 0.05 },
{ "ItemGenerator", "magazine", 0.01 },
{ "submachinegun", "cfglootweapon", 0.05 },
{"PartGeneric","magazine",0.03}, {"PartGeneric","magazine",0.03},
{"ItemGenerator","magazine",0.01}, {"ItemGenerator","magazine",0.01},
{"PartWheel","magazine",0.02}, {"PartWheel","magazine",0.02},
@@ -427,9 +454,12 @@ class CfgBuildingLoot {
{"","generic",0.25}, {"","generic",0.25},
{"","military",0.07}, {"","military",0.07},
{"ItemEtool","weapon",0.03}, {"ItemEtool","weapon",0.03},
{"ItemSandbag","magazine",0.02}, {"ItemSandbag","magazine",0.02},
{"ItemFuelBarrelEmpty","magazine",0.03}, {"ItemFuelBarrelEmpty","magazine",0.03},
{"fuel_pump_kit","magazine",0.01} {"fuel_pump_kit","magazine",0.01},
{ "machineguns", "cfglootweapon", 0.01 }
}; };
lootTypeSmall[] = { lootTypeSmall[] = {
{ "pistols", "cfglootweapon", 0.12 }, { "pistols", "cfglootweapon", 0.12 },
@@ -452,6 +482,12 @@ class CfgBuildingLoot {
lootChance = 0.4; lootChance = 0.4;
lootPos[] = {}; lootPos[] = {};
lootType[] = { lootType[] = {
{ "assaultrifles", "cfglootweapon", 0.1 },
{ "machineguns", "cfglootweapon", 0.04 },
{ "pistols", "cfglootweapon", 0.08 },
{ "sniperrifles", "cfglootweapon", 0.03 },
{ "militaryshotguns", "cfglootweapon", 0.05 },
{ "submachinegun", "cfglootweapon", 0.06 },
{"AmmoBoxSmall_556","object",0.01}, {"AmmoBoxSmall_556","object",0.01},
{"AmmoBoxSmall_762","object",0.02}, {"AmmoBoxSmall_762","object",0.02},
{"Binocular","weapon",0.01}, {"Binocular","weapon",0.01},
@@ -466,8 +502,7 @@ class CfgBuildingLoot {
{"","military",0.01}, {"","military",0.01},
{"machinegunammo","machinegunammo",0.05}, {"machinegunammo","machinegunammo",0.05},
{"militaryclothes","militaryclothes",0.05}, {"militaryclothes","militaryclothes",0.05},
{"NVGoggles","weapon",0.01}, {"NVGoggles","weapon",0.01}
{"100Rnd_762x54_PK","magazine",0.05}
}; };
lootTypeSmall[] = { lootTypeSmall[] = {
{ "pistols","cfglootweapon",0.10 }, { "pistols","cfglootweapon",0.10 },
@@ -502,6 +537,7 @@ class CfgBuildingLoot {
{"ItemFlashlight","generic",0.01}, {"ItemFlashlight","generic",0.01},
{"ItemKnife","generic",0.01}, {"ItemKnife","generic",0.01},
{"ItemMatchbox_DZE","generic",0.03}, {"ItemMatchbox_DZE","generic",0.03},
{ "farmweapons", "cfglootweapon", 0.03 },
{"","military",0.38}, {"","military",0.38},
{"WeaponHolder_ItemMachete","object",0.02}, {"WeaponHolder_ItemMachete","object",0.02},
{"","hunter",0.5} {"","hunter",0.5}

View File

@@ -867,28 +867,7 @@ class CfgMagazines {
}; };
}; };
}; };
class ItemFuelPump: CA_Magazine
{
scope = 2;
count = 1;
type = 256;
displayName = "Fuel Pump";
model = "\z\addons\dayz_epoch\models\supply_crate.p3d";
picture = "\z\addons\dayz_epoch\pictures\equip_wooden_crate_ca.paa";
descriptionShort = "Fuel Pumps can be used to create a refuel station";
weight = 25;
class ItemActions
{
class Build
{
text = $STR_ACTIONS_BUILD_EPOCH;
script = "spawn player_build;";
require[] = {"ItemToolbox"};
create = "FuelPump_DZ";
neednearby[] = {"fueltank"};
};
};
};
class ItemScaffoldingKit: CA_Magazine class ItemScaffoldingKit: CA_Magazine
{ {
scope = 2; scope = 2;

View File

@@ -101,12 +101,12 @@ switch (_iClass) do {
if (DZE_MissionLootTable) then{ if (DZE_MissionLootTable) then{
{ {
_itemTypes set[count _itemTypes, _x select 0] _itemTypes set[count _itemTypes, _x select 0]
} count getArray(missionConfigFile >> "cfgLoot" >> _iClass); } count getArray(missionConfigFile >> "cfgLoot" >> _iItem);
} }
else { else {
{ {
_itemTypes set[count _itemTypes, _x select 0] _itemTypes set[count _itemTypes, _x select 0]
} count getArray(configFile >> "cfgLoot" >> _iClass); } count getArray(configFile >> "cfgLoot" >> _iItem);
}; };
_index = dayz_CLBase find _iItem; _index = dayz_CLBase find _iItem;
_weights = dayz_CLChances select _index; _weights = dayz_CLChances select _index;
@@ -120,6 +120,7 @@ switch (_iClass) do {
case "backpack": case "backpack":
{ {
//Item is single backpack //Item is single backpack
_itemTypes = [];
if (DZE_MissionLootTable) then { if (DZE_MissionLootTable) then {
_itemTypes = ((getArray (missionConfigFile >> "cfgLoot" >> _iItem)) select 0); _itemTypes = ((getArray (missionConfigFile >> "cfgLoot" >> _iItem)) select 0);
} else { } else {
@@ -136,15 +137,16 @@ switch (_iClass) do {
}; };
case "cfglootweapon": case "cfglootweapon":
{ {
_itemTypes = [];
if (DZE_MissionLootTable) then{ if (DZE_MissionLootTable) then{
{ {
_itemTypes set[count _itemTypes, _x select 0] _itemTypes set[count _itemTypes, _x select 0]
} count getArray(missionConfigFile >> "cfgLoot" >> _iClass); } count getArray(missionConfigFile >> "cfgLoot" >> _iItem);
} }
else { else {
{ {
_itemTypes set[count _itemTypes, _x select 0] _itemTypes set[count _itemTypes, _x select 0]
} count getArray(configFile >> "cfgLoot" >> _iClass); } count getArray(configFile >> "cfgLoot" >> _iItem);
}; };
_index = dayz_CLBase find _iItem; _index = dayz_CLBase find _iItem;
_weights = dayz_CLChances select _index; _weights = dayz_CLChances select _index;