diff --git a/Sources/epoch_config/Configs/CfgBlackMarket.hpp b/Sources/epoch_config/Configs/CfgBlackMarket.hpp index 829fb1f7..8993bcde 100644 --- a/Sources/epoch_config/Configs/CfgBlackMarket.hpp +++ b/Sources/epoch_config/Configs/CfgBlackMarket.hpp @@ -4,7 +4,7 @@ class CfgBlackMarket // will always get set to BlackMarkets // Example: {0,2} will set the 1st and 3rd defined static trader as a BlackMarket - BlackMarketTraderCount = 2; // 2 Random Traders will be set to BlackMarkets (change every Restart) + BlackMarketTraderCount[] = {1,2}; // {min,max} Random Traders will be set to BlackMarkets (change every Restart) ShowBlackMarketTraders = "true"; // Show Marker for Blackmarket Traders? BlackMarketMarkerColor = "ColorRed"; // Marker color for Blackmarket Traders (if ShowBlackMarketTraders = "true") BlackMarketPurchaseMulti = 5; // Multi on purchase on top of the default price diff --git a/Sources/epoch_server/init/server_init.sqf b/Sources/epoch_server/init/server_init.sqf index c408aa6e..98c873b5 100644 --- a/Sources/epoch_server/init/server_init.sqf +++ b/Sources/epoch_server/init/server_init.sqf @@ -192,7 +192,7 @@ publicvariable "EPOCH_Traders"; // Start Black Market Traders _StaticBlackMarketIdx = ["CfgBlackMarket", "StaticBlackMarketIdx", []] call EPOCH_fnc_returnConfigEntryV2; -_BlackMarketTraderCount = ["CfgBlackMarket", "BlackMarketTraderCount", 0] call EPOCH_fnc_returnConfigEntryV2; +_BlackMarketTraderCount = ["CfgBlackMarket", "BlackMarketTraderCount", [0,0]] call EPOCH_fnc_returnConfigEntryV2; _ShowBlackMarketTraders = ["CfgBlackMarket", "ShowBlackMarketTraders", true] call EPOCH_fnc_returnConfigEntryV2; _BlackMarketMarkerColor = ["CfgBlackMarket", "BlackMarketMarkerColor", "ColorRed"] call EPOCH_fnc_returnConfigEntryV2; _BlackMarketItemsCount = ["CfgBlackMarket", "BlackMarketItemsCount", 100] call EPOCH_fnc_returnConfigEntryV2; @@ -268,7 +268,8 @@ _Blackmarket_BlackList = ["CfgBlackMarket", "Blackmarket_BlackList", []] call EP _BlackMarketTraders pushback _x; }; } foreach EPOCH_StaticTraders; - for "_i" from 1 to _BlackMarketTraderCount do { + _BlackMarketTraderCount params [["_minmarkets",0],["_maxmarkets",0]]; + for "_i" from 1 to (round (_minmarkets + random (_maxmarkets - _minmarkets))) do { if (count Epoch_DynamicTraders > 0) then { _trader = selectrandom Epoch_DynamicTraders; Epoch_DynamicTraders = Epoch_DynamicTraders - [_trader];