Contents show]

Development Diary: Balancing Path of Exile

Monday, January 24, 2011

Path of Exile contains a lot of numbers. A relatively complex item or skill probably has twenty or more specific values behind the scenes representing damage values, ranges, durations and other properties. Balancing these numbers is an extremely difficult challenge but is necessary for the game to feel fair and rewarding for all players. We’ve spent a lot of time developing a system that allows us to easily balance these gameplay values. Manual Balance

Back in 2007, we had enough of Path of Exile’s core gameplay working that initial balance started to become necessary. At this stage, we had to decide how much life monsters and players had, and how much damage weapons and monsters inflicted in combat. We were dealing with relatively few balance values for only a handful of monsters and items, so we picked arbitrary numbers that sounded about right. If a short sword does 5-10 damage, then it’s reasonable for a two-handed sword to do 9-18 damage. A skeleton might have 30 life – implying an average of 4 hits of the short sword, or 2.2 hits of the two-handed sword. By hand-picking values, we created a relatively balanced combat experience.

As more advanced combat calculations were added, the balance requirements became complicated. By mid 2008 we had various types of elemental damages, accuracy calculations, damage mitigation and critical hits. Items had mods that added specific ranges of these values. Because we were still picking these values by hand, substantial time was spent changing existing numbers to be fair as calculations changed. When we added a chilling effect due to cold damage, we had to manually go through every instance of cold damage on a mod, weapon or monster and reduce the values so that it was now fair.

Spreadsheets

The burden of changing numbers in dozens of files became too high. We switched to generating the numbers in large Excel files. We set up a system of ratios that helped us show the relative worth of various game mechanics. For example, a monster might be set to deal 50% fire damage. The spreadsheet knew that each point of fire damage was worth 0.8 points of physical damage, so it was able to pick the correct numbers. If we wanted a level 10 monster to have an 80% chance of hitting an opponent with an average amount of evasion, then we were able to calculate the correct amount of accuracy to grant that monster.

Over time, we began to outgrow Excel spreadsheets also. Maintaining the ratios that were checked when calculating various values started to become a nightmare and the built-in scripting in Excel was not making it much easier. We also wanted to solve the issue of exporting this data in an efficient manner so that the game could load it very quickly.

Our Custom Balance Tool

In early 2009, we decided to build a dedicated tool for game metadata editing. On the surface it looks similar to a spreadsheet, but has substantial scripting capabilities and can export directly to the binary format that our game loads. In addition to handling the balance data, it also lets us edit and localise all of the text the game uses.

With this tool complete, we took a second look at what we were trying to achieve with the balance. It became apparent that the difficulty wasn’t just in picking values that were fair relative to each other, but also resolving questions like “how large should the effect of an item’s mod be relative to a passive skill?”

Effectiveness

Our eventual solution was to create a concept called effectiveness. An effectiveness cost can be calculated for each stat at a specific level. The relationships are hierarchical, so we can represent the relative cost of stats by assigning ratios between them and their parent. For example, fire damage costs 1.42 times as much as physical damage because it can set people on fire. A damage mod on a non-weapon item costs 2.08 times as much as the same mod on a weapon. If you have a certain amount of effectiveness to spend, you can use these ratios to work out how much fire damage you’d get on a non-weapon compared to physical damage on a weapon.

Once costs are measured in terms of effectiveness, overall balance gets very easy. We assign an arbitrary amount of effectiveness to the player, which grows in an exponential curve as they level up. By assigning the expected number of equipped base items, item mods, passive skills, active skills and such per level, an effectiveness allocation for each of these areas can be calculated. For example, at level three we expect that a player will have an average of 1.6 skill gems equipped, two passive skills and three item mods across six base. At level 35, they’d have 9.75 skill gems, 34 passive skills and 28 item mods across nine base items.

This lets us calculate, for example:

A skill gem balanced for player level 2 is worth 15 effectiveness. This means an early fireball inflicts 11-16 fire damage. A level 50 skill gem on the other hand is worth 106 effectiveness. A fireball appropriate for that level would do 78-113 fire damage.

A level 10 base item is worth 28 effectiveness. If all of that effectiveness is spent on damage, then it represents a median 27 physical damage per second. For a 90% strength, 10% dexterity one-hand club, that’s 18-42 damage at 0.9 attacks per second.

A level 6 passive skill is worth 10 effectiveness. An example skill balanced for this level/effectiveness is “+7% damage with swords and +4% attack speed with swords”.

A level 1 item mod is worth 15 effectiveness. A level 11 item mod is worth 18 effectiveness. For the early increased life mods, that’s 37-45 increased life at level 1, or 45-54 increased life at level 11.

Monsters are also balanced using the same system. We’ve specified that an average monster currently has 16% of the effectiveness of a player, and they scale at the same rates. Different monsters have different ratios of how much effectiveness is spent on offense or defense. Their strength/dexterity/intelligence alignment also modifies what areas effectiveness is spent on. For example, a pure-strength monster such as a zombie gets entirely life and physical damage reduction. A half-dexterity/half-intelligence monster would get its defensive effectiveness split between life, evasion and energy shield.

The great thing about this effectiveness system is that it’s so easy to tweak the balance of the game. For example:

If we feel that fire damage is overpowered, we can change how much effectiveness it costs, and all the fire damage in the game is reduced at once.

If players find a fight involving zombies difficult, we can either tweak those specific areas’ zombies, all zombies in the game, or all monsters, depending on the specific complaint.

As specific mods become popular or unpopular among alpha testers, we slightly tweak how much effectiveness they cost until the fair values are determined.

When we add a new skill or support gem, we pick what stats it affects and the system automatically spends the right amount of effectiveness on those stats. It’s rare to have to tweak this much.

We’re very pleased with the balance system that we’ve come up with for Path of Exile. There’s still manual supervision required, but it’ll be a great help going forward as we continue to add content to the game and get feedback from our expanding pool of alpha (and soon, beta) testers.