Sunday, July 17, 2011

Defense's role in reducing damage

In many games, there exists health or hit points that determine how much punishment a character can take before biting the big one, so as to allow individual characters to survive without relying on luck. This allows a player to fight more types of enemies, as they can now use strategy to fight off early ones. However, having HP doesn't easily increase the lifespan of characters, simply because unless otherwise specified, HP determines only how close the character is to dying. Lot of difference that makes in a game like Super Smash Bros., where you flinch from being hit by any attack that isn't overly specific.

This brings up how you easily take damage unconditionally if there's no defense stat. Most likely, the Fragile Speedster (high speed, low power) gets so many hits in that you'd have to reduce the damage input of their individual attacks considerably or you're simply not going to have a prayer, and the Mighty Glacier receives so many of them that their only chance of being usable is to be able to laugh them off. This is understandably hard to balance out naturally, but a defense stat allows making this job much easier, because now those weak little hits will become only useful on anybody but the Squishy Wizard or the Glass Cannon if the speedster is patient enough. The Stone Wall, meanwhile, gets to do their job effectively, and the Mighty Glacier can actually, you know, live.

But managing a fine balance for defense is tricky business. If you make it too weak, it won't be able to influence battles by any suitable degree for its purpose. But if it's too strong, you will have invincible characters running around laughing at everything they come across, knowing they will never be killed without being extremely careless. Healing can come into play too and complicate things, because reducing damage taken means reducing the amount needed to heal, which can easily amount to snowballing if the healing is only slightly outpaced in general.

And while it's not uncommon for the likes of RPGs to use multiple defense stats, usually one for physical attacks and the other for magic attacks, it's not necessarily foolproof even without the potential problem of overfavoring either bash baddies or spellcasting slimeballs within the enemy makeup, simply because a character can still have high values in BOTH stats and end up basically invincible.

But how do we balance defense stats? Well, we can start by taking a look at a few commonly used formulas:
**ATK * 2 - DEF
*ATK * (variable - DEF) / variable (note that variable is likely the same in both cases)

Here's ATK - DEF, first and foremost:

*Pros: simplistic, lower attack values become extremely limited in influence
*Cons: high defense values may become too powerful, but if attack values are too high for that, the defense stat becomes weak

This is the base damage formula that Fire Emblem, Super Mario RPG, and Paper Mario use. Yep, it looks like Nintendo likes to use this formula. This is best used for purely tactical/strategic factors, because of how powerful defense can be if not given a suitable limit, which personal stats rarely allow. Under this formula, EACH time you're attacked, each point of defense is pretty much equivalent to one point of HP, which alone makes it more powerful than HP itself, even when one-hit-kills become standard--but naturally, we don't want one-hit-kills to be standard.  And it doesn't end there, oh no. If defense hits or exceeds the enemy's attack value, the target won't even take damage at all. This can happen in Fire Emblem and particularly Paper Mario, both with low-to-moderate end stats. Super Mario RPG has at least moderate-end stats, but then provides easy healing availability, and healing effectively reduces attack value even further, most likely by a lot. The defense stat provides to make it less likely that the healing will get outpaced by enemy punishment, and also reduce by how much if it does get outpaced. Consequently, healing is also hard to balance.

Still, the formula has its merits. And Final Fantasy 5 uses it in a creative way: having only equipment/spell stats (in general) get reduced by defense, while personal stats are multipliers of the result after defense is subtracted.

Here's a more common variation:
RPGs like Dragon Warrior (or Dragon Quest) are fond of this, as ATK values stay high to keep up with ever increasing HP values, while making sure that only absurdly high DEF values can stop them. But if you see how clumped the lines are, you'll see that DEF has minimized influence. This is most likely because the player probably has multiple armor types and healing to work with. The problem, however, is that this favors the player, since baddies generally don't get to work with either, certainly not in-RAM. Some do, but most won't.

But hey, they're RPGs. They're not going to revolve entirely around combat strategies, though killing the difficulty easily is questionable.

Now here's ATK/DEF:

*Pros: higher DEF values avoid brokenness, lower DEF values can still be felt
*Cons: higher DEF increases are painfully ineffective, lower DEF values increase damage by possibly too much

Believe it or not, this method is actually used in Final Fantasy 4. I truthfully haven't managed to get that far in FF4, but my understanding is that this would be powerful in the early game, where your DEF values are low enough that any increase to them can be really felt, but in the late game, DEF increases need to be in considerable values to do anything worthwhile aside from magic number business. But again, I haven't played FF4 enough.

I have, however, played another game that uses ATK/DEF: Advance Wars Days of Ruin. This game is an outright strategy game, so naturally, DEF values are in the happy medium. Or at least close to it. Dang general lack of CO unit weaknesses aside from money. But I'm not here to complain about that problem, I'm here to talk about how DEF's handling here affects the game. And honestly, the change compared to the old formula should have involved just the COs and maybe the Communication Towers, not the terrain. Of course, while 80 ATK 120 DEF and 120 ATK 80 DEF here would both be bad (80/~83 and 120/125), some minor strength over weakness isn't necessarily a bad thing, as long as the weakness exists and can readily stop stat abuse. Compared to the old formula's problems, which I'll talk about but let me get this out of the way. Meanwhile, involving terrain in the formula is a mistake, because terrain is a purely tactical factor. It worked better in the old formula because it actually reduced damage to any reasonable level. Here, the only thing it's good for is magic numbers. Seriously, magic numbers? Now it's worthless in doing ANYTHING really worth noting, rather than doing anything beyond hurting directs, which was stupid enough in previous AWs. You don't render a central mechanic pointless like that, especially in a game designed around strategy.

There's one last game I know that basically uses the ATK/DEF formula: Game Boy Wars 3. It's actually used to determine base damage, pretty much, rather than being purely matchup dependent. After all, no need to use over 5000 bytes when around 750 or fewer are necessary. But anyway, because units are a central resource that can easily be increased and thus should be vulnerable enough, this formula works out quite nicely, with infantry and range-fire units actually becoming feasible to OHK on a halfway reasonable basis. The only problem that arises from the formula is how hard it is to keep durable units alive on terrain like Roads because their defense stats don't make all that much of a difference in that regard, but terrain defense factors as well as level defense are subtracted from the otherwise final damage, including the attack multiplier. Yep, the low ATK values are covered, although not by enough, surprisingly. But nevertheless, it's an interesting take. Hunh. Let's see how a mix of these two formulas would basically work out:

I'm aware, Game Boy Wars 3 doesn't use that formula flatly, just a similar formula for determining damage. But you can guess it's rather balanced. Considering it's a raw formula, that's pretty good.

Finally, here's ATK * (variable - DEF) / DEF:

*Pros: easily kills high ATK values without touching low ATK values
*Cons: low ATK values aren't phased, low DEF values don't do much, high DEF values do too much

Some RPGs use this. Chrono Trigger and Final Fantasy 6 are among such RPGs. But use this carefully. If you want exponential power growth in the bad guys, go right ahead, but otherwise, I can't think of this being that good. Early game armor will suck especially because attack values aren't even high yet, but late game armor can easily end up making your characters basically gods.

Now okay, that's just RPGs at work. But what about strategy games? Well, there's a game that uses the formula: Advance Wars, prior to Days of Ruin. Although AW1 uses it 3 times, one for each DEF value type: the CO boost, the CO Power boost, and the terrain defense. AW2 and AWDS has DEF values added together, which causes problem when invincible or just near-invincible units can be managed without too much trouble in certain cases. AW1's method is actually decent, as it actually avoids invincible units but still makes it useful to have defense. Of course, the formula hits high values the hardest, because ATK is not reduced with any subtraction. This makes dealing with infantry a headache on rough terrain because of how inexpensive they are. Range fire units like artillery also benefit because they attack from a safe distance to begin with, but close combat units like tanks have to keep steady attack power because of how much punishment they can easily take.

Needless to say, be careful about reducing high values. It may prevent stupidly cheap stuff, but sometimes, some powerful stuff should stay consistently powerful.

And that should be that. Just remember to watch how powerful defense is and that will be one less bit of shallowness to worry about.

No comments:

Post a Comment