Wednesday, September 5, 2012

Game Design: Basic combat math (I)

Having stated my high level goals for the new game, it’s time to get my hands dirty and do some actual design work. The first point in the agenda, then, is the mathematical framework of the combat system. Easy enough.

I believe that game combat should, by default, favor the player characters while still providing a credible challenge, last long enough for heroes to use most of their toys, and minimize dead turns or turns where a player is left without interesting choices to make. To address these points, we need to pay special attention any factors that affect encounter duration, power usage, and the balance of power between player characters and monsters. Overall, the work process will have the following steps:

  1. Set general goals for the combat system

  2. Define game stats for a fixed-level scenario

  3. Define stats for scenarios with characters of arbitrary levels

  4. Test a lot

  5. Iterate previous steps until satisfied.

Today’s article will focus on the first step, meaning that we won’t be assigning any concrete values to character stats. Instead, we will talk in terms of combat length, number of participating characters, and number of turns it takes to kill a character. We will start by assuming generic stat lines for characters and monsters, leaving the effect of roles and customization for later.

Introduction: Encounter duration and focus fire

With this in mind, let us define the main concepts used in this approach:

  • K (Turns to kill) - The number of game turns that a character A takes, on average, to kill a character B. It depends on A’s accuracy and damage, and on B’s defenses and hit points, among other factors. To calculate it, divide a defender’s HP by the attacker’s average damage.

  • T (Encounter turns) - The number of game turns required to end a combat encounter, on average. It depends on the number of characters on each side, and their K value (i.e. the turns they take to kill each other). Our initial analysis will focus on pure damage only, and more complex effects like negative conditions will be considered later.

A major point that needs to be taken into account is that, except for some specific scenarios, K is not equal to T. That is, the actual encounter duration is different (more specifically, longer) than what one would expect, based on analysis of isolated characters. To understand this, let us first take a look at those scenarios where K is, in fact equal to T.

Consider a combat encounter where Joe the Hero (character H1) faces Gork the Orc (monster M1). For simplicity, let’s assume that both character and monster have 3 hit points, and their attacks occur simultaneously, always hitting for 1 damage. Clearly, in this scenario both combatants would always achieve mutual annihilation by turn 3. The K value of our characters, 3, is equal to the encounter duration. If we extended this basic scenario to have three heroes (H1, H2, H3) facing three monsters (M1, M2, M3), all with the same stats and using the same rules as before, and assuming all combatants have some strange code of honor forcing them to fight one on one, we end up with three pairs of duelists that self-destruct on the third turn of combat.

However, this weird duel behavior is not how combats usually go. The most effective tactic, and thus the one that most parties resort to, is to focus fire, i.e., to have all characters in a team pile on a single unfortunate opponent until he drops, and repeat the process until the combat is over. The tactic advantage of focus fire is that, once an enemy drops, the damage output of the enemy team decreases. If we go back to the example scenario, and have both teams use focus fire, we will have a fight where each side gradually loses combatants, as shown in the following figure.

Two things of note here:

  • As the combat progresses, it takes longer to kill an enemy

  • The combat ends in 5 turns, even though all characters have a K value of 3.

As we can see, the existence of focus fire has an impact on combat duration. This effect will vary with the number of characters in an encounter, and their relative strength. Another important implication is that combat duration cannot be easily determined through simple formulas, but will require some kind of simulation - though we will try to simplify this requirement as much as possible. Finally, it must be noted that the use of focus fire is not a binary proposition: these examples show characters first spreading their damage as much as possible, and then perfectly focusing their attacks, but real combats usually fall somewhere in between. The ability to focus fire better than the opponent is, in fact, a critical factor for success in a tactical combat game like the one we are proposing.

System Requirements

The combat system will need to meet the following requirements:

  • Average combat duration of 5 turns. When both sides are of similar level, I expect the combat to be over in about 5 turns, so that players can spend most of their per-encounter resources without falling into repetitive grinding. This duration may rise to about 6 turns for greedy parties refusing to spend daily resources, or go as low as 4 turns (or slightly below that) if the heroes go all out on daily attacks and action points.

  • The players win... with some effort. Player characters are expected to win same-level encounters, but not without losing a bunch of healing surges and daily powers along the way. Ideally, it will take 20-25% of a party’s daily resources to make it through an encounter - with generous usage of daily powers saving healing surges, and vice versa. Player characters dropping unconscious during combat should be a common occurrence, with about 1-2 KO’d PCs each encounter. Death of individual characters (outside of party wipes) should be rare, but still possible when unconscious party members are left unprotected.

  • Every turn counts. It’s easy to fall into the trap of having the last couple of turns in a fight become an unexciting cleanup routine. This happens when the monster team has been reduced to one or two members, unable to pose a real danger to the heroes, but with enough hit points left to require a significant amount of time to actually finish the encounter. We need to include mechanics that make monsters both more threatening and quick to kill once they are in this situation.

In the next article, we will provide a more detailed look at the numbers and stats behind our combat system, discuss the impact of combat roles, and introduce a few rules changes that should make the last rounds of combat a bit more exciting.


  1. Ooh, intriguing. I tried to do the simulation with 5 PCs facing 5 monsters, and, provided I got the formula right, the battle was over by the start of turn 7 (counting from 1). Boosting PC health to 4 brought it down to the desired turn 5, but that's still assuming an average hit takes down 1/3 of a monster's hp, and that such a hit is scored by every PC every turn.

    Now let's take healing into account. Players get it by the bucket, monster don't (really, they shouldn't). There should always be at least 4 PCs fighting, and if three hit, a monster dies each round. 5 monsters, 5 rounds. Right on schedule.

    So, um, all this to say a "three-hit" monster is about right. I'd also be all for a "four-hit" PC, but that with standard action healing. If healing is abundant (and as a minor action), let's equalize the hp and see what happens!

  2. I hadn't though of that before, but in case any reader is interested, the spreadsheet I used for the simple simulation example is available to play with here:

    I'll look into healing in an upcoming article, and I'll actually be making a case for a limited amount of monster healing. It's counter-intuitive, and I'll explain it in detail in the article, but a bit of monster healing can actually go a long way in mitigating late-combat grinding, if simulations are to be trusted.

  3. Bigger question: how do you account for multi-target damage?

    When I was writing 5th Edition Now, I briefly considered writing it as a form of striker feature (since "multi-target damage as controller feature" struck me as a bit odd), but it didn't really turn out too well.

  4. That is, indeed, a bigger question, and one I'll try to address once I have nailed the single-target attacks. Leaving aside the all-important positioning considerations (which are virtually impossible to model), area attacks are strongly dependent on the number of combatants on each side and how this number evolves over time. They also screw with my focus fire assumptions (since an area attack, by definition, means that a party isn't perfectly focusing their fire), further complicating any calculations.

    I do have a basic framework to define a rough equivalence between multi-target attacks and single-target attacks, but it won't work until I have defined all other game variables first. So I'll leave this topic for last.

    1. I'm currently playing in a game as a wizard. There is a hybrid Warlock/Blackguard, who gets indignant that I'm annoyed that she has Echoing Dirge (a close blast 5 two target binder power), because it essentially makes her into a controller with a striker feature on top. "You deal more damage than anyone else in the party, it's hypocritical of you to complain that a striker has controller powers when you're a controller with striker damage!"

      Now, if 4E had defined multi-target damage as a striker element from the start, that would certainly make sense. But they didn't. But even if they had, the question is, how would that even work?

      To be honest, I'm not sure I even like the "roles" framework, especially when it's enforced by powers-which aren't mutually exclusive.

  5. I look forward to some sort of playtest material when you are done with this. Seems very interesting indeed.