From 75e3ee58c26b9bf913d674b4611af5044dd78303 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Fri, 20 May 2016 17:20:10 -0400 Subject: [PATCH] Reduce ItemBloodbag loot chance slightly for classic system Since typed bags spawn in bulk (usually 2x 4 different bag types) this reduces bloodbag output slightly when classic system is enabled. Medboxes were spawning with 3-8 blood bags, this reduces it to about 1-6 which should be similar to 1051 values IIRC. Feel free to adjust this up or down if needed. --- SQF/dayz_code/loot/insert.sqf | 8 +++++++- SQF/dayz_code/loot/insertCargo.sqf | 8 +++++++- SQF/dayz_code/loot/spawn.sqf | 8 +++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/SQF/dayz_code/loot/insert.sqf b/SQF/dayz_code/loot/insert.sqf index 25065aa51..0115fb434 100644 --- a/SQF/dayz_code/loot/insert.sqf +++ b/SQF/dayz_code/loot/insert.sqf @@ -34,7 +34,13 @@ if (!local (_this select 0)) exitWith { private "_item"; _item = _x select 1; - if (dayz_classicBloodBagSystem && _item in dayz_typedBags) then {_item = "ItemBloodbag";}; + if (dayz_classicBloodBagSystem && _item in dayz_typedBags) then { + if (_item in ["bloodTester","bloodBagAPOS","bloodBagABPOS"]) then { // reduce ItemBloodBag output slightly since typed bags spawn in bulk + _item = ["ItemBandage","ItemPainkiller","ItemMorphine","ItemHeatPack","ItemAntibacterialWipe"] call BIS_fnc_selectRandom; + } else { + _item = "ItemBloodbag"; + }; + }; (_this select 0) addMagazine _item; }; diff --git a/SQF/dayz_code/loot/insertCargo.sqf b/SQF/dayz_code/loot/insertCargo.sqf index b28bcc8c0..a1b062543 100644 --- a/SQF/dayz_code/loot/insertCargo.sqf +++ b/SQF/dayz_code/loot/insertCargo.sqf @@ -29,7 +29,13 @@ Author: { private "_item"; _item = _x select 1; - if (dayz_classicBloodBagSystem && _item in dayz_typedBags) then {_item = "ItemBloodbag";}; + if (dayz_classicBloodBagSystem && _item in dayz_typedBags) then { + if (_item in ["bloodTester","bloodBagAPOS","bloodBagABPOS"]) then { // reduce ItemBloodBag output slightly since typed bags spawn in bulk + _item = ["ItemBandage","ItemPainkiller","ItemMorphine","ItemHeatPack","ItemAntibacterialWipe"] call BIS_fnc_selectRandom; + } else { + _item = "ItemBloodbag"; + }; + }; (_this select 0) addMagazineCargoGlobal [_item, 1]; }; diff --git a/SQF/dayz_code/loot/spawn.sqf b/SQF/dayz_code/loot/spawn.sqf index 4d64b6fd7..3032e1030 100644 --- a/SQF/dayz_code/loot/spawn.sqf +++ b/SQF/dayz_code/loot/spawn.sqf @@ -77,7 +77,13 @@ switch (_lootInfo select 0) do { private "_item"; _item = _lootInfo select 1; - if (dayz_classicBloodBagSystem && _item in dayz_typedBags) then {_item = "ItemBloodbag";}; + if (dayz_classicBloodBagSystem && _item in dayz_typedBags) then { + if (_item in ["bloodTester","bloodBagAPOS","bloodBagABPOS"]) then { // reduce ItemBloodBag output slightly since typed bags spawn in bulk + _item = ["ItemBandage","ItemPainkiller","ItemMorphine","ItemHeatPack","ItemAntibacterialWipe"] call BIS_fnc_selectRandom; + } else { + _item = "ItemBloodbag"; + }; + }; _vehicle = createVehicle ["WeaponHolder", _this select 1, [], 0, "CAN_COLLIDE"]; _vehicle addMagazineCargoGlobal [_item, 1]; _vehicle setPosATL (_this select 1);