Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: how do economy in games ¯\(°_o)/¯?  (Read 1965 times)

professorlamp

  • Bay Watcher
    • View Profile
    • joereynoldsaudio
how do economy in games ¯\(°_o)/¯?
« on: November 10, 2013, 06:45:41 pm »

Evenin'

I'm in the process of making a game, it was meant to be mostly economy with a part of adventure but it's actually the other way around right now. My economic model is pretty weak and the implementations I have are very poor. How can I make the economy of a game a bit more in-depth mechanics-wise?

At the moment, the basis of my economy is;

Person comes in with product and sells it
If the same product is sold multiple times, the demand of that item decreases as does the price.
I also have it going the other way:
If the player is buying the same item over and over again, the price of that item will rise.
And lastly, if the shop has a large amount of one item, they will not accept any more of that item from you.

That's about as deep as my economy goes  >:(  but I NEED it to be deeper, right now the game has grown a mind of its own and is going a different direction to what I wanted :(

Spill your ideas at me  :D
If you require more info on the game then I'll spill the beans a bit more...


 
Logged
I write music for video games!
www.joereynoldsaudio.com

Bauglir

  • Bay Watcher
  • Let us make Good
    • View Profile
Re: how do economy in games ¯\(°_o)/¯?
« Reply #1 on: November 10, 2013, 07:40:26 pm »

What kind of game are we talking about? Tabletop or computer, genre, etc.

I'd recommend implementing a haggle system of some kind.

Also, if it's a computer game, economies should function on different levels, and be dependent on local resources. So, a trade in one city will not immediately change prices in another, and place with its own iron mine will stop buying iron equipment earlier than someplace else, at about the point where the only use for the stuff is melting it down for scrap. Make sure that your definitions for "large amounts" and so on are dynamically determined, rather than hard-coded - whether or not a store will accept certain goods, and the price they'll pay, for instance, should be a function of your bartering skills, the relevance to the buyer's own business, the local resources, the rate at which those resources are produced, the rate at which they're consumed, the resources the regional economy can supply, the availability of local craftspeople, the current inventory, and some measure of an item's versatility and inherent value.

Where sensible, your transactions should alter these values for a given location, although the amount might be tiny until you're a real merchant prince. For instance, selling an iron sword might only add 1 kg of iron back into the local economy. So it's a negligible change, but don't bother setting up special cases for sales that seem "too small to be worth tracking". Instead just let it increment the largish number tracking the local iron supply, which is part of the system you have in place that will keep things reasonable when you try to dump 1,000 tons of iron into that same village. NPCs should have, where plausible, awareness of the consequences of their deals (nobody will buy 1,000 tons of iron in a village that consumes it so slowly that it becomes worthless, even if its current rarity makes it a precious commodity before the deal). If you want to get really in-depth, you can track migration as people follow the explosions of wealth your character leaves behind.

This is probably too much busywork for a pen and paper game, however, unless you scrap the adventure part entirely and have the players play as economies instead of people. It's too much for game mechanics, but it might make a compelling "character" creation system. Also, somebody make that game.
Logged
In the days when Sussman was a novice, Minsky once came to him as he sat hacking at the PDP-6.
“What are you doing?”, asked Minsky. “I am training a randomly wired neural net to play Tic-Tac-Toe” Sussman replied. “Why is the net wired randomly?”, asked Minsky. “I do not want it to have any preconceptions of how to play”, Sussman said.
Minsky then shut his eyes. “Why do you close your eyes?”, Sussman asked his teacher.
“So that the room will be empty.”
At that moment, Sussman was enlightened.

mainiac

  • Bay Watcher
  • Na vazeal kwah-kai
    • View Profile
Re: how do economy in games ¯\(°_o)/¯?
« Reply #2 on: November 10, 2013, 07:45:33 pm »

That's actually not a bad model at all for a base.  I'd suggest the next thing to do is make a basic supply-demand curve model.

For each good make a list of each potential buyer and the value they'd get for it.  If a buyer wants multiple ones, enter them into the list multiple times.  Then make a list of potential producers in the same fashion.  Add an additional cost to the producers to account for extra costs, like keeping items around in shops and whatnot.  Then find where these two lists intersect and you've got a competitive market pricing.  So use this as the natural price of the item, what everyone knows that it's worth.  If there's a lot in stock or it's out of stock then you can make the price react to the scarcity or the glut, like you are doing right now with your selling and buying model.
Logged
Ancient Babylonian god of RAEG
--------------
[CAN_INTERNET]
[PREFSTRING:google]
"Don't tell me what you value. Show me your budget and I will tell you what you value"
« Last Edit: February 10, 1988, 03:27:23 pm by UR MOM »
mainiac is always a little sarcastic, at least.

professorlamp

  • Bay Watcher
    • View Profile
    • joereynoldsaudio
Re: how do economy in games ¯\(°_o)/¯?
« Reply #3 on: November 10, 2013, 07:53:11 pm »

What kind of game are we talking about? Tabletop or computer, genre, etc.

Right now it's very much a hack'n'slash computer game, I'm trying to draw emphasis away from the hack'n'slash aspect of it.

Short description:

You're a young boy in Uganda who kills cannibals and sells their limbs to a witchdoctor (this is where most of the economic model lies). Eventually with the money, you move away from the ritualistic culture.

edit: Looks like I'm going to need to go into further detail.

The trading is not on a grand scale, it's very small and intimate between the boy and the shopkeeper, that is all. There are a grand total of 2 shops. One for weapons and the other is the witchdoctors hut to sell limbs, bodies etc... and also to purchase small bits (which haven't been coded or thought of yet).

There aren't any trades or anything like that, nor is there any large scale travelling, realistically, the whole game is probably about 1/2 kilometer long (in game terms) and so there isn't a lot to explore. Given that there's not a lot to explore, I need depth from other areas, i.e. The economic aspect.

Here's how it might look in steps

1. Guy enters scene, kills a bunch of people
2. Guy has acquired (random) body parts, body parts are priced respective of what they are, heads are the most valuable with fingers/toes being near worthless
3. Guy enters shop and sells his stuff
4. Guy now has more money and no items
END

It all seems a bit shallow and I just really want something a bit deeper to it than what it is right now. I would like players spending the majority of the time on the shop interface rather than in-game. I want them to ponder about the next best move for their wallet but my understanding of economics is pretty poor...

« Last Edit: November 10, 2013, 08:02:09 pm by professorlamp »
Logged
I write music for video games!
www.joereynoldsaudio.com

Bauglir

  • Bay Watcher
  • Let us make Good
    • View Profile
Re: how do economy in games ¯\(°_o)/¯?
« Reply #4 on: November 10, 2013, 08:48:04 pm »

Well, what I'd recommend you focus on is letting economics emerge from what you do understand. Since there's no large-scale economy, you can pare down most of what I said before. What you would want to do is figure out what kinds of goods the village is already producing and which kinds of goods it has a practical use for. Those should be fairly consistent. All the things you can pick up during adventuring should be categorized, so that you can compare them to what already exists and figure out a "fair" price. These should factor into a supply and demand curve, which your sales then modify.

With only two shops, it's absolutely mandatory that there be interplay between the two if you want the economics aspect to be a game of its own - otherwise, it's impossible to make it anything but a straightforward "Get the most valuable loot, sell, repeat", and the getting of loot will predominate since that's the only place decisionmaking comes into it. You should be able to play the shopkeepers off against each other in a way that lets you turn a profit at their expense. Partially overlapping inventories and delays between price adjustments at one or the other would go a long way.

Say you buy a truckload of bones from the witch doctor. The price of bones rises as a result, first at the witch doctor (who has a lower supply now) and later at the weapons guy (who understands there is a greater demand, and maybe uses them for weapon handles or something). You sell your bones to the weapons guy, and prices fall. You likely take a small loss in the process. However, you have a big supply of bones just outside of town! Before the witch doctor hears about your sale to the weapons guy and lowers prices accordingly, you pick up your own stash and sell it to the witch doctor, who still believes bones to be valuable commodities. You, the clever swindler, make a tidy profit, leaving the witch doctor impoverished and likely to curse you. Perhaps this was not the wisest choice, but you are now filthy rich.

EDIT: Although you might want to work on the setting a bit. Comes off a bit... terribly stereotypical. If nothing else, you'd want a good reason for the boy to want to leave the culture.
« Last Edit: November 10, 2013, 08:52:12 pm by Bauglir »
Logged
In the days when Sussman was a novice, Minsky once came to him as he sat hacking at the PDP-6.
“What are you doing?”, asked Minsky. “I am training a randomly wired neural net to play Tic-Tac-Toe” Sussman replied. “Why is the net wired randomly?”, asked Minsky. “I do not want it to have any preconceptions of how to play”, Sussman said.
Minsky then shut his eyes. “Why do you close your eyes?”, Sussman asked his teacher.
“So that the room will be empty.”
At that moment, Sussman was enlightened.

Knight of Fools

  • Bay Watcher
  • From Start to Beginning
    • View Profile
    • Knight of Fools
Re: how do economy in games ¯\(°_o)/¯?
« Reply #5 on: November 10, 2013, 11:15:58 pm »

You can't have a deep economic model with just two stores, with each of them handling completely different goods. I'd even argue having any price appreciation or depression would be bad, unless you want to encourage the player to move onto stronger enemies that have different items.

Maybe you could have certain items or cures that are in demand, caused by certain events. Disease A begins to rise, so demand for Cure A rises, which requires ingredient A. Stocks decrease, prices increase. Players could plan for, or even cause, certain things to happen in order to take advantage of this system.

It doesn't have to be limited to diseases. Celebrations, spiritual cures, war, etc. Some things, like famine, could change multiple items - Folks would pay more for food, but they'd also want oral contraceptives (Provided by the witch doctor, made from ingredients you supply) to avoid having children during a time of scarcity. Times of plenty would have the opposite effect, with a higher demand for aphrodisiacs and lower prices for food.

Beyond that, though...  There's only so much you can do with an economy in a game of such limited scope. And I have to agree, the setting seems rather silly.
Logged
Proud Member of the Zombie Horse Executioner Squad. "This Horse ain't quite dead yet."

I don't have a British accent, but I still did a YouTube.

professorlamp

  • Bay Watcher
    • View Profile
    • joereynoldsaudio
Re: how do economy in games ¯\(°_o)/¯?
« Reply #6 on: November 11, 2013, 02:17:24 am »

Bauglir:  I like the idea of interplay between the two stores so that's something I'll have to look into.

As for the setting, that can easily be changed, although I'm probably going to stick to the whole cannibal thing.  :P

Still, thanks for the food for thought guys :D
Logged
I write music for video games!
www.joereynoldsaudio.com

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: how do economy in games ¯\(°_o)/¯?
« Reply #7 on: November 11, 2013, 04:10:55 am »

I just read a really good thing about this.... wait...

http://forums.tigsource.com/index.php?topic=29750.msg964745#msg964745

There it is. It's a post-mortem of the game Papers, Please (which is cool) and how he balanced the economy-part.
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Clownmite

  • Bay Watcher
    • View Profile
Re: how do economy in games ¯\(°_o)/¯?
« Reply #8 on: November 11, 2013, 05:16:18 am »

Hey professor, I know you've looked at my project before (my economy implementation is based off of this paper) so maybe this is old news, but I'd highly recommend checking this out (direct link to pdf) http://larc.unt.edu/techreports/LARC-2010-03.pdf
Logged

professorlamp

  • Bay Watcher
    • View Profile
    • joereynoldsaudio
Re: how do economy in games ¯\(°_o)/¯?
« Reply #9 on: November 11, 2013, 08:47:17 am »

Excellent :D

I'll go over these links. I may have to re-design the mechanics by the look of things, to a slightly larger scale at least.

« Last Edit: November 11, 2013, 08:54:20 am by professorlamp »
Logged
I write music for video games!
www.joereynoldsaudio.com

LeoLeonardoIII

  • Bay Watcher
  • Plump Helmet McWhiskey
    • View Profile
Re: how do economy in games ¯\(°_o)/¯?
« Reply #10 on: December 04, 2013, 04:22:42 pm »

Also, rather than just making the buyer refuse to buy if he has STOCK > 10 or whatever, how about if he remembers how much he bought and sold of each thing in the prior period? Let's say every week.

Frontier example.

A shopkeeper needs to sell pelts to a traveling trader. The shopkeeper is the middle-man. The trader is the conveyer back to the civilized country, which is outside the scope of the frontier. The player fits into the position of trapper.

So it looks like this: Trapper -> Shop -> Trader -> Homeland.

The homeland has a demand, let's say for 1000 pelts per week. It resets every week, so if you send nothing this week then the homeland won't want 2000 next week ... still just 1000 in any week. That means the trader knows he will be able to sell as many as he can get, up to 1000. He will have no reason not to communicate that to the shopkeeper. The shopkeeper knows he will be able to sell up to 1000 pelts per week to the trader.

Let's say the shop sold 500 pelts last week. The shopkeeper will think, "1000 is the limit to my inventory, otherwise pelts are sitting around in my shop unsold until the next week - and what if I don't sell all of those either? Best to stick with a max of 1000 pelts at any time". But he also thinks, "I successfully sold 500 pelts last week, so I can have at least 500 in my inventory." He will want to buy between 500 and 1000, because he wants to maximize profit, so he wants to sell as much as he can manage.

If next week he sells 600 pelts but retains 100 in inventory (because the trader bought only the 600), that's inactive capital. Now next week he's concerned - will he only sell 600 pelts again? If so, he wants to get 600 to sell, but any excess are a risk to him, so he should pay less. 600 is now his "soft cap" because he retained unsold pelts, and 1000 is his "hard cap" because he knows he can never sell more than that to the trader.

But of course if you offer him pelts at $1 each instead of $10 each, he will probably buy all the pelts you can sell him because he will eventually get to sell them onward. At what point will he be unwilling to continue buying extremely cheap pelts? Probably when he runs out of funds to buy pelts and must wait for the trader to buy some.

///

So each week your player, the trapper, comes to the shop to sell pelts. The shop will have a current inventory, let us say 100 pelts. It has a "soft cap" of 600 pelts, which means you can sell him enough to raise his inventory to 600 at the full $10 price. After that he expects a discount, perhaps down to $4, up to his "hard cap" of 1000 pelts. After that he expects a harsh discount, only $1 per pelt.

At some point the trapper will be unable to sell all his pelts. He will probably turn his attention to other pursuits - perhaps charcoal-burning, or smoking meat - because he knows producing pelts in excess of the shop's "soft cap" is a less valuable use of his time.

The trader who buys from the shop, of course, will buy as much as he can carry - he wants to maximize profit by carrying as much as possible - and travel to the homeland to sell. He will use capital to do this, in the form of donkeys, a cart, a rifle to protect himself, perhaps guards, and the food etc. needed to support himself while traveling. He arrives and gets his profit from the sale, and returns through the wilderness to the frontier to purchase more pelts. As he becomes more prosperous, he is able to buy and sell more pelts at once, making the shop's "soft cap" increase, to as much as 1000/wk.

///

The trader may lose his shipment. This puts the trader at a point where he may be unable to purchase another shipment of pelts from the shop. He may go to the shop and ask for pelts at a lower price, because he can't afford to buy enough. The shop might agree, or might offer to lend to the trader, which is a separate issue. Or the homeland may offer the trader less per pelt, which means the trader will want to pay less per pelt. Either way, if the shop receives less per pelt, it must offer less per pelt to the trapper. This probably affects the base price of $10, which in turn reduces the "soft cap" price from $4 and the "hard cap" price from $1.

///

Now what if we have multiple people in each category? All the traders are vying to fulfill the homeland's 1000/wk demand. All the shops are trying to sell pelts to these traders. All the trappers are trying to fulfill the shops' demands up to their "soft caps". And everyone needs to do it just before the other guy gets there.

That means trappers are in competition with each other, just as shopkeepers are, and traders are. Although, instinctively it feels like shopkeepers probably have less pressure to buy from trappers, and more pressure to sell to traders. That means the traders have relatively more power in this scenario and trappers far less power; also traders have the most to lose (their entire livelihood - their method of making money by using money) while the shops regulate their own risk by restricting pelt-buying, and trappers who cannot sell lose only their time spent gathering pelts. Besides that, of course, if everything doesn't work out perfectly and trade cannot continue, everyone will starve to death.

Because traders tend to boom and bust, and only traders and shopkeepers make significant money in this enterprise - and especially shops because they can perform work far in excess of time constraints, only restricted by money restraints - shops should gather the most money under them as a class. This means if a trapper or trader needs financial help, a shop can lend to him to continue the economy. This continuation benefits everyone, but the loan also nets the shop interest, propelling shops as a class farther ahead of the others economically.

///

This is all coming out of my butt here, so if anyone wants to chime in on how I'm clueless, please do!
Logged
The Expedition Map
Basement Stuck
Treebanned
Haunter of Birthday Cakes, Bearded Hamburger, Intensely Off-Topic