Showing posts with label Resources. Show all posts
Showing posts with label Resources. Show all posts

July 6, 2023

Trade VIII: Pricing Abilities

DM's Escritoire says:

Been a while, but Alexis' recent post generated an interesting comment from you regarding using his Sage system to effect manufacturing and prices. Care to share the direction you're taking. I recently watched his (ten year old) youtube and caught something I missed in the last third regarding references for "service providers." I may try to revisit this approach unless the Sage abilities shows more promise.

I would care to share the direction I'm taking, thank you for asking.

Alexis' approach is to make the yearly income of a person with a certain skillset equal to the amount of time needed to train them to that level. I took a different approach, but I'm hoping his solution can inspire me to close some of my gaps.

My trade system still operates largely as described several years ago. My upgrades have largely been relegated to a better processing system: I no longer calculate each stage of good in turn. Instead, I overhauled the recipe system so that each good is calculated recursively based on the price of its ingredients. This also makes it trivial to add new items to the system, as no recalculation needs to be done for complex manufactured goods.

Raw resources are still assigned based on rarity calculations: I attempt to make these as accurate to the real world as possible, but I also keep a file to override those results in case I want to force a particular resource to occur somewhere.

Industries/labor was a different matter. I'd started out giving each industry a "support value" based on MDME: how many people are required to support the resource of an industry. Many people pointed out issues with MDME's support values, but I do think the core idea is sound. But that leaves us back at square one: what number for SV do we use? My answer so far, unfortunately, is do what I feel right.

{
  "item": "potter",
  "cpUnit": 10,
  "tech": 6,
  "SV": 300
}

Occasionally, a price will not make sense, and I'll reevaluate the SV. But this is the base number I use to determine whither and which. Let's take a population of 1000. We randomize the order of industries and begin with potter as above. $\left\lfloor\frac{1000}{300}\right\rfloor=3$. So there will be $1-3$ potter references here. Let's roll a $2$ (the actual roll percentage is also calculated from the SV and population). This means that $2\cdot300=600$ of the population is tied up in "supporting" the potter, leaving 400 for the next industry we consider. These base references are then spread across the trade network just like anything else.

This process results in a unique fingerprint of industries for each city.

It is no complex matter to extend this to sage abilities.

{
  "item": "hunting",
  "cpUnit": 2,
  "tech": 4,
  "SV": 50
}

Our fiat values are again cpUnit (the unit here being /day) and SV. Hunting ought to be a more common skill than most, so we begin with these numbers and see how it turns out. Because each ability is assigned independently, we can define all Amateur Logistics abilities to have the same base numbers, and the final output for a given market will still be unique. Authority/Expert/Sage abilities can be likewise scaled up appropriately from the Amateur values.

This lets the party acquire a hireling with a bespoke set of abilities and gives a total monthly price based on the specific set of skills they desire.

Future considerations:

  • Better understanding of how the various fiat numbers are derived, something more internally consistent like the price of training/apprenticeship
  • Replace some industries with appropriate skills, e.g., Potter can be replaced by Pottering. As mentioned above, I think this is probably a better approach overall, since it more directly ties the  market network into the sage system

September 15, 2022

Trade VII: Why Can't I Find What I'm Looking For?

The market system is based on rarity, a calculation derived from the local availability of a good and the total available amount of that good (or at least, the amount that is reachable). Goods are arranged hierarchically into stages, from "raw" materials all the way up to complex goods which require many precursors which themselves are often manufactured.

The system I've written to handle these complex goods works great. I can add "recipes" to a master file and calculate a price for any good I can dream up (and properly research).

A core concept of the system is that of a reference, which represents the amount of a good which can be purchased by 1500 oz of gold (approximately 3,125 gp). For small goods, like crops, a single reference can represent tons of material.

The question I am currently working through is: how to take the bits of information I have and translate them into an availability metric.

The market and price list provide two important functions to the party: they generate striving (to aspire towards a piece of equipment they can't yet afford) and scarcity (equipment that is not available for any cost).

We can, of course, allow the price itself to perform both of these functions. However, all equipment should not be available at all times simply because it exists somewhere in the system. The question is then how to determine how often a good will appear in a given market.

My initial thought is to use the local number of references to determine this rarity. If less than a single reference exists in the local market, then there is a good chance it'll not be available that week (or similar period of time). This means that we can recursively build up a local reference amount for manufactured goods based on the local references of its components.

Once I have this number, I can either use it as a probability straight up, or mitigate it a bit by comparing it to the rarity constant (itself a function of the size of the market). For now, I'm simplifying the final product by taking the log of that number and using that to determine a "rarity score."

\[\mathit{rarity} = \left\lceil-\log_{10}\left(\mathit{ref}_\ell\right)\right\rceil\]

Example: for a good with a 0.002 local references ($\mathit{ref}_\ell=0.002$), the rarity score is 3. That can be further used for a roll as needed. We could say that an item with a rarity of 3 will be available in a market on a 1 in 1d30, for example. This makes rare items difficult to find, but not impossible. The party could either hang around until some were available, or travel to another (and perhaps more favorable) market.

The simplest method to determine local references is to use the minimum of all constituent components, without regard to the amounts needed. I'm not super comfortable with this, because my conception of references is tied more tightly to actual production numbers (which I generate from the working population availability). But it has led to some bizarre cascades. Fodder, for example, is very cheap, but a lot of it is needed to raise a foal into an adult horse. This also means that the number of fodder references needed per horse is very very low. Both of these can quickly get out of hand as very small or large numbers are passed through several iterations of the recipe parser.

I tried dividing local references by the amounts needed, or comparing the local references available to the number needed. Neither are really satisfactory. I think I will use the simple method described above, and if I get a lot of complaints in play then I will revisit it.

The recipe system is built and effective. There are a lot of recipes to write, however.

April 21, 2022

Trade VI: Simplifying to Complexity

I've been working on my algorithms to generate trade networks and manufactured goods. Although probably several years out of date now, Tao's Trade System remains required reading for anyone wanting to do something similar.

This iteration was a much-needed rework of the way a lot of the prices were generated. I had gone through Alexis' work linked above and simplified it to my needs. He is using references based in the real world, whereas I am trying to generate from scratch.

I found that of all the equations, the final price of an object simplified to just a few variables. The first is the local value of a unit (oz) of gold (in cp, all prices are expressed in cp and can then be abstracted back up to sp or gp as needed). I'll call this $g$. To find this number, we need the local availability $g_\ell$ and the total availability $g_t$. $g_t$ is the total number of references reachable from the point in question. This is easy to do with network algorithms. Local availability is a weighted distance calculation over all locations $i$ reachable from $\ell$: \[g_\ell = \sum_i \frac{g_i}{\textrm{dist}\left(\ell, i\right) + 1}\] By this calculation, if $i$ has 2 gold references, but is 4 days away, it contributes $\frac{2}{4+1} = 0.4$ references to $g_\ell$.

Right now, I am treating each hex as a node in the graph, but if there is no defined settlement there, all its resources are given to the closest city hex for pricing purposes.

We need a rarity factor $r$ that scales with the size of the network. As the network grows larger, a smaller $r$ is needed to balance things out. I'm trying this out for now: \[r = -\frac{1}{n}\] where $n$ is the number of nodes in the network.

The last two constants are the number of gold pieces per oz ($p = \frac{1\textrm{ gp}}{0.48\textrm{ oz}}$) and ratio of cp to gp ($c = \frac{100}{1}$). These are easy to change. A half-ounce gold piece is somewhat hefty; many coins in history would have been much smaller amounts. Gold is valuable enough that a small bit is worth a lot, and hence a great deal of value can be expressed in quite tiny coins. I like the idea of a gp being a weightier coin. I also try to base the sizes of my coins on current analogs that I can actually show to my players.

A thousand of these is no joke

So the final equation comes together: \[g = \left(r \cdot \frac{g_t}{g_\ell} + 1\right) \cdot p \cdot c \]

For an individual resource $q$, the equation is similar. First, we have to define the base cost $b$ of a unit of $q$. I found that this was the most important factor; it essentially represents the ideal economy where everything is in perfect supply. Whether a board-foot of wood is defined as 1 cp or 18 cp will have approximately a 18x effect on the final price of wood no matter where you are in the world. This becomes the key object of research when sketching out the system. It is then an easy matter to determine how many units of $q$ are equivalent to one reference of gold (assuming a gold ref = 1500 oz): \[\mathit{ref}_q = \frac{b}{\mathit{ref}_g = 1500\textrm{ oz}}\]

We obtain the rarity $r_q$ in a similar way as above with gold, using the distance weighted availability. The final price (in cp) of an item at location $\ell$ is then: \[\$_q = \frac{g}{\mathit{ref}_q} \cdot \left(r \cdot \frac{q_t}{q_\ell} + 1\right) \mathit{ref}_g\]

There are some other ways to view this equation. It can simplify again to: \[\$_q = \frac{g}{b} \cdot \left(r \cdot \frac{q_t}{q_\ell} + 1\right)\]

The next step is to determine the availability of labor references. I haven't quite decided how to assign these so I'll save that for a future post. We obtain the available references by once again iterating on the network: \[L_\ell = \sum_i \frac{L_i}{\textrm{dist}\left(\ell, i\right) + 1}\]

The cost of a material $m$ at a given stage (eg, hematite $\to$ iron ore) is then the cost of the raw materials (the unit cost $\$_m$ times the number of units $n_m$) plus the labor cost, which is raw material cost divided by the labor references: \[\$_m = \$_q \cdot n_m + \frac{\$_q \cdot n_m}{\mathit{ref}_L}\]

This step is repeated for each stage of the process, which can be quite complex. I developed a JSON schema to represent each manufactured material. To raise an auroch from a calf to weaned, you require the following.

{
  "item": "auroch (weaned)",
  "unit": "hd",
  "stage": 1,
  "tech": 7,
  "weight": 200,
  "recipe": {
    "materials": {
      "auroch (calf)": 1,
      "min": [
        {
          "maize": 483,
          "oats": 483,
          "barley": 483,
          "cassava": 483,
          "rice": 483,
          "wheat": 483
        }
      ]
    },
    "labor": "herdsman"
  }
}

Our raw materials are 1 auroch calf + whichever is cheaper between 483 lbs of feed, plus the labor of a herdsman. As long as every manufactured item "downstream" exists, this "item" will be available for purchase.

April 8, 2022

Resources XXIII: Crops and Climates

I've recently completed a little side project that will help resource placement significantly.

I cross-referenced the crop yields from EarthStat with Koppen climate data to get the prevalence for 175 different categories. The data isn't perfect - it doesn't take politics or demographics into account, for example - but I think it will be useful either in automation (as I plan to use it) or in beginning to think about where crops should be placed on a world map.

More details and the data itself can be found here in its own git repo.

September 14, 2020

Resources XXII: Reserves

I will be going through material sources in an effort to quantify which areas would be most suitable for population generation. To do this I'll rely on the concept of reserves.

On the Higher Path blog [subscription needed], Alexis calls out reserves as:

So let's use the word Reserves to describe wealth as it occurs in the wilderness, and resources to describe wealth as that which the civilised parts of the kingdom actively exploit.

I'll use it in a slightly different way: the level of unexploited resource in the wilderness which may be exploited. Not all wells are equally deep, for instance.

Let us consider the noble auroch. This animal occurs in the following Koppen climates: Aw; As; Am; Csa; Csb; Csc; Cwa; Cwb; Cwc; Cfa; Cfb; Cfc; Dfa; Dfb. As a large mammal, we may also assume it needs at least 1 point of water drainage in a hex to survive (probably a low estimate). This yields the following distribution:

Nothing interesting so far. Let's apply some Perlin noise.

Now, aurochs are not found in every place where they might possibly be. For the sake of illustration, let's do 50% (cattle are pretty ubiquitous, I'd expect this to be on the high side for a reserve).

We are left with a number between 0 and 1 detailing the relative level of abundance of the wild reserve of aurochs. What that level is can then be derived separately and scaled. For example, wild cattle generally form herds of about 10 animals, with some instances of up to 184 head/3400 hectares. This is less than a reference per hex: about 0.3 ref/20hex. Obviously, once these herds are domesticated, their size will increase, so the exact relationship between the raw reserve and its resource equivalent will need to be defined.

On the other hand, I could simply tie the 0-1 relative abundance to the maximum developed reference density, which for this resource is 733 ref/20hex (assuming 100% utilization which is obviously a false assumption). Much to think about.

The advantage of using Perlin noise is the fact that it is reproducible given the same inputs: if these are defined for each commodity, then the reserves sort themselves out.

December 12, 2019

History XXII: R&D

I have long been fascinated by the Worlds: History project. Go check it out.

One idea I'd like to steal gain inspiration from is the discovery system. People groups have chances to learn new technologies over time (or even lose them). It's quite comprehensive in design if not fully filled out.

I love this. Conceptually, it should synthesize with my existing tech tree, yielding at least the following benefits:
  1. Prehistory is now possible; Year 0 doesn't necessarily start with the first city, and every polity doesn't begin with a city/settlement.
  2. Tribes/polities should be able to migrate more rapidly, reaching more area of the planet's surface.
  3. Technology will be different in different areas. This already exists but is fairly deterministic, based on population density. If your density is X, then you have agriculture, for example. This is captured by the tech level.
The downsides? It's a whole 'nother branch of work for me in addition to all of the research I'm already doing. So it might be useful to build it as a toggled mod. Additionally, DrTardigrade is working on timescales many factors larger than mine.

July 16, 2019

Resources XXI: Aurochs

The auroch was a breed of very large cattle which went extinct in the 1600s. Rather than a generic "cattle" reference, I want to use them for a bit more exotic feel.


Since we have no live aurochs, I'm going to use stats for the Indian gaur, another very large taurine, as my base.


An auroch calf weighs about 50 lbs at birth. Based on current calf prices relative to gold, a reference of gold can purchase 15,000 head of calves. They are found in A/B/C Koppen climates.

A calf is economically useful after it's been weaned, which for aurochs is approximately 8 months. During this time, there is already a material upkeep cost because the mother's milk is gradually being replaced by solid food. This is factored as an upkeep cost even if the animal is largely grazing, because any forage the auroch gets off my land is potential food I can't grow and sell; it is a sacrificial investment. Overall, this works out to 483 pounds of food, selected by the lowest price available in the region.

Once the calf is weaned (about 200 lb), its food uptake is significantly increased. The animal will eat about 2% of its body weight per day for the next 2 years and 4 months (more or less). This is 23,679 pounds of food up to its full weight (2,500 lb).

Each of these costs is mixed with the labor of local herdsmen, which increases the cost somewhat. However, herdsmen are usually in good supply and so the added labor cost is generally low.

This makes a full-grown auroch quite valuable (depending on the cost of feed). This cost will be used to determine the local costs for meat, leather, horn, and bone glue (and perhaps other things, but these are the most important for now).

Looking at the city of Kwazfulnis (population: 3896 dwarfs, 795humans, 237 halflings, 101 elves): you can get a calf for about a copper; but a weaned calf will cost you 28 sp, and a fully grown beast is 141 gp!

It's possible these prices don't make sense. I feel like every time I look at my base commodities table I see another mistake to correct. But I'm making slow progress, and I'm more concerned that the system work flawlessly (or good enough) so that updates/corrections can be made more easily.

July 15, 2019

Trade V: Money Makes the World Go Round

The fantasy economy runs on gold.

But gold is rare.

Yet trade still manages to happen. How?

My world is very disconnected. There are many separate networks which do not interact at all: the tech level is too low, the roads haven't been built, the markets aren't connected.

Many places do not have any gold at all.

But they have silver.

So what I've done is check each sub-network to see if gold is available. If it is, all is well. If not, we move to a silver standard. If (and this is more rare still), silver is not available either, I fix the price of chalcopyrite, since copper is a Stage 1 good (gold and silver are both Stage 0). If copper is not available, you're out of luck; for now anyway. If I add another precious metal it should be easy enough to go back and add it into this selector. So eventually, everyone should have something to base a coinage economy on.

I do think it might be worth it to adjust the rarity of gold. In the iteration I'm testing at the moment, I have 10 gold mines for 17,290 settled hexes. That's an occurrence of about 0.058%, whereas gold should be around 0.3%. Of course, there is more gold...it just hasn't been found yet. In reality, it's a little higher than the target, around 0.5%. I think I'll add a stronger effect on desirability since gold is so important.

March 20, 2019

Resources XX: Old Makes Way for the New

Not all resources can be extracted more efficiently or in greater quantities as local population increases.

In particular, raw agricultural resources will be pushed out of the way by the city.

Hence, I need a signal to indicate when a good is inversely proportional to local population (or infrastructure, or population density, etc).

I'll call this "Type A."

Type A goods, so far, are just those which require physical land to function, which is agricultural resources. Of course, we can think of cases where, say, a strip mine grows in area, but since this is only a single type of mine, we'll leave it alone for now.

The Type A goods (in the system so far) are:

commodity
wood
wheat
maize
oats
barley
cassava
rice

Inverting these numbers requires knowing (or guessing) the highest infrastructure. Although the infrastructure can rise quite a bit (the maximum I have so far is 2742), anything higher than 400 represents a fully settled hex. And indeed, there are considerations here that I might explore later: as the amount of available area grows, so does the number of hands necessary to farm that land. So there is inevitably a trade-off in how much you are able to produce.

All of the Type A goods are also Tech-6 (T-6). This means that only a single point of infrastructure is necessary to begin producing them. I think the best system as a first approximation is that of diminishing returns. A T-7 or T-8 hex may have more hands available, but each additional level reduces the efficiency of production. This is an easy way to account for the reduced amount of farmland or harvestable forest. If we consider that the production per person $p$ drops as the infrastructure $I$ increases $1\to400$, we then see that $p$ is related to base production $p_0$ by \[p = {p_0 \over 399}\left(400 - I\right)\]. I'll have to run some more tests and see how this actually works in practice, but I feel it's a reasonable start.

March 18, 2019

Resources XIX: Stage 0 Materials

Here are the raw resources I've researched so far.

But I have an interesting problem. A lot of these are ores with modern scientific names. That presents an odd immersion-breaker; a dwarf trader would (perhaps) not carry hematite. He'd carry red-iron, or something. However, I don't want to fall into the trap of making up too many names, while balancing that with playability.


For certain minerals, if only a few places produced it, it would make sense to call it after the producing nation or city. A good example is psilomelane, a manganese ore. Only 141 cities produce it. Of these, 10 cities control 50% of the total production: Nabib, Ashdinjem, Cusraq, Lahmanazlib, Rogan, Malia, Siaglen, Silil, Qoloob, and Crewnevanch. All great names to draw from: nabibite, Cusraq iron, qolooban. In an obscure, independent world, those would work great! Psilomelane is, after all, a Greek phrase meaning smooth-black, from the appearance of the stone. So all these things must be taken into account in order to present a consistent and immersive world to player. Having to memorize "qolooban" if you want to supply your blacksmithery is not terribly immersive.

But nonetheless, I will try.

commodity unit tech level occurrence unit/ref ref/acre acre/pop ref/1000 common
wood bd.ft 6 7000000 0.0029 100
goethite lb 7 0.0446 93750 6.311 bog-iron
limonite lb 7 0.0775 93750 157.8557 brown-iron
umber lb 7 0.0194 125000000 9.697
magnetite lb 8 0.0963 93750 0.2524
hematite lb 9 0.1008 93750 0.0101 red-iron
silver oz 8 0.0334 15000 3.8788
wheat lb 6 2500000 0.0001 100
maize lb 6 3528000 0.0001 500
oats lb 6 2500000 0.0007 1
gold oz 6 0.0035 1500 1.7455
barley lb 6 2500000 0.0001 1000
cassava lb 6 52083 0.0011 100
rice lb 6 62500 0.0001 100
chalcopyrite lb 6 0.1699 223404 24.4156 goldstone
azurite lb 7 0.034 47872 113.9394 bluestone
malachite lb 7 0.0777 103723 52.5874 greenstone
clay lb 6 0.0775 937500 157.8557
coal lb 9 0.11 9000000 0.1818
psilomelane lb 7 0.0123 23438 0.9697 bubblestone
pyrolusite lb 7 0.0201 23438 0.9697 blackstone

March 12, 2019

Trade III: You Have Something I Want

Time to put everything together and generate a trade network.

The network graph itself is created from the roads, seaways, and rivers. Right now, I have about 10 thousand separate resource-producing settlements, and about 20 thousand roads connecting them.

The problem I am running into is that networkx is pretty slow with this many edges (about 15,000 nodes and twice as many edges). But I found that pre-processing the trade distances makes this much faster. For instance, two cities may be connected by more than one route, even if its just a road and a navigable river. Although local circumstances may require trade to flow along a non-optimal route (the road is blocked, the river is too choppy), the vast majority of trade will occur in aggregate along the shortest route. Therefore, non-optimal routes are irrelevant to the market network; many of those 30,000 edges will never be used.

The process to assign a resource reference is as follows:
  • From the list of available raw resources for a given city hex, select those which the current infrastructure level will support
  • Determine the reference amount that the city can produce
  • Calculate the gold reference for every hex using the system described here
  • Calculate the reference costs for each raw resource
  • Calculate the labor costs for each raw resource. Really this is more of a measure of the amount of references available, and not the cost directly, but I can define a base cost just like any other material good and get, for example, the daily income of an ironworker
  • Calculate the costs for each manufactured commodity. Because a given good might depend on a number of other manufactured goods, I have to make sure that I do them in the right order. To this end, I define goods in stages. Hematite, as a raw resource, is a Stage 0 good. Iron ore is made from Hematite, and is thus a Stage 1 good. So all Stage 0 goods must be assigned and priced before the Stage 1 goods can be calculated. For every multi-stage good, the overall Stage must be $n+1$ where $n$ is the highest Stage used in the recipe
Manufactured goods are defined through recipes. This takes a lot of guesswork sometimes. For example:
'iron (ore)': {'min1': {'charcoal': 1; 'coal': 2};
'min2': {'goethite': 1.6; 'limonite': 1.8; 'magnetite': 1.4; 'hematite': 1.4};
'labor': 'ironsmith'}
This recipe for general iron ore says that you will need 1 lb of charcoal, or 2 lb of coal (whichever is cheaper), and the cheapest ore between 1.6 lb of goethite, 1.8 lb of limonite, 1.4 lb of magnetite, or 1.4 lb of hematite. These raw materials are then shaped by an ironsmith to produce 1 lb of iron ore.

This system is nicely versatile.

One snag that I've run into is the presence of trade networks without access to any precious metals at all, yet perhaps quite robust industry. There are a few solutions to this.
  1. Remove these networks entirely. No precious metal economy, no economy.
  2. Structure these to work as barter economies
  3. Use another substance as the practical fiat currency
  4. Assign a small amount of gold to the economy to lubricate it
2 and 3 are the most likely, historically speaking. But they also require the most work. The easiest for now is just 1. I think I'll redo a long history once I have a good number of raw resources defined. That should take care of most of these outposts. Most of them are small isolated mountain towns, which makes sense that they might not have structured economies, but there are several large cities in there (around 80k), which starts to make less sense in my mind.

Full trade network (sea routes not yet added), after many attempts to use force-directed layout

March 6, 2019

Resources XVIII: Rebirth

It's time to take a break from history generation to discuss a bit of resource placement. I'd like to see how the models I have currently will perform when applied to a larger area, and then dive into more of the raw materials. These are what I need to create enough of a framework to start running games again - any updates to the system are fine as long as they are to processed materials, not raw resources. Those need to be in place (or at least a minimum working set of them).

To do this, I needed to revisit some of the old numbers and make sure they make sense.

Surprise! Basically none of them do. So I reorganized my workflow.

First, I look around for production numbers for both ancient and modern times. I then compare these to a known quantity, particularly one that I'm holding fixed. I can use pricing ratios to make an educated guess as to the reference amounts and the production numbers, assuming a 500:1 improvement since the Industrial Revolution.

For example, I know that in Roman Britain, silver production was about 200 tons, gold around 9 tons, and copper around 15000 tons. This implies that for equivalent amounts of labor, I can get 75x more copper than silver, and 20x more silver than gold.

Similarly, one region in ancient Greece had a working force of 11,000 and output 200 tons of silver annually. If the ratio of gold to silver prices is about 10 (it fluctuates wildly, of course, but was around 10 in antiquity), and 1 reference of gold is equal to 1500 oz, then a reference of silver is about 15000 oz. Since the ratio of silver to copper is about 20, now I know the reference amounts and production quantities for gold, copper, and silver. Some research yields occurrence amounts, and generally, this research process must differ between categories. Minerals are easy to guess - but agriculture is not. Thankfully, the Romans took good notes about how much material they produced, giving a reference point for how much a technomagically minded society could produce if they put their minds to it.

This is not a terribly academic process, but it's a process, and it's based on numbers, regardless of realism. There are a lot of ways to tackle this problem, but I'll see if this one works for me.

I also need a mechanism for scoping this work. I want to get this into a playable state so I can start running games again, but if I spend years and years researching every possible item on the table, that's foolish. I think I might begin with the equipment lists in the PHB (poorly designed though they are) and develop the items that players might want as basics (with modification, of course). Then, if they want an additional item, it is more or less trivial to add (assuming that the raw materials and industries are already defined).

One thing I am assuming is that magic has little effect on overall production. Of course, this would not be strictly true. Any wizard, for example, smart enough to build traps in his dungeon would be smart enough to put that brain to work building an industrial production facility, putting all the local glassmakers out of business and declaring economic victory over the entire trade network. So there are some sociological questions that arise when considering why magic is not prevalent in the economy. Perhaps it is too rare. Perhaps the magical portion of the population (already a higher slice of the social strata) has bigger things of concern. Lots to think about.

But I'm rambling now, so I'll stop. Plenty to come soon.

November 14, 2018

Resources XVI: Manganese and Nickel Mining

nickel
magnanese

If we want good steel, we need manganese and nickel. Strictly speaking, these are ingredients of wrought iron, but I'm sticking them into steel. The Spartans may have lucked into manganese-rich iron ores, producing superior weapons.

Thankfully, nickel is easy. It's found in a form of limonite, which I've already categorized as an iron ore. So a tiny bit of limonite will yield nickel, and therefore it's not a Stage 0 raw resource.

Manganese is not terribly difficult to research either. It comes from pyrolusite (found, like everything else, with chalcopyrite). In the interest of fantasy-style names, I'll call it umber instead (which is a rich brown pigment made of crushed pyrolusite). In fact, I wonder what might be some more fantastical names for hematite, etc. Good subject for a future post.

Umber has an occurrence per hex of 2%, but this is improved by the presence of goethite, hematite, mountainous terrain, or boggy areas.

November 12, 2018

Resources XV: Revisiting Metals in Demoland

Now that we have data on all the metals we need, I'm going to revisit the resource distribution in Demoland. From here, we can gradually build up society as it might have expanded in this kingdom.

This map shows potential resources in each hex, not necessarily the exploited ones. I've also left off agricultural references, because the map tends to get pretty cluttered, even with just a few symbols. The symbol reference can be found here. I've grayed out the symbols on purpose. Once we being actually placing them (again), they'll be more visible to indicate their exploitation.

Maps like this can be helpful for certain types of campaigns. Knowing what materials are where can inform an ambitious party searching for a source of wealth, or a place to found a town and be king of their own country. At least, until Rich Neighbor gets jealous...

November 9, 2018

Resources XIV: Placing Copper Ore

Chalcopyrite has some relation to both gold and silver, and so it could be considered a lynchpin of this system. But we will also consider the other copper ores here as well.

I've found a really good resource at Mindat.org, which gives the number of mines around the world for different minerals. I can plug this into my formula and get a percentage occurrence for my own world.
  • Chalcopyrite: 27,901 deposits. 16.9%
  • Malachite: 12,759 deposits, 7.8%
  • Azurite: 5,593 deposits, 3.4%
Not bad. Azurite and malachite are linked, and chalcopyrite is linked with volcanic areas and coal seams.

November 7, 2018

Resources XIII: Placing Silver Ore: Redux

I made an error in the previous post. To enshrine my mistake, I'll fix it here.

I forgot to multiply by the hex area factor. If I do so, I get an occurrence of 700%! That implies that there are 7 deposits of silver in each hex. That has to be wrong, otherwise silver would be essentially worthless. So I made a bad assumption.

Instead, I will use the Mindat method (discussed in the future copper post). This yields:
\[{5,484\textrm{ deposits}\over 57,000,000\textrm{ mi}^2}\cdot {347\textrm{ mi}^2 \over 1 \textrm{ hex}} = 3.3\%\]
That's a bit more reasonable. Again, keep in mind that 347 square miles is a massive area, and that's just one hex!

Resources XII: Placing Silver Ore

Silver's crust abundance is 0.0000079%, so about 2000x more common than gold. Let's use the numbers already generated for gold:
\[{2000\cdot580\textrm{ deposits}\over 57,000,000\textrm{ mi}^2}\cdot 347\textrm{ mi}^2 = 2\%\]
For now, I'll ignore galena and pretend we're mining pure silver (galena, remember, is only about 2% silver). Just like with gold, we see an opportunity to increase the occurrence alongside chalcopyrite, which is quickly becoming my favorite mineral. So, to get the placement for gold and silver down, I need to tackle copper ores.

Edit: In which I correct a mistake.

October 26, 2018

Resources XI: Silver Mining

silver
lead/galena

The primary ore of silver (at least in ancient times and for my purposes) is galena. Galena is also a lead ore, and produces about 1-2% of silver. To my geologically untrained eye, its occurrence is more or less random, except for a relationship with chalcopyrite.

Because I'm itching to start playing, I may skip over silver (and gold) production in the trade system. I'll still work on them, of course, but I might use "silver" directly (as a raw resource) rather than bother to work out the details of production.

That brings to mind an interesting question about coinage. This would be restricted to an administrative center or licensed foundry, and while raw nuggets of metal could certainly be used in frontier towns, a gold mine does not necessarily equate to a flourishing coinage economy. The bullion has to make its way down to the foundry (if its located elsewhere) to be converted to spendable coinage appropriate to the realm. So that might be interesting to study later on, if I include foreign currencies rather than a flat "gp/sp/cp" across the globe. Unrealistic, I know, but gameable. I'm not a monster.

August 24, 2018

Resources X: A Man's Gotta Eat

As far as agriculture goes, there is no better resource I've found for implementing crop distribution than the Ramankutty Lab. This is an absolutely fantastic repository for the distribution of 175 different crops.

However, that's a lot of work for me to do, even though the heavy lifting has already been done. I have to figure out how to translate those stats into something my program can read. I have climate data, of course. Just have to decide which wires to plug in where.

Ramankutty provides some models for predicting crop cultivation based on the length of the growing season. This is a good start, although they use some data I don't have, like the actual evapotranspiration and the soil moisture index.

For my purposes, at first, I might just go through the data and figure out what Koppen climate the crops roughly align with. That's easy enough to do by layering the kml files which are easily available. I'll only post an example here: please go over to the repo linked above to get the data for yourself. It's very informative. This is probably the easiest way to do it: I can't find any crop lists compared to Koppen unfortunately; there are some broad generalizations but that's all.
Source: Earthstat

Then again, it'll take a long time to go through 175 crop types. So I think I'll prioritize and work through them here and there. I'm also having a lot of fun making the symbols for them. I've either used alchemy symbols straight from the Quivira font or combined glyph shapes in Inkscape to maintain a consistent style. I also like the Symbola and Esoterik fonts, but I haven't had occasion to use them yet. I don't always use the alchemy symbol, most for metals, but I do try and tie it in somehow if I can. If a bunch of mystic medievalists did all the work for me, why reinvent the wheel? For example, barley and rye (both used in alcohol production) use various forms of alcohol symbols.

In terms of translating the yield numbers to actual reference numbers, we can calculate the number of acres it takes to produce one reference, and we also need to know the amount of arable land that's available for agriculture. This varies from climate to climate, and I need to do a more detailed study of the percentages there. For instance, India's Aw climate gives them a mind-boggling 52% of arable land, but only 4% is used for crops. Then, how many people does it take to work a single acre? Estimates are all over the place (since it may vary per crop), but the basic grains seem to be around 20 acres a person. I'd rather use 10 in the absence of better data for now. I've worked 10 acres before (vineyard), and it was rough but doable.

So the code will need to decide if the settlement will run out of available hands or available land first. Not so hard.

I'm looking over these yield numbers and some seem a little high for a pre-modern society, even assuming some magical assistance from the local druid. So I may revisit them.

 
Wheat: Cfb. Primarily, at least. One thing I'm doing is ignoring some of the smaller yield areas to account for differences in technology. Wheat is pretty hardy and can be grown in many different climates, but the highest yields are predominately Cfb. Yields 1,000 lbs/acre.

Barley: Cfb, Cfa, BSh, Dfb, Dfa. Another versatile crop, without which your stereotypical dwarfs will be ale-less. Of course, if you want beer, you need hops as well. Yields 100 lb/acre.

Oats: Cfa, Cfb. Yields 480 lb/acre.

Maize: Cfa, Dfa, Csa, Csb, Cfb. Yields 500 lb/acre.

Cassava: Af, Am, As, Aw, Csa, Cfa, Cwb, Cwa, Cwc, BSk, Dwa, Dwb. Very wide distribution. Yields 1,300 lb/acre.

Rice: Aw, Am, Cfa, Cfb, BSh, Dfb, Cfa, Cwa, Csa. This stuff will grow basically anywhere you have water. Yields 1,125 lb/acre.

August 20, 2018

Resources IX: Demoland's Iron Industry

Industry is kind of a strong word for what they've got. Remember, barely anyone lives here. They have a good bit of iron, and not that much money to buy it with. There are only three places where they even can buy it: Andox, Gerlin, and Malis. They also have no connection to any outside economy, so as far as they know, iron is just cheap as dirt.

It's possible that an economy this poor (or at least, lacking in the Big Three fantasy coinages of copper, silver, and gold) would be on the barter system. However, the trade system is still of use here because it provides a comparative measure of value. If a goat is worth 1gp, and a chicken is worth 5cp, then a goat is worth 20 chickens. Easy.

I'll be going through this a bit slowly, since I'm uncovering bugs as I go back through all my code.

Also, these numbers are constantly changing. Eventually, of course, this will all be generated, but I'm a strong believer in doing it by hand at least at a very small scale so that I can catch some of the bigger problems as they come up. So some of the reference numbers might be too small or too large. I already caught a problem like this for the wood reference. In large economies, this can get lost in the weeds, but in small economies like Demoland, it can have huge social ramifications.

With the same caveat of constant development, I haven't fully researched some of the ores that appear here, specifically copper and silver, at least in terms of putting them into the system. So they appear fully formed, for now. Clay also appears (since you need it to create the furnaces to refine iron).

Not all cities are markets. Market towns are displayed in small caps. I try to keep the resource symbols up to date here.

  • Andox is the market for Kenor, Norys, Derl, and Cadewin
  • Gerlin is the market for Llen and Betryn
  • Malis is the market for Ffrith
The reference amounts are as follows:
I'll put up another post soon talking about the recipe system I use to integrate my version of the Tao's trade network. But already I can see that this place is a total backwater. It helps to remember that about 80% of people live around, not in, the villages. Andox, for example, has over 5000 people scattered around it. So even though the town itself might be very small, it directly administers hegemony over a much larger population (including the surrounding hexes, so almost 8000 all told), many of whom will have to do business in Andox itself, since it's the best place to get iron tools (among other things).