Mod Details

Advanced Trader Framework

Advanced Trader Framework 2.1.0

Created by  yoshka

7.2K Downloads

SPT 0.0.0 Compatible

Edit, customize and even create new traders easily. Share you custom made trades with the community and add them to the trader of your choice.

Latest Version 2.1.0
SPT 0.0.0

Updated Jul 28, 2022 at 8:43 PM

Version Notes
  • Updated to AKI 3.1.1
This download is externally hosted.
Always scan for viruses.

UPDATE NOTE: ATF is now a Standalone Trader Example for you to customize. The old files ATF files are still compatible with the new Version, just drop them into the /db/assort/ folder.

The Utility functions will be moved to a new separate mod! It’s gonna take some time to get done.

Features:

  • Create new Standalone Trader easily
  • Create new Trade Files that can be shared with others
    • Any Trades Trades in the /db/assort/ folder will be added to the Trader

Installation:

  • Just put the mod into the /user/mods/ folder

Adding a Trade:

  • Just put any Trade file into the /db/assort/ folder

Changing a Trader Avatar:

  • your new avatar must be .jpg or .png
  • add your new avatar to the /res/ folder
  • edit “avatar”:“/files/trader/avatar/YourAvatarName.jpg“ in the base.json

Share your Mod:

  • change the TraderID in the base.json in the /db/base/ folder
  • change the Modname in the config
  • change the Foldername

Notes on sharing Trade files:

If you share your presets you should make sure that your presets are valid without mods otherwise you should create a new TradePackage with Mod requirements. Mods like Makes Sense and alevesThings (cool mods btw) let you put certain attachments on weapons which would be normally not possible. I dont know how the game reacts if you load such a preset without those mods.

I hope the community creates some cool new Trade Overhauls. My reason for creating this mod was exactly that. I just wanted to play a hardcore run, but I didn’t like the default barter trades. At first I wanted to edit the default traders, but then I thought why not make it very customizable and add the ability to save trades in different files which you can edit easily and share.

I am gonna upload some unique trades in the next couple of days or weeks depending on how much time I have. I hope you have fun with this mod and I also hope that there are not too many problems I have to fix.

Notes for modders:

  • feel free to use, improve and update any of my code
  • some credits would be nice if you use my code
Version 2.1.0
Download Mod Version
SPT 0.0.0
Latest Compatible SPT Version

1.3K Downloads

Created Jul 28, 2022 at 8:43 PM

Updated Jul 28, 2022 at 8:43 PM

Virus Total Results
  • Updated to AKI 3.1.1
Version 2.0.0
Download Mod Version
Unknown SPT Version
Latest Compatible SPT Version

602 Downloads

Created Jun 30, 2022 at 7:10 PM

Updated Jun 30, 2022 at 7:10 PM

Virus Total Results
  • Updated to Aki 3.0.0
  • Changed to a standalone Tradermod
  • Old ATF files are still compatible
  • The Utility Fuctions will be moved to a new Mod
Version 1.5.0
Download Mod Version
Unknown SPT Version
Latest Compatible SPT Version

2.4K Downloads

Created Feb 2, 2022 at 2:17 PM

Updated Feb 2, 2022 at 2:17 PM

Virus Total Results
  • updated to AKI 2.2.0
  • repeatable Quest should work for custom Traders
  • all Traders using ATF should also work in AKI 2.2.0
  • should also work with AKI 2.2.1
Version 1.4.0
Download Mod Version
Unknown SPT Version
Latest Compatible SPT Version

657 Downloads

Created Jan 27, 2022 at 1:57 PM

Updated Jan 27, 2022 at 1:57 PM

Virus Total Results
  • Fixed the insurance Issue for custom Traders
  • The Modded Trader Example now has a dialogue.json
  • Prapors dialogue is used as default in case there is no dialogue.json
  • To update from V1.3 to V1.4 just replace the old /src/ folder with the new /src/ folder.
  • Thanks to ZxregretzxZ for the help with the insurance issue.
Version 1.3.0
Download Mod Version
Unknown SPT Version
Latest Compatible SPT Version

1.1K Downloads

Created Jan 16, 2022 at 6:19 PM

Updated Jan 16, 2022 at 6:19 PM

Virus Total Results
  • Removed deletion of old avatars in localappdata
  • ATF now throws an error if a Trade ID doesn’t match with a barter_scheme and loyal_level ID
  • Traders now get added to the Flea and all their trades should be available on the flea
Version 1.2.0
Download Mod Version
Unknown SPT Version
Latest Compatible SPT Version

623 Downloads

Created Dec 28, 2021 at 1:08 PM

Updated Dec 28, 2021 at 1:08 PM

Virus Total Results
  • Jaeger had the Mechanic base.json causing problems
  • Renamed the /moddedTrades/ folder to /TradePackages/
  • Removed the old /assort/ folder added the /DefaultTradePackage/ Folder instead
  • the requiredMods.json is now called PackageConfig.json
  • added the ability to enable a Package in the PackageConfig.json
  • renamed the traderConf.json to TraderConfig.json and removed the enableBlacklist option
PaPaSamBuBu

keep getting this error

TypeError: Cannot set properties of undefined (setting ‘Potnak’)

TypeError: Cannot set properties of undefined (setting ‘Potnak’)

at Potnak.postDBLoad (C:\Users\ravin\OneDrive\Desktop\SP Tarkov\user\mods\Pontak\src\mod.js:72:49)

at PostDBModLoader.executeMods (C:\snapshot\project\obj\loaders\PostDBModLoader.js)

at PostDBModLoader.onLoad (C:\snapshot\project\obj\loaders\PostDBModLoader.js)

at App.load (C:\snapshot\project\obj\utils\App.js)

TypeError: Cannot set properties of undefined (setting ‘Potnak’)

TypeError: Cannot set properties of undefined (setting ‘Potnak’)

at Potnak.postDBLoad (C:\Users\ravin\OneDrive\Desktop\SP Tarkov\user\mods\Pontak\src\mod.js:72:49)

at PostDBModLoader.executeMods (C:\snapshot\project\obj\loaders\PostDBModLoader.js)

at PostDBModLoader.onLoad (C:\snapshot\project\obj\loaders\PostDBModLoader.js)

at App.load (C:\snapshot\project\obj\utils\App.js)

0 Likes
yexer7

im getting an error i cant make any sense of when i try to install in visual studios.

* Executing task in folder ATF_ExampleTrader: npm install

npm : The term ‘npm’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

At line:1 char:1

+ npm install

+ ~~~

+ CategoryInfo : ObjectNotFound: (npm:String) [], CommandNotFoundException

+ FullyQualifiedErrorId : CommandNotFoundException

* The terminal process “C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command npm install” terminated with exit code: 1.

* Terminal will be reused by tasks, press any key to close it.

* Executing task in folder ATF_ExampleTrader: npm install

npm : The term ‘npm’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

At line:1 char:1

+ npm run build:unzipped

+ ~~~

+ CategoryInfo : ObjectNotFound: (npm:String) [], CommandNotFoundException

+ FullyQualifiedErrorId : CommandNotFoundException

* The terminal process “C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command npm run build:unzipped” terminated with exit code: 1.

* Terminal will be reused by tasks, press any key to close it.

0 Likes
yoshka

The error is CommandNotFoundException and that means you didn’t install node.js because it can’t find the npm command in your environment.

I am guessing you downloaded the Node.js installation and only ran the install_tools.bat file and called it a day. So you most likely only installed chocolatey and python.

I installed Node.js via chocolatey but because of that I run a newer version. I am not sure why the getting started guide for AKI modding states that Version 14.15.3 is the one needed. I tried the npm install on my end and it works but I don’t really use it. So it is most likely better to install the right version as the documentation states.

1 Like
yexer7

it was the node version i think. i deleted everything tried anain no dice so i deleted again and got chocolaty first. then then used that to install node. it works now! thanks for the help!

0 Likes
yexer7

hi me again! when this is put in assort folder, the server crashes before i can get an error message in the server. maybe you know what I’m doing wrong.

{
“items”: [
{
“_id”: “Glock_Preset”,
“_tpl”: “5a7ae0c351dfba0017554310”,
“parentId”: “hideout”,
“slotId”: “hideout”,
“upd”: {
“UnlimitedCount”: true,
“StackObjectsCount”: 999999
}
},
{
“_id”: “Glock_Slide”,
“_tpl”: “5a6f5e048dc32e00094b97da”,
“parentId”: “Glock_Preset”,
“slotId”: “mod_reciever”,
“upd”: {
“StackObjectsCount”: 1
}
},
{
“_id”: “Glock_grip_mod”,
“_tpl”: “5a7b4960e899ef197b331a2d”,
“parentId”: “Glock_Preset”,
“slotId”: “mod_pistol_grip”,
“upd”: {
“StackObjectsCount”: 1
}
},
{
“_id”: “Glock_extended_frontsight”,
“_tpl”: “5a71e0048dc32e000c52ecc8”,
“parentId”: “GLock_Slide”,
“slotId”: “mod_sight_front”,
“upd”: {
“StackObjectsCount”: 1
}
},
{
“_id”: “Glock_extended_rear_sight”,
“_tpl”: “5a71e0fb8dc32e00094b97f2”,
“parentId”: “GLock_Slide”,
“slotId”: “mod_sight_rear”,
“upd”: {
“StackObjectsCount”: 1
}
},
{
“_id”: “Glock_33rd_Mag”,
“_tpl”: “5a718da68dc32e000d46d264”,
“parentId”: “Glock_Preset”,
“slotId”: “mod_magazine”,
“upd”: {
“StackObjectsCount”: 1
}
},
{
“_id”: “Glock_barel_Threaded”,
“_tpl”: “5a6b5e468dc32e001207faf5”,
“parentId”: “Glock_Preset”,
“slotId”: “mod_barrel”,
“upd”: {
“StackObjectsCount”: 1
}
},
{
“_id”: “x400_flashlight”,
“_tpl”: “56def37dd2720bec348b456a”,
“parentId”: “Glock_Preset”,
“slotId”: “mod_tactical”,
“upd”: {
“StackObjectsCount”: 1
}
},
{
“_id”: “sdn9_supressor”,
“_tpl”: “5c7e8fab2e22165df16b889b”,
“parentId”: “Glock_barel_Threaded”,
“slotId”: “mod_muzzle”,
“upd”: {
“StackObjectsCount”: 1
}
}
],
“loyalty_level_items”: {
“Glock_Preset”: 1
}
}

0 Likes
yexer7

(node:1832) UnhandledPromiseRejectionWarning: TypeError: Cannot read property ‘96d0efd58ba74b93d97657e5’ of undefined <———–– the error has to do with the preset

at RagfairOfferGenerator.generateTraderOffers atleast to me it looks like it does. (C:\Users\jacob\Desktop\SPTAKI\obj\bundle.js:8671:54)

at RagfairServer.update (C:\Users\jacob\Desktop\SPTAKI\obj\bundle.js:2469:40)

at C:\Users\jacob\Desktop\SPTAKI\user\mods\zz-CustomTradersOnFlea\src\mod.js:52:52

at Array.forEach (<anonymous>)

at CustomTradersOnFlea.postAkiLoad (C:\Users\jacob\Desktop\SPTAKI\user\mods\zz-CustomTradersOnFlea\src\mod.js:48:14)

at PostAkiModLoader.executeMods (C:\Users\jacob\Desktop\SPTAKI\obj\bundle.js:13605:46)

at PostAkiModLoader.load (C:\Users\jacob\Desktop\SPTAKI\obj\bundle.js:13594:14)

at ModCallbacks.onLoad (C:\Users\jacob\Desktop\SPTAKI\obj\bundle.js:1833:31)

at App.load (C:\Users\jacob\Desktop\SPTAKI\obj\bundle.js:18157:59)

at C:\Users\jacob\Desktop\SPTAKI\obj\bundle.js:19855:47

(Use Aki.Server --trace-warnings ... to show where the warning was created)

(node:1832) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

(node:1832) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

when the server runs it gives this error. i know the error is linked to another mod. but the server dosent run without it oddly.

0 Likes
yoshka

That most likely happened because you file is missing the barter_scheme section which is basically the price. I am guessing that is why RagfairOfferGenerator.generateTraderOffers throws the undefined error.

“barter_scheme”: { “Glock_Preset”: [ [ { “count”: 100, “_tpl”: “5449016a4bdc2d6f028b456f” } ] ] }

1 Like
yexer7

I’m still unable to get the .json to load.

after adding the barter scheme this is the error. i also re imported the preset so that i know all the item id’s are good.

the server loads with no errors when the (custom_traders_on_flee) mod is not included but traders screens are blank as well as the inventory screen. when (custom_traders_on_flee) is installed this is the error it gives. same error but now with different property: (name).

(node:9004) UnhandledPromiseRejectionWarning: TypeError: Cannot read property ‘0’ of undefined

at RagfairOfferGenerator.generateTraderOffers (C:\Users\jacob\Desktop\SPTAKI\obj\bundle.js:8671:64)

at RagfairServer.update (C:\Users\jacob\Desktop\SPTAKI\obj\bundle.js:2469:40)

at C:\Users\jacob\Desktop\SPTAKI\user\mods\zz-CustomTradersOnFlea\src\mod.js:52:52

at Array.forEach (<anonymous>)

at CustomTradersOnFlea.postAkiLoad (C:\Users\jacob\Desktop\SPTAKI\user\mods\zz-CustomTradersOnFlea\src\mod.js:48:14)

at PostAkiModLoader.executeMods (C:\Users\jacob\Desktop\SPTAKI\obj\bundle.js:13605:46)

at PostAkiModLoader.load (C:\Users\jacob\Desktop\SPTAKI\obj\bundle.js:13594:14)

at ModCallbacks.onLoad (C:\Users\jacob\Desktop\SPTAKI\obj\bundle.js:1833:31)

at App.load (C:\Users\jacob\Desktop\SPTAKI\obj\bundle.js:18157:59)

at C:\Users\jacob\Desktop\SPTAKI\obj\bundle.js:19855:47

(Use Aki.Server --trace-warnings ... to show where the warning was created)

(node:9004) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

(node:9004) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

0 Likes
yexer7

this is the json as well.

{
“items”: [
{
“_id”: “glock_preset”,
“_tpl”: “5a7ae0c351dfba0017554310”,
“parentId”: “5fe49444ae6628187a2e78b8”,
“slotId”: “hideout”,
“upd”: {
“UnlimitedCount”: true,
“StackObjectsCount”: 999999
}
},
{
“_id”: “glock_slide”,
“_tpl”: “5a6f5e048dc32e00094b97da”,
“parentId”: “glock_preset”,
“slotId”: “mod_reciever”
},
{
“_id”: “glock_grip_mod”,
“_tpl”: “5a7b4960e899ef197b331a2d”,
“parentId”: “glock_preset”,
“slotId”: “mod_pistol_grip”
},
{
“_id”: “glock_front_sight”,
“_tpl”: “5a71e0048dc32e000c52ecc8”,
“parentId”: “glock_slide”,
“slotId”: “mod_sight_front”
},
{
“_id”: “glock_rear_sight”,
“_tpl”: “5a71e0fb8dc32e00094b97f2”,
“parentId”: “glock_slide”,
“slotId”: “mod_sight_rear”
},
{
“_id”: “glock_magazine”,
“_tpl”: “5a718da68dc32e000d46d264”,
“parentId”: “glock_preset”,
“slotId”: “mod_magazine”
},
{
“_id”: “glock_barrel”,
“_tpl”: “5a6b5e468dc32e001207faf5”,
“parentId”: “glock_preset”,
“slotId”: “mod_barrel”
},
{
“_id”: “x4oo_flashlight”,
“_tpl”: “56def37dd2720bec348b456a”,
“parentId”: “glock_preset”,
“slotId”: “mod_tactical”
},
{
“_id”: “sdn9_supressor”,
“_tpl”: “5c7e8fab2e22165df16b889b”,
“parentId”: “654254b75f1114e1fc0e1349”,
“slotId”: “mod_muzzle”
}
],
“barter_scheme”: {
“glock_preset”: [
[
{
“count”: 50000,
“_tpl”: “59faff1d86f7746c51718c9c”
}
]
]
},
“loyalty_level_Items”: {
“glock_preset”:1
}
}

0 Likes
yoshka

Might be because of the parentId of your sdn9 supressor which should most likely be “glock_barrel” or it might be that you have multiple trades with the same IDs. If you just test it with the preset that is included in the mod I am pretty sure it would work. Doing presets by hand isn’t the best way.

The old version had the exportPreset function which I wanted to split up into a new mod along with the other utilities but lately I haven’t been really motivated to modding.

0 Likes
yexer7

I’m still working on it! I’ll get it at some point, thank you for all your help and all you do!

0 Likes
JDCallie

Is there a way to add trades to existing traders, rather than to make a new trader?

0 Likes
yoshka

It should be possible. You have to copy the trader base from your AKI installation. The files are in Aki_Data/Server/database/traders/. Each Folder there is a trader. To find the trader your looking for just look into the base.json of each folder.

If you have the base.json of the default trader you want to edit, you just use that with this mod and if you only want to add stuff to the trader assortment you have to grab the assort.json and put it in the assort folder of this mod alongside with all your trades you want to add to it. If you don’t use the default assort only your added trades should show up.

0 Likes
Ksmitty1998

Update to 3.2.0?

0 Likes
yoshka

Is it broken? I haven’t read about any issues that need to be adressed in the AKI 3.2.0 update.

If it is broken comment again and let me know and I will try to look into it. I haven’t had the time to test the new update.

0 Likes
SLDEVIL

Hey, what is the best way to export a preset? i cannot figure it out by myself sadly.

0 Likes
yoshka

Normaly you would use the export preset utility function but I haven’t updated that to the newest version yet. So at the moment, there isn’t a easy way.

0 Likes
AILOUDER

Why did you remove Utility Fuctions from 2.0 ?

0 Likes
yoshka

Because the Utility functions will be seperate in a new mod.

0 Likes

And how then on 3.0.0 SPT.AKI Export assemblies?

0 Likes
yoshka

I am sorry, but I don’t understand your question.

0 Likes

I mean how to export weapon presets

0 Likes

It’s just that I understand that before the removal of Utility Functions, you had a weapon export function that could be placed in “assort” after which the trader could sell these weapons ( Sorry, I can only communicate through a translator)

0 Likes
yoshka

All Utility functions will be moved to the new ATF Utility mod, that includes exporting presets, merging and unpacking trades.

0 Likes
Wieger

Is there a good guide anywhere for creating new trades? I’d like to add some presets with unique names, but I don’t know how to do that in the JSON

0 Likes
yoshka

At the moment there isn’t. I am working on the ATF Utility mod that helps with creating new Tradefiles and Presets. I hope that I can get the mod done as soon as possible.

0 Likes
Wieger

Great to hear. Thanks for the response

0 Likes
ZacFair

hey i have too many traders(so i cant acces the top ones like therapist) but dont want to get rid of them, could you make it so you can scroll to see the rest of your traders on the trader menu ?

0 Likes
yoshka

sorry but I can’t really help with that problem.

0 Likes
xatts

just wondering if this works with 2.3.0

0 Likes
yoshka

Probably not. The 2.3.0 update has major changes to the modding structure.

0 Likes
xatts

unlucky, thanks for letting me know! have a wonderful day/night

0 Likes

Testing. On 2.3.1 seems works, though warning messages about “trader ID not found” types in server console. Will see, can I disable them or not. Trader appears, I tried to buy some supplies… it was done, without errors. Next try will be creating some simple quest with “Custom Quests” mod.

Upd: Seems warning connected with other mod, it is not ATF problem, I guess. It looks like setting, which changing trader’s assort update, probably from KMC ServerValueModifier. Nevertheless, your mod is still working, thank you, yoshka! Upd upd: warning appears also with clean spt with ATF mod only. Seems, it is messages from server itself.

Upd2: Yup, quests working too. Yoshka, cheers! Your mod works still great! People, you CAN download this mod to playing with spt 2.3.1, it’s definitely WORKS (I ran some simple tests, but I think it is enough)

0 Likes
GhostFenixx

Although it’s a necropost - the addition with warning messages is not SVM’s fault but AKI change of internal configs related to insurance and stock time.

let AkiFix = {“traderId”: “INSERTID”,“seconds”: 3600}
TraderConfig[“updateTime”].push(AkiFix);
InsuranceConfig.insuranceMultiplier[“INSERTID”] = 0.30
Here is the fix, change “INSERTID” to trader ID you’re about to fix, you can duplicate this without let in the beginning if you have multiple custom traders, some of mods already have that treatment, I think it’ll be LeKaiju’s work and Thunderbags.

0 Likes
yoshka

Thanks for informing me about the issue. I will look into it.

0 Likes
Dogboy

Aloha,

I’m having an issue with exporting presets. They almost always export with the word ‘export’ still attached.

https://ibb.co/D9pdC2xD9pdC2x

I’ve tried seperating them by a space and putting export at the end of the filename, neither of which have helped.

If there’s a way to change the name manually I am fine with doing it that way, I just don’t know how.

Thanks in advance,

0 Likes
yoshka

The names are only saved in your profile and won’t be shared with other if you share your trade files.

You can either change the name of the preset directly in your profile or if you delete the preset in the in game preset editor, the name will be gone. Then you should be able to save the preset under a different name.

1 Like
Dogboy

Thanks Yoshka, much appreciated.

0 Likes

Details