I've gotten through my equipment list and established Sets for each object. I realized as I went that the Sets are quite crunchy enough to manage every item, as many things are simply excessively rare and happen to be made of things that are bound to be made of a common good: say, a floating castle made of stone, as an example of something not on the list. That can be solved by simply dividing the reference availability by the workmanship number on the table, but even that has to be arbitrarily tweaked somewhat. I'm never happy with an arbitrary solution, so no doubt I'll be messing with this system until I am happy ... or until I die, which ever seems more likely.
Still, I'm more pleased with it than I have been with any other availability system, and that's good. I'm just rebuilding the pretty table for players to use during the game, then I'll post it on my drive for patreon users.
There's a different aspect to availability that needs addressing, and that connects to the quantity of goods that can be bought (a whole other headache). I'll use elephants as an example.
Let's say that we're in Stavanger: a cool Norwegian climate in the summer and bitterly wet and cold in the winter. In my system, the total number of references for elephants in Stavanger is 0.0200. I have 7 world references for elephants just now (there would be more, but Thailand, Malaysia and Indonesia have not yet been added to the system). Here's the breakdown of how the sources of elephants affect the Stavanger market:
All of these are in India. The distance between Stavanger and Mysore, Bombay, Galle, etc. are all over 300. Myingan, in the region of Pagan, in the Empire of Toungoo, is in Burma (and I'll bet you recognize none of those names), making it the farthest away.
It's no use arguing that these are mastodons in Norway, because the table clearly shows where they're coming from. And since 0.015625 is the minimum for set one objects, and since and "elephant" is a set one object from elephant references, this puts elephants in Norway. I can eliminate elephants by arbitrarily listing them as "set 2," but then I would have to remember to personally change that set if the trade numbers were being generated for a market in India. No good. The programming has to work for everywhere.
Put that on a shelf for the moment.
My trade system bases the price of an elephant on the number of references vs. the number of elephants. I have 50,637 head of trained, domesticated elephants in the world, obviously in India and Burma. This doesn't seem like many, but it compares with established numbers early in the 20th century. And I don't have many references, because the source comes from the 20th century and even India had been advanced enough that not every town in the country named elephants as a resource.
If we take that number and divide it by 7, we end with slightly less than 7,234 elephants per reference. If we multiply the number of references in Stavanger by 1 reference of elephants, we get 144.55 elephants in Stavanger. In Norway.
That's ridiculous. There are only 2,500 people in the town of Stavanger in my game, so where the hell are they keeping all these elephants?
It helps to think of products appearing on the market tables as things going through the market, rather than as things being kept there. Most of anything is a wholesale product, piling up in a given town like Stavanger before being distributed throughout a large section of the hinterland. Stavanger market serves a population ten times its number, and of course merchants in Stavanger import things they expect to then ship forward to other trade cities.
If we think of the number of elephants, or any other product, as the amount going through Stavanger in a year, it reduces the physical appearance of every commodity. If we divide the year into 52 weeks, however, it still means almost three elephants moving through Stavanger per week, but that's at least a little easier to swallow.
Technically, it could be the same three elephants, or even one elephant, being sold over and over, since that's how economies work. We could also argue that only the paperwork is moving through Stavanger. A fellow doing business in Stavanger has a plantation in India and as such, he's managing his elephants overseas; yes, you can buy an elephant in Stavanger, but you have to pick it up in Mysore.
That's a way of handwaving the issue and it has been the thought process I've had for a long time. Besides, no player character wants to buy an elephant in Stavanger, even if it is only 89 g.p. Even if the thing is in a stall, as a DM I'm going to be a complete asshole about it and tell the player the elephant is going to die if it doesn't get a sufficient shelter or moved pretty quick to a warmer climate. That's a way of controlling it too. That and the fact that an elephant eats 450 lb. of food a month.
None of this actually solves the problem, however ~ as I say, it is handwaving. Logically, the trick it to establish another variable that states an elephant won't or can't be sold in such-and-such a climate, even if the adjusted references say it exists.
And that is easy to write and to propose but it includes hundreds of other items that must also be arbitrarily limited in market appearance based on a very wide variety of issues. Saltwater fish and shipbuilding being sold inland (along with defining what is "inland"), furs and heavy cloth items even being available in hot, humid climates (why would you want a fur even as a rug in Burma? And who would bring it thousands of miles to market it there?), wagons existing in places without roads and so on. These things are fiddly and highly particular to some areas and we're talking about a lot of work defining the margins of where a product occurs and where it doesn't.
On top of this, add the argument of seasonal availability, something I have always wanted to incorporate but which was just a bridge too far. I think I see now how this could be done more easily, but again it is a process of going through each item one at a time and arbitrarily deciding whether something can be bought in a given season at all, and then how much of what is sold in what season ~ and even that doesn't yet take into account fruit that is shipped a thousand miles vs. a hundred.
I've hand-waved that by saying an apprentice mage with a freshen cantrip can restore a cubic yard of vegetable material a day, enabling a full wagon to be restored entirely every four-six days, depending on the size of the wagon, long enough for it to be hauled from Andalucia to Warsaw or further. But a system that argued that Israeli hushhash couldn't be bought in Stavanger at all would be better.
These are long-term plans, and hopefully will be implemented one by one. The hold-up until now has been a base system that could be used to adjust items; now that I have found one (hopefully, it holds up), I can patiently figure out these other issues one by one, creating features that will discount something if it is such and such a distance from the sea, if it is autumn, if it is in such and such a climate that discounts its presence and so on. A long, frustrating process towards a deeper, grittier detail, but I think in the long run worth it.
I look back at what I've created thus far; it would be hard to imagine something this big and this complex at the beginning of this project without losing heart at ever accomplishing this much. Yet I have accomplished it, because I didn't think of the whole scale. I just thought of one little bit of it at a time, letting the process itself determine the monolith of the project that it became.