Sub topic 4
Building level-based stat tables
This chapter assumes you can write formulas that reference other sheets and can fill them down. It also assumes you know the curve shapes from the previous chapter (linear, polynomial, exponential). Here you turn those curves into a table that lists every stat for every level. The table feeds the damage and time-to-kill work in later chapters.
What a stat table is for
A level-based stat table has one row per level and one column per stat. Designers use it for three jobs:
- Lookup. Any system can ask "what is the player's damage at level 12?" and get one answer.
- Review. You can scan a column and see where a stat jumps, stalls, or outruns another stat.
- Export. When the numbers are final, the table can be saved as CSV or pasted into the game's data files.
The table holds no hand-typed numbers. Every cell is a formula that reads from the Params sheet, so changing one parameter rebuilds the whole table.
Layout
Use a sheet named Stats. Put a header in row 4 and start the data in row 5, with the level in column A. Keeping this layout fixed means formulas like A5 read the same way on every row.
The parameters live on Params. The XP and price curves from the previous chapter already use cells B2 to B5. This chapter adds the rest:
| Cell | Meaning | Example value |
|---|---|---|
| Params!B2 | Base XP | 100 |
| Params!B3 | XP exponent | 1.5 |
| Params!B7 | Base health at level 1 | 100 |
| Params!B8 | Health added per level | 20 |
| Params!B9 | Base damage at level 1 | 10 |
| Params!B10 | Damage exponent | 1.2 |
| Params!B11 | Armor per level | 4 |
Label every parameter in column A of Params and write its unit in column C. A value like 1.2 means nothing six weeks later unless the sheet says what it is.
Writing the column formulas
Put the level numbers in A5 down to A24 for a 20-level game. Type 1 in A5 and =A5+1 in A6, then fill down. If you type each level by hand, one typo shifts every row after it.
Each stat column applies one curve type:
=ROUND(Params!$B$7 + Params!$B$8 * (A5 - 1), 0)This is the health column (B). It is linear. The (A5 - 1) term makes level 1 equal the base value, so Params!B7 is exactly the level-1 health.
=ROUND(Params!$B$9 * A5 ^ Params!$B$10, 0)This is the damage column (C). It is polynomial, with the exponent in a parameter cell.
=ROUND(Params!$B$11 * A5, 0)This is the armor column (D), also linear.
=ROUND(Params!$B$2 * A5 ^ Params!$B$3, 0)This is the XP-to-reach-this-level column (E), the same formula as in the curves chapter. For the running total in column F, use:
=SUM(E$5:E5)The dollar sign on the first row only (E$5) anchors the start of the range while the end of the range moves down with each row. This is called a growing range.
Note the $ signs on every Params reference. Without them, filling down shifts Params!B7 to Params!B8 on the next row, and the table silently produces nonsense. Anchoring parameters with $ is the most common fix for a broken stat table.
What the numbers look like
With the example parameters, selected rows come out as follows:
| Level | Health | Damage | Armor | XP to reach |
|---|---|---|---|---|
| 1 | 100 | 10 | 4 | 100 |
| 2 | 120 | 23 | 8 | 283 |
| 5 | 180 | 69 | 20 | 1118 |
| 10 | 280 | 158 | 40 | 3162 |
| 20 | 480 | 364 | 80 | 8944 |
Look at the health and damage columns together. Health grows about 4.8 times between level 1 and level 20. Damage grows about 36 times. A level-1 character needs 10 hits to deal 100 damage, but a level-20 character can deal 480 damage in about 1.3 hits. The fights get far shorter as the player levels up.
The table makes this visible, but it does not decide whether it is a problem. Perhaps you want fights to get faster as a power fantasy. Perhaps you wanted them to stay near 10 seconds. That is a balance goal from chapter one, and the table lets you check the result against it.
Add check columns
A stat table is more useful with a few columns that are not stats. They exist only to catch mistakes.
Growth per level shows how fast a stat rises. Put this in column G, starting at row 6:
=C6 / C5 - 1A smooth curve shows a steadily shrinking percentage for polynomial growth, and a constant percentage for exponential growth. A sudden spike or dip means a formula or parameter is wrong.
Hits to kill an equal-level target, in column H, compares offense and defense:
=B5 / C5This is crude, since it ignores armor, hit chance and crits, which the damage chapters add. It is still a fast way to spot a mismatch between two curves. Plot column H as a line chart. A flat line means health and damage keep pace. A steep fall, as in the example, means damage is outgrowing health.
A third check compares XP cost to the time a player spends at each level. Do not add it until you have an economy or pacing model, because XP alone says nothing about time.
Fixing the mismatch
To make the example's hits-to-kill line flatter, give health a power curve too. Replace the health formula with:
=ROUND(Params!$B$7 * A5 ^ Params!$B$8, 0)Here Params!B8 becomes a health exponent instead of a per-level increment. Setting it close to the damage exponent, for example 1.1 against 1.2, keeps hits to kill from collapsing. Change one parameter, watch column H, and stop when the line matches your target. This is the tuning loop the whole workbook is built for.
Per-class and per-enemy variants
Most games have more than one character type. Do not copy the table once per class. Keep one base table and apply a multiplier for each class from a small lookup table. Create a sheet Classes with class names in column A and a health multiplier in column B:
| Class | Health multiplier | Damage multiplier |
|---|---|---|
| Warrior | 1.25 | 0.90 |
| Mage | 0.80 | 1.30 |
| Rogue | 0.95 | 1.10 |
Then put the chosen class in a cell, such as Stats!B1, and apply the multiplier to the base health column:
=ROUND(B5 * INDEX(Classes!$B$2:$B$4, MATCH($B$1, Classes!$A$2:$A$4, 0)), 0)MATCH finds the row of the class name, and INDEX returns the multiplier from that row. The last argument 0 in MATCH forces an exact match. Leave it out and the lookup can return the wrong class without any error.
For enemies, the same idea works with a Targets sheet. Each enemy gets a level offset or a multiplier, and the table values are read by level, not copied.
Rounding and off-by-one traps
Several errors recur in stat tables:
- Rounding too early.
ROUNDis for the displayed stat. If a later column builds on a rounded value, the rounding error compounds. For chained calculations, keep an unrounded helper column and round only in the column that the game reads. - Rounding the total versus summing rounded values.
=SUM(E$5:E5)adds rounded XP values, so it can differ by a few points from rounding the exact cumulative sum. Decide which one the game uses, then keep it consistent. - Off-by-one levels. "XP to reach level 5" and "XP to leave level 5" are different numbers. Name the column clearly, and check which one the game's code expects.
- Level 1 not equal to the base. If level 1 does not return the parameter value, you probably forgot
(A5 - 1)in a growth formula or usedA5 - 1in a power formula. In a power formula,A5 ^ exponentalready gives 1 at level 1, so no subtraction is needed. - Text numbers. A value that was pasted in as text will not compute. Use
ISNUMBERin a check cell to confirm that a column is all numbers. - Level cap. Decide how far the table goes. Extending the table by filling down is easy, but a curve that works to level 20 may produce absurd values at level 100, especially an exponential one.
Reading a stat from another sheet
Other sheets should read from the table with a lookup and never recompute stats. To get damage at the level typed in Targets!B1:
=INDEX(Stats!$C$5:$C$24, MATCH(Targets!$B$1, Stats!$A$5:$A$24, 0))This keeps one source of truth. When you retune the curve, every sheet that uses it updates.
Exercise
Your health column is =ROUND(Params!B7 + Params!B8 * (A5 - 1), 0). After you fill it down, level 2 looks right but level 3 shows a much smaller health value than level 2. What is the likely cause, and how do you fix it?
Show answer
The parameter references are relative, so on row 6 the formula reads Params!B8 and Params!B9 instead of B7 and B8, and the values drift down the column. Anchor them with dollar signs, Params!$B$7 and Params!$B$8, and fill down again.
Exercise
With the example parameters, level 20 damage is 364 and level 20 health is 480. You want a level-20 character to need about 5 hits to kill an equal-level target. Which column would you check, and what would you change?
Show answer
Check the hits-to-kill column (health divided by damage), which currently gives about 1.3. Raise the health growth (for example by using a health exponent close to the damage exponent) or lower the damage exponent in Params, then recheck the column until level 20 is near 5 and the line across levels is flat or changes the way you intended.