Traders on Flea 1.0.4

Allow Fence and any modded traders to show up on Flea and search results.

You will need to make sure this mod loads after any other mods that include custom traders. You may need to add additional z's to the folder name.

Configuration

Settings are available in src/config.json.


enabled: true | false global on/off switch for the mod


includeFence: true | false if Fence should be included in Flea & search results


forceAdd: true | false Forces all traders to be added to flea. This removes some items from the trader's inventory! See Below

Troubleshooting

Why am I seeing a message that a trader couldn't be added to flea?

This happens when a trader has items in their inventory that aren't registered in the global items database, so it causes an error when the game checks if these items are allowed on the flea market. These items could be references to items from other mods that aren't installed, but they likely aren't showing up in the trader's inventory already.


By default, this mod just skips adding the trader to flea when these invalid items are found.


You can set forceAdd: true in the config to remove these items from the trader's inventory and add the trader to flea. A file will be generated in the mod's res/ folder that lists the items that were removed. This file does not do anything, it just for you to see what was removed.


Turning this setting back to false and restarting the server will go back to skipping that trader and not altering their inventory (the file in the /res/ folder will still be there, but it's just for your information).

I'm seeing an error on the server.

Please leave a comment that includes the error you're seeing and the custom traders you have installed. I'll take a look and see if I can provide a fix!

  • Version 1.0.4

    Fixed a compatibility issue with HideoutItems mod. Now checks if a price is set in trader.assort.barter_scheme when validating items in the trader's inventory.

  • Version 1.0.3

    Added a new 'forceAdd' config option to remove invalid items from a trader's inventory and add them to flea. See main page or included README for details.

  • Version 1.0.2

    Removed the "Unknown" person showing up in flea with really low prices.

  • Version 1.0.1

    Added a new config option:


    includeFence: true | false if Fence should be included in Flea & search results. Default config is set to true.

  • Version 1.0.0

  • thank you great mod! just a question, does it mean if i set it to "force" it will remove the items from the trader only on flea or everywhere?

    • Hey, glad you like it!


      Setting "forceAdd" to true would just remove the invalid items from the trader's inventory. Most of the time, these invalid items are items from other mods that aren't installed, so they likely aren't showing up in the trader's inventory already.


      An easy way to double check is to keep "forceAdd": false and take a screenshot of the bottom of the trader's inventory. Then switch "forceAdd": true, restart the server, and take another screenshot.


      If you find that these screenshots are different and items are actually being removed, please let me know what custom trader it is, so I can take a look!

      Like 2
  • Hello.


    I'm getting the following error:


    [ERROR] Trace:

    TypeError: Cannot read property '0' of undefined

    at Function.generateTraderOffers (C:\SPT-AKI\obj\src\servers\RagfairServer.js:380:34)

    at Function.update (C:\SPT-AKI\obj\src\servers\RagfairServer.js:168:31)

    at Function.load (C:\SPT-AKI\obj\src\servers\RagfairServer.js:25:23)

    at Object.load [as aki-ragfair] (C:\SPT-AKI\obj\src\callbacks\RagfairCallbacks.js:9:23)

    at Function.load (C:\SPT-AKI\obj\src\utils\App.js:22:13)

    at Function.main (C:\SPT-AKI\obj\src\Program.js:26:13)

    at Object.192../Lib.js (C:\SPT-AKI\obj\src\Program.js:30:9)

    at o (C:\SPT-AKI\obj\node_modules\browser-pack\_prelude.js:1:1)

    at C:\SPT-AKI\obj\node_modules\browser-pack\_prelude.js:1:1

    at Object.289.../Program.js (C:\SPT-AKI\obj\src\ide\ReleaseEntry.js:4:1)


    I'm using the following custom trader:
    AKGUY, AR SHOPPE, Hex's Firearm Production (Big Money), Hideout Items and NamelessMaid

    • Hey igotgun, thanks for those details, I just added a fix for this (1.0.4).


      It looks like the issue was with HideoutItems. That trader has one item in their inventory (gold chain) that doesn't have a price set for it, so it likely wasn't available to purchase.


      You can set 'forceAdd: true' in the config to remove that item and add the trader to flea.


      Cheers

    • Tested and working. Thank you for swift fix and amazing mod. Make my gun preset building process a lot more easier.

  • I'm getting the same

    "TypeError: Cannot read property 'CanSellOnRagfair' of undefined

    at Function.generateTraderOffers...." error as shadowalla91


    I am using TML.


    I removed the custom traders that I had which were, AK Guy, AR Shoppe, GearGal, and Food&Drink Redux then added one trader at a time and re-ran the server after deleting the old loadorder.txt


    I have discovered that using AK Guy and AR Shoppe, the server throws this error. GearGal seems to be working fine, kind of weird since its made by the same person. I'm going to try more load order arrangements and report back if I can get it to work.

    • If it helps, it appears both those MODs are extremely outdated


      hub.sp-tarkov.com/files/file/80/


      hub.sp-tarkov.com/files/file/60/
    • idk what happened to your link but you linked me joshs super ifak and a price adjuster mod, that are in fact, extremely outdated LOL


      hub.sp-tarkov.com/files/file/185/


      hub.sp-tarkov.com/files/file/330/


      those are the two mods that I had to load AFTER this pages mod

    • I see that. I have no idea what happened. Here are the two "outdated" links I meant to include.


      [ AR Shoppe Mod ]

      [ AK GUY ]

    • I just found an "updated / current" version of [AKGUY SUPER SHOP 2.3.1]. With ONLY that Trader Mod and this one, the Server.exe immediately spits out this ERROR. Hope this helps your troubleshooting.


      ...AND, then when I run the [Aki.Launcher.exe], it WONT read my existing profile. With either one loaded alone, no errors and the [Aki.Launcher.exe] reads the profile, but with your mod and [AKGUY SUPER SHOP 2.3.1], the launcher will NOT read my profile. Something is going on. Again, hope this helps troubleshooting,


      [ AKGuy Super Shop ]


      ┌───────────────────────────────┐

      │ SPT-AKI 2.3.1 │

      https://discord.sp-tarkov.com

      │ │

      │ This work is free of charge │

      │ Commercial use is prohibited │

      └───────────────────────────────┘

      Server: executing startup callbacks...

      [INFO] Importing database...

      ModLoader: loading mods...

      [INFO] Loading: AKGUY

      buoy-traders-on-flea: Added Fence, AK GUY to flea

      [ERROR] Trace:

      TypeError: Cannot read property 'CanSellOnRagfair' of undefined

      at Function.generateTraderOffers (C:\NoScan\Games\EFT\obj\src\servers\RagfairServer.js:373:67)

      at Function.update (C:\NoScan\Games\EFT\obj\src\servers\RagfairServer.js:168:31)

      at Function.load (C:\NoScan\Games\EFT\obj\src\servers\RagfairServer.js:25:23)

      at Object.load [as aki-ragfair] (C:\NoScan\Games\EFT\obj\src\callbacks\RagfairCallbacks.js:9:23)

      at Function.load (C:\NoScan\Games\EFT\obj\src\utils\App.js:22:13)

      at Function.main (C:\NoScan\Games\EFT\obj\src\Program.js:26:13)

      at Object.192../Lib.js (C:\NoScan\Games\EFT\obj\src\Program.js:30:9)

      at o (C:\NoScan\Games\EFT\obj\node_modules\browser-pack\_prelude.js:1:1)

      at C:\NoScan\Games\EFT\obj\node_modules\browser-pack\_prelude.js:1:1

      at Object.289.../Program.js (C:\NoScan\Games\EFT\obj\src\ide\ReleaseEntry.js:4:1)

      [SUCCESS] Started webserver at http://127.0.0.1:6969

      [SUCCESS] Started websocket at ws://127.0.0.1:6969

      [SUCCESS] Server is running. Happy playing!

    • yeah those updated links you posted are the versions I'm using.


      i loaded those two mods after this pages' mod. Those two traders arent on the Flea, but the server doesnt throw the error either, which is fine with me.

  • Hi i got this error and when i launch the Akilauncher my profile is gone and i need to create a new one(even thought it's still in the folder)

    TypeError: Cannot read property 'CanSellOnRagfair' of undefined

    at Function.generateTraderOffers (G:\EMUTARKOV\obj\src\servers\RagfairServer.js:373:67)

    at Function.update (G:\EMUTARKOV\obj\src\servers\RagfairServer.js:168:31)

    at Function.load (G:\EMUTARKOV\obj\src\servers\RagfairServer.js:25:23)

    at Object.load [as aki-ragfair] (G:\EMUTARKOV\obj\src\callbacks\RagfairCallbacks.js:9:23)

    at Function.load (G:\EMUTARKOV\obj\src\utils\App.js:22:13)

    at Function.main (G:\EMUTARKOV\obj\src\Program.js:26:13)

    at Object.192../Lib.js (G:\EMUTARKOV\obj\src\Program.js:30:9)

    at o (G:\EMUTARKOV\obj\node_modules\browser-pack\_prelude.js:1:1)

    at G:\EMUTARKOV\obj\node_modules\browser-pack\_prelude.js:1:1

    at Object.289.../Program.js (G:\EMUTARKOV\obj\src\ide\ReleaseEntry.js:4:1)

    • I had that as well. I restarted the server and made sure the mod is last to load (using TrapModLoader).

    • Hey shadowalla91, what version of SPT-AKI are you using and what modded traders do you have?


      This mod shouldn't affect anything on your profile, so I'm guessing this error just prevented your existing profile from loading. If you remove the mod (or set "enabled": false in the config), does your profile show up?

    • i have aki 2.3.1 version and i have namelessmaid, AKGUY, GearGal, armalite shop, Hex'sFBPtrader(Gunsmith), bigger Bang trader and questor. I tried to remove the mod and my profile shows up again.

    • Hey, thanks for those details.


      I just uploaded a fix for this. It looks like some modded traders include items in their inventory from other mods that may not be installed (or could just be a mistake), so the game couldn't find them when checking if they can be sold on flea.


      In the new version of the mod, these traders are skipped by default. You can set 'forceAdd: true' to have these items removed from the trader's inventory (they likely weren't showing up already) and add the trader to flea.


      Let me know if that doesn't solve your issue here.

    • i tested it yesterday everything works fine so far. thank you for this small but amazing mod and for the quick reply

  • Awesome mod! I was wondering though if it was possible to add a config option to turn off the fence on flea, but still allow custom traders?

    Like 1
    • Glad you like it! I just added a new version with that config option. Let me know if you run into any issues with it.

      Thanks 1
    • Oh wow, that was fast! Thank you!! It doesn't seem like it's working though. Unknown still shows up under the flea, even when it's set to false.

    • Ah ok, thanks for the details, just uploaded a fix.


      Fence shows up as "Fence" in the search results. The "Unknown" person was actually the base prices for flea market getting added as a trader. That's why their prices were so low!


      Cheers

      Thanks 1
    • That did the trick! Thank you so much, and thanks again for the speedy updates!!

  • But let me start by saying........ :love:

    Thanks 1
  • I was just thinking about this today. Thanks a lot for this mod!

    Like 1
    • Just tried it. Fence items are now showing on the Flea. Works as described. Thanks again.

      Like 1