How do we know market prices are right?

Once in a while someone asks us about market prices, claiming that they are unfair and we should adjust specific trades. But each time when we inspect the report we find something is overlooked. So how come we are so sure about market prices now?

Market was added to KaM Remake only 1.5 years ago and immediately caused a stir. We set the wares prices basing on wares cost relative to raw wares (stone, trunks, corn, wine, arguably the cheapest resource in KaM). It looked like a good approach, but practice proved us wrong. There were many unfair trades back then, with Trunks for Coal being the most profitable and abused. Since then we have changed our approach, let me quote:

The new formula is based on the time it takes to produce 1 of that ware, plus the cost of the components as before (so flour_value = corn_value + time_to_make_flour). There are some additional tweaks:
1. Trees take a large area to produce so they get +0.15 to their value
2. The non-renewable resources are worth additional +25%.
3. Wine takes some extra wood to build so +0.1
4. You can only build a few iron/gold mines so +0.2

Market tradeoff is 2.2, meaning that for every trade you need x2.2 more wares sold to get the equivalent wares bought.

But let’s not waste time on figures and move on to a recent “market abuse” example. We were reported that trading Axes to Horses is an unfair trade, that players can dump the economy and easily arm dozens of Knights by using the market. The winning setup is just some 12 woodcutters and 5-6 workshops.

It looks plausible, but let’s prove it with an experiment! Let’s take the trusted Map Editor and built such a village, alongside we make roughly equivalent village that is focused on producing Horses in a traditional way. To avoid external factors each Store is stocked with 1000 of food and houses are placed next to each others supply:

market_explained_1ย market_explained_2

Are they going to be equivalent in Horses produced? Let’s wait for the numbers.ย When mission starts it takes some clicking to rig the first village (set axes order to 1000 and set up market trade for horses). Both villages take some time to start producing Horses at a steady rate (trees need to be planted, corn needs to grow). Once that time passes everyone is at work.ย Let’s wait for 2 hours and then compare figures. Debug x300 speedup is a great time-saver ๐Ÿ˜‰


After 2 hours inspecting the villages there are some minor adjustments, but they are quite minor compared to overall picture, so we won’t restart the experiment (second village could have had fewer serfs). There are few idle serfs, every house is stocked with input materials, there are little to no overhead.

First village is quite impressive: 12 woodcutters, 5 sawmills, 5 workshops, 1 market. 20 serfs, 22 citizens and roughly 260 tiles of roads. Food eaten: 140 bread + 140 sausages.
Second village is a lot more humble: 6 farms, 3 stables. 15 serfs and 9 citizens. ~90 roads. Food eaten: 80 bread + 80 sausages (could be fewer if we fired idle serfs).

But when we look at Horses produced we see that villages performance is next to identical:


How could it be? The trick is inside the wares prices and market tradeoff factor. Each ware is priced according to its production rate (see above). True, first village has a lot more GDP, it stomps out axes at a huge rate, but when they are traded GDP is lost. Each time market does an exchange it takes 2.2 units, to give out only 1 unit.

Where does that leads us to? It seems going market is a good idea if you agree to spend twice as many of everything to get the same result from trading ๐Ÿ˜‰ Other times specialized production beats the market and that’s the point of it.

Outcome: Next time when you hear about unfair market prices, do the same experiment and see how it compares.

This entry was posted in Gameplay. Bookmark the permalink.

15 Responses to How do we know market prices are right?

  1. Lewin says:

    I’d like to add that the first village would take much longer to build and consumes more space, so it’s actually far more efficient to produce horses through the farm and stables than by trading axes.

    One case where the market is useful is when you want to make small amounts of a resources and avoid the high cost of constructing a complete production line for it. Say you only want 10 knights in a game, in that case trading some resources to horses is more efficient that building 2 farms and a stables and waiting for them to be produced. But if you want lots of horses the stables is a better option.

  2. t says:

    This test is OK for me. It is fair to test the market values. And the market values seems good with this formula.

    But basicly under the multiplayer game should to create food also, what is most time come from Farm (bread, sousage).
    So when you heard somewhere the axes trading is cheap should to calculate with the food supplyment also.
    Sometimes players have more than 50axes in the barrack. just five minutes to trade 12-13 horses. (i did in the past and under 5minutes a little bit better what can produce one or two stables). 9-12woodcutters, 4-5 sawmills,3-4 wooden weapon makers are the average bases so your test is OK(+1-1-1building is absolutaly possible).
    Making horses from farm with 3 stable is really hard in a realgame. because of food.

    I think the first wood village building is possible without any problem, with army production also. But i dont see the second has any chance, because still missing the weapons and armors next to the horses (leather armors(?) or iron armors). So if you would like to crate that in the game should to creat minimum 10farms(eat bread) or minimum 12 farms(eat sousage)…etc..
    And if a normal player would chose a way then i think will chose the first, what is much much easier and more effective then the second.

    I think hard to say the values of wares because ubder the game those are always changing.
    Maybe some wares should to set up uniqe value to make better market. (or using the dinamic script to values setting in time.)
    -trading woodenweapons with a little bit higher ratio.
    -cheaper wine->more vineyard under PT
    -cheaper stone->32 stone nver effective

    Market has an uniqe power to form the gamestyles!;)
    I wish the best!

    • Krom says:

      Market lets correct planning mistakes like that, when at peacetime end player has excess of some items and lack of others. It is done at a cost though. Having axes overproduced means that the labor and materials went into them are 50% lost when being trade. Instead of player could build 4 less woodcutters, 1-2 less sawmill and workshop (and market) and be fine with just 2 more farms and 1 stables (placed at exact same places and taking 50% less building materials and space as well).

      It is wrong to think that having horses breeded takes precious food from the town. It is akin to thinking AA battery flashlight takes energy from powergrid sockets. They are just not connected. You build 2 farms and a stables and they are self-contained.

  3. The Dark Lord says:

    I disagree with your conclusions. A stable is a very static building; it can only produce horses and it requires corn. Axes are made of timber, and as we know, timber is a very precious resource as you need it for both buildings and weapons. 3 stables and 6 farms might be as efficient as 12 woodcutters, 5 sawmills and 5 weapon workshops. But the woodcutters/sawmills/weapon workshops are much more versatile. They can contribute to the creation of buildings, wine fields, weapons and wooden shields; and as shown you can trade them in relatively cheap ratios for other wares. Another important aspect that was not taken into consideration, is that woodcutters are available after the schoolhouse and farms only after the sawmill. As a consequence, corn production will start much later than timber production, especially since gold also gets important after the sawmill (and soon iron too) and the corn first needs to grow. Next, if you use that corn to produce horses, that means you are not producing any food. Axes could also be traded for food in the marketplace in case of an emergency. I’m also doubting the setup of the test, because usually there are some trees on the map and 6 sawmills/weapon workshops might be more efficient than 5 (on 12 woodcutters), but not sure about the latter. There is one more very important aspect: if you only want a few horses, making a few ‘expensive’ trades is more efficient than wasting loads of corn on a stable, because it takes a lot of corn before it starts to pay off. All in all: experiments like these are nice, but do not represent a realistic game. Trade values are much better than they used to be, but to say that they are ‘right’ is a little too soon in my opinion.

    • Krom says:

      It is good to see some constructive critics ๐Ÿ™‚

      Let’s go by numbers:
      1. Indeed, wood is very versatile in KaM, yet we don’t see towns build solely around wood production and trading axes for everything else. However the tradeoff is ~x2 for all trades.

      2. Wood being available earlier contributes to militia rushes well, but if you spend it on building other houses then it’s not a big gap between first traded horses and first breeded ones I believe.

      3. Test setup is artificial, there ain’t gonna be so optimized placements on a real map. Optimizations can be applied to non-trade town as well – place farms apart to let farmers work more efficiently. It was to demonstrate the scale of difference between trade/non-trade scenarios. It did its job well, the scale is about x2.

      4. “Wasting loads of corn” is just an equivalent to wasting the double of wood/time/space/food/everything in this case ๐Ÿ˜‰ The payoff arrives at about 5-10 horses (anyone to test the actual number?).

      This example showed once again that the unfair trade being explained is not unfair, it’s just a trade and like many others has a point at which it makes sense and at which – not. That’s how the trading work: when you need few – trade, when you need lotsof – build specialized branches.

      P.S. Had to retype this text twice ๐Ÿ™

    • Bence791 says:

      Yes, 12 woodcutters can easily run 6 sawmills. On the other hand, 6 sawmills could run 7-8 weaponmakers as well, but as a consequence you can’t build at the same time with this better wooden weapon production.

      Note that you will need maaaany more serfs to run the woodabuse ๐Ÿ™‚

      • Krom says:

        6 sawmills can produce 19.5 wood per minute at full load. On the other hand 6 weapon workshops can use up to 20 wood per minute. This leads me to believe 6 sawmills can not employ 7-8 workshops ๐Ÿ˜‰

  4. t says:

    I dont remember exactly the market formula, but maybe some new factor could help to make better, more fair values to the market.
    (Ware using factor)
    For example, how also TDL wrote it from the wood. wood is “an universal” ware. Use it for buildings, winefield, weapons, shields. This is 4 things.
    Corn is used by three kind of buildings.
    Food used by one type of buildings.
    Stone used only road and buildings.
    weapons used only one buildings…etc…

    (Original buildingway factor/or an averagetown factor)
    Making an average town and analise that and counting from there some little thing.
    Mesure the produced wares, and analise them in the time. Compare the produced wares, the lost wares…etc.
    i think should to touch somehow the real/ effective games somehow, and this factor could be that factor what is make the real price of the things

    (some correction with manually)
    -wine a little bit expensive

    I really enjoyed the old market values, because then the market gave many strategies way in the early game, and that was really fun. Nowadays the market gives less enjoyable things in the pt, but still there some possibilities.;)

    I think programing market easier than find out how about the prices;)
    Have a nice work!


    PS: an awsome and hardcore idea: what if in the background the market counting the all active wares what is in the game, and calculte the prices from it. And counting the all resources what are avaiable. So then the market never had the same price and then the most attentive players win lot in that moment:)
    Ok, im just kidding, sorry;)

    • Krom says:

      Recently I have a seen a game where player built his corn production around shield-making and trading them on the market, without a single farm. That occurred to him like a good idea. But do we need to penalize wooden warfare trading because of that? I think not. We just can run another test and find out that trading shields for corn takes twice of everything versus growing corn on farms. Do we need to do it for every combination of wares? That’s some (26^2) variants.

      My conclusion is that short-term trading is an advantage (5-10 items), but after that it is a drawback. So let it be just a misleading strategy that will let “versatile” players win over “abusers” ๐Ÿ™‚

  5. Fingrapyro says:

    Here is an idea. As we build more markets, the trade should get better, to balance this, there should be like a “tax” for trade, for example, a market decreases the extra cost of trade by 0.2 the current value to my knowledge is 2.2.

    Three markets means I get a trade price of 1.8 for the two extra market, but because I have to pay taxes I have to hand in three gold chest if four markets 1.6, but have to hand in four gold chest per trade.

    Another balance could be to only be able to buy resource if you already able to produce it, after all how does ‘anyone’ has coal if there is no coal mine available…

    My apologies if I mentioned something that is already there, I am downloading the update right now.


    • Krom says:

      This is an interesting idea. However building more of the exact same building is kind of non-intuitive in KaM, where everything that is been done is scaled realistically. For example if you have two schools you can not train units faster, but you can do that simultaneously. Same with markets – you can do more trades. Decreasing the trade tax is also undesirable because 2.2 is already considered a fair deal.

      Trading for wares you haven’t acquired yet is okay IMO, after all this is market, it gets wares from an outside, not from the magic duplicator within ๐Ÿ˜‰

      Thanks for your feedback!

  6. Radimov says:

    Hi, im kinda new around here, but i played KaM a long time ago and im kinda of those “slow players” (with this i mean i dont have nrยบ of serfs counted, nrยบ of buildings etc…) and since it never existed this Market we had to make a self efficient village food/weap etc… about this market thingy, it makes an advantage to the ppl o knows how to manage it even with slow amounts, KaM isnt reduced about a management of 1 building, its an whole village, althou the suggestion that Fingapyro made about: “Another balance could be to only be able to buy resource if you already able to produce it, after all how does โ€˜anyoneโ€™ has coal if there is no coal mine available” it kinda approaches more to that scenery of the whole village.

    The game is awesome and when i found it i was overjoyed, but i just hope that you guys developing this dont go to the way that recent games go(and i can name several of them that were success and went to total fail)… and that is by not sticking to the original game that we love. like those ballistas and catapults, if those go in it is going to be a sniping mode KaM(even if they miss sometimes when in numbers it can still be op+archers) and a few militias to stall, at least for me it isnt KaM.

    I agree that market brings more strategies and competition but it derails from the vanilla, not as much if it works like the suggestion above. As said before it was removed from the game by some unknown reasons, maybe some of them were already mentioned here.

    About the market thats one major point to why i dont play with other ppl i dont know in mp, because im always at loss(but this is for me ofc its my opinion only, and i bet i belong to a minority of the ppl around here by playing like this ^^), i will wait patiently for the A.I to become better since its a lot better than it was.

    I know this isnt about the market but, can i wonder if you guys will put some more maps with 3 – 4 humans vs A.I since almost all of the co-op maps are for 2 and i noted that at least 1 map that was for 3 is now for 2 humans.

    But i hope for the best since you guys have made a awesome job until now, thanks for this really appreciated. Cheers!

    • Fingrapyro says:

      Hi Radimov. I agree with you, personally the whole purpose of the KAM campaign is to overcome one disadvantage after another as you advance in maps, the market destroys that disadvantage, all I am doing is trade wood, stone, whatever, to whatever the resource is that is currently scarce, no individual strategy at all when it comes to economy.

      Another idea, the ratio at which I can buy increaces, to not turn market into a single use thing, it should decreace with time. For example: I just selled 22 wood and got ten axe (if I understand the ratio thing correctly, I still haven’t been able to install it). next time I must do a trade ratio of 2.4 or 2.6 instead of 2.2, making the wanted resource more scarce and the given resource more plenty (useless) in the market, once every five minutes the ratio number decreases by 0.1 but never goes below 2.2.
      This way, I will not be able to buy myself food, while all I ever had is a lot of weapons and vice versa, Adding recharge could also work, as in after the deal was closed.

      Krom I also want to say that it is awesome to see this game remade.
      While I really feel like market needs balancing, I don’t really mind what you will do with it, Thanks!!!

      Also does this not support shattered kingdom version of KAM? I tried to install it, then it tells me I need Peasant rebellion, I sadly lost that disc a long time ago, I only have the original.

      • Krom says:

        Thanks for feedback ๐Ÿ™‚

        I don’t remember is Market is unlocked in first campaign missions, but having it available around mission 7-9 sounds fine IMO.

        KaM Remake can only be installed on top of the TPR. It is hard to buy a new TSK these days, so we decided to support only the TPR so far. I could be wrong, but this is one of the first times we get asked about TSK support.

  7. Boomka says:

    I think everyone should realise that market is a support structure, not the primary one. I use it only when ran out of iron/coal/gold/stone. Market makes a game much longer cause materials are somewhat unlimited with it, and its great. But still the game ends faster tnat gold/coal runs out.

Leave a Reply

Your email address will not be published.