Game Design Deep Dive: The weapon-crafting system of Mercenary Kings
I'm going to explain a challenge we had when developing the weapon customization system, and how we solved it. This question was this: "How do we define and balance all stats for 300 gun parts?"
Game Design Deep Dive is a new series from Gamasutra, with the goal of shedding light on specific design features or mechanics within a video game, in order to show how seemingly simple, fundamental design decisions aren't really that simple at all. Our most recent installment came from Shovel Knight developer David D'Angelo. We've also looked at the digging mechanic in SteamWorld Dig. Also, don't miss these developer-minded looks at the movement system in Road Not Taken and Crypt of the NecroDancer's rhythm roguelike mechanics.
The weapon balancing spreadsheet for Mercenary Kings. (Click for larger view.)
Use a "damage-per-second" calculator. Based on the properties of a weapon (raw/elemental power, speed, accuracy, etc.), I created a formula that allowed me to output an approximate DPS value. With this formula, I created a calculator using an Excel sheet (see below). I could then input each value into the calculator to get the approximate DPS value of a specific weapon. This is an extremely useful tool to help make sure that weapons are well balanced with one another.
Use the power of math! Many properties are related, so you can create formulas to find the values of many of them instead of inputting them one-by-one. A common example is what you see when you go to a shop in a RPG: Items have a "buy" price and a "sell" price. Most of the time you notice this: Sell Price = Buy Price * 0.5. We applied this principle on gun parts to find their DPS, rank, price and sell price.
Group parts into gun sets. Even though we have over 300 gun parts, when they're assembled, we really have about 130 guns in the game. So, instead of setting all values of each gun part individually, we created a system that allowed us to automatically generate the values of all properties of a gun part by only defining the values of the assembled gun. Not only this is more intuitive, but this system alone cut the amount of stats I needed to set manually by more than half.
For example, the Recon Rifle, as an assembled gun, is built from five parts that the player can craft:
1. Recon Rifle Receiver
2. Recon Rifle Barrel
3. Recon Rifle Magazine
4. Recon Rifle Sight
5. Recon Rifle Stock
Each one of these five parts has its own properties (some or all of these: Power, Elemental, Range, Speed, Reload, Capacity, Accuracy, Weight).
So, when we designed this gun and we set the values of its five parts, instead of setting values for each property of each part individually, we created a system that allowed us to only set values to the Recon Rifle as a whole, and it would automatically generate values for all properties of each of its five parts. This saved a lot of the grunt work of entering hundreds of stats manually.
Use your guts. Having everything balanced evenly is okay -- it works! But the result can be pretty boring. Sometimes, you want to have a weapon that is a bit overpowered or underpowered for other reasons than sheer logic.
For example, you might want to have something overpriced, because the visual shows that it's made of gold. This is the kind of thing that formulas can't detect. To solve this problem, we made sure that each value could be overwritten manually. This allowed me to add some color, and make the values of the weapons more interesting.
We didn't have the luxury to hire designers for the sole purpose of inputting and balancing stats, so these methods allowed us to create a complex customization system with very few resources.