Algorithmic Barter Randomizer 1.1.2

Randomize vanilla barters. Turn on hardcore mode to have barters for almost every item! Configurable with multiple difficulty settings! Customizable seed for replayability! Share your seed/difficulty to get the same outcome with friends!

uc?export=download&id=1gOxuD5yDt4dexIvUMnp8Z-cbfwgbbS4P



What this mod changes:

  • Randomizes all trader "barter" items

    The algorithm basically looks at the costs for the target item, and then randomly chooses items that are near to the same cost for the trade.

    In general, trades should be more sensical and require fewer items.
  • Optional "Hardcore" mode that changes most items in the game to barters)! (Excludes ammo/mags)
    This also by default:
    - Turns off the flea market
    - Reduces the require spend for each loyalty tier on traders
    - Increase the minimum amount of trades for most items from 1 > 5
    - Reduces the amount traders will give your for goods sold to them

    All of the above can be turned on/off

  • Configurable difficulty
  • Configurable seed, let no two play throughs feel the same!
  • Share your favourite seed/difficulty multipliers with friends to have the same experience as them!

Compatibility:

  • PUT this AFTER ALGORITHMIC LEVEL PROGRESSION in the order.json load order!!!
  • Should be compatible with almost everything :/
  • There is a config option to support custom traders as well!


Need some pointers for hardcore?

  • Fence is critical, use him to buy barter items/scopes/parts, you never know what a barter item he sells might get you.
  • Use the "Required for" right click menu option on bartered goods to figure out what they give you.
  • Trading between traders is a good strategy, think: pack of smokes > can of tuna > salewa > AKM
  • Use "ODT's Item info" so that in raid you know when something is valuable


SHOULD BE COMPATIBLE WITH ALL VERSIONS OF AKI!



If you're really digging the mod, consider supporting my caffeine addiction ☕ 8)


=== INSTALL STEPS ===


1. Drag and drop this folder into the user/mods folder.

2. Update your mods/order.json so that this is last on the list.

(this is likely only needed if you have custom quests you would like included)

3. Optionally change your configuration (see below configuration options).


4. ???????


5. Profit!!!!



Example order.json:

{

"order": [

"ServerValueModifier",

"zPOOP",

"Lua-CustomSpawnPoints",

"DewardianDev-XXXX",

"DewardianDev-AlgorithmicLevelProgression"
"DewardianDev-AlgorithmicBarterRandomizer",

]

}



==== Configuration Options ====


{

// Turn on/off the mod
"enable": true,


//Change this to change the randomizer, share seeds and difficulty with friends to get the same outcome!
"seed": 2023,


// These are the DIFFICULTY settings. For cheaper barters (0.2) is lower, more expensive barters is higher (1.5)

// This changes base games barter difficulty

"barterCostMultiplier": 0.7,


// This changes the cash converted barter difficulty
"cashBarterCostMultiplier": 0.5,


// This turns on hardcore, which changes most cash items to barters (excluding ammo/mags)
"enableHardcore": false,


    // These are the recommended settings for hardcore, feel free to change them if desired.
"hardcoreSettings": {


    // This allows a few of the cheaper items to be purchasable with cash
// Be aware: this isn't a 1:1 rouble value.

        "cashItemCutoff": 10000,


// Disables the open flee market (you can still use it to look for trader items)
      "disableFlee": true,


// Traders' loyalty requirement of cash spent is drastically reduced
// This is to compensate for less cash being used in general

      "reduceTraderLoyaltySpendRequirement": true,


// Increases minimum buy counts from 1 > 5 for traded items
    "increaseMinBuyCounts": true,


// This is to balance the player using fence for everything
      "reduceTraderBuyPrice": true
},


//Turn this on to figure out the correct custom trader name to add to the below "customTradersToInclude"
"printUnkownTraders": false,


// This is to add custom traders (Experimental: will be dependent on other modders db changes)
  "customTradersToInclude": [
"SteveTheExampleGuyThatHasSalewas",
"BobJustExampleBob"
],


//Will print out the changes for each cash change barter
  "debugCashItems": false,


//Will print out the changes for each barter
"debug": false
}


  • Version 1.1.2

    Compatibility Optimization:

    • Should help with compatibility with mods that implement items incorrectly with the DB.
  • Version 1.1.1

    Config change:


    • Fixed a bug with cash barters and custom items.
    • "Difficulty" has been replaced by two new values:
      "barterCostMultiplier": 0.7,

      "cashBarterCostMultiplier": 0.5,

    These values multiply the base items (to be traded for's) prices to figure the rough cost of the total barter items.


    For example, if the item costs 100, and the multiplier is 0.5, the traded item value would be 50.


  • Version 1.1.0

    Complete rewrite:


    • Completely rewrote the mod, balance feels much closer to live barters.


    NOTE: the hardcore mode may present trades that when combined are unbalanced, this is a known side effect of the random nature of this mod.

  • Would it be possible to randomize barters after each raid?

    • This is likely coming in the next update.

      Happy 1
  • any option to also make it so ammo/mags require barters? im doing a hardcore playthrough and its quite fun to be forced to use whatever you can salvage instead of just buying a kit

    • I would need to add something like BOOBs (bullet box mod) to accomplish that.


      I can look into it but magazines for example I can easily switch on.


      Maybe I'll add a config option for those

  • Version 1.1.2

    Compatibility Optimization:

    • Should help with compatibility with mods that implement items incorrectly with the DB.
  • TypeError: Cannot read properties of undefined (reading '_props')

    TypeError: Cannot read properties of undefined (reading '_props')

    at getPrice (D:\SPT-AKI 3.6.1\user\mods\zzzzzDewardianDev-AlgorithmicBarterRandomizer\src\BarterChanger\BarterChanger.js:57:24)

    at D:\SPT-AKI 3.6.1\user\mods\zzzzzDewardianDev-AlgorithmicBarterRandomizer\src\BarterChanger\BarterChanger.js:152:70

    at Array.forEach (<anonymous>)

    at D:\SPT-AKI 3.6.1\user\mods\zzzzzDewardianDev-AlgorithmicBarterRandomizer\src\BarterChanger\BarterChanger.js:146:30

    at Array.forEach (<anonymous>)

    at BarterChanger (D:\SPT-AKI 3.6.1\user\mods\zzzzzDewardianDev-AlgorithmicBarterRandomizer\src\BarterChanger\BarterChanger.js:114:26)

    at AlgorithmicBarterRandomizer.postAkiLoad (D:\SPT-AKI 3.6.1\user\mods\zzzzzDewardianDev-AlgorithmicBarterRandomizer\src\mod.js:10:61)

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

    at PostAkiModLoader.load (C:\snapshot\project\obj\loaders\PostAkiModLoader.js)

    at ModCallbacks.onLoad (C:\snapshot\project\obj\callbacks\ModCallbacks.js)

    TypeError: Cannot read properties of undefined (reading '_props')

    TypeError: Cannot read properties of undefined (reading '_props')

    at getPrice (D:\SPT-AKI 3.6.1\user\mods\zzzzzDewardianDev-AlgorithmicBarterRandomizer\src\BarterChanger\BarterChanger.js:57:24)

    at D:\SPT-AKI 3.6.1\user\mods\zzzzzDewardianDev-AlgorithmicBarterRandomizer\src\BarterChanger\BarterChanger.js:152:70

    at Array.forEach (<anonymous>)

    at D:\SPT-AKI 3.6.1\user\mods\zzzzzDewardianDev-AlgorithmicBarterRandomizer\src\BarterChanger\BarterChanger.js:146:30

    at Array.forEach (<anonymous>)

    at BarterChanger (D:\SPT-AKI 3.6.1\user\mods\zzzzzDewardianDev-AlgorithmicBarterRandomizer\src\BarterChanger\BarterChanger.js:114:26)

    at AlgorithmicBarterRandomizer.postAkiLoad (D:\SPT-AKI 3.6.1\user\mods\zzzzzDewardianDev-AlgorithmicBarterRandomizer\src\mod.js:10:61)

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

    at PostAkiModLoader.load (C:\snapshot\project\obj\loaders\PostAkiModLoader.js)

    at ModCallbacks.onLoad (C:\snapshot\project\obj\callbacks\ModCallbacks.js)

    • getting the above error when loading the server, i have made sure that this mod is after your level progression mod

      i have tried to reinstall with no changes to the config but it still errors
      i took this mod out and no issues loading server

    • Use the load order.json, not zzzzzzz.


      But this is likely a bad custom item.

      I'll take a look

    • thanks, i have not added any custom traders in the config for this mod, and i removed the mod that added the items from current live version (like Armor and guns etc) but still got the error

    • What's your mod list?

    • I use the new content mods/sain/swag and have no issues.

      OH!.. I bet you have a custom trader..

      I didn't test extensively with them yet.

      I'll test with priscillu.

  • Version 1.1.1

    Config change:


    • Fixed a bug with cash barters and custom items.
    • "Difficulty" has been replaced by two new values:
      "barterCostMultiplier": 0.7,

      "cashBarterCostMultiplier": 0.5,

    These values multiply the base items (to be traded for's) prices to figure the rough cost of the total barter items.


    For example, if the item costs 100, and the multiplier is 0.5, the traded item value would be 50.

  • Version 1.1.0

    Complete rewrite:


    • Completely rewrote the mod, balance feels much closer to live barters.

    NOTE: Hardcore mode may present trades that when combined are unbalanced, this is a known side effect of the random nature of this mod.

  • I Don't know why, but the hardcore mode doesn't work for me. I put true on enableHardcore, I get a message that changed 600 cash items, but in game only change old barter items. ;(


    Am i doing something wrong? i'm new to modding sp-tarkov.

    • Three things:

      • Look at the install instructions around load order.
      • Make sure your "cashItemCutoff": 10000, << Isn't too high
      • I am pushing an update tonight dramatically improving this mod.
  • Hey ummm
    Downloaded latest version. Open up Therapist and look at the barters. I can exchange 1 Car Medikit for.... 1 Car Medikit?
    Would be funny if it wasn't that I can exchange a 1/220 condition medikit for a perfectly new one!

    • Yeah, I've fixed the like for like trading already.

      I'm working on a new balance algorithm.


      The fundamental problem is that the prices on the flea for items is linked to trades/quests in game. So when you change all of the trades, those values are no longer correct.


      This makes appraising bartered items values incredibly complex.
      I'm attempting to graph the rarity of items chance of loot against its value now in some meaningful way.


      TLDR: getting alternate items for trades isn't hard. Pricing the value of items and their barters is.

  • still not happy with the balance.


    Working on some changes

  • Any chance we get something to randomize the hideout upgrade items?


    few notes after a start on hardcore medium

    -It's not converting prices well on the modded trader Priscilu, his fully kitted guns are bartering for things like a single hose or beef stew when they normally cost 100-500k

    -feel like it needs some kind of rarity check or price multiplier based on rarity tier, kappa items aren't that expensive but there's near zero chance of me ever finding 3 stuffed bears. also things like SG-C10, M-2 swords.


    still fun.

    • Working on balancing weapons/ammoboxes now. That should help things.
      I may scrap melee/med trades.

    • Hey! Since I have, going to push up another version quick, try it out and give me some feedback.

  • Version 1.0.1

    • Major Update:


      • Balance completely rewritten.
      • Should see much more "fair" barters in general.


      Leave feedback in the comments!


      Have fun! :):thumbup:
    • Ughh.. just realized the bullet cases/weapons aren't being handled correctly.

  • Okay so I think I need to work on balance a bit.
    Changes incoming.

    • Got it!!


      There were a number of things not being handled that needed a balance:


      - Some items aren't available on flea.. meaning they are actually worth a lot more than they are listed for in the db.

      - Cash items converted to trades were using the same algorithm as the original trade items, when in reality, those original trades are meant to limit the availability and feasibility of those items.. in practice this means that in hardcore mode there needs to be two tiers of barter difficulty for it to be fair.


      This has now been handled and I'm much happier with the new balance changes.


      Release tomorrow.

  • Can you add a setting where each trader will trade for things relating to them


    Example:

    Prapor - more russian themed items

    Therapist - Medical items + food

    Skier- whatever the fuck skier does

    peacekeeper - god blessed american goods

    mechanic - weapon stuff

    ragman - cloth materials / armor repair kits

    jeager - food / drinks / whatever else idk


    also are all the trades equivalent in value to the item in roubles?

    • No.


      More or less, balance is being worked on and it is random.


      :)

  • I think there's a small typo in config/description with DisableFlee, shouldn't it be DisableFlea?

    • Lol yes...

      Happy 1
    • Also a cool suggestion in my opinion - Make an option to use randomized seed every time server starts (although that could be abused in some or another way)

      Thumbs Up 1
    • I'll add that. It will likely just be setting the seed to false or 0.


      Very easy to do.

      Heart 1
    • please have an option not to have it change also as i don't want to keep having to remember different stuff every session

    • I'm sure it will be off by default so don't worry

  • Holy heck yes! Now we just need a updated loot randomizer to complete this!

  • highly recommended

    i love this mod, and the creator has been very helpful with issues that i was having :thumbup:

    just some minor balancing of items required