From f179d037dccae2188b9af6b28873f6ef1f2ffd16 Mon Sep 17 00:00:00 2001 From: A Man Date: Thu, 24 Mar 2022 13:08:27 +0100 Subject: [PATCH] Add changeable DZE_GemChance to configVariables --- SQF/dayz_code/actions/remove.sqf | 2 +- SQF/dayz_code/configVariables.sqf | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/SQF/dayz_code/actions/remove.sqf b/SQF/dayz_code/actions/remove.sqf index bba63ff35..5e53d2a09 100644 --- a/SQF/dayz_code/actions/remove.sqf +++ b/SQF/dayz_code/actions/remove.sqf @@ -290,7 +290,7 @@ if (_proceed && _success) then { {_selectedRemoveOutput set [count _selectedRemoveOutput, [_x select 1, [_x select 2, _x select 3]]]} forEach _output; // chance of gem occurrence - if ([0.4] call fn_chance) then { + if ([DZE_GemChance] call fn_chance) then { local _gems = []; local _weights = []; diff --git a/SQF/dayz_code/configVariables.sqf b/SQF/dayz_code/configVariables.sqf index 6c7acc26c..96f8e508d 100644 --- a/SQF/dayz_code/configVariables.sqf +++ b/SQF/dayz_code/configVariables.sqf @@ -186,6 +186,7 @@ if (!isDedicated) then { // Trader Menu DZE_serverLogTrades = true; // Log trades to server RPT (sent with publicVariableServer on every trade) + DZE_GemChance = 0.4; // Chance of gem occurrence in an Ore Vein, valid values from 0.01 - 1, 0.4 = 40% Chance DZE_GemOccurance = [["ItemTopaz",10], ["ItemObsidian",8], ["ItemSapphire",6], ["ItemAmethyst",4], ["ItemEmerald",3], ["ItemCitrine",2], ["ItemRuby",1]]; //Sets how rare each gem is in the order shown when mining (whole numbers only) DZE_GemWorthArray = [["ItemTopaz",15000], ["ItemObsidian",20000], ["ItemSapphire",25000], ["ItemAmethyst",30000], ["ItemEmerald",35000], ["ItemCitrine",40000], ["ItemRuby",45000]]; // Array of gem prices, only works with config traders. Set DZE_GemWorthArray=[]; to disable return change in gems. DZE_SaleRequiresKey = false; // Require the player has the key for a vehicle in order to sell it. The key can be in the player's toolbelt, backpack, or the vehicle's inventory.