Tuesday, October 24, 2017

Calculating Scarcity in Market Items

A small number of my readers will be happy to learn that I'm replacing parts of my trade pricing table with excel's vlookup feature.  I have found a practical application for it and I'm incorporating the function.

One problem I have had with the trade system is the question of availability.  It is all well and good to have things with prices that vary from place to place, but that still leaves the question, "How many can I buy?"  Or, for that matter, if there is anything on the shelf at all.

I have tried a number of methods for this over the year, one of which is still a part of the system as it is located for patreon supporters right now.  But it is based on random numbers and I must admit, for some things, random numbers just suck.  It was because of random numbers that I conceived by sage abilities system as things you can absolutely do vs. things that you absolutely cannot do.  There are some things that still incorporate random numbers, but the principle of knowledge is not one of them.  I know that the Serbians were massacred and driven out of their homeland during World War I.  There's no random chance that I will forget that.

Of late, I've figured out a way to get the random chance out of the availability of items.  Though it drastically flattens the likelihood of finding a given object, or how many are available, because the number of items is so large and the algorithm is hard to predict, that is only noticeable to the designer.  Eventually, the players will grasp the idea for some items, but I doubt they would for the whole list of goods and services that can be purchased.

It works like this.  Imagine what it's like to buy things in a general store.  You want to buy something very common like a torch and you find there's a big basket of them.  But then you want a flint to light that torch and it turns out there's just one left.  Or the store sold the last one this morning and you're out of luck.

That's what I'm reaching for.  That common items will always be there, or virtually always; and less common items will tend to be missing from the shelf marked "telescope" or "silver holy symbol."  Unless, of course, the player happens to be in a town where telescopes are made.  Then there will be a basket-full.

I'll just trust here that readers are vaguely aware of my trade system.  Every time I want to talk about it there's too much to explain and I have already been down that road.  Still, basically there are a set of references that I express to the fourth significant digit.  The number of references for any given object, from extraordinarily rare gems to general foodstuffs ranges from 0.0025 to 20.0000.

I'm beginning with the premise that if we're at a particular market, say Stavanger in Norway where the online party is, a total references of >1 for that object means that every possible version of that object is available.  If Stavanger's shipbuilding industry is >1 reference, then ships of every size can be purchased or built from scratch at that port.  Of course, the boat might not actually be in the harbor, but an agent in Stavanger can get it for you in a period reasonable with the 17th century, say a month or two.

From there, we create a series of tiers.  >1 reference equals Tier 1.  Dividing that number by four, 0.25 - 0.9999 references equals Tier 2.  Dividing it again by four, 0.0625 - 0.2499 equals Tier 3 and 0.01563 - 0.0624 equals Tier 4.

We then rate every object that is sold on a scale of 1 to 4 "sets."  Set 1 includes anything that is grossly common: ordinary stone, iron bars, a cloak, chickens, torches, a stay at an inn, ordinary wine and beer, whatever.  Things we absolutely expect to always find in any market town.  Set 2 is one up the scale: things that are a little less common but could still be expected to be found in any civilized society: a holy symbol, a metal candelabra, butter and cheese, hard boots as opposed to soft ones, books, a vial of salve for wounds, a stay at a nicer inn, etcetera.  Set 3 would mean low level luxuries; the sort of thing that peasants would never buy but would find its way into a merchant's household: porcelain, stained glass, a rare liqueur, a fur coat, a particularly nasty poison, a carved oaken bureau, a pet war dog and so on.  Finally, Set 4 would include every rare thing that conceivably existed.

For Set 4 things to be found, the number of references would have to equal the Tier 1 level.  At Tier 2, at best we would find Set 3 objects.  At Tier 3, no better than Set 2.  Finally, at Tier 4, only Set 1 objects would exist.  If the number of references isn't high enough for Tier 4, nothing of that particular good or service is available.  If we're so far from the makers of weapons that less than 2% of a reference exists, then no, there's nothing here, not even a dagger.  You'll have to make due with a club you find somewhere.

I know it sounds to some people that the Tier number should equal the Set number, and that's fine for them if that's how they want to do it.  It's just reversing the scale.

I like that this system narrows the import reach for objects that ought to be unusual, while maintaining commonality in areas where the object is actually made.  It may be hard to find a fur coat in Italy, but in Russia everyone is wearing them, even though they are a set 3 object.  You may have the money to buy everything in existence: but if it isn't on the shelf because it is never imported (its just too far away), then there's no point in waiting to see if something will come in next week.  No one ever brings it here because it isn't wanted.

This gives me ideas for how to manage the starting question, how many are there - but I haven't quite solved that one yet.  I'm patiently working on creating a page that gives everything a set number, then compares that with the automatically generated tier system ~ which is where vlookup is coming in handy.  Yes, it was a good suggestion and now that I'm starting to get used to it, I'll be using the function more often.  I'd like to thank those readers who poked me about it and to promise them that yes, even an ornery grognard can change.

I should be able to update the pricing table on the private drive for patreon donations in a week or two: sooner if readers clamor for a beta version that's only partially made.