If you haven’t the preceding post yet, check it out first. Part 1
Show me the money
From where we left off the next thing we need to determine is how much gold to drop. We need to write down what we want our relationships to be for dropping gold. For this example our desired interactions are:
A player needs cash to buy the remainder of the item sets at any given level from the money collected from fights as well the money created by the off-class items
Items should increase in value to keep a player needing to always earn more money and sell lots of gear to get higher level items
A merchant should sell items for more than they will purchase them
A player should feel like they are earning lots of money at high level
We need wrap our head around the idea of the system. As we talked about before money is one of the transports to turn the remainder items into gold.
Let’s take a look at the high-level concept of this with our high-level economy.
Focusing on a sub-section of the economy we listed before you can see the loop from items through the shop. On that process the economic drain that exists is from the merchant multiplier. The merchant removes worth from items by paying less for them than they are worth. With these relationships in mind let’s start to attack the actual creation of the system by figuring out the total number of desired and non-desired item drops.
We need to turn the non-desired items into gold and provide gold directly to the player by dropping it at the end of combat. To do this we need to now know the average value of a level 1 item. Once again this is a number we simply make up. We don’t want to make a value that is so low a merchant multiplier would fall apart. We’ll make it easy and be cheap to the player at the same time. We’ll pick 10 gold. Ok, great. We now have a cost of the average level 1 item.
I personally like to really rip off the player on resale. I’ve never seen or heard complaints from internal or external sources about being harsh on resale. The players somehow always blame the merchant, like he really exists, and then just accepts it almost immediately.
Let’s say that a merchant will pay 20% of the cost of an item to a player. With the stated data points we know a player will be able to buy an item for 10gp and then sell it back to the merchant for 2gp. This also means the player will be able to convert 5 items into 1 item. I am being harsh on resale but don’t miss the point I just said. Up above we see that 40 items plus extra gold needs to be converted into 10 items. This means a 25% merchant multiplier (10/40) would be a break even point without a gold drop. Anything higher or the existence of the gold drop would begin to give the player more dough than we want them to have. Our example game is rather simple. Most game economies have more exits for money out of the economy such as potions, bank deposit fees, item decay, heal costs, etc. Those extra money drains help allow the merchant multiplier to be higher.
Quickly hopping back to the cost of items in the game we stated a level 1 item should be worth 10gp but what do we want a level 2 item to be worth? Take a second and think about it. Keep reading after you’ve think you know.
The trick is to not actually pick a value. You need to determine the relationship between the two. How many level 1 items does it take to equal the value of a level 2 item? What about a level 3 item? This relationship determines how much a player can skip buying items for one level to apply it to the next.
In a sensible balanced economy, the cost of the item should be in-line with the effectiveness of the weapon and / or desirability of the weapon. However, they don’t need to be on the same curve but both curves need to mate well. The steepness of the lines or curves will determine how often players will want new items as well as how cost effective it is to trade up.
My gut feeling for this is something to the tune of items approximately doubling in value over a 2 level range. A sample data set for that would look like this:
This chart shows the cost of an item if it was 2x the previous level.
Looking over the data I’m not really excited about it. Level 19 items costing 5120 seems way to much over 20 levels with level 1 items only costing 10. Levels 1 through five look alright but I think we could scale back from doubling. As of right now, the first few levels will give the player an overt sense of being poor. I’ll reduce the strength overall and recalculate. Doing so gives us this curve which I’m fairly happy with:
Wondering how I got that curve?
A quick tangent is in order here. You may have noticed that the enemies to level and the number of sets to level as well as many other sets of data used are on curves. No surprise really. That said, all of the curves are clean and don’t have unwanted flat spots within their usable range. You’ll want to make several curves for your game. Before anyone starts trying to remember all of their math lessons you should know something. The trick is that anytime you need a line or a curve you don’t actually need to calculate it. Even if you are capable of calculating the curve doing so can be slower than cheating. How do you cheat? Simple, currently out on the internet are several curve fitting programs you can use for free. Write down the data you want and the program will return the curve for that data. You can select from many different kinds of curves to see what fits the data best. A site you can try for this purpose is:
Once you have the curve equation, you can calculate out all of the fields.
Here’s how I used the trick for the chart you just saw.
First, I laid out the basic data I was looking for:
Level 1, 10gp Level 3, 15gp Level 5, 30gp Level 7, 80gp
Next I ran that data through a least fitting squares program to get a quadratic curve. That program returned.
y = 3.4374999999998934 + 9.479166666666783x -3.4375000000000324x^2 + 0.5208333333333359x^3
Once I had the data I rounded it and got the chart you saw above. Most of the time the values you get will be slightly off from the values you asked for which happens because curve fitting is approximated not exact.
With that said, who cares if it is slightly off? We aren’t building a space shuttle we’re building a game. The fact is that if your intent was for an item to cost 60 at level 7 but instead it costs 61 is actually an improvement. You can chart out the entire economy past the number of levels you asked for and you can visually see any plateaus or anomalies you data might have.
One quick side note, when I’m building a game I usually build all of the equations to handle at least twice the number of levels, damage, experience, or whatever than I am initially planning to use. It doesn’t take anymore time and allows for extra content to be added at will.
Back to the regularly scheduled program
With all of the preceding data we can now make this next chart:
I’ll explain. We just determined the average cost of an item at a given level. Earlier we specified how many items in a given level we felt a player will want to sell. Multiplying them against the merchant multiplier gives us how much cash a player will get from selling the items. Now we take the total amount of cash the player can get from selling items and divide it by the cost of an item for a given level. This gives us the number of items a player can purchase from selling at that level.
player cash = sell items * avg cost * merchant multiplier
buyable = player cash / avg cost
Earlier we specified how many items we wanted players to buy at a given level. With that information we can now make this chart:
We take the number of items we want the player to buy and subtract it from the number of items they can buy from the cash they have. The number we end up with is the total gold they will need to buy what they are supposed to at that level. We then divide the needed gold by the number of times a monster will drop gold in a level to get how much, on average, a monster should drop gold.
Buyable items = player cash / item cost
items to buy = number of items to be bought – buyable items
needed $= items to buy * avg item cost
$ per drop = needed gold / times gold drops on level
Great, armed with that information we can now build the item and gold economy systems.
In our game we will store a base economic table that is a level and the value for that level. With our game it would look like this:
In every item we need to store the level of the item and an avg value %. Depending on the complexity of the items you are creating you could have prefixes and suffixes on the items modify the base items %. What this gets you is the ability to state an item is worth 50%, 110%, 80%, etc. of the avg value for the level. This way you have a base frame of reference what the value means. In other words, instead of saying, “I have a level 14 item that is a bit overpowered, Should I make it worth 902?” you will say, “This overpowered item should cost 120% of what other items cost at this level.” You can then easily change the percent as much as you want but you have a reference. Even better than that, with this setup you can rewrite your entire economic curve and every item will simply update to the new values. No need to revisit old items. You have access to virtual big and small adjustment dials.
By creating the economy out of how we want everything to relate to each other. We can update any relationship and easily recalculate the entire economy. This allows for the economy to be rapidly tuned in any fashion. Once your playing maybe you’ll discover you want creatures to drop more items, you don’t like how the first few and last levels has similar gold drops, or you think the player’s bank account should show less money in it but still be able to buy the same number of items. All of these tweaks and any other tweaks are easy. Change the variables you want to and new balanced data falls out.
My Economy Isn’t Like That
Very few games have identical economies. This example illustrates how to articulate the relationships you need and turn them into game systems. The process for creating an economy big or small is the same. How would you use these processes to create an economy for a FPS, RTS, Platformer or other? Think about how elements I glossed over such as hording items affects the economy. Some people may ask you to add an auction house or have player traded items. Now you know the real question there is what are you trying to accomplish with those systems? How could you make them to cause the outputs you want from the system?
Think it through, create your relationships and everything else will just fall into place.
Thx for the education.
Errata: Duplication in "Back to the regularly scheduled program".