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.

Who: Jonathan Lavigne, co-founder, Tribute Games

My name is Jonathan Lavigne, and I was in charge of the game design on PlayStation 4 and Mac/PC title Mercenary Kings. I'm also co-founder of Tribute Games, which I started with Jean-Francois Major and Justin Cyr back in May 2011. Before developing Mercenary Kings, we worked at Ubisoft on several Game Boy Advance games (Star Wars Episode III, Open Season, TMNT) and on Scott Pilgrim (which I also designed). My first indie title was Ninja Senki and the first game we developed at Tribute is Wizorb.

What: Balancing loot in Mercenary Kings

I'm going to explain a challenge we had when developing the weapon customization system, and how we solved it. This challenge in question was: "How do we define and balance all stats for 300 gun parts?" In Mercenary Kings, each weapon can have up to five gun parts (receiver, barrel, magazine, stock and sight), and each part has in between six and 12 different stats. For 300 gun parts, it means that we had in-between 1,800 and 3,600 values to define and balance.


When you have only four or five weapons in a game, the solution is simple; you define all stats one-by-one, you test them, and you re-adjust if needed. In our case, this wouldn't work, because with so many stats to define, it would take several days -- even weeks -- to do only a first draft of all stats. It would also be impossible to set all stats one-by-one in a consistent manner with all of them rationally balanced with one another. Because you're human, you'll end up making different decisions depending on how you feel at the moment you're inputting this or that value. And what would happen if you set everything up, and then some gameplay change ends up affecting the balance of the whole game? You'd have to start over...


We used a combination of 5 different methods to overcome this challenge: Use a "balancing table." I put all elements of the game (enemies, bosses, weapons, items, etc) in a table, in the order the player encounters them in the game, and cross-referenced them with the damage dealt by the weapons. This is not meant to find the exact value of each property, but rather to give you a general view of how game elements should be balanced in relation to each other.
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.

Latest Jobs


Playa Vista, Los Angeles, CA, USA
Senior Level Designer (Zombies)

PlayStation Studios Creative Arts

Petaling Jaya, Selangor, Malaysia
Lead Concept Artist

High Moon Studios

Carlsbad, CA, USA
Technical Designer at High Moon Studios

High Moon Studios

Carlsbad, CA, USA
VFX Artist
More Jobs   


Explore the
Advertise with
Follow us

Game Developer Job Board

Game Developer


Explore the

Game Developer Job Board

Browse open positions across the game industry or recruit new talent for your studio

Advertise with

Game Developer

Engage game professionals and drive sales using an array of Game Developer media solutions to meet your objectives.

Learn More
Follow us


Follow us @gamedevdotcom to stay up-to-date with the latest news & insider information about events & more