Sub topic 8
Modeling an economy: sources, sinks and pacing
This chapter builds a small economy model in a spreadsheet. It checks whether players earn currency at a pace that matches what you charge them. It assumes you have read the earlier chapters on workbook structure (Params, calculation and output sheets), exponential progression curves, and probability and expected value. You should be comfortable with ^, ROUND, ROUNDUP, LN and absolute references such as Params!$B$4.
What an economy model answers
A game economy is a set of currencies (gold, gems, materials) that flow in and out of the player's wallet. A model lets you ask three questions before any playtest:
- Pacing: how long does a player wait between purchases?
- Balance of flow: does currency pile up unspent, or does the player run dry?
- Variance: how unlucky can a player get with random rewards before the pacing breaks?
Each question needs a target. Pacing targets look like "an upgrade takes 10 to 60 minutes of play." Write them in the Params sheet so formulas can check against them, as described in the chapter on balance goals.
Sources, sinks and the wallet
A source (also called a faucet) adds currency to the wallet. A sink removes it. The stock is the amount currently in the wallet. A flow is an amount added or removed per unit of time.
| Kind | Examples | Usually modeled as |
|---|---|---|
| Source | Quest rewards, enemy gold, item sales, daily login | Amount per action × actions per hour |
| Source (random) | Rare drops with a vendor value | Drop chance × value |
| Sink | Upgrades, repairs, consumables, fees | Cost per purchase × purchases per hour |
| Sink (forced) | Repair after each fight, death penalty | Fraction of income or fixed cost per action |
The wallet's change per period is sources minus sinks. If that difference stays positive, currency accumulates and prices feel cheap. If it stays negative, players cannot afford what the game expects them to buy.
Setting up the parameters
Add these cells to the Params sheet. Column A holds the label and column B the value.
| Cell | Meaning | Value |
|---|---|---|
| B4 | Level-1 upgrade cost | 100 |
| B5 | Upgrade cost growth per level | 1.15 |
| B6 | Gross gold per fight at level 1 | 12 |
| B7 | Gold per fight growth per level | 1.08 |
| B8 | Repair sink as a fraction of income | 0.15 |
| B9 | Fights per hour | 40 |
| B10 | Minimum acceptable minutes per upgrade | 10 |
| B11 | Maximum acceptable minutes per upgrade | 60 |
The cost and income curves use the same exponential form from the progression chapter. Keeping them as two separate parameters is the point: the gap between 1.15 and 1.08 decides how pacing drifts as the player levels.
Building the pacing table
On an Economy sheet, put headers in row 4 and the levels 1 to 30 in A5:A34. Then fill these formulas down.
Upgrade cost for the level in A5:
=ROUND(Params!$B$4 * Params!$B$5 ^ (A5 - 1), 0)Place that in B5. Gross gold per fight goes in C5. It has no rounding, because you want exact values until the final output:
=Params!$B$6 * Params!$B$7 ^ (A5 - 1)Net gold per fight, after the repair sink, goes in D5:
=C5 * (1 - Params!$B$8)Fights needed to afford the upgrade go in E5. ROUNDUP is correct here because a player cannot win 9.8 fights:
=ROUNDUP(B5 / D5, 0)Minutes to afford go in F5:
=E5 / Params!$B$9 * 60Finally, a pass/fail flag in G5 compares F5 with the pacing targets:
=AND(F5 >= Params!$B$10, F5 <= Params!$B$11)With the values above, you should see these rows:
| Level | Upgrade cost | Net gold per fight | Fights | Minutes | In target |
|---|---|---|---|---|---|
| 1 | 100 | 10.2 | 10 | 15.0 | TRUE |
| 10 | 352 | 20.4 | 18 | 27.0 | TRUE |
| 20 | 1423 | 44.0 | 33 | 49.5 | TRUE |
| 30 | 5758 | 95.0 | 61 | 91.5 | FALSE |
The table shows the useful behavior of this model. Pacing is fine through level 20 and then slides out of range, because cost grows at 15% per level and income at only 8%. The wait per upgrade grows by roughly 7% per level, since 1.15 / 1.08 ≈ 1.065. You can find the first failing level with a single cell:
=INDEX(A5:A34, MATCH(FALSE, G5:G34, 0))If every level passes, MATCH returns #N/A. Wrap the formula in IFERROR(..., "none") if you want a readable result.
Random income: drops as expected value
Many sources are random. A rare item that sells to a vendor adds to income, and you can fold it into the model with expected value. Suppose Params!B12 is the drop chance per fight (0.02) and Params!B13 is the vendor value (150 gold).
=Params!$B$12 * Params!$B$13That yields 3 gold per fight on average, which is a 25% boost over the 12 gold base at level 1. If you leave drops out of the model, you underestimate income by that amount. If you include them, remember that this income arrives in lumps.
Averages hide the lumps, so check two more numbers. The probability of at least one drop in a window of fights (here 40, one hour of play) is:
=1 - (1 - Params!$B$12) ^ 40The result is about 0.554. A player has only a 55% chance of seeing a 2% drop in an hour, even though the expected wait is 1 / 0.02 = 50 fights. To find how many fights cover an unlucky player, solve for a target confidence. For 90% confidence, with the target in B14:
=ROUNDUP(LN(1 - Params!$B$14) / LN(1 - Params!$B$12), 0)With B14 = 0.9, the answer is 114 fights, more than twice the average. If your pacing target must hold for unlucky players, plan around the 114, not the 50.
Tracking the wallet over time
The pacing table treats each upgrade in isolation. To see the stock, add a timeline with one row per hour. Put the hour in A5, income in B5, sinks in C5 and the wallet in D5. For the first hour, with income from fights and spending on a planned purchase:
=Params!$B$9 * Params!$B$6 * Params!$B$7 ^ (Params!$B$15 - 1)Here Params!B15 is the player's level during the simulation, which you hold fixed to keep the example simple. Then the wallet in row 6 and below uses the stock-and-flow identity:
=MAX(0, D5 + B6 - C6)The MAX(0, ...) stops the wallet going negative, which a real player cannot do. It also hides a problem: a spend you cannot afford disappears from the model. Add a separate column showing =MAX(0, C6 - D5 - B6) as unmet demand, so shortfalls stay visible.
The faucet-to-sink ratio
A fast health check on any period or level band is the ratio of total sources to total sinks:
=SUM(B5:B28) / SUM(C5:C28)Read it as follows:
- A ratio near 1 means income and spending roughly match.
- A ratio well above 1 means currency accumulates. This is inflation: prices feel trivial and players stop caring about earning.
- A ratio below 1 means players cannot keep up with the intended spending, and they will feel stuck or turn to purchases outside the game.
A ratio slightly above 1 is usually healthy, since players should end sessions with some choice. Pick a target band in Params, such as 1.05 to 1.20, and flag it the same way as the pacing check.
Edge cases and common errors
- Rounding too early. Round income only in the final output. If you round gross gold per fight at each level, small errors compound over 30 levels and shift the "first failing level."
- Constant fights per hour. Real players do not fight at a fixed rate. Higher levels often have longer fights or travel time, so make fights per hour a column that can vary by level.
- Ignoring item sell-back. If players can sell upgrades or drops, that is a source. Leaving it out hides inflation.
- One-time versus repeating costs. An upgrade is paid once, while repairs recur. Do not put them in the same unit without converting both to cost per hour or cost per fight.
- Averages as promises. A mean income says nothing about the unlucky player. Use the percentile formula above, or the Monte Carlo approach in a later chapter, for anything with randomness.
- Hardcoded numbers. If
1.15appears inside a formula instead of Params!B5, you cannot tune it later and cannot see where it came from.
Exercises
Exercise
In the pacing table, change the gold growth (Params!B7) from 1.08 to 1.10 and keep everything else the same. How many fights and how many minutes does the level-20 upgrade now take, and does it stay inside the 10 to 60 minute target?
Show answer
Upgrade cost at level 20 is still 1423. Gross gold per fight is 12 × 1.10^19 ≈ 73.39, and net after the 15% repair sink is about 62.38. Fights needed are 1423 / 62.38 ≈ 22.8, rounded up to 23. Minutes are 23 / 40 × 60 = 34.5, which is inside the target.
Exercise
A rare drop has a 3% chance per fight. Write the formula for the probability of at least one drop in 30 fights, and say what the result means for a player who does 30 fights in a session.
Show answer
=1 - (1 - 0.03) ^ 30, which is about 0.60. A player has roughly a 60% chance of seeing the drop in 30 fights, so about 4 in 10 sessions of that length end without it, even though the average wait is 1 / 0.03 ≈ 33 fights.
Exercise
Your model shows sources of 5000 gold per hour and sinks of 4000 gold per hour. What is the faucet-to-sink ratio, and how much currency is left unspent after 5 hours of play?
Show answer
The ratio is 5000 / 4000 = 1.25. The surplus is 1000 gold per hour, so about 5000 gold is unspent after 5 hours. With a target band of 1.05 to 1.20, this economy is inflating and needs either more sinks or less income.