This commit is contained in:
[VB]AWOL
2014-01-14 12:01:48 -06:00
parent 20dab78c27
commit a5addbda5b
9 changed files with 89 additions and 16 deletions

View File

@@ -1,5 +1,6 @@
[NEW] Modular building spawning now ahead on server start, vehicles spawning after it. @Skaronator @zabn
[ADDED] Provide option to have loot tables loaded from mission file. DZE_MissionLootTable = true will look for loot configs via missionConfigFile. @vbawol
[ADDED] Added Craftable/Buildable Wood Crate Storage. Recipe 6 x PartWoodLumber = ItemWoodCrateKit. @Mochnant
[ADDED] BAF_Merlin_DZE - transportMaxWeapons 15, transportMaxMagazines 150, transportmaxbackpacks 5. @Skaronator
[ADDED] Added back BAF_AS50_scoped_DZ configs, still not on traders or loot tables. @vbawol

View File

@@ -12,8 +12,12 @@ switch (_iClass) do
{
//Item is food, add random quantity of cans along with an item (if exists)
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
_itemTypes = [] + ((getArray (configFile >> "cfgLoot" >> _iClass)) select 0);
_itemTypes = [];
if (DZE_MissionLootTable) then {
_itemTypes = ((getArray (missionConfigFile >> "cfgLoot" >> _iClass)) select 0);
} else {
_itemTypes = ((getArray (configFile >> "cfgLoot" >> _iClass)) select 0);
};
_index = dayz_CLBase find _iClass;
_weights = dayz_CLChances select _index;
_cntWeights = count _weights;
@@ -37,8 +41,12 @@ switch (_iClass) do
{
//Item is sigle, add 1 item from cfgloot
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
_itemTypes = [] + ((getArray (configFile >> "cfgLoot" >> _iItem)) select 0);
_itemTypes = [];
if (DZE_MissionLootTable) then {
_itemTypes = ((getArray (missionConfigFile >> "cfgLoot" >> _iItem)) select 0);
} else {
_itemTypes = ((getArray (configFile >> "cfgLoot" >> _iItem)) select 0);
};
_index = dayz_CLBase find _iItem;
_weights = dayz_CLChances select _index;
_cntWeights = count _weights;
@@ -51,7 +59,11 @@ switch (_iClass) do
case "backpack":
{
//Item is single backpack
_itemTypes = [] + ((getArray (configFile >> "cfgLoot" >> _iItem)) select 0);
if (DZE_MissionLootTable) then {
_itemTypes = ((getArray (missionConfigFile >> "cfgLoot" >> _iItem)) select 0);
} else {
_itemTypes = ((getArray (configFile >> "cfgLoot" >> _iItem)) select 0);
};
_index = dayz_CLBase find _iItem;
_weights = dayz_CLChances select _index;
_cntWeights = count _weights;
@@ -63,7 +75,11 @@ switch (_iClass) do
};
case "cfglootweapon":
{
_itemTypes = [] + ((getArray (configFile >> "cfgLoot" >> _iItem)) select 0);
if (DZE_MissionLootTable) then {
_itemTypes = ((getArray (missionConfigFile >> "cfgLoot" >> _iItem)) select 0);
} else {
_itemTypes = ((getArray (configFile >> "cfgLoot" >> _iItem)) select 0);
};
_index = dayz_CLBase find _iItem;
_weights = dayz_CLChances select _index;
_cntWeights = count _weights;

View File

@@ -13,8 +13,12 @@ switch (_iClass) do
{
//Item is sigle, add 1 item from CfgLootSmall
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
_itemTypes = [] + ((getArray (configFile >> "CfgLootSmall" >> _iClass)) select 0);
_itemTypes = [];
if (DZE_MissionLootTable) then {
_itemTypes = ((getArray (missionConfigFile >> "CfgLootSmall" >> _iClass)) select 0);
} else {
_itemTypes = ((getArray (configFile >> "CfgLootSmall" >> _iClass)) select 0);
};
_index = dayzE_CLSBase find _iClass;
_weights = dayzE_CLSChances select _index;
@@ -30,7 +34,12 @@ switch (_iClass) do
//Item is sigle, add 1 item from CfgLootSmall
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
_itemTypes = [] + ((getArray (configFile >> "CfgLootSmall" >> _iItem)) select 0);
_itemTypes = [];
if (DZE_MissionLootTable) then {
_itemTypes = ((getArray (missionConfigFile >> "CfgLootSmall" >> _iItem)) select 0);
} else {
_itemTypes = ((getArray (configFile >> "CfgLootSmall" >> _iItem)) select 0);
};
_index = dayzE_CLSBase find _iItem;
_weights = dayzE_CLSChances select _index;
_cntWeights = count _weights;
@@ -45,7 +54,12 @@ switch (_iClass) do
//Item is sigle, add 1 item from cfgloot
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
_itemTypes = [] + ((getArray (configFile >> "cfgLoot" >> _iItem)) select 0);
_itemTypes = [];
if (DZE_MissionLootTable) then {
_itemTypes = ((getArray (missionConfigFile >> "CfgLootSmall" >> _iItem)) select 0);
} else {
_itemTypes = ((getArray (configFile >> "CfgLootSmall" >> _iItem)) select 0);
};
_index = dayz_CLBase find _iItem;
_weights = dayz_CLChances select _index;
_cntWeights = count _weights;

View File

@@ -46,7 +46,14 @@ _rnd = random 1;
if (_rnd > 0.3) then {
_lootType = configFile >> "CfgVehicles" >> _type >> "zombieLoot";
if (isText _lootType) then {
_array = []+ getArray (configFile >> "cfgLoot" >> getText(_lootType));
_array = [];
if (DZE_MissionLootTable) then {
_array = getArray (missionConfigFile >> "cfgLoot" >> getText(_lootType));
} else {
_array = getArray (configFile >> "cfgLoot" >> getText(_lootType));
};
if (count _array > 0) then {
_loot = _array call BIS_fnc_selectRandomWeighted;
if(!isNil "_array") then {

View File

@@ -95,7 +95,13 @@ _rnd = random 1;
if (_rnd > 0.3) then {
_lootType = configFile >> "CfgVehicles" >> _type >> "zombieLoot";
if (isText _lootType) then {
_array = []+ getArray (configFile >> "cfgLoot" >> getText(_lootType));
_array = [];
if (DZE_MissionLootTable) then {
_array = getArray (missionConfigFile >> "cfgLoot" >> getText(_lootType));
} else {
_array = getArray (configFile >> "cfgLoot" >> getText(_lootType));
};
if (count _array > 0) then {
_loot = _array call BIS_fnc_selectRandomWeighted;
if(!isNil "_array") then {

View File

@@ -5,7 +5,13 @@ dayz_CBLBase = [];
dayzE_CBLSChances = [];
dayzE_CBLSBase = [];
_config = configFile >> "CfgBuildingLoot";
_config = [];
if (DZE_MissionLootTable) then {
_config = missionConfigFile >> "CfgBuildingLoot";
} else {
_config = configFile >> "CfgBuildingLoot";
};
for "_i" from 0 to ((count _config) - 1) do {
_classname = toLower(configName (_config select _i));
_itemChances = [] + getArray (_config >> _classname >> "ItemChance");
@@ -53,7 +59,14 @@ for "_i" from 0 to ((count _config) - 1) do {
dayz_CLChances = [];
dayz_CLBase = [];
_config = configFile >> "cfgLoot";
_config = [];
if (DZE_MissionLootTable) then {
_config = missionConfigFile >> "cfgLoot";
} else {
_config = configFile >> "cfgLoot";
};
for "_i" from 0 to ((count (_config)) - 1) do {
_itemChances = (getArray (_config select _i)) select 1;
_weighted = [];
@@ -71,7 +84,14 @@ for "_i" from 0 to ((count (_config)) - 1) do {
dayzE_CLSChances = [];
dayzE_CLSBase = [];
_config = configFile >> "cfgLootSmall";
_config = [];
if (DZE_MissionLootTable) then {
_config = missionConfigFile >> "cfgLootSmall";
} else {
_config = configFile >> "cfgLootSmall";
};
for "_i" from 0 to ((count (_config)) - 1) do {
_itemChances = (getArray (_config select _i)) select 1;
_weighted = [];

View File

@@ -473,6 +473,9 @@ if(isNil "DZE_FriendlySaving") then {
if(isNil "DZE_BuildOnRoads") then {
DZE_BuildOnRoads = false;
};
if(isNil "DZE_MissionLootTable") then {
DZE_MissionLootTable = false;
};
DZE_REPLACE_WEAPONS = [["Crossbow","ItemMatchbox","ItemHatchet"],["Crossbow_DZ","ItemMatchbox_DZE","ItemHatchet_DZE"]];

View File

@@ -327,7 +327,13 @@ spawn_vehicles = {
for "_x" from 1 to _num do {
_iClass = _allCfgLoots call BIS_fnc_selectRandom;
_itemTypes = [] + ((getArray (configFile >> "cfgLoot" >> _iClass)) select 0);
_itemTypes = [];
if (DZE_MissionLootTable) then {
_itemTypes = ((getArray (missionConfigFile >> "cfgLoot" >> _iClass)) select 0);
} else {
_itemTypes = ((getArray (configFile >> "cfgLoot" >> _iClass)) select 0);
};
_index = dayz_CLBase find _iClass;
_weights = dayz_CLChances select _index;
_cntWeights = count _weights;