phm Posted March 27, 2018 Report Share Posted March 27, 2018 After a bit of testing with new databases, it's seems that numeric values in epochconfig.hpp/ starterTraderItems[] are being interpreted as number of rounds in a clip rather than number of clips. Is there some way to specify both, or is the starterTraderItems[] value being put in the wrong place (#rounds vs. # of clips)? Thanks! Link to comment Share on other sites More sharing options...
He-Man Posted March 28, 2018 Report Share Posted March 28, 2018 Yep, all mags in traders are only calculated by rounds now. So if you want 2 Mags of 20rnd_... you have to set the value to 40. phm 1 Link to comment Share on other sites More sharing options...
phm Posted March 28, 2018 Author Report Share Posted March 28, 2018 12 hours ago, He-Man said: Yep, all mags in traders are only calculated by rounds now. So if you want 2 Mags of 20rnd_... you have to set the value to 40. Thanks for this! With this in mind, I tested more. It seems the max that I can get to go into a belt (e.g, mk200) is 100 rounds. What am I doing wrong? Link to comment Share on other sites More sharing options...
He-Man Posted March 29, 2018 Report Share Posted March 29, 2018 Hmm, just tested it and for me it is working fine: starterTraderItems[] = { // Starter Items for fresh spawned trader first array is classnames second is quantity. {"ItemSodaBurst","meatballs_epoch","VehicleRepair","KitPlotPole","Hatchet","MeleeSledge","200Rnd_556x45_Box_F"}, {5,5,5,2,2,2,400} }; https://www.dropbox.com/s/rdqdk9p2fcmmn9s/20180329023201_1.jpg?dl=0 Link to comment Share on other sites More sharing options...
phm Posted March 29, 2018 Author Report Share Posted March 29, 2018 15 hours ago, He-Man said: Hmm, just tested it and for me it is working fine: starterTraderItems[] = { // Starter Items for fresh spawned trader first array is classnames second is quantity. {"ItemSodaBurst","meatballs_epoch","VehicleRepair","KitPlotPole","Hatchet","MeleeSledge","200Rnd_556x45_Box_F"}, {5,5,5,2,2,2,400} }; https://www.dropbox.com/s/rdqdk9p2fcmmn9s/20180329023201_1.jpg?dl=0 Still not working for me (see attached jpeg). The trader should have 10 clips. starterTraderItems[] = { // Starter Items for fresh spawned trader first array is classnames second is quantity. {"150Rnd_556x45_Drum_Mag_F"},{1500} }; NPCSlotsLimit = 30; // Max number of traders static or dynamic. Warning! Higher the number lower performance. forceStaticTraders = "true"; // disables traders moving from work to home TraderGodMode = "false"; // If true, Trader can not be killed by Players storedVehicleLimit = 15; // Vehicles more than x stored in ALL Traders will automatically be deleted on Restart. StaticTraderItemPurge[] = {99999,1}; // {ItemCount,ReducePercent} - If a static trader have more than x different items, on restart the items will be reduced by y percent DynamicTraderRespawnCount = 99999; // If a dynamic Trader have more than x different Items, he will respawn on another Spot (with start Items) TraderItemCountPerItem[] = {99999,99998}; // If the Trader has more than x pieces of an Item, it will be reduced to y pieces (on Restart) TraderItemsDeleteInstant[] = { // List of Items, that will be deleted from Trader instant after sell // "ItemVehDoc1", // "ItemVehDoc2", // "ItemVehDoc3", // "ItemVehDoc4" }; TraderItemsDeleteRestart[] = { // List of Items, that will be deleted from Trader on Restart // "ItemLockbox", // "ItemSafe", // "ItemGoldBar10oz" }; Link to comment Share on other sites More sharing options...
Grahame Posted March 29, 2018 Report Share Posted March 29, 2018 Is the issue that CfgTraderLimits is not set up? _limit = ["CfgTraderLimits", _item, 100] call EPOCH_fnc_returnConfigEntryV2; He-Man 1 Link to comment Share on other sites More sharing options...
He-Man Posted March 29, 2018 Report Share Posted March 29, 2018 THanks @Grahame, that's it, I think. Will double check it tomorrow. phm 1 Link to comment Share on other sites More sharing options...
phm Posted March 29, 2018 Author Report Share Posted March 29, 2018 1 minute ago, He-Man said: THanks @Grahame, that's it, I think. Will double check it tomorrow. Ok, thanks. Shouldn't this also be in epochconfig.hpp? And in the meantime, where should I edit this? <mission_file>/compile/traders/EPOCH_npc_TraderAdd.sqf ? Link to comment Share on other sites More sharing options...
Grahame Posted March 29, 2018 Report Share Posted March 29, 2018 @phmThe lines should be simply removed now there are new methods to set trader limits - was a holdover from previous versions I think. Grep-ed all of EpochMod source. Used in epoch_code/compile/traders/EPOCH_npc_TraderAdd.sqf and epoch_server/compile/epoch_traders/EPOCH_server_loadTraders.sqf The fix will require code changes to alter _limit properly but to test and give you a quick fix, change line 60 of epoch_code/compile/traders/EPOCH_npc_TraderAdd.sqf to _limit = 5000; and line 56 of epoch_server/compile/epoch_traders/EPOCH_server_loadTraders.sqf to read the same. Let us know whether that fixes it for you. I will try on my dev server when I finish work later if I do not hear back first. phm 1 Link to comment Share on other sites More sharing options...
Grahame Posted March 29, 2018 Report Share Posted March 29, 2018 Actual fix (will test) would be to remove lines 60-64 in epoch_code/compile/traders/EPOCH_npc_TraderAdd.sqf: _limit = ["CfgTraderLimits", _uiItem, 100] call EPOCH_fnc_returnConfigEntryV2; if (_itemQty >= _limit) then{ _stockLimit = true; _allowAdd = false; }; and in epoch_server/compile/epoch_traders/EPOCH_server_loadTraders.sqf, remove line 56: _limit = ["CfgTraderLimits", _item, 100] call EPOCH_fnc_returnConfigEntryV2; Remove lines 63 to 68: if (_limit == 0 || _currentStock == 0) then { // diag_log format ["EPOCH_DEBUG: TraderSlot: %1 | Removed %2 from Trader | _limit: %3 | _currentStock: %4",_i,str _item, _limit,_currentStock]; _arrchanged = true; _delete = true; } else { Remove lines 75-79: if (_currentStock > _limit) then { _arrchanged = true; (_arr select 1) set [_idx,_limit]; _currentStock = _limit; }; and remove line 112: }; He-Man and phm 2 Link to comment Share on other sites More sharing options...
phm Posted March 29, 2018 Author Report Share Posted March 29, 2018 3 hours ago, Grahame said: @phmThe lines should be simply removed now there are new methods to set trader limits - was a holdover from previous versions I think. Grep-ed all of EpochMod source. Used in epoch_code/compile/traders/EPOCH_npc_TraderAdd.sqf and epoch_server/compile/epoch_traders/EPOCH_server_loadTraders.sqf The fix will require code changes to alter _limit properly but to test and give you a quick fix, change line 60 of epoch_code/compile/traders/EPOCH_npc_TraderAdd.sqf to _limit = 5000; and line 56 of epoch_server/compile/epoch_traders/EPOCH_server_loadTraders.sqf to read the same. Let us know whether that fixes it for you. I will try on my dev server when I finish work later if I do not hear back first. After changing values in both of those files (just changing the one in the mission file had no affect), it's working as expected. Thanks @He-Man and @Grahame for your help! Looking forward to fix(es) in the next release. Grahame and He-Man 2 Link to comment Share on other sites More sharing options...
He-Man Posted March 30, 2018 Report Share Posted March 30, 2018 Can you try these 2 changed files?https://github.com/EpochModTeam/Epoch/compare/887fd41b7c8c...2abcf105b563 Link to comment Share on other sites More sharing options...
He-Man Posted March 30, 2018 Report Share Posted March 30, 2018 I have doublechecked it and the problem was a missing recalculation of the current stock in the cleanup checks. Anyway the "old" cfgtraderlimit is no longer needed and has been removed (last post). Edit: I am currently sorting some last things out.. Edit2: I think I got everything now. Please take these 2 changed files and let me know, if it works as expected: https://github.com/EpochModTeam/Epoch/blob/experimental/Sources/epoch_server/compile/epoch_traders/EPOCH_server_loadTraders.sqf https://github.com/EpochModTeam/Epoch/blob/experimental/Sources/epoch_code/compile/traders/EPOCH_npcTraderAdd.sqf Grahame 1 Link to comment Share on other sites More sharing options...
He-Man Posted March 30, 2018 Report Share Posted March 30, 2018 I have also added a function to convert the starter trader mags to rounds. So you no longer have to add the rounds, but the count of mags in the epochconfig.hpp https://github.com/EpochModTeam/Epoch/compare/54b739a4a2f0...a11e8c6f9c79 Helion4 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now