From fc2c03d0d3afbb78844f8d39fa0a64e9d5db6bd0 Mon Sep 17 00:00:00 2001 From: oiad Date: Wed, 17 Aug 2016 22:52:05 +1200 Subject: [PATCH 1/4] Advanced trading change to buyables list This changes Advanced trading to change the item color to green if it matches with an item is in your inventory, in your weapon slots (main slot and dayz_onBack) is the same backpack and is a vehicle you are local to. This brings it in line with default trader, except we're using local here since that's all that matters. Thanks to @ebaydayz for the suggestion. --- .../functions/z_at_fillBuyableList.sqf | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_fillBuyableList.sqf b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_fillBuyableList.sqf index c1e4f1ce6..b7a682b68 100644 --- a/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_fillBuyableList.sqf +++ b/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_fillBuyableList.sqf @@ -1,7 +1,28 @@ -private "_index"; +private ["_index","_count","_type","_name","_weapons"]; #include "defines.hpp" { + _name = _x select 0; + _type = _x select 1; + + if (_type == "trade_any_vehicle") then { + _count = { local _x } count (nearestObjects [(getPosATL player), [_name], Z_VehicleDistance]); + }; + if (_type == "trade_items") then { + _count = {_x == _name} count magazines player; + }; + if (_type == "trade_weapons") then { + _weapons = weapons player; + _weapons set [count _weapons,dayz_onBack]; + _count = {_x == _name} count _weapons; + }; + if (_type == "trade_backpacks") then { + if (_name == typeOf (unitBackPack player)) then { _count = 1; } + }; + _index = lbAdd [Z_AT_BUYABLELIST, _x select 3]; lbSetPicture [Z_AT_BUYABLELIST, _index, _x select 4 ]; + if (_count > 0) then { + lbSetColor [Z_AT_BUYABLELIST, _index, [0, 1, 0, 1]]; + }; } count Z_BuyableArray; From 4e65c4b4734fd0551d02a49024e4d7f179a0009f Mon Sep 17 00:00:00 2001 From: A Man Date: Wed, 17 Aug 2016 15:45:15 +0200 Subject: [PATCH 2/4] Add missing re-combine actions for magazines (#1741) * Updating strings for missing magazins Adding new magazine names to make it similar to the dayz 1.8.7. names. Adding Mk17 M17 SD M107 KSVK L115 VSS * Adding missing magazines and re-combine option Mk17 Mk17 SD * Adding missing magazines and re-combine option M107 KSVK L115 VSS * Update stringtable.xml Moved new strings to epoch package * Update 762x51.hpp Adding the SD indicator. I think the SB instead of SD is too confusing. So everyone knows it is SD ammo. --- .../Configs/CfgMagazines/Magazines/762x51.hpp | 26 +++++++- .../Configs/CfgMagazines/Magazines/Misc.hpp | 60 ++++++++++++++++++- SQF/dayz_code/stringtable.xml | 28 +++++++++ 3 files changed, 112 insertions(+), 2 deletions(-) diff --git a/SQF/dayz_code/Configs/CfgMagazines/Magazines/762x51.hpp b/SQF/dayz_code/Configs/CfgMagazines/Magazines/762x51.hpp index b0367a8c1..78f009b98 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Magazines/762x51.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Magazines/762x51.hpp @@ -69,4 +69,28 @@ class 200Rnd_762x51_M240 : 100Rnd_762x51_M240 { displayName = "200Rnd. M240"; count = 200; descriptionShort = "Caliber: 7.62x51mm NATO
Rounds: 200
Used in: M240, Mk 48 Mod 0"; -}; \ No newline at end of file +}; + +class 20Rnd_762x51_B_SCAR : CA_Magazine +{ + displayName = $STR_DZ_MAG_20Rnd_762x51_B_SCAR_NAME; + + cartridgeName = "762x51"; + + class ItemActions + { + COMBINE_MAG + }; +}; + +class 20Rnd_762x51_SB_SCAR : CA_Magazine +{ + displayName = $STR_DZ_MAG_20Rnd_762x51_SB_SCAR_NAME; + + cartridgeName = "762x51_SD"; + + class ItemActions + { + COMBINE_MAG + }; +}; diff --git a/SQF/dayz_code/Configs/CfgMagazines/Magazines/Misc.hpp b/SQF/dayz_code/Configs/CfgMagazines/Magazines/Misc.hpp index 98911f763..f9a9dde90 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Magazines/Misc.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Magazines/Misc.hpp @@ -45,4 +45,62 @@ class 15Rnd_W1866_Slug : CA_Magazine { COMBINE_MAG }; -}; \ No newline at end of file +}; + +class 10Rnd_127x99_m107 : CA_Magazine +{ + displayName = $STR_DZ_MAG_10Rnd_127x99_m107_NAME; + + cartridgeName = "127x99"; + + class ItemActions + { + COMBINE_MAG + }; +}; + +class 5Rnd_127x108_KSVK : CA_Magazine +{ + displayName = $STR_DZ_MAG_5Rnd_127x108_KSVK_NAME; + + cartridgeName = "127x108"; + + class ItemActions + { + COMBINE_MAG + }; +}; + +class 5Rnd_86x70_L115A1: CA_Magazine +{ + displayName = $STR_DZ_MAG_5Rnd_86x70_L115A1_NAME; + + cartridgeName = "86x70"; + + class ItemActions + { + COMBINE_MAG + }; +}; +class 10Rnd_9x39_SP5_VSS: CA_Magazine +{ + displayName = $STR_DZ_MAG_10Rnd_9x39_SP5_VSS_NAME; + + cartridgeName = "9x39"; + + class ItemActions + { + COMBINE_MAG + }; +}; +class 20Rnd_9x39_SP5_VSS: CA_Magazine +{ + displayName = $STR_DZ_MAG_20Rnd_9x39_SP5_VSS_NAME; + + cartridgeName = "9x39"; + + class ItemActions + { + COMBINE_MAG + }; +}; diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml index 4e9d12218..ad63918fd 100644 --- a/SQF/dayz_code/stringtable.xml +++ b/SQF/dayz_code/stringtable.xml @@ -16183,5 +16183,33 @@ You need matches to build a fireplace + + 20Rnd. SCAR mag. + 20п. SCAR маг. + + + 20Rnd. SCAR SD mag. + 20п. SCAR SD маг. + + + 10Rnd. M107 mag. + 10п. M107 маг. + + + 5Rnd. KSVK mag. + 5п. KSVK маг. + + + 5Rnd. L115 mag. + 5п. L115 маг. + + + 20Rnd. VSS mag. + 20п. VSS маг. + + + 10Rnd. VSS mag. + 10п. VSS маг. + From d62a69b9f5f87c4f6c94634bd14c363ffd1c35a8 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Wed, 17 Aug 2016 10:18:11 -0400 Subject: [PATCH 3/4] ArmoredSUV transportMaxMagazines change #1588 Fixes #1588 --- SQF/dayz_code/Configs/CfgVehicles/Car/ArmoredSUV.hpp | 6 +++--- Server Files/SQL/1.0.6_Updates.sql | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/SQF/dayz_code/Configs/CfgVehicles/Car/ArmoredSUV.hpp b/SQF/dayz_code/Configs/CfgVehicles/Car/ArmoredSUV.hpp index 5dea3427b..0001d5619 100644 --- a/SQF/dayz_code/Configs/CfgVehicles/Car/ArmoredSUV.hpp +++ b/SQF/dayz_code/Configs/CfgVehicles/Car/ArmoredSUV.hpp @@ -265,7 +265,7 @@ class ArmoredSUV_PMC_DZ: ArmoredSUV_Base_PMC typicalCargo[] = {}; enableGPS = 1; transportMaxWeapons = 20; - transportMaxMagazines = 400; + transportMaxMagazines = 150; transportmaxbackpacks = 10; class Turrets: Turrets { @@ -333,7 +333,7 @@ class ArmoredSUV_PMC_DZE: ArmoredSUV_Base_PMC typicalCargo[] = {}; enableGPS = 1; transportMaxWeapons = 20; - transportMaxMagazines = 400; + transportMaxMagazines = 150; transportmaxbackpacks = 10; class Turrets: Turrets { @@ -469,7 +469,7 @@ class ArmoredSUV_PMC_DZE2: ArmoredSUV_PMC_DZE1 class ArmoredSUV_PMC_DZE3: ArmoredSUV_PMC_DZE2 { transportMaxWeapons = 40; - transportMaxMagazines = 800; + transportMaxMagazines = 400; transportmaxbackpacks = 15; class Upgrades { diff --git a/Server Files/SQL/1.0.6_Updates.sql b/Server Files/SQL/1.0.6_Updates.sql index efa2add6a..2e9790df5 100644 --- a/Server Files/SQL/1.0.6_Updates.sql +++ b/Server Files/SQL/1.0.6_Updates.sql @@ -59,6 +59,12 @@ INSERT IGNORE INTO `Traders_DATA` VALUES (NULL, '["BAF_Merlin_DZE",2]', 2, '[2," DELETE FROM `Traders_DATA` WHERE item = '["CH53_DZE",1]'; DELETE FROM `Traders_DATA` WHERE item = '["BAF_Merlin_DZE",1]'; +-- ---------------------------- +-- Swap ArmoredSUV to upgraded version since transportMaxMagazines was decreased on default version (400 --> 150). Upgraded has 400. +-- ---------------------------- +UPDATE `object_data` SET `Classname` = 'ArmoredSUV_PMC_DZE3' WHERE `Classname` = 'ArmoredSUV_PMC_DZ'; +UPDATE `object_data` SET `Classname` = 'ArmoredSUV_PMC_DZE3' WHERE `Classname` = 'ArmoredSUV_PMC_DZE'; + -- ---------------------------- -- Swap datsun and hilux to upgradeable _DZE versions -- ---------------------------- From a345b69a772c6856d85d041996442d1c614e8493 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Wed, 17 Aug 2016 13:27:08 -0400 Subject: [PATCH 4/4] Swap vanilla ItemPadLock for Epoch ItemComboLock This greatly simplifies things over having two separate combo lock classes. --- .../Configs/CfgLoot/Groups/Buildings/Castle.hpp | 2 +- .../CfgLoot/Groups/Buildings/Construction.hpp | 6 +++--- .../CfgLoot/Groups/Buildings/Residential.hpp | 4 ++-- .../Groups/Buildings/ResidentialRuins.hpp | 4 ++-- .../CfgLoot/Groups/Buildings/Supermarket.hpp | 4 ++-- .../Configs/CfgMagazines/Items/Padlock.hpp | 2 +- SQF/dayz_code/Configs/CfgVehicles/DZE/Doors.hpp | 17 +++++++++++++++++ SQF/dayz_code/config.cpp | 2 +- .../R3F_Weight/Magazines/BuildingSupplies.hpp | 4 ++++ 9 files changed, 33 insertions(+), 12 deletions(-) diff --git a/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Castle.hpp b/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Castle.hpp index d0014ca4d..4728ce0d2 100644 --- a/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Castle.hpp +++ b/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Castle.hpp @@ -22,7 +22,7 @@ Castle[] = {Loot_MAGAZINE, 1, equip_Crossbow_Kit}, {Loot_MAGAZINE, 3, equip_rope}, {Loot_MAGAZINE, 4, PartWoodPile}, - {Loot_MAGAZINE, 1, ItemPadlock}, + {Loot_MAGAZINE, 1, ItemComboLock}, {Loot_MAGAZINE, 1, ItemTent}, {Loot_MAGAZINE, 1, ItemCamoNet}, diff --git a/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Construction.hpp b/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Construction.hpp index b665990a8..43d7eec67 100644 --- a/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Construction.hpp +++ b/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Construction.hpp @@ -1,13 +1,13 @@ Construction[] = { - {Loot_MAGAZINE, 9, ItemLog}, + {Loot_MAGAZINE, 9, ItemLog}, // Used for crafting and vanilla buildables {Loot_MAGAZINE, 9, ItemPlank}, - {Loot_MAGAZINE, 5, ItemStone}, + {Loot_MAGAZINE, 5, ItemStone}, // Used for crafting and vanilla buildables {Loot_MAGAZINE, 8, equip_nails}, {Loot_MAGAZINE, 9, equip_metal_sheet_rusted}, {Loot_MAGAZINE, 9, equip_metal_sheet}, {Loot_MAGAZINE, 1, equip_lever}, - {Loot_MAGAZINE, 1, ItemPadlock}, + {Loot_MAGAZINE, 1, ItemComboLock}, {Loot_WEAPON, 1, ItemPickaxe}, {Loot_WEAPON, 2, ItemPickaxeBroken}, diff --git a/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Residential.hpp b/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Residential.hpp index a8a121e07..c13edc097 100644 --- a/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Residential.hpp +++ b/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Residential.hpp @@ -23,7 +23,7 @@ Residential[] = {Loot_GROUP, 4, backpacks}, //Other - {Loot_MAGAZINE, 0.5, ItemPadlock}, + {Loot_MAGAZINE, 0.5, ItemComboLock}, {Loot_MAGAZINE, 1, PartPlywoodPack}, {Loot_PILE, 6, AmmoCivilian, 1, 2}, @@ -45,7 +45,7 @@ ResidentialSmall[] = {Loot_WEAPON, 5, ItemCompass}, {Loot_WEAPON, 5, ItemKnife}, {Loot_WEAPON, 1, Binocular}, - {Loot_MAGAZINE, 0.5, ItemPadlock}, + {Loot_MAGAZINE, 0.5, ItemComboLock}, {Loot_GROUP, 6, AmmoCivilian}, {Loot_GROUP, 10, Trash}, {Loot_GROUP, 10, Consumable}, diff --git a/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/ResidentialRuins.hpp b/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/ResidentialRuins.hpp index 390ee2d2a..b6b99f739 100644 --- a/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/ResidentialRuins.hpp +++ b/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/ResidentialRuins.hpp @@ -1,7 +1,7 @@ ResidentialRuins[] = { - {Loot_MAGAZINE, 10, ItemLog}, - {Loot_MAGAZINE, 10, ItemStone}, + {Loot_MAGAZINE, 10, ItemLog}, // Used for crafting and vanilla buildables + {Loot_MAGAZINE, 10, ItemStone}, // Used for crafting and vanilla buildables {Loot_MAGAZINE, 7, equip_metal_sheet_rusted}, {Loot_GROUP, 4, Trash}, {Loot_GROUP, 3, AttachmentsGeneric} diff --git a/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Supermarket.hpp b/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Supermarket.hpp index 9310bb608..2fe3a9317 100644 --- a/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Supermarket.hpp +++ b/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Supermarket.hpp @@ -29,7 +29,7 @@ Supermarket[] = {Loot_MAGAZINE, 1, PartPlywoodPack}, //{Loot_MAGAZINE, 0.5, ItemDomeTent}, //IN TENTS GROUP {Loot_MAGAZINE, 1, ItemCamoNet}, - {Loot_MAGAZINE, 0.5, ItemPadlock}, + {Loot_MAGAZINE, 0.5, ItemComboLock}, {Loot_MAGAZINE, 3, ItemBandage}, {Loot_MAGAZINE, 2, ItemPainkiller}, {Loot_MAGAZINE, 2, ItemAntibacterialWipe}, @@ -55,7 +55,7 @@ SupermarketSmall[] = {Loot_WEAPON, 3, Binocular}, {Loot_GROUP, 10, pistols}, {Loot_MAGAZINE, 1, ItemMixOil}, - {Loot_MAGAZINE, 0.5, ItemPadlock}, + {Loot_MAGAZINE, 0.5, ItemComboLock}, {Loot_MAGAZINE, 3, ItemBandage}, {Loot_MAGAZINE, 2, ItemPainkiller}, {Loot_MAGAZINE, 2, ItemAntibacterialWipe}, diff --git a/SQF/dayz_code/Configs/CfgMagazines/Items/Padlock.hpp b/SQF/dayz_code/Configs/CfgMagazines/Items/Padlock.hpp index fa2fcca23..db9f323f4 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Items/Padlock.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Items/Padlock.hpp @@ -1,4 +1,4 @@ -class ItemPadlock: CA_Magazine +class ItemPadlock: CA_Magazine //Vanilla lock, left in config for potential admin use, but all scripts changed to use Epoch ItemComboLock { scope = public; count = 1; diff --git a/SQF/dayz_code/Configs/CfgVehicles/DZE/Doors.hpp b/SQF/dayz_code/Configs/CfgVehicles/DZE/Doors.hpp index 0a9cf78c8..ed4c86ef5 100644 --- a/SQF/dayz_code/Configs/CfgVehicles/DZE/Doors.hpp +++ b/SQF/dayz_code/Configs/CfgVehicles/DZE/Doors.hpp @@ -782,4 +782,21 @@ class CinderWallDoorSmall_DZ: CinderWallDoor_DZ_Base { statement="this animate [""Open_door"", 0]"; }; }; +}; + +/* + Vanilla DayZ buildables are defined in \dayz_buildings\configs\ + Only included here to overwrite vanilla ItemPadlock with Epoch ItemComboLock +*/ +class WoodenGate_Base; +class WoodenGate_1: WoodenGate_Base +{ + class Upgrade { //to next stage + requiredTools[] = {"ItemEtool","ItemToolbox"}; + requiredParts[] = {"ItemLog","ItemComboLock"}; + create = "WoodenGate_2"; + }; + class Disassembly { + requiredTools[] = {"ItemToolbox"}; + }; }; \ No newline at end of file diff --git a/SQF/dayz_code/config.cpp b/SQF/dayz_code/config.cpp index c219b5e37..812c5f599 100644 --- a/SQF/dayz_code/config.cpp +++ b/SQF/dayz_code/config.cpp @@ -17,7 +17,7 @@ class CfgPatches //dayz addons "dayz", - "dayz_buildings", + "dayz_buildings", // Overwrite classes that use vanilla ItemPadlock with Epoch ItemComboLock "dayz_communityassets", "dayz_communityweapons", "dayz_equip", diff --git a/SQF/dayz_code/external/R3F_Realism/R3F_Weight/Magazines/BuildingSupplies.hpp b/SQF/dayz_code/external/R3F_Realism/R3F_Weight/Magazines/BuildingSupplies.hpp index a6a55319d..8781f69c3 100644 --- a/SQF/dayz_code/external/R3F_Realism/R3F_Weight/Magazines/BuildingSupplies.hpp +++ b/SQF/dayz_code/external/R3F_Realism/R3F_Weight/Magazines/BuildingSupplies.hpp @@ -63,6 +63,10 @@ class ItemScrews { weight = 0.005; }; +class ItemComboLock +{ + weight = 0.03; +}; class ItemPadlock { weight = 0.03;