Wednesday, January 26, 2011

Why is the softcap so important?

This is the first thing I ever did to gain a little bit of recognition within City of Heroes. I took a look at the defense mechanic from a statistical viewpoint in an attempt to better explain exactly how beneficial the defensive softcap is to a character. It was written over a year ago, and looking back on it there's a lot I could improve. An updated version that goes more into detail is on my list of things to do.

Originally posted 8/7/2009

I'm sure someone else has done something similar and maybe more thoroughly, but I couldn't find it and I had fun doing this, so here's what I got.

You may notice my registered date as 2004, but I haven't really been playing that long. I took an extended hiatus due to educational and financial reasons and have only recently started playing again. I was also much less interested in the game's mechanics back then, granted, things were simpler. Coming back to the game this time I find I have a different point of view, similar to a min/maxer. I want to get the most out of my characters with these shiny "new" IO's. I've got a background that touched on probability and statistics (mainly odds) and I tried to apply what I know to CoX game mechanics. One of the things I found out really emphasizes why hitting - not merely coming close to - the soft-cap is so important.

If you haven't already, check out ParagonWiki - Attack Mechanics where I got the game's formulas. Everything I say builds on what I found here.

A word on the math before we get too far: Probability is notorious for being foiled in the short run. Look at gambling for a great example; guy walks into casino with a dollar, hits the jackpot and leaves with ten thousand. Another guy walks in with ten dollars and loses everything in ten plays. The simple fact is that the random number generator always has that chance of throwing you a really bad set of numbers. You could have a 99% chance to dodge everything, but get hit three times in a row. This won't happen often, but it will happen.

Where probability really shines is in long term analysis. That same casino has all its machines set at 85% return, so over a year and after millions or even billions of plays, they will keep fifteen cents out of every dollar that's been brought into the casino. If you had a 99% chance to dodge everything, in the long run, you'd have one hit for every ninety nine dodges.

Part of my analysis hinges on what is "likely" to happen. Any event is likely to happen if its probability is greater than 50%. That means that the event will occur more often than it won't.

First, let's look at the worst case scenario:
No defense.

Let's say this is a low level blaster soloing. With zero defense, a minion of even level will hit him half of the time. If he runs into a +2 Boss, he has a 78% to get hit. In a succession of five attacks, that boss has a probability of 69.6% to hit him at least four times. Four shots from a boss is devastating, and without munching on some inspirations, our hero is doomed. With the lowest difficulty setting, though, the worst he should run into is a +1 LT. This LT has a chance to hit our hero of 63.25%, and in the same succession of five attacks, he is only 39.5% likely to land those four hits. This will still happen remarkably often, which is why few heroes run around without any defense.

The formula I use for the "succession of five attacks" is a little complicated. PM if you want more information.

Next scenario I'd like to look at: 25% defense.

This could be the same blaster with some nice IO sets and weave, or a low level SR scrapper. 25% is essentially halfway to the soft-cap. That sounds good, but let me illustrate how bad it actually is.

A minion of even level will still land exactly one in four swings. At this point, after only three attacks, it's more likely that you've been hit at least once than dodged everything. (The formula for that one is (0.75 * 0.75 * 0.75) or (1 - 0.25)^3 = 0.422, therefore only 42% likely that you dodged everything. More often than not, you've been hit.) In a succession of five attacks, it is 37.3% likely that you've been hit at least twice.

But let's face it, few people only fight even level minions. On a marginal difficulty of 3, the worst you run into is a +2 boss. The chance to get hit by the boss is 39% (almost 15% higher!), and it is now more likely that you've been hit by the second swing (37.2% chance to dodge two attacks in a row). Out of five attacks, it is 30% likely that you'll be hit by three or more. Without any resists, tricks or inspirations, you may want to solo carefully.

Enhance... Enhance... : 35% defense.

We've only added 10% defense, so the SR scrapper has his enhancements slotted well.

Comparing to the last scenario, now your odds of getting hit by an even level minion are 15%. Now you are only more likely to be hit after five attacks instead of three. Again, (1-.15)^5 = .444, amazingly comparable. You've just doubled the number of likely successive dodges by adding a mere 10% in defense. In a set of five attacks, you're only 16.5% likely to get hit by two or more.

Continuing the comparison to the +2 boss (23.4% chance to hit), you now have a 58.4% chance to dodge two attacks in a row, so you're only likely to get hit by the third attack (44.9% chance to dodge three in a row). In that five attack combo, you are now just 8.7% likely to get hit by three or more, as opposed to 30% in the case above. The odds of getting hit two or more of that five is 33.3%. You should be pretty survivable now.

Last scenario: 45% defense.

Here we are, the legendary soft cap. Elude defense levels, or the SR scrapper with great IO's.

Even level minions now only hit 5% of the time. Now, after thirteen attacks, it is still likely (51.3% to be exact) that you have dodged all of them. Series of five attacks: The chance of getting hit by two or more is only 2.3%, and that never happens.

Now a +2 boss shows up and you laugh. He only has a 7.8% chance to hit you, which works out so that he's only likely to have hit you by the ninth swing. This is why hitting the soft cap is important, only 10% more defense than the last case, and you're likely to dodge three times as many attacks. In a series of five attacks, it is only 5.2% likely that he has hit you two or more times.

Let's have some fun with the numbers. Imagine a +4 AV staring you down. With soft-capped defense, that AV has a surprisingly low 10.5% chance to hit you. "Wait a second," you say, "10.5% can't be right!" Believe me, it is. I'll get to why that is later, but for now, just take this in. With 45% defense, a +4 AV will only hit you one time in ten, which is less often than an even level minion will hit someone with 35% defense. Four levels and three rank increases don't compare to 10% of added defense. In-freaking-credible.

Against this AV, you are likely (51.4%) to dodge six attacks in a row. In a run of five shots, he will hit you with two or more a minuscule 8.9% of the time. You can effectively tank a +4 AV.

So how does this make sense?

This makes sense when you look at the game's formulas on Wiki. It's really all because of the accuracy multipliers. An even level minion has a multiplier of 1 (no effect), while a +2 boss has an effective multiplier of 1.3 * 1.2 = 1.56, and the +4 AV has an effective multiplier of 1.5 * 1.4 = 2.1. When your defense is 35%, the even level mob only hits you 15% of the time, but when you introduce the multipliers, that 15% grows very quickly. If, however, your defense is at the soft-cap, even though the +4 AV doubles his accuracy, he's only doubling 5%.

Thanks for reading, I hope I've explained some things.

Some further study:

A few requests have been made for me to run some other scenarios, so I will include those here. The first request regarded blasters who try to get some defense (10-15%) and how effective it is over zero defenses. The second pseudo request was for the numbers at 40% defense, which should highlight how much that last 5% does.

Some Defense: 10% & 15% defense.

The idea here is that you're a mid-high level squishy who, while not obsessed with IO's, is trying to get a little survivability out of his build. Remember the zero defense case? It was dismal, but just to re-hash it: Even level minion hits you 50% of the time, +1 LTs hit you 63% of the time, and +2 bosses hit you 78% of the time. The LT will likely land three out of five swings and the boss will likely land four out of five.

When you have 10% defense, the chances to be hit change to 40%, 50.6%, and 62.4%, respectively. We can already make a comparison here, in that the LT now looks like a minion and the boss looks like an LT. The boss and LT still hit more often than they don't, but you've effectively taken a level and a rank away from everything. (Or you've added a rank and a level to what you feel you can handle!) This translates almost directly into my succession of five, because the boss is only likely to hit you three out of five times. The LT is still likely to hit you three out of five as well, but considerably less likely. The odds dropped from 73.7% to 51.1%.

With 15% defense, the chances to be hit become 35%, 44.3%, and 54.6%. It isn't much different, although now only the boss hits more often than he misses. The LT is now only likely to land two of five and the boss just barely likely to hit you three of five.

This is something I've been afraid to do, but I'm going to inject some subjective analysis for this particular scenario to answer the question: "Does this small amount of defense really help?"

In teams, I have to say "a very resounding yes," because if you're the kind of AT that can only get 10-15% defense, you are one of the team's squishies. You're doing your team role while the real hardy AT's try to hold most of the aggro. What you worry about is the minion or LT you got the attention of, but didn't quite kill. Maybe you're a blapper or close supporter who has to worry about those AoE attacks. The point is, you only get attacked a fraction of the fight. Maybe you only get one out of ten attacks directed at you; maybe it's one out of five, but that all compounds on the little bit of defense you added. A +2 boss hits you three out of five times, but when you only see one of five of his attacks, it's kind of like you "dodge" 22 out of 25 attacks. Mix in the fact that you are avoiding mez effects and debuffs, and you considerably boost your effectiveness in a team setting.

Another thing to consider is that some of the support AT's you'll work with can buff your defense or debuff accuracy. Maybe they can only get 30% one way or the other, but the 15% in your build pushes you into the range of soft-cap near-invincibility. Just remember how I keep mentioning "that last 10% or 5%." You can become that last little push when your team is buffing you.

That last five percent: 40% defense.

Compare this to 45%, and to a lesser extent, 35%. With your defenses pretty close to the soft cap, you think you've done well for yourself. Even level minions hit you 10% of the time, but they aren't exciting. +1 LTs will hit 12.7% of the time, still boring. +2 bosses hit you 15.6% of the time. That looks great, you can just run amok now without any worry.

By the fifth attack, the boss has hit you. 17.6% of the time, he hits you two out of five times. For comparison's sake, that happens twice as often the same thing occurring to a soft-capped character fighting a +4 AV. If you went against that same AV, you get hit by the third attack. Can you see the disparity?

Subjective again: Yes, 40% defense is excellent. You're going to be able to handle just about anything PvE can throw against you, and even some AV's. You can laugh at normal content, and only munch candy when you see an EB (even then, only at half of them). I'm just trying to point out how much that last five gives you. 40% defense is a spectacular build, and if you can only soft-cap by sacrificing, maybe you should rethink trying to softcap.

Defense and Mez: Extra pain saved through defense.

This wasn't the original point of my analysis, but it is something very important to consider when you're looking at defense, and especially defense vs. resistance.

Many attacks in this game carry more than just the -HP debuff we call damage. Some attacks debuff your accuracy or damage, and some will render you completely useless. (Notice I said useless, not helpless. Your defenses stay active, you just can't fight while held/slept.) Keep in mind that as you get hit less often, you incur less of these debuffs and mezzes. There's less of a chance that you get held long enough or debuffed low enough that they can kill you. Simply, you stay more effective longer.

In the comparison between resistance and defense builds, defense based sets have a slight advantage. Defense builds have considerably more mez protection in the sense that they get mezzed less often and therefore have less stacked mezzes. Resistance builds prevent stacking mezzes by having protection against and resistance to mez effects. The effects last for less time, so they stack less often. Where the defense build has the advantage is when several mez effects are applied at the same time. The defense build dodges the majority of the mezzes and keeps fighting, but the resistance tanker drops his offensive taunt aura for a precious few seconds and the team wipes.

Positional vs. Typed Defense:

This is a copy-paste from another one of my posts that addressed a question on whether it was better to have soft capped smashing and lethal defense, or moderate positional defense.

The way defense works is like this: Every attack carries a few types, and to figure out if that attack hits you, it uses the best case scenario. This means that a ranged lethal attack will check your ranged and lethal defense, and take the higher of the two before figuring out whether it hits you or not.

In the case of energy melee, the attack will have smashing, energy, and melee tags. It will roll to hit based on the highest defense you have out of smashing, energy, and melee. Let's say your defense against smashing is highest, so the roll is made and the attack misses. The whole attack misses, not just the smashing damage part.

That's why having S/L is so good. It doesn't just protect you from things like archery and martial arts, but also energy melee because of the smashing component and ice blast because of lethal components. S/L is very common, and if even a small part of the attack is S/L, the whole attack can be avoided by having S/L defense.

Why is positional defense so good? While the S/L tags are on many attacks, every attack in the game, with the exception of a few psionic attacks, have a positional tag attached to them. If you can get softcapped to all positions, or all positions you expect to be attacked from (ranged/AoE as a hoverblaster), then you are protected from virtually everything. An attack that was all energy or fire damage, for example, would get past the S/L softcap, but would still have the ranged or melee tag that the positional defense could stop.

This is why M/R/A will always be better than S/L. The only attacks that M/R/A can't defend against will also completely bypass S/L. Outside of that, most things have some smashing or lethal, but everything has a melee, ranged, or AoE tag.

This is going to be true for mezzes as well. What's better? Being hit by 20% of all mezzes or 5% of most mezzes and 50% of all others... I'm not really sure. Depends, really, on whether you want to tailor your game experience to one kind of enemy or not. If you want equal survivability against everything... go with moderate positional. If you want godmode against anything with S/L and no defense debuffs but faceplant to anything else... go with S/L softcapped.

8 comments:

  1. Turned out that playing a Scrapper was way, way more fun than playing a Mastermind. I might even take the scrapper to 50 before trying the MFing warshade which, as I said, is the whole reason I decided to try CoH in the first place!

    I have the thing on that tracks your stats as you play - Parry will sometimes ratchet my lethal/melee resistance up to 48.6%! Is this a display bug, or does it fall under an exception that allows active powers to break the cap?

    Also, my other defenses are a puny 1.96% thanks solely to Combat Jumping. Regeneration totally makes me survive damage, but having read your article I feel like I should get some defense too. Any suggestions how to do so? (Currently capped at level 14, buying the game next week.)

    ReplyDelete
  2. Gumby,

    There's a very specific reason I use the term soft cap. It means that you can add defense above 45%, but there is little to no practical benefit from doing this. You have to look at the tohit formula to see why the soft cap is 45%.

    The vast majority of enemies start at 50% chance to hit you. The minimum this chance can be brought down to is 5%. Even with your 48.6, the game floors the enemy chance to hit you at 5%.

    There are a few exceptions. Some enemies start with a higher base chance to hit, and many enemies debuff defense. This is why defense is allowed to go above 45%.

    ReplyDelete
  3. Great information here. I was kind of in the same boat as you. Started at release (on my brother's account), then got my own a few weeks later. Forum registered since Aug 2004. Leveled a Controller, got all my 50++ SOs and any HOs I could. Leveled a DM/SR scrapper, perma eluded, stacked straight dmg with focused accuracy.

    Left the game (played WoW), got big into min/max'ing. My brother never left the game, and has a monster Spines/SR scrapper. I watched him a few times just level groups in the rikti crash site, and it was impressive.

    I started playing again recently and went EM/SD. I spent a lot of time (and influence) on getting defense capped without trading damage. Once Mids updates, I'll have my build posted. It seems to be working out really well so far. My brother was a big pusher of getting defense cap before anything else, and this certainly explains why.

    A different brother recently made a Claws/WP scrapper, and is slotting/IO'ing for type-defense. He gets his ~30-40%, and a good bit of resists, but I think I'll look into getting him positional capped if possible. He has the regen and resists to help, so that may be his only option with WP, but it is worth looking into getting positional up.

    Thanks for the information!

    ReplyDelete
  4. Great write-up. My only comment, is a warning not to underestimate S/L defense. You can aquire it far easier and more affordably. If you can get positional high enough, it is definitely better. If you cannot, then don't be afraid to go S/L.

    ReplyDelete
  5. Excellent write up Dechs, but you may want to look into adding a section of -tohit, and how it affects and stacks with +defense.

    Especially with the 5% 'cap' on tohit, if you have -20% tohit, and 35% defense, are you effectively softcapped?

    Short answer, yes.

    Long answer, it depends on how much the enemy resistance -tohit.

    I've seen plenty of people quote this page and not realize that -tohit works very similar to +def, so when they see a build with 40% defence, but the ability to throw out -40% tohit, they say 'You need more defense.' without realizing that even against +4 AVs (87% resistance) your still effectively softcapped.

    ReplyDelete
  6. can anyone help me how to softcap my DP corruptor T_T

    ReplyDelete
  7. 10 years later I still have this on my signature on Homecoming.

    ReplyDelete