Skyrim Special Edition

File information

Last updated

Original upload

Created by

sasnikol

Uploaded by

sasnikol

Virus scan

Safe to use

About this mod

This mod makes bartering with NPCs take into account their Speech skill and perks to counteract player's bartering skill. No longer bartering is a one-way street :)

Permissions and credits
Intro

Ever felt like bartering in Skyrim was kind of one-sided? Speech is exclusive to you and the rest of Skyrim just seemed to agree that they'll charge you 330-200% for things as you level up the Speech. Well, no more! It's time for NPCs to speak up! :) Now the bartering will be a real deal where both parties are taken into account.


Overview

NPCs Learn to Barter is an SKSE mod that changes bartering to take into account NPCs' Speech skill too. Each barter will feel unique, because prices will be determined by comparing the Player's Speech against the NPC's. If your character has a considerably lower Speech than the NPC you're bartering with, negotiating prices will be in favor of the NPC. You'll see increased prices for buying and simultaneously reduced prices for selling. Conversely, if you're much better at Speech than the NPC, you'll get better deals, to the point where you'll be able to profit. Remember being annoyed by an NPC trying to sell you for 1000 gold the thing that you just sold to them for 100 gold? Well, it's time for uno reverse card :D (this is still a quite rare case that can only happen close or beyond Speech level 100, but nevertheless I bet it would feel good)

NOTE

The mod also allows the game to bypass built-in limitations imposed by fMaxSellMult (1.00) and fMinBuyMult (1.05) as well as fBarterSellMax (0.95) and fBarterBuyMin (1.05) to unlock the full potential of the new bartering.

Here is a quick comparison of Vanilla vs NPCs Learn to Barter bartering:

In Vanilla game final prices for every merchant are determined by 4 factors:

  • Game settings (fBarterMin, fBarterMax) - to define a baseline for buying/selling prices. These are giving you 330% buying and 30% selling prices at the start.
  • Player's Speech level - as it improves prices go from fBarterMax value to fBarterMin value, so at Speech 100 you get 200% buying prices and 50% selling prices.
  • Player's bartering Perks - they further modify the prices and have more significant effect than skill alone. In Vanilla Speech, they can push you as far as 40% (Haggling + Allure) and improve prices up to 140% for buying and 70% for selling.
  • Player's Fortify Barter effects - similarly to perks, can buff prices up to 105% for buying and 95% for selling. This is a hard cap that you can't bypass.

In NPCs Learn to Barter final prices will vary for every merchant and are determined by 7 factors:

  • Game settings - the same settings are used in new formulas to let players modify the baseline range of prices that will appear in the game.
  • NPC's Speech level - is used to scale this baseline for that specific NPC. So here instead of a fixed 330% buying and 30% selling prices you'll get a dynamic range that depends on both yours and theirs Speech.
  • Player's Speech level - same as Vanilla, it determines how far on that dynamic scale defined in previous step you are.
  • Player's bartering Perks - same as Vanilla, further modify the prices.
  • Player's Fortify Barter effects - same as Vanilla.
  • NPC's bartering Perks - NPC's perks, such as Haggling and Allure will also be taken into account and turned against you.
  • NPC's Fortify Barter effects - same here, if an NPC has Fortify Barter enchantments or learnt to drink a potion or something they'll get even better deals for themselves :) (for enchantments to work on NPCs you'll need a mod that distributes PerkSkillBoosts "Skill Boosts" [PERK:000CF788] and AlchemySkillBoosts [PERK:000A725C] for potions)
As you can see NPCs are now much more involved in determining final prices, thus making each barter feel unique, rewarding you for outpacing NPCs in Speech.


Dynamic Bartering

Whenever you want to barter with someone, the mod will compare your Speech skill with that NPC's skill and scale the range defined by fBarterMin and fBarterMax, this scaled range represents a "Difficulty" to barter with this specific NPC at your current level.

Depending on the value of fBarterMin dynamic bartering will switch between Enhanced Vanilla Formula (when fBarterMin >= 1) and Parity Formula (when fBarterMin < 1). One of the reasons to introduce an alternative formula is because fBarterMin values below 1 would be poorly handled anyways (even in Vanilla), so I repurposed it to allow different interpretations.

Enhanced Vanilla Formula
Used for ranges where 1 <= fBarterMin < fBarterMax

This formula uses the same approach as original Vanilla formula, where prices range between fBarterMax at Player's 0 Speech skill and fBarterMin at Player's 100 Speech, but instead of using fixed fBarterMax and fBarterMin it uses them to calculate a similar range, but for NPC's Speech skill. And after that we feed those calculated boundaries to the original formula. This makes prices go higher if NPC is more skilled in Speech and lower if otherwise.

In practice, this means that without changing any game settings if you approach an NPC here is what you might expect:

  • If NPC has a much higher Speech (higher by 50+) you actually won't be getting 330% prices as in Vanilla, you'll be getting up to 500% buying prices and instead of 30% selling it will be only 20%. You'll be incentivized to find lower-level merchants to increase your odds.
  • As you gain Speech skill, the gap between yours and NPC's Speech decreases and prices climb up in your favor.
  • If NPC is about the same Speech level as you, you'll be getting close to Vanilla prices as you're both equally good (or bad) at bartering and don't know any better than to follow general consensus on pricing in Skyrim :)
  • As you outpace NPC in Speech the prices start to get sweeter and sweeter, they're now better than what Vanilla game would offer you.
  • Finally, the tides have turned, and you have 50+ more Speech level than the NPC you're bartering with. You're so good at this now that you're able to go up to 150% buying and 70% selling.

Here is some math, for those who want to know all the details:
Spoiler:  
Show
Vanilla formula simply scales desired multiplier between the two settings:

Mult = fBarterMax - (fBarterMax - fBarterMin) * min(skill,100)/100

Enhanced Vanilla Formula adds another dimension and defines a range for fBarterMax and fBarterMin:

fBarterMaxUpper = MaxSurchargeFactor * fBarterMax
fBarterMaxLower = MinSurchargeFactor * fBarterMax

fBarterMinUpper = MaxDiscountFactor * fBarterMin
fBarterMinLower = MinDiscountFactor * fBarterMin

Then by using delta between Player's and NPC's Speech we scale our effective fBarterMax and fBarterMin on those defined ranges:

Delta = NPCSpeech - PlayerSpeech
DeltaMin = -100
DeltaMax = 100

fBarterMaxEffective = fBarterMaxLower + (d - DeltaMin) * (fBarterMaxUpper - fBarterMaxLower) / (DeltaMax - DeltaMin)
fBarterMinEffective = fBarterMinLower + (d - DeltaMin) * (fBarterMinUpper - fBarterMinLower) / (DeltaMax - DeltaMin)

Finally, using this scaled effective bounds we calculate the same multiplier:

Mult = fBarterMaxEffective - (fBarterMaxEffective - fBarterMinEffective) * min(skill,100)/100

And voila! prices will now be in favor on who's better at barter :)

Here is a graph that illustrates both Vanilla (dashed lines) and Enhanced Vanilla (solid lines) formulas:


Click on image to view full size
  • Orange is for buying prices
  • Violet is for selling prices
  • The graph is captured at NPC's Speech level 30, so you might notice that Vanilla and Enhanced Vanilla intersect at exactly Player Speech level 30. This is where you'll get multipliers same as in Vanilla.
  • If Player's skill is less than 30 the multipliers will be increasing towards fBarterMaxUpper and fBarterMinUpper
  • If Player's skill is more than 30 the multipliers will be decreasing towards fBarterMaxLower and fBarterMaxLower


Parity Formula
Used for ranges fBarterMin < 1 <= fBarterMax

This formula is all about justice, mostly! :) Instead of gradually going from the very high prices to just acceptably high prices as in Vanilla, the Parity Formula focuses on making a fair trade when both parties have the same Speech skill. It interprets fBarterMax as the maximum surcharge you might get in the worst-case scenario and fBarterMin as the maximum discount you might get in the best-case scenario, then applies Vanilla scaling from 1.0 towards one of those values depending on who has the higher Speech.

What you might expect from this formula:

  • If NPC has a much higher Speech (higher by 50+) you will be getting up to 330% buying and down to 30% selling prices as in Vanilla. You'll be incentivized to find lower-level merchants to increase your odds.
  • As you gain Speech skill, the gap between yours and NPC's Speech decreases and prices climb up towards stalemate.
  • If NPC is about the same Speech level as you, you'll be getting almost 100% buying/selling prices as you're both equally good (or bad) at bartering and can't negotiate prices in anyone's favor, thus reaching stalemate.
  • As you outpace NPC in Speech, you can now negotiate a small discount and actually make profits. (from this point you must control yourself to not exploit this mechanic by repeatedly buying/selling the same item to drain all gold from NPC :D)
  • Finally, the tides have turned, and you have 50+ more Speech level than the NPC you're bartering with. You're so good at this now that you're able to get up to 20% discount, and up to 25% profit from selling things. (These values appear at fBarterMin=0.8)

The math:
Spoiler:  
Show
Parity Formula starts by defining a parity point and two boundaries for worst-case and best-case scenarios:

WorstMult = fBarterMax
ParityMult = 1
BestMult = fBarterMin


Then by evaluation delta between Player's and NPC's Speech, we apply scaling from ParityMult towards either WorstMult or BestMult depending on Delta's sign:

Delta = NPCSpeech - PlayerSpeech
DeltaBest = -100
DeltaParity = 0
DeltaWorst = 100

if Delta <= 0
  Mult = BestMult + (Delta - DeltaBest) * (ParityMult - BestMult) / (DeltaParity - DeltaBest)
else
  Mult = Parity + (Delta - DeltaParity) * (WorstMult - ParityMult) / DeltaWorst - DeltaParity)


This ensures that at equal Speech skill Mult is always 1, thus achieving parity.

Here is a graph that illustrates both Vanilla (dashed lines) and Parity (solid lines) formulas:


Click on image to view full size
  • Orange is for buying prices
  • Violet is for selling prices
  • The graph is also captured at NPC's Speech level 30. As you can see at Player Speech level 30 both prices meet at 100%, meaning that you're both buying and selling at item's original price.
  • If Player's skill is less than 30 the multiplier will be rapidly increasing towards WorstMult (fBarterMax)
  • If Player's skill is more than 30 the multiplier will be slowly decreasing towards BestMult (fBarterMin)

DISCLAIMER

This formula strays too far from Vanilla design and will cause deflation: instead of Vanilla 330% - 200% prices, you will operate either at around 80%-100% or 100%-330% range depending on how your Speech compares to NPC's Speech. Due to most prices being close to 100% once you've progressed enough in Speech, you will spend much less money on buying stuff.

Because of this, I can only recommend Parity Formula if you have other mods that decrease loot and other income you might have to counteract deflation.
Or, you know... use it at your own risk and fun! :D

This is what Dynamic Bartering is about! But that's only half of the bartering, as after that Perks come into play.


Speech Perks

Once Dynamic Bartering determined unique bartering multipliers for buying and selling prices, NPCs Learn to Barter will apply perks. NPCs perks will be taken into account, just like yours. First, it will apply Player's perks as usual, after that it will inversely apply NPC's perks on top. So, when NPC has a Haggling perk that says prices are 25% better (for NPC), you will actually get 25% worse prices when bartering with this merchant, unless you also have Haggling perks to counteract their Haggling. Imagine being a Male Nord and buying something from a charming woman with Allure perk, well.. she will get 10% better prices from you :)

NOTE

In Vanilla game NPCs don't have any Speech perks, so this part of the mod won't have any effect on bartering.
NPCs Learn to Barter expects other mods (such as NPCs Learn Skills & Spells) to give these perks to NPCs.

But its usefulness extends far beyond this specific scope. Combined with SPID it unlocks a myriad of applications, for example, it makes possible to create mods like Trade & Barter with even deeper and nuanced personalities for merchants by utilizing Perks on individual NPCs rather than a set of perks on player themselves. Think of adding random taxes to prices in cities, bartering with strangers, some NPCs favor clients in Noble clothing, others tend to give more discounts to weathered warriors, use perks to signify demand on food or other goods in a region, the list goes on...

Mixing all of these together should provide a truly diverse economy that is all revolving around people bartering instead of being just soulless vending machines with programmed fixed prices :D ah, what a time to be alive...


Compatibility

NPCs Learn to Barter should be compatible with pretty much anything. It should handle pretty well any reasonable changes to fBarterMin and fBarterMax that other mods might've edited to either bump up or lower the prices. Those changes will be taken into account and scaled ranges will be calculated with these changes in mind. So, if another mod changes prices to be 500%, then NPCs Learn to Barter will signify this by ranging this limit from 250% to 750%. However, keep in mind that NPCs Learn to Barter was designed around Vanilla values for the best results.


NPCs Learn Series


Support
Thank you for using my mods! If you enjoy them and would like to support me, you can use the links below.