BETRAYAL AT KRONDOR - SHOP ASSISTANT

[Shop Home]
[Items] [HAG] [Groups] [Repair] [Prices] [Maths]

ITEMS
Every Shop has an ITEMS Code. Example - ITEMS 10/16. This means that 10 Items are initially for sale in the Shop, and that the Shop can hold a maximum of 16 Items. Why is this important?
  • The 10 Items are CORE STOCK. The CORE STOCK will never change. The Shop can only hold 16 Items. This means that you can SELL 6 Items to the Shop, all of which will then be for sale.

    If you now SELL a 7th Item to the Shop, something is bound to happen. What happens is that one of the 6 Items you sold before will disappear, only to be replaced by the 7th Item. From tests I've made I'm fairly certain that the disappearing Item is ALWAYS the MOST EXPENSIVE one of the 6 Bought Items. (Remember, this will NOT affect CORE STOCK.)

  • In a few cases the CORE STOCK will contain a HIDDEN ITEM. This is usually a Medium Crossbow, which won't show up until Chapter 3 (don't ask me why). In the example above (10/16), only 9 Items would show up in Chapters 1 and 2, but this won't change the fact that the Shop only has 6 empty Item slots.

    NOTE: The Hidden Item will be bought by the Shop, even if it doesn't belong to an Item Group bought by the Shop. Example: The Cavall Keep Shop does NOT buy all Crossbows. A Light Crossbow is on sale here in all Chapters, but a Medium Crossbow will also turn up here in Chapter 3. It is part of the CORE STOCK, and will be bought by the Shop at all times, even in Chapter 1.

  • Most Shops have 6 empty Item slots. However, some Shops have a capacity for 50 Items! I can't see the logic behind this, as the Shops in question only buy a VERY limited selection of (cheap) Items. For your interest, the 50 Item Shops are:

    Tyr-Sog: Three Hillmen Pawn
    Tanneurs: Hamil's Pawn
    Et Cetera Goods (North of Cavall Keep)

    Perhaps the designers intended these Shops to be different? Note that two of them are "PAWN" Shops!

HAG
Each Shop has a HAGgling Code. Example - HAG 75/40. You should ignore these numbers, unless you're passionately interested in cracking codes (and have a lot of time on your hands)! I've spent awesome amounts of time trying to figure out the exact mechanisms of HAGGLING, and all I really know is that there is a RANDOM FACTOR involved. I'm convinced that these two numbers contain the solution, so I've decided to include them here, for future reference.

If you're interested in tackling this enigma, let me know. I have SOME info to share. But let me warn you: You need to be prepared to spend WEEKS, if not MONTHS, on TESTING alone, collecting MOUNTAINS of Data. And then you'd have to figure out the mathematics involved. (Note: I managed to solve the BARDING puzzle by pure luck, and only because there's no RANDOM FACTOR involved.)

ITEM GROUPS
On each Shop Page you will come across the Item Group Codes. These are three-letter codes I use for the Item Groups. Each Shop will buy one or more Item Group. If you check out the
Basic Prices Page, you will see that I've classified all the items according to these Groups. Here's a quick check-list of the 12 Groups you will come across on the Shop Pages. If you need further details, go to the Basic Prices Page.

There are four more Item Groups, which you should be familiar with:

It is useful to know which Items belong to the NON Group - these Items can NEVER be sold. SPElls can only be sold in Shops that already have them for sale. KEYs and INN Items can, of course never be sold anywhere.

A Shop will always buy ANY ITEM from the specified Group. It will also buy all items ALREADY FOR SALE, even if they're not in the GROUP. Example:

A Shop does NOT buy the SWOrd group, but a Broadsword is for sale. This means that you can SELL a Broadsword here, but NO OTHER SWORD.

For a rough overview of Shops and the Item Groups bought you should consult the ITEM GROUP TABLE.

REPAIR (Special thanks to Bob Freimuth, who researched this and figured out the maths.)

Only 6 Shops in the game offer Repair:

SHOPREPAIRRF
Fletcher's Post (LaMut)CrossbowsN/A
Joseph the Animal'sArmor0.8
The Battleworks (Highcastle)All0.5
The Iron Monger (Northwarden)All1.0
Sign of the Eagle (Krondor)All1.0
Port Exchange (Romney)All1.0

The cost of repair usually depends upon three factors: The Basic Price of the Item, the Condition of the Item, and the Repair Factor (RF, see above).

Crossbows are different. There's just a flat rate, 80.0 for a Bessy Mauler, 40.0 for all others. Note: A Broken Crossbow needs to be RESTRINGED - Heavy String for Bessy Mauler and Tsurani Heavy Crossbow, Light Bowstring for all others. Restringing always results in 100% condition, thus Repairing a Broken Bow in a Shop is a waste of money.

The formula for calculating the cost of repairing Swords and Armor is given below, where the Item's Condition is expressed as 0.XX (for example, 25% = 0.25).

Repair Cost = Basic Price * Repair Factor * (1 - Condition)

For example, the cost of repairing a 25% Broadsword (Basic Price = 12.0) in Romney (Repair Factor = 1.0) would be:

12.0 * 1.0 * (1 - 0.25) = 9.0

The cost of repairing the same sword in Highcastle (Repair Factor = 0.5) would be:

12.0 * 0.5 * (1 - 0.25) = 4.5

PRICES: BASIC / SELL / BUY / DISCOUNT
Each Item has a Basic Price. You can look this up in the
Basic Prices Page. In each shop the Basic Price will be modified. There are three factors to look out for here: The SELL Factor, the BUY Factor, and the Maximum Discount. Please pay attention to the COLORS - they are used consistently in the Shop Pages.

This is best illustrated with an example. Let's look at THE CROSSROADS Shop in Yabon. Here's an actual part of this Shop Page:

THE CROSSROADS 1.30 25% 0.27BASICSELLBUY
Broadsword [100%] 12.0 15.6 11.7 4.2

There's a 100% Broadsword for sale here. The Basic Price for this is 12.0. The actual SELL Price is found by multiplying this with the SELL Factor:

12.0 * 1.3 = 15.6

However, if you sell the same Sword back, you will only receive 4.2 for it! Now the BUY Factor comes into account. The SELL Price multiplied by the BUY Factor results in the BUY Price:

15.6 * 0.27 = 4.212, which gets truncated to 4.2

As you know, it is possible to Haggle. I haven't been able to figure out the exact mechanisms of Haggling (see above), because there's a Random Factor in the equation, which makes it extremely difficult to test. However, I've established the Maximum Discount. In this example the Maximum Discount is 25%, which means that 11.7 is the lowest possible price you can achieve by Haggling in this Shop:

15.6 - (15.6 * 0.25) = 11.7

In this example the Haggle Price could fall anywhere beween 11.7 and 15.6, depending on your Haggling Skill and LUCK (the Random Factor). (Note: Because of the Random Factor it is possible to exit a Shop, re-enter, and Haggle again with a different result!)

BAK MATHEMATICS
When calculating any of the above, it is sometimes important to realize how the game calculates. If you're a pedant (like me), you will get extremely irritated (and suspicious) if a calculated result is off by so much as a single Silver Royal! So here's a crash course in BAK Mathematics:

TRUNCATION OF NUMBERS
BAK only admits ONE Decimal Place. Numbers are NEVER rounded up, only truncated.

For instance, BAK will treat 1.99 as 1.9, 1.09 as 1.0 (even though 1.99 is closer to 2.0, and 1.09 is closer to 1.1).

CALCULATIONS
All Prices are calculated from the Basic Price. Therefore it is necessary to know that the Basic Price of any Item is based on a certain Charge/Percentage of that Item. (This information can easily be found in the
BASIC PRICES Page.)

So let's look at an example of how this can matter:

SHOP: Children of the Green Heart SELL Factor: 1.15
On sale here are Picklocks [8] - Basic 70.0 Sell 80.4

Now, according to the formula given above (Basic Price * Sell Factor = Sell Price)
70.0 * 1.15 = 80.5! So why is it actually 80.4?

The Basic Price of Picklocks is based on Picklocks [4] = 35.0 This, of course, results in a Basic Price of 70.0 for Picklocks [8].

In this Shop the price of Picklocks [4] would be 35.0 * 1.15 = 40.25, and the game truncates this to 40.2, resulting in a SELL Price of 80.4 for Picklocks [8]!

The same applies to Weapons/Armor in less than 100% condition, the Basic Price being based on 100% condition. Here the obvious rule is:

First find out what a 100% Item would cost in the Shop (Basic Price * Sell Factor). Truncate the result, if needed. Then apply the condition.

When doing Price calculations in BAK, remember two facts:

1) The BUY Price is calculated from the SELL Price. The SELL Price is calculated from the BASIC Price. If you calculate the BUY Price from the BASIC Price, remember that the SELL Price must be TRUNCATED before it is multiplied with the BUY Factor.

2) As stated above, the equation for Maximum Discount is:

SELL PRICE - (SELL PRICE * 0.XX)

Algebraically this is, of course, equal to:

SELL PRICE * (1 - 0.XX)

But there a catch! The Discount (SELL PRICE * 0.XX) must be TRUNCATED, before it is subtracted from the SELL PRICE !

Example: ITEM SELL PRICE: 65.0 / Maximum Discount: 25%

65.0 * (1 - 0.25) = 48.75 = 48.7 (truncation) (WRONG!)

BUT

65.0 * 0.25 = 16.25 = 16.2 (truncation)
65.0 - 16.2 = 48.8 (CORRECT!)

Is there anything else left to explain? Perhaps there is. You will find more information in the other Shop Pages, but I'm sure I've missed something. If you're puzzled, please let me know.