Pointers on how to learn to realistically model a fake world economy?
January 6, 2019 6:59 PM   Subscribe

I want to be able to create a plausible, dynamic economy for tabletop roleplaying games. I have no clue how to model the economics, so I’m looking for books/other resources on the topic (or other online communities that may have people who know how to do this). I explain what I have in mind within!

I have long been annoyed by the zero dimensional nature of tabletop game economies. I realize many people may think it’s silly to want to spend time on that aspect of all things, but indulge me :)

Basically, I want to be able to define a world, and then be able to define economic shocks. A clear example: the heroes finally slay the dragon and uncover a massive hoard of gold. This almost certainly should lead to inflation, depending on how they introduce it to the world market. What I want is to write a program which, given a description of the game world, can define plausible markets.

What I have in mind is sort of to describe cities and towns categorically. “A small mining town” etc (likely with more detail than that on the resources they have access to...I imagine resources could be abstracted into common, rare, food, etc). I’d define how long and how hard it is to get from place to place. For items, I’d define what the inputs are (again, abstracting...a sword might be 2 parts common resources 2 parts rare resource 10 parts labor or something). My goal is for model to be able to give me prices. How much is a sword worth, in a given town, based on that towns economy and the potential trade routes it has etc.

That’s the general goal. Define the world, and be able to get the worth of things, people’s general income, etc. Then I’d like to be able to introduce economic shocks (dragon’s hoard, a trade route shuts down, etc) and see how all of those factors change over time.

So, I can program, and I have a high level understanding of economics, but I have absolutely no clue how to tackle modeling something like the above. I realize it is non-trivial, and am willing to invest time learning about this, but I have no idea where to start. Any and all pointers welcome!
posted by wooh to Grab Bag (17 answers total) 8 users marked this as a favorite
 
Growing Artificial Societies might be a place to start.
posted by If only I had a penguin... at 7:11 PM on January 6, 2019


I think you will get best results through trial-and-error and game testing. It is perfectly plausible to say, "When there is more money in circulations, the price of resources and goods goes up," and "when trade routes are blocked, the cost of impacted goods is effected." That would be a fun dynamic to introduce into a game, and could easily be defined through a simple (or complex) tale.

I think it's unlikely you'd get optimal gaming results by defining an abstract formula based on some definition of "correct economics".
posted by Winnie the Proust at 7:41 PM on January 6, 2019 [1 favorite]


I think modeling this might be even more interesting than you think...like, maybe introducing a bunch of gold creates massive inflation. Or maybe it reduces the price of silver because people stop mining gold and start mining silver instead. Maybe it creates a new school of magic because people discover a bunch of gold-based alchemical recipes that were too expensive to develop before. Or maybe some spells that were frequently rarely used become more commonplace. (This would have interesting implications if, e.g. diamonds became super common in a D&D setting where diamonds are a material component of the Raise Dead spell, and their rarity is one of the big blockers to simply resurrecting everybody who dies a premature death.) Maybe it spurs the creation of fiat currency because to fight inflation, the monarch declares that only gold you can prove you owned Before Dragon Death is valid currency, and can be exchanged for a dollar at the city hall. Maybe it does wreak economic catastrophe, and as a result the kingdom outlaws any further dragon-slaying upon penalty of death. I mean, not that you asked my opinion, but I think modeling an economy is a super cool idea, and the most RP-interesting effects of economic shocks tend to be things like political change and technological innovation, which seem hard to model.


Anyway, /r/worldbuilding/might be a good place to ask about this stuff.
posted by phoenixy at 7:55 PM on January 6, 2019 [4 favorites]


I don't know how much practical knowledge you might glean from it, but for spiritual inspiration towards your quest, look at Dwarf Fortress.
posted by glonous keming at 8:00 PM on January 6, 2019


Response by poster: Winnie the Proust: I agree there is serious 80/20 to be had. That said, the appeal of the model is non-local effects. Once I have a good enough model, all sorts of unexpected things can happen. My goal is not a "true" model per se, just a consistent one that can give me the outputs I want (say, average monthly earnings of a pleasant, price of a sword, etc)

Phoenixy: I feel seen you :) I think you get it. You're absolutely right that the most interesting things can't be modeled, but the goal of the model is to give flesh to those things. So the GM/players would still be defining all the big political etc stuff, but the model would give life to that. And in turn, that can generate outputs that lead to political results. The dragon hoard leads to inflation which leads to the heavily leveraged gold mining empire going bankrupt unexpectedly, etc etc
posted by wooh at 8:19 PM on January 6, 2019


Simcity 2013 was such a failure by EA that they even gave everyone a free game to make up for it (and that's how I ended up with Mass Effect 3) but I rather liked their GlassBox engine, which essentially modeled everything in the city as physics type fluid simulation moving through pipes - from high pressure to low pressure, from uphill to downhill. The only way to "model" tens of thousands of individual citizens was to treat them all as homogeneous water molecules in a physics simulation. Maybe you could have a look at it?

For example, say you have built another area and failed to plan for increased traffic and there is now horrible gridlock. Some workers are late for work for several days, then they get fired. Household wealth depletes. When it drops below a certain level the people living there are kicked out from the house. They then go live in the park as homeless people. Their criminality increases. They rob other citizens. Police has to come and take them to jail, but if the police don't arrive in time they don't get caught. If the ambulance doesn't arrive in time their victim dies. Even if not, the victim is now in hospital and can't work. Household wealth decreases further. Jails become overcrowded.

The system doesn't care about the identity of any "one" particular particle - they're all interchangable. But they're all modeled - the citizen, the police, the ambulance, the garbage collectors, kids going to school, people going shopping, etc. If you follow the life trajectory of any one agent it doesn't make any sense because of their lack of memory. A kid may go to school and return to a totally different house afterwards. But on a macro level it works pretty well!
posted by xdvesper at 9:06 PM on January 6, 2019


I wonder if GlassBox was inspired by MONIAC.
posted by Chrysostom at 9:42 PM on January 6, 2019 [1 favorite]


One thing that medieval economies (which are the usual setting for dragons etc) have is very little actual transaction of goods relative to today. This paper constructs a medieval GDP for England (and may have a ton of useful information for your purposes, since most fantasy settings are not unlike medieval England). GDP back then is 37% agriculture, 20% industry and 43% services (today it's 0.7% / 20% / 79%) Most of the value in the agriculture and industry are in pork and mutton, as well as wool and wool products. The wool/wool products are cheap to produce and heavy/bulky to transport; the meat spoils quickly. The lion's share of the services are domestic services that don't ship at all. Because it's so expensive to transport goods back then -- pure animal muscle power unless you were lucky enough to be able to use a water route -- there is actually very little trade.

This might be good; you might as a starting point assume that the population as a whole is self-sufficient for food, housing and clothing since this is mostly made and consumed locally, and then you only need to track higher-value goods. On the other hand, if Baron Von Evil blockades the mountain pass and his skeleton warriors destroy the crops on the far side, there's no way for your heroes to break the blockade, and stop the famine.

I'd look into the system that Railroad Tycoon 3 used for their economy, which seems not dissimilar from the SimCity 2013 model. It's described in a little more detail on page 71-75 of the manual. Basically, the map is treated as a grid. There are a number of commodities, let's say tin. Each gridcell has a price for a commodity and an amount of the commodity; they start out at a neutral price and no supply at all, say 50 guilders per cart of tin. There are sources for the commodity (mines) and sinks for the commodity (tinkerers and other metalsmiths). The sources start producing commodities. say 1 cart of tin per tick. The sinks start demanding commodities. If a cell has excess supply of a commodity, the price goes down. If a sink has not enough supply of a commodity, it starts increasing the price. The price in other cells are affected by the adjacent cells; if the smith in Hiddlestown needs tin, the word gets out that someone is willing to pay for tin in Hiddlestown, first locally and then further and further away.

The commodities themselves then begin to move from places of lower price to places of higher price; in RT3 there is a strong modification where the transport costs are much lower along rivers and oceans than on land. You could make this work by saying that if the price of tin a certain cell is 40 guilders and in one adjacent cell it's 41 and in another it's 43, the tin will go to the 43 guilder cell -- unless the 41 guilder cell is along a river. (Basically, it takes the flattest/easiest path to higher prices, where rivers and potentially roads, forests, hills affect this slope more than plains do.) This means that essentially commodities tend to flow the path of least resistance to where they are needed.

What then happens in RT3 is conversion for some commodities; when iron and coal both reach a steel mill, then a shipment of steel is produced; when the steel hits a factory then goods of another sort are produced that then are consumed in a town. This chart has an example. This might be a good expansion step; start with a single commodity, then add in some terrain effects, then add in commodity conversion (and if you want the bonus step, commodity substitution, where perhaps scrolls can be made of paper or vellum, whichever is cheaper.)

Remarkably, the spatial interaction of economic activity is sort of where I work professionally, so please feel free to MeMail me if you have more questions -- the RT3 model isn't the only way or the best, but it's relatively straightforward cellular automata that also happens to exist as an implemented system if you want to see what it looks like in action for like 10 bucks. (Because the economy and shipping of goods is so important to RT3, the game has an in-game map mode where you can see the prices change and commodities move in real time, and how your railroad has an impact.)
posted by Homeboy Trouble at 9:54 PM on January 6, 2019 [3 favorites]


Do you know where your natural resources are? Do you know who controls them? Which resources are most important / scarce? How are materials processed? Is there the concept of quality resources in your game (do you need to have refineries, what are the value-add processes such as what was done with Damascan Steel?) Are there any new resources or technologies that replace the need for old resources? Are guilds tied to governments? Do guilds pay tariffs? What does 'the state' provide vs. what do trade guilds provide? Does this change at the border?

A sword may be a sword, but look at the old 2nd ed. Dark Sun books and you'll see the impact of scarcity - alternative material weapons, inflated prices, etc...

Once you understand where your resources are, and who controls them, then you need to consider how goods and services are exchanged... Ever given your players a cow as a form of payment? Is there a black market? What goods should be smuggled in and/or counterfeit? Who has the most to lose by a loss of stability in the market and what would they do to prevent / prop up the economy?

After that... then we gotta pause... if you are at that point, then you need to slide into banking, what currencies exist, why sovereign states would exchange currency, why one currency might be valued higher than the other (trade imbalances), and how money is lent and repaid... How is coin measured? Does a dragon care if their treasure is counterfeit or underweight, or do they just want the shiny... Also... an adventurer cant just spend all their money immediately - think of it like bitcoin... if they can't convert it into something usable when they want to... all they have are heavy paperweights... and no liquidity... So they may be rich... but they may have to wait for their money to be useful...

Who has a monopoly on goods? how do prices change? How are people compensated?

If I were looking to do this myself, I would avoid focusing on an equation to understand inflation, and instead look to make sure the components of my economy are in place and functional...
posted by Nanukthedog at 10:41 PM on January 6, 2019 [3 favorites]


Response by poster: Nanukthedog, you are totally on point. So my idea is to abstract those concerns into core concerns that represent them, and can change accordingly. Then build an engine using those, and then more can be added.

So for example, there may be the following resource categories:
Food
Common Commodities
Uncommon Commodities
Rare Commodities
Silver
Gold

With other categories:
Perishable
Nonpersihable
Durable
Nondurable

And so on. The input to the engine would be the topology of the world...so that means the users would define a world of cities and towns, where a bunch of nobs are set....exactly things like: is there a gold mine near by? Is there a lot of rare commodities but little food? How hard is it to get to other towns?

Value add would be in the form of labor and buildings, and buildings+labor. Though maybe buildings are just a special type of durable resource. Regardless, labor can take certain inputs and create outputs. A blacksmith can take some combination of commodities and make a sword. My goal is to know: how much does that sword cost our adventurers? If they kill the blacksmith, how much gold does he have? If the pass to the nearest city is blocked, how much do prices go up?

And then on that, one can definitely layer on banking... I think trade imbalances are really important, given what I know about the economics of the middle ages. But I think what I described above is sort of the core issue, and the rest can be feedback loops on top of that. But you're asking all of the right questions. The things you defined are things that I want to be definable, but what I'm not sure at all is what to do once I have those inputs. So I know all of those things...how can I calculate the changing value of a sword over time? Two countries go to war and now all trade between them is cut off, not to mention an immense increased demand for lots of things. How are prices going to skyrocket? And of course, a good system would let you know when there are big arbitrage opportunities (eg smuggling)
posted by wooh at 10:48 PM on January 6, 2019


The society and politics are going to be a huge factor. If most wealth is tied up in non-monetary obligations around labor and land you'll see different effects of supply/demand imbalance than you would in a more market driven area. If the royal mint is the only legal customer for gold inflation is worst where coins enter circulation (maybe an army camp, if it's that kind of army) not near the mine. Prices for something like bread might be fixed by decree and supply ensured by force. Basically supply and demand still apply but market signals get determined by all sorts of things.

Along those lines, I still love Cosma Shalizi's observation on what a "mutually beneficial trade" looked like for most of history:

MAN ON HORSEBACK: I have killed the previous man on horseback. Give me your grain or I will kill you too.
FARMER: Your worship is most merciful.

posted by mark k at 11:45 PM on January 6, 2019 [2 favorites]


Lots of respect to your premise.

What I'm not sure is if you want to worldbuild or worldbuild for a select transient number of roleplayers.

If you want to worlbuild-worldbuild for a setting, I can't help you out lots there.

If you're just worldbuilding for an instance of a party - well, supply and demand works well. The party has waaaay too much supply for the local economy to soak up, so everything costs much much more and everything sells much much less.

You as the GM arbitrarily sets the cost of everything, as is plot dependent. Oh - you can't quite afford a decent horse - what're you willing to do to get those extra couple of silvers?

You have a shitton of gold - but it doesn't buy you a lot here where you already dropped off about a decades worth of GDP. What are you going to do with it, and is anyone else going to know your plans?

I'd definitely go with "it costs whatever the plot says it costs."

Also - I have a real problem with copper/silver/gold in "fantasy" settings - is that a HUGE ingot of copper where twenty of them represents a sliver of silver, or is the silver so debased that it's mostly just zinc and tin? Gold - what purity, with which impurities?
posted by porpoise at 11:50 PM on January 6, 2019


Similarly, your party gets a *windfall treasure* from Land A.

Turns out, their currency is so debased that it's almost worthless anywhere else; and you've got to transport through somewhere to get the heavy metals smelted out where the locals still values the currency in full.

A fortune is gained by the party and they travel to someplace *everyone* has always wanted to retire to - because *everyone* has retired there, everything costs a lot more and the party runs out of treasure too quickly - or someone else who ran out too quickly tries to con the party.

As GM, you're free to manipulate local markets. Perhaps there was a "pickle failure" one year and the loss in pickles were 98% instead of 6% and the frost came early and killed the nettles. Local costs for winter vegetables goes up something like 10000% and people die because of it.

Value of a "castle forged" sword - if the owners of the castle were actively building stockpiles, the cost of a sword goes up and maybe becomes contraband because of decreased supply. In other times, they'd be a less expensive commodity item (probably created in more leisure and with higher end quality) that you'd buy off the shelf. The value of a given sword is going to vary depending on local availability/ demand.
posted by porpoise at 12:01 AM on January 7, 2019


I would:
- Create a weighted graph representing towns and abstract “trade distance” D (trade route, river, bandits, actual distance, etc)
- Give each town a resource gain function, so town A gets N units of gold and M units of food from their mines and farms per month/year
- Also define a resource drain function to represent eating, forging of swords, etc
- At each time point, run gain and drains, then use a diffusion-type algorithm to model the flow, where the amount of resource transferred from A to B is proportional to (N_A - N_B)/D_AB
- Use linear supply/demand normalized to a capital city; tracking gold here would also let you back out inflation

Enhancements:
- Define resource conversion rates at each city (iron + coal to steel)
- Give different resources different diffusion constants to represent ease of transport
- Tiered consumption, where you have multiple classes of food resource (eg) and the rich will preferentially eat high quality food but will eat lower quality if necessary
posted by Maecenas at 7:30 AM on January 7, 2019 [1 favorite]


Forgot to add: more info on graph diffusion here, it seems: http://www.leonidzhukov.net/hse/2015/networks/lectures/lecture11.pdf
posted by Maecenas at 7:35 AM on January 7, 2019


Most game systems don't acknowledge the effects of magic on the economy. If there is any magic in the game, it changes things a great deal - and oddly, the more magic, the fewer changes.

If there is one wizard per million people and his abilities are limited to "purify drinking water and throw sparks from his wand that can light a fireplace," then every king in six realms will demand access to the wizard, and wars will be fought over it, and "wizard-pure water" will be sold for ridiculous sums, just because it's absolutely unique. If wizardry is a talent like blacksmithing and everyone has a little bit of it and there are wizard schools (multiple) and wizard wars... they're just another guild faction in the world, which may look very different, what with the flying cats and forests of singing purple trees and all, but the economics won't change much from what we know.

Extra bonus problems in fantasy gaming: Every species will have its own culture, its own languages, its own economy. D&D was based on medieval borderline-renaissance Europe, with nonhuman races being "exotic visitors" to human cultural settings; very little thought went into their own societies. More substantial worldbuilding is going to need to consider them. (Why do dragons hoard treasure? Dwarves live 300+ years; how do their banks calculate interest? What's the elven reproduction rate - do they have ~2.2 children over the space of a thousand years, so each child grows up as the only youth in their village?)

One of the biggest problems with gaming economy: for most of history, the vast majority of the world was very, very poor. As in, entire county-sized regions might be full of people who have never handled coin in their lives. That doesn't mean they're on a "barter economy" (which may not have ever existed - barter is how you do business with outsiders, not locals), but they're on a system that doesn't involve coin exchange, even if the values are measured in coin that none of them have. (Relevant book: Debt: The First 5000 Years.)

Economics gets weirder the longer you look at it. For gameworld design, there are two main approaches:
1) Only what's needed for the plot; economies the players don't see, don't actually exist. GM fiat manages arguments.
2) "Someday I might write a novel about this"- you need more background details, which is likely to actually make things less clear and coherent for the players, as they run into details that don't connect to anything they've already encountered. Done well, this gives them the sense of a full world outside of what they know; done poorly, or with uncooperative players, it looks like the GM is telling a story that doesn't actually involve them.
posted by ErisLordFreedom at 8:04 AM on January 7, 2019 [1 favorite]


Elite: Dangerous is another game with an economic simulation that might be a good inspiration.

Each region (planet) has a different economic system that results in different supply and demand of various commodities; trade between neighboring systems is simulated to set prices. There are different states in each system, like war, plague, famine, bubble, recession, etc. that affect supply and demand.

There are major factions ("the Empire", "the Federation", and so on) and local minor factions -- with minor factions in particular the player's decision to throw in their lot with one can shift the balance of power (thereby leading to different economic events).

There's also a larger complicated story which is semi-scripted by the game developers, with key events depending on the balance of player choices.

The actual mathematical formulas they use may have been worked out by some nerds, but I haven't seen it. But the general design seems to work okay, although for a pen and paper RPG it would be on a much smaller scale, since there aren't thousands of players.
posted by vogon_poet at 11:05 AM on January 7, 2019


« Older Should I take the leap to live by myself or wait...   |   How to cope with Mums dementia? Newer »
This thread is closed to new comments.