Lesson Notes — Playtest and Rebalance: Did Your Mod Work?
Course 2: Game Design & Development Principles / Unit 6: Game Design Mechanics, Rules & Documentation / Lesson 12: Playtest and Rebalance: Did Your Mod Work?
The golden rule: Keep working inside your own expansion folder in the expansions folder, in your expansion.js file. Do not edit index.html.
Lesson overview
Making a change is easy. Knowing whether the change worked is the hard part. Today you turn on the event logger in your template so the game tells you exactly what each interaction is worth, then you run a fair test, compare your expansion to the original values, and rebalance. This is the same loop designers use after every patch. See also Unit 4, Lesson 10: Balance and Dominant Strategies (opens in a new tab).
Step 1: Turn on the event logger
In Part 3 of your expansion file, remove the // from each line so it looks like this:
const originalRecord = recordContactEvent;
recordContactEvent = function (id, kind, key) {
const before = popularityScore();
const result = originalRecord(id, kind, key);
console.log(kind + ' with ' + id + ': popularity ' + before + ' -> ' + popularityScore());
return result;
};
Reload, start a new game, open the Console with F12, and play. Each time something happens you will see a line like kept with aaliyah: popularity 40 -> 46. The logger calls the original function, so the game still works exactly as before. It only watches.
If you see the same event twice and the number does not change the second time, that is the rule from Lesson 8: the same moment with the same person only counts once.
Step 2: Write a hypothesis
A hypothesis is a prediction you can test. Write it before you play, in this form: I think that changing X from A to B will make the game Y because Z. For example: I think that raising kept from 4 to 6 will make players choose hangout plans more often because they pay off faster.
Step 3: Run a fair test
- Write a short test script: the exact actions you will do, such as talk to three classmates, accept one invitation, and miss one plan.
- First play the script with your knobs set back to the original values (for example
kept: 4andnoShow: -5). Keep the logger on and write down its numbers. This is your baseline: the thing you compare against. - Change the knobs to your new values, reload, start a new game, and play the same script. Write down the logger’s numbers again.
- Compare the two sets of numbers, event by event.
The classmates in each game are random, so compare points per event, not your final totals.
Step 4: Look for a dominant strategy
A dominant strategy is one choice that is always better than the others, so a smart player never has a reason to pick anything else. Look at your logger numbers. Which action earns the most popularity for the least effort? If your expansion made one action much stronger than the rest, you may have created a dominant strategy. Write down what a player would do if they only did that, and whether that would be fun.
Step 5: Rebalance
Change one knob, test again with the same script, and record the result. Repeat until you are happy, or until you can explain why you are not. Always change one thing at a time. If you change three, you will not know which one did the work.
Side effects
Changing one number can change other things. If you raise what a conversation is worth, friend slots open sooner. If friend slots open sooner, the game gets easier everywhere. Write down any side effect you noticed, even a small one.
Your turn
- Turn on the logger and confirm you see output in the Console.
- Write a hypothesis and a test script on your Playtest Report.
- Test with the original values and then with your values, and fill in the results table.
- Name the strongest action and decide whether it is a dominant strategy.
- Make one rebalance change, test again, and record what happened.
Check your understanding
- Why compare your expansion against a baseline?
- Why change only one knob at a time?
- What is a dominant strategy, and why is it a problem for game design?
Use this lesson’s Key Terms page to build your glossary.