Client plugin is built for the client version of SPT-AKI 3.7.1 but may be compatible with some older versions, although no support for them will be provided.
In case there is a newer SPT version - you can try it out, it may still work.
Target: SPT-AKI 3.7.1 Hotfix 23/10/23: Fixed an initialization issue. Could appear when using mods which get/show item prices.
Updated for the newest version of SPT.
Changed the flea price calculation to get the lowest price from an item offer with best possible condition by default, can be changed to old behaviour in the config with the ragfairUseLowestPrice entry.
Also fixed 'bulk' flea offers impacting the flea price calculation.
Changed the flea price calculation to get the lowest price of an item by default, can be changed to old behaviour in the config with the ragfairUseLowestPrice entry.
Also fixed 'bulk' flea offers impacting the flea price calculation.
Client plugin is built for the client version of SPT-AKI 3.7.1 but may be compatible with some older versions, although no support for them will be provided.
Judging by the comments on the Softcore page, people seem to have some item/flea related errors on 3.5.5, somewhat similar to yours. So I guess that might be the cause.
Hello! I currently use Broker alongside the Softcore mod that tweaks the flea access. I set the ragFair option to false, but it is still attempting to run through those functions if I attempt to buy an item from the flea (This worked in previous versions of the mod)
Here's the error:
Unable to get item: 61a6446f4b5f8b70f451b166 from db
TypeError: Cannot read properties of undefined (reading '_props')
TypeError: Cannot read properties of undefined (reading '_props')
at InventoryHelper.getSizeByInventoryItemHash (C:\snapshot\project\obj\helpers\InventoryHelper.js)
at InventoryHelper.getContainerMap (C:\snapshot\project\obj\helpers\InventoryHelper.js)
at InventoryHelper.getStashSlotMap (C:\snapshot\project\obj\helpers\InventoryHelper.js)
at InventoryHelper.addItem (C:\snapshot\project\obj\helpers\InventoryHelper.js)
at TradeHelper.buyItem (C:\snapshot\project\obj\helpers\TradeHelper.js)
at BrokerTradeController.confirmTradingInternal (C:\snapshot\project\obj\controllers\TradeController.js)
at BrokerTradeController.confirmRagfairTrading (C:\snapshot\project\obj\controllers\TradeController.js)
at TradeCallbacks.processRagfairTrade (C:\snapshot\project\obj\callbacks\TradeCallbacks.js)
at TradeItemEventRouter.handleItemEvent (C:\snapshot\project\obj\routers\item_events\TradeItemEventRouter.js)
at ItemEventRouter.handleEvents (C:\snapshot\project\obj\routers\ItemEventRouter.js)
TypeError: Cannot read properties of undefined (reading '_props')
TypeError: Cannot read properties of undefined (reading '_props')
at InventoryHelper.getSizeByInventoryItemHash (C:\snapshot\project\obj\helpers\InventoryHelper.js)
at InventoryHelper.getContainerMap (C:\snapshot\project\obj\helpers\InventoryHelper.js)
at InventoryHelper.getStashSlotMap (C:\snapshot\project\obj\helpers\InventoryHelper.js)
at InventoryHelper.addItem (C:\snapshot\project\obj\helpers\InventoryHelper.js)
at TradeHelper.buyItem (C:\snapshot\project\obj\helpers\TradeHelper.js)
at BrokerTradeController.confirmTradingInternal (C:\snapshot\project\obj\controllers\TradeController.js)
at BrokerTradeController.confirmRagfairTrading (C:\snapshot\project\obj\controllers\TradeController.js)
at TradeCallbacks.processRagfairTrade (C:\snapshot\project\obj\callbacks\TradeCallbacks.js)
at TradeItemEventRouter.handleItemEvent (C:\snapshot\project\obj\routers\item_events\TradeItemEventRouter.js)
at ItemEventRouter.handleEvents (C:\snapshot\project\obj\routers\ItemEventRouter.js)
I loaded Broker at the end of all my other mods, if theres any other info that would help let me know. Thank you for the mod
Display More
First step would be trying to buy the same items that cause the error without the Broker. I've personally used Softcore with Broker without any issues, on SPT-AKI 3.5.4.
Also it doesn't try to run anything Broker related when you buy/sell from flea. The BrokerTradeController is simply a replacement for server's default TradeController. The only method it overrides is confirmTrading(not confirmTradingInternal), everything that you see called in the error stack is all default, nothing related to Broker.
You'd probably want to check if it happens with all items or just some. Your error message specifically states that item with template id 61a6446f4b5f8b70f451b166 can't be found in the database. Here's that item in item finder.
Replace the client plugin with this one, initiate the error again and give me the bepinex logs. Or just give me the lines where it says ReflectionHelper.FindClassTypeByMethodNames [AmbiguousMatch
Target: SPT-AKI 3.5.5 Hotfix 24/04/23: Fixed "type initializer" errors when using the mod along-side some other client plugins/libraries. Redownload the mod if you have this issue.
Custom traders support, option to ignore traders "Unlocked" status, cross-version compatibility for the client plugin and some fixes.
Adds several inventory organizing features which rely on item tags, such as sort locking, move locking and container organizing.
Also adds a button to take out all the items from a container.
This mod adds several inventory organizing features that should save you some time when managing your stash. These features use the in-game item tags. In general, to use it's features you have to write a @ tag and parameters(if needed) into item's tag name.
Installation
Drop the contents of the archive into your SP Tarkov directory.
Tags
There are several tags you can use:
@sl - Sort Lock. Prevents the item from being moved when sorting inventory.
@ml - Move Lock. Prevents the item from being moved by user or when sorting inventory.
@o - Organize. Makes a container pull items which can fit into it. Items which are being pulled are determined by container's filters and parameters which user has specified.
The "Organize" feature is the only one that can use additional parameters. It's probably not the most elegant solution, but also not the worst and decently usable even as a simple proof of concept.
Multiple tags
If you wish to specify multiple tags, make sure to separate them with spaces.
Example: @ml @o, @sl @o, @o money; @ml.
"Take Out" button
This button is located on container view panel, near the sort and organize button. It's label should say "T/O". It takes out every item from the container into it's parent container. When used on equipped items - transfers contents into stash.
If you add ! before categories name, the specified category parameter will be treated as an exclusion.
Example: @o !magazines; - means everything but Magazines category.
Name parameter
You can specify a desired name by writing a prefix n: and then the name of an item. The name doesn't have to be exact, it can be a certain part of it, but be aware that it can also be ambiguous (e.g. if you simply write BP it will pull any item that has "BP" in it's name).
Example @o n:igolnik;.
If you add ! before name parameter, it will be treated as an exclusion.
Example: @o n:!igolnik; - means everything but items which have "igolnik" in the name.
Container priority and order parameter
By default organized containers execution is ordered by their implicit priority, where containers with the narrowest conditions are taken first. For example container with tag @o n:igolnik;(selects only items which have "igolnik" in the name) has a higher priority than the one with tag @o(default category, pulls any fitting item).
If implicit priority doesn't suffice, you can specify an explicit order number. Containers with explicit order value are prioritized over those without it.
Example: @o #:3; and @o #:1;, container with order value 1 will pull items earlier than the one with order value 3.
Found in raid (and other double-dash parameters)
There are some parameters which are prefixed with two dashes:
--default - default container categories. If no categories are specified, this parameters is implicitly used. Most likely you won't need it.
--fir - items must be "Found in raid".
--not-fir - items must be not "Found in raid".
Multiple parameters
If you want to specify multiple parameters, simply separate them with the | symbol.
Example:
@o #:2|muzzle devices|n:ak-74|--fir; - container priority value 2, only items of category "Muzzle devices" and only if item's name contains "ak-74", and only found in raid. Basically collects all FiR muzzle devices with AK-74 in the name, like Wafflemaker, JMac, and other suppressors/muzzle breaks.
@o assault rifles|magazines|weapon parts & mods; - container will pull only Assault Rifles, Magazines and Weapon parts & mods.
@o n:rouble|n:eur|n:dollar|n:bitc; - container will pull only items which have "rouble" or "eur", or "dollar", or "bitc" in their name.
If you want to use the mod on SPT-AKI older than 3.5.5 - replace the client plugin(BrokerTraderPlugin.dll) with the appropriate build. Client plugin builds for older versions:
Unsupported. It's recommended to use DrakiaXYZ's Task List Fixes instead.
Details
Installation: drop the contents of the archive into your SP Tarkov folder.
Developed for SPT-AKI 3.5.2 - 3.5.4 client version.
Fixed sorting by "questsAvailability" based on current location. It was messing up every sort type. Now available and unavailable tasks are grouped and each of them are sorted accordingly.
Trader sort now uses localized trader nickname instead of id.
Location sort now uses localized location name instead of id.
I got tired of clicking everywhere and switching between different lagging menus and so here we go. This guy should reduce the amount of clicks and button presses needed to sell stuff.
Adds a new trader - the Broker. He should sell your items to the most profitable option - trader or flea, while following the game logic. Also sells and buys foreign currencies based on PK's and Skier's pricing. Currency purchases are redirected to PK and Skier so you also level them up. The cash equivalent number is also changed, check out the screenshots to see how it looks, it's the number on top of the "DEAL!" button. For every other trader changes only the number format(adds spaces between thousands).
Installation
Before installing the mod, make sure to make a backup of your profile at SPTARKOV/user/profiles/
Just copy the contents of the archive into the directory where your SP Tarkov is located. Don't forget to delete the old version if you are updating.
Compatibility
Should be incompatible with mods that override server's "TradeController".
If you have any mods that affect trader/flea pricing - load this mod after them.
If you have any mods that completely remove player offers from flea and the ability to create yours - set useRagfair to false in the config. Otherwise Broker will still show you fallback flea prices and will still trade items to flea market.
If you installed any mods that affect Flea Market prices after launching the server with my mod at least once, and you have caching enabled(useCache: true) - clear the mod cache.
Note
If you notice inconsistencies in prices, unexpected behaviour, encounter crashes/errors - inform me about that in the comments.
This trader will sell your is stuff in the most profitable way. The principle is as follows:
Most profitable trader price and flea market prices are compared.
If player has unlocked the flea, item is found in raid, not blacklisted and the flea price is more profitable - item will be sold to flea.
If previously mentioned conditions are not met - item will be sold to most profitable trader.
* When selecting the most profitable trader all conditions are accounted (whether the trader can buy this item, item's durability/resource, etc.). So for example broken items will be sold to Fence.
* Broker buys a total of everything that every other trader buys.
Overall the Broker follows basic player and game logic (or rather should if doesn't).
The prices at which items will be sold should be displayed accordingly to where they're sold. When trader price is displayed his currency is accounted for. Flea market prices are always in roubles, also the price shown is the actual profit(profit = offer price - tax).
When selling to Traders
Items are quite literally redirected to a different trader. So they are sold in the same way as if you would sell them yourself. So you receive money from that exact trader and in his appropriate currency. The trader's sales sum is also increased just as it would normally, so you will make progress towards leveling his loyalty level.
When selling to Flea market
Items sold will be counted as being sold to Broker. The profit you get is a subtraction profit = offer price - tax. Following the game logic, the flea reputation is will also be increased with the account of offer price, not profit. Broker's sales sum includes the profit you've made selling items to flea market with his help. The flea price of an item is also affected by item's condition.
* Flea reputation on the client updates when you reboot the game or get out of a raid.
Found in raid item attachments, weapons etc.
These are a bit complicated balance-wise. Due to how items are priced on the flea only the price of the base item is accounted. The accounted price is the average offer price for an operational(has all vital attachments) item.
So technically you can sell an M4A1 or HK416 with just the lower receiver for the full flea price of ~50k. The reason for that is that some attachments have hilarious prices. E.g. M4A1 lower receiver is ~200-250k roubles on flea, or some basic items from default weapon presets are overpriced at about ~10-50k roubles.
Any attachments on the found in raid weapon are not accounted towards its price, if you want to sell some valuable attachment - sell separately. You also could disassemble a weapon completely and abuse the hilarious prices on the flea.
On the other hand if you somehow fixed the prices, have a mod that does it or just want to sell a stock found in raid M4A1 for ~250k roubles - this feature can be configured in the config.json file.
logger - can be ignored. If you set "verbose" to true - it will output some log messages in the server console.
useCutomTraders - default value false. Determines whether Broker will sell to custom traders.
customTraderIds - default value [](empty array). An explicit range of custom traders to be used by Broker, obviously matters only if useCustomTraders is true. When left empy ([]) - all custom traders will be used. If you want an explicit range of traders add their IDs into the array in the following manner: ["customTraderId1", "customTraderId2", "customTraderId3"]. Trader IDs can be found in their base.json file, look for a line with "_id" (it's usually in the beginning).
buyRateDollar - by default is set to 1. Must be a positive number or 0. Determines the rate at which Broker buys dollars from you, base price is Peacekeeper's sell price. If set to 0 - Broker will stop buying dollars.
buyRateEuro - by default is set to 1. Must be a positive number or 0. Determines the rate at which Broker buys euros from you, base price is Skier's sell price. If set to 0 - Broker will stop buying euros.
profitCommissionPercentage - by default is set to 0. Available range of values is [0-99]. Determines how much Broker will take from your profits.
Since v1.2.0, doesn't reduce the sales sum increase when items are sold to their corresponding traders.
Doesn't affect foreign currency sales.
For flea transactions commission is calculated from the profit(price - tax), not the flea price of an item. It doesn't affect flea rep gain.
useRagfair - by default true. When set to false - Broker will only show trader prices and sell to traders. With this settings being false, any other setting with "ragfair" prefix should be irrelevant.
ragfairUseLowestPrice- default value true. When calculating flea item prices, gets the lowest flea price of an item with best possible condition. Set to false for old behaviour where its calculating an average from offers with 85-100% condition.
ragfairIgnoreAttachments - by default true. When set to false - accounts for every single attachment on the item when calculating flea market price. If you changed this option - clear mod cache at SP TARKOV/user/mods/Nightingale-brokertrader-[version]. More about it at "Found in raid item attachments, weapons etc." section in "Details".
ragfairIgnorePlayerLevel - by default false. When set to true - ignores flea level restriction set in the server, when comparing trader/flea prices.
ragfairIgnoreFoundInRaid - by default false. When set to true - ignores item's found in raid status, when comparing trader/flea prices.
tradersIgnoreUnlockedStatus - default value false. Determines whether Broker will ignore traders "Unlocked" status (e.g. how Jaeger is initially locked). Can be useful if you have a mod that dynamically locks/unlocks traders, e.g. Path To Tarkov.
useNotifications - default value true. Determines whether notifications will be displayed, set to false if you want to disable them.
notificationsLongerDuration - default value false. Setting to true makes notifications display 2-3 seconds longer.
useCache - by default false. When set to true - creates a cache of collected flea prices. Might save you a second or two when booting up the server. If you installed any mods that affect Flea Market prices after launching the server with my mod at least once, and you have caching enabled - clear the mod cache.
useClientPlugin - default value true. Should always be true. Using the mod with this setting being false is not directly supported. If you are having issues with the client plugin set this value to false.
Disabling the client plugin disables all client-side features and introduces inconsistencies, e.g. the price displayed on the UI is not consistent with the actual profit you'll get. Also flea tax calculation(and maybe some others) will be slightly inaccurate.
You can also try to remove the BrokerTraderPlugin.dll and set this value to false, but if even that doesn't work, that might mean that the server side of the mod is not compatible with your SPT-AKI version.
useItemBaseClassServiceFix - default value false. An optional(and also kind of temporary) fix which should be used if you get spammed with "Item not found in item base cache" warnings.
Initially made this for myself, since I wanted to balance and play around with item properties.
I wanted to do things like:
setting recoil/other stat multipliers for some weapon groups based on their caliber or their name(MDRs, SCARs, Glocks, ect.)
removing turn rate modifier from any equipment(including face shields, SLAAPs, etc.) lolipanic
making earpiece wearable with heavy helmets
NVGs wearable with face shields
combining different helmets with different visors (not always pretty)
changing food/medical items use time and other props
changing tactical headset properties
and so on...
So basically this mod lets you do exactly that and anything else you want to do with item properties.
In general to use it you set up a query which will filter items by set conditions and then multiply or set those item's property values. So you can change several items at the same time or just one individually.
While already mentioned in the Readme, here are resources I used which might help you understand what properties do Tarkov items have and how you should edit them:
Your SPT-AKI's \Aki_Data\Server\database\templates\items.json, more relevant to your SP Tarkov version than DB search, but use it only as reference, do not mess it up.
It's recommended to use an editor which supports JSON format (e.g. VSCode/VSCodium) to avoid making mistakes in the structure.
Always keep a profile backup if you are worried about how some item changes you've set up might affect your profile.
More details and examples on how to use it are in Readme.pdf.