Jump to content
Jade Shadows: Share Bug Reports and Feedback Here! ×

Damage falloff and self stagger math suggestion


Steel_Rook
 Share

Recommended Posts

I've had the chance to look through the new math for AoE damage falloff and self-stagger from my own AoE, as well as playing around with the changes a bit now. While I find them problematic, I feel that they could still work with a few tweaks to the underlying calculations. Do note that this post is a bit heavy on high-school-level math, since the majority of my proposed changes are rooted in quadratic functions. With that in mind, here's what I'd suggest:

 

Thesis:

Change the calculation for AoE damage dropoff and severity of self-stagger to use quadratic functions and not their current (linear) functions. This will ensure that damage floor at the edge of an AoE could (if needed) be set fairly low without losing damage near the centre and around the middle to quite the same extent. Furthermore, cap self-stagger to 80% (or some other cutoff) of the weapon's AoE range. This would ensure that while we can still stagger and knock ourselves down, we're not going to experience that until we're a fair bit inside our own AoE.

For my proposed calculations, I'm going to use the following quadratic function:

f(x) = a(x + b)^2 + c

Here, X is the range from the centre of the explosion as a fraction of the explosion's maximum range. An at 6 meters inside an 8-meter AoE, x would be 6/8 = 0.75, or 75% of max range. f(x) would be the strength of the effect at that range - the amount of damage as a proportion of max damage or the amount of self-stagger as a proportion of maximum stagger severity. I'm not giving A, B or C any meaningful names because they're just parameters there to give us the right graph shape. Here, A controls the "spread" of the parabola as well as its facing (pointing up or pointing down), B controls the horizontal/abscissa position of the peak and C controls the vertical/ordinate position of the peak. The slope of dropoff, then, would be defined by those parameters.

 

Damage falloff:

I would set damage falloff to start at 100% at 0 range, drop down to the weapon's floor at max range (we'll call this "floor") and have increasing returns (i.e. an inverted paraola). I would also specifically want the peak of the parabola to sit at 0 range. In other words, I'm going to require that f(0) = 1, f(1) = floor, C = 0. I'll skip the analytical solution since I doubt anyone cares, but this gives us the following formula for damage falloff:

final_damage = -floor*(range)^2 + 1

To explain what this does, let's look at at he original proposed damage dropoff floor of 90% at the edge. At 0 range right at the centre of the AoE, you'd obviously be doing -0.9*(0)^2 + 1 = 1, or 100% damage. Right at the edge, at 100% of maximum range, you'd be doing -09*(1)^2 + 1 = -0.9 + 1 = 0.1, or 10%, just as you'd expect. Crucially, however, let's look at what happens in the middle, at 50% range. Then your damage would be -0.9*(0.5)^2 + 1 = -0.9*0.25 + 1 = -0.225 + 1 = 0.775, or 77.5% damage. This is different from the damage you'd do in the current linear function, which would simply be 50%.

In other words, my proposed function for determining AoE damage falloff still scales between 100% and 10% damage (in this example), but most of the lost this time around happens near the end. You retain more of your damage across more of your AoE range and only start to really lose damage near the edges of your AoE. This rewards accurate AoE placement as the bulk of the damage still occurs near the middle without requiring significant AoE range bloat - something currently required to ensure a smoother drop in damage with range.

 

Self stagger:

I would set self stagger to start at 100% at 0 range, drop to 0 at the self-stagger cutoff range (we'll call this "cutoff") and have diminishing returns (i.e. a standard parabola). I would also specifically want the peak of the parabola to sit at the range of "cutoff." In other words, I'm going to require that f(0) = 1, f(cutoff) = 0, C = 0, B = cutoff. This gives us the following formula for self-stagger falloff:

final_stagger = (1/cutoff^2)*(range - cutoff)^2

For example, let's look at my proposed cutoff of 80%. At 0 range right at the centre of the AoE, you'd be doing (1/0.8^2)*(0 - 0.8)^2 = (1/0.64)*0.64 = 1, or 100% stagger. Right at the cutoff, where range equals our cutoff of 0.8, you'd be doing (1/0.8^2)*(0.8 - 0.8)^2 = (1/0.64)*0 = 0, or no stagger to yourself. As before, though, let's look at what happens half-way between impact and cutoff, or a range of 0.4.There, you'd be doing (1/0.8^2)*(0.4 - 0.8)^2 = (1/0.64)*0.16 = 1/4 = 0.25, or 25% stagger. Now, I don't know exactly how self-stagger scales, whether it's linear with range or just based on damage, but right here we have the following - within 40% of total range (half of the cutoff, remember), we've already lost 3/4 of the stagger severity.

In other words, my proposed function for determining self-stagger severity still scales between 100% and nothing between the centre of the explosion and the 80% (in this example) cutoff. However, most of the loss of severity happens right at the start. You're still going to roll yourself like a pinball if you fire explosives into your own face, but the severity of this will drop off VERY quickly as you move away. This change will slowly ramp down as you approach the cutoff. This ensures that you'll still have severe problems firing AoE weapons irresponsibly, but it should make weapons with large AoEs less annoying to deal with, and less likely to stumble you right at the edge of the AoE.

 

Summary:

By modelling both AoE damage falloff and AoE self-stagger as quadratic functions (as parabolae), this allows us to heavily back-load the loss of AoE damage and heavily front-load the loss of self-stagger without actually changing any of the range or dropoff values. Yes, I did propose an additional "cutoff" value for self-stagger, but that could be tweaked per weapon and indeed simply set to 1.0, effectively removing it from the function. Yes, these are somewhat complex functions which might put off your average player, but players need not be exposed to the functions themselves. As long as players know that most of AoE damage is lost at the periphery and most of the stagger goes out a short way out from the middle, I feel that should be "close enough" for most.

Crucially, though - using linear functions for range dropoff means that the AoE range has a VERY significant impact on the rate of decline, which typically leads to AoE weapons being given unnecessarily large radii, or else conservatively high falloff floor values. With quadratic functions, the "undesirable" effect can be pushed to one end and ranges kept a bit more restrained.

 

*edit*

Damage falloff addendum:

In addition to modelling AoE damage falloff as quadratic, a thought occurs that it too can be given a cutoff similar to what I proposed for self-stagger. That is to say, damage falloff doesn't necessarily need to start immediately from the centre. It's entirely possible to design a "cutoff" - a minimum distance from the centre of an AoE where full damage is still dealt, with damage only beginning to fall off after that point. To implement this, let's update our original parabolic damage dropoff formula:

final_damage = -(floor/(1 - cutoff)^2)*(range - cutoff)^2 + 1

Yes, yes - the function got even uglier, but it works. As before, here "floor" represents the lowest value damage can get due to dropoff, "range" is the range of a target from the centre of an AoE and "cutoff" is the distance from centre where dropoff starts. Let's pull a few examples. Let's assume 90% damage dropoff at max range and full damage at 10% of AoE range. Then, at 0 range in the centre of the AoE, we'd still be doing 100 damage. range is 0, that's less than the 0.1 cutoff range, so damage is automatically 1.0, or 100%. At 0.1 range (10% of the way to the edge), the damage we deal is -(0.9/(1 - 0.1)^2)*(0.1 - 0.1) + 1 = 0 + 1 = 1, or 100% damage. At range 1.0 (the edge of the AoE), the damage we deal is -(0.9/(1 - 0.1)^2)*(1 - 0.1)^2 + 1 = -0.9 + 1 = 0.1, or 10%. Now let's try 0.5 range again (mid-way along the AoE radius). Then, our damage would be -(0.9/(1 - 0.1)^2)*(0.5 - 0.1)^2 + 1 = -(0.9/0.9^2)*0.4^2 + 1 = -0.16/0.9 + 1 ~ 0.8222, or ~82.22% damage.

So what have we accomplished here? Well, we ensured that damage remains at 100 between 0 and 10% (exclusive) range, then drops parabollically to 10% damage between 10% (inclusive) and 100% range. The damage dealt at the half-way point jumped from 77.5% to 82.22% simply because all values along the way jumped a little. Damage starts to decline later, declines faster but at every point besides max range it's still slightly higher. Just the gain over the other formula diminishes with distance. Crucially, though, we inserted another "lever" that a developer could pull to adjust AoE damage across range. This now gives us three: AoE maximum range, damage floor at max range and now cutoff before damage dropoff starts. And the best part here is you an set the cutoff to 0, which would instantly return us to the previous function, in case you don't want to use it.

 

Self stagger addendum:

In various conversations both here and elsewhere, a thought recurs: What if we didn't want full self-stagger even at point blank range? Could self-stagger start at some lower value, some cap that it can never exceed regardless of circumstances? Could my proposed formula account for this AND simultaneously account for the cutoff? Yes. The answer is yes, though the formula grows ever uglier. Specifically, the formula would look like this:

final_stagger = (cap/cutoff^2)*(range - cutoff)^2

Here, "cap" refers to the highest amount of self-stagger (as a percentage of the maximum possible) that an AoE could apply at point-blank AoE range. "Cutoff" is the range past which no self-stagger will happen relative to the AoE's maximum range. "Range" is simply the range from an AoE's centre to the player as a proportion of that AoE's maximum range. With that said, let's pull a few examples. Let's say we're firing an attack which deals only 80% of maximum self-stagger at its centre and loses all stagger by 80% of its maximum range. At a range of 0 (centre of the AoE), the self-stagger dealt would be (0.8/0.8^2)*(-0.8)^2 = (0.8*0.8^2)/0.8^2 = 0.8, or 80%. At 80% range, the self-stagger dealt would be (0.8/0.8^2)*(0.8 - 0.8)^2 = (0.8/0.8^2)*0 = 0, so no self-stagger. So the formula meets the criteria we set for it, but what happens at the half-way point to the cutoff? What happens at 40%? Well, then the self-stagger would be (0.8/0.8^2)*(0.4 - 0.8)^2 = (1/0.8)*(-0.4)^2 = 0.16/0.8 = 0.2, or 20% self-stagger.

If you noted that the values in this revised formula are all exactly 80% of the values of the previous self-stagger formula, you would be correct. Effectively all we did was attach a multiplier at the front of everything, which is always going to be somewhere between 0 and 1. We kept the same point of extremum (where the function reaches 0 and starts rising again) but splayed the parabola a bit, which caused every value to drop to 80% of its old value. So yes - this approach doesn't just cap self-stagger, but also alters the rate of decline (by reducing it slightly). Wecould have simply hard-capped it by stating that "if self-stagger > 0.8, then self-stagger = 0.8" and flattened the curve. I'm not entirely sure which is "better," but I personally find this to be more consistent as it keeps the rate of decline proportionate.

In any case, this was just an attempt to include an extra variable in the function and make it that much more flexible. If such a cap isn't needed, then one can simply set the cap to a value of 1 and it's effectively removed from the function, in practical terms.

Edited by Steel_Rook
  • Like 3
Link to comment
Share on other sites

Neat! Though I am a little worried about the weapons with considerably smaller AoEs might become even weaker.

But that said, is there any given equation that DE stated how the current damage fall off works?
While I also assumed the damage falloff would function as a linear decline, I would like to see what the current mechanics are.
If you know any that is.

Edited by Shaburanigud
Link to comment
Share on other sites

1 hour ago, Shaburanigud said:

Neat! Though I am a little worried about the weapons with considerably smaller AoEs might become even weaker.

Weaker than they are now? That's unlikely. Initially, DE intended for all AoEs to have a "floor" of 90% damage reduction (i.e. 10% damage dealt) at the edge of their AoE, but changed their mind and shifted the dropoff floor much higher for a lot of weapons with smaller AoEs. Provided they retain the same range and floor values, weapon damage will only increase. Provided they decide to decrease either the floor or the range, then weapon damage at the edge will decrease, but weapon damage near the middle is likely to stay at or above current levels. It depends on the values in question.

It didn't occur to me at the time, but it's entirely possible to shift the parabola "up" (positive along the abscissa) and clamp max value at 100%, thus ensuring that dropoff doesn't actually start until some distance after the centre. I'm speaking off the top of my head here, though. Should probably look into that.

 

1 hour ago, Shaburanigud said:

But that said, is there any given equation that DE stated how the current damage fall off works?
While I also assumed the damage falloff would function as a linear decline, I would like to see what the current mechanics are.
If you know any that is.

I couldn't find a direct quote from the release notes - the descriptions there are very vague. I seem to recall comments during the Dev Stream suggesting that the dropoff is linear, from 100% at the centre to 10% at the edge. This sort of model is pretty easy to calculate since you can simply interpolate between the two points, plus it's easy to explain. My proposed functions are pretty "ugly" despite in truth being fairly simple. I will admit, however, that I have no sources to cite that the damage dropoff is linear. It's entirely possible DE already used the system I'm proposing (it's fairly obvious, can't really take much credit here) and people simply reacted to the patch notes rather than empirical experience. I've no reliable means to test AoE damage dropoff, not with any amount of precision.

Link to comment
Share on other sites

Damage falloff addendum:

In addition to modelling AoE damage falloff as quadratic, a thought occurs that it too can be given a cutoff similar to what I proposed for self-stagger. That is to say, damage falloff doesn't necessarily need to start immediately from the centre. It's entirely possible to design a "cutoff" - a minimum distance from the centre of an AoE where full damage is still dealt, with damage only beginning to fall off after that point. To implement this, let's update our original parabolic damage dropoff formula:

final_damage = -(floor/(1 - cutoff)^2)*(range - cutoff)^2 + 1

Yes, yes - the function got even uglier, but it works. As before, here "floor" represents the lowest value damage can get due to dropoff, "range" is the range of a target from the centre of an AoE and "cutoff" is the distance from centre where dropoff starts. Let's pull a few examples. Let's assume 90% damage dropoff at max range and full damage at 10% of AoE range. Then, at 0 range in the centre of the AoE, we'd still be doing 100 damage. range is 0, that's less than the 0.1 cutoff range, so damage is automatically 1.0, or 100%. At 0.1 range (10% of the way to the edge), the damage we deal is -(0.9/(1 - 0.1)^2)*(0.1 - 0.1) + 1 = 0 + 1 = 1, or 100% damage. At range 1.0 (the edge of the AoE), the damage we deal is -(0.9/(1 - 0.1)^2)*(1 - 0.1)^2 + 1 = -0.9 + 1 = 0.1, or 10%. Now let's try 0.5 range again (mid-way along the AoE radius). Then, our damage would be -(0.9/(1 - 0.1)^2)*(0.5 - 0.1)^2 + 1 = -(0.9/0.9^2)*0.4^2 + 1 = -0.16/0.9 + 1 ~ 0.8222, or ~82.22% damage.

So what have we accomplished here? Well, we ensured that damage remains at 100 between 0 and 10% (exclusive) range, then drops parabollically to 10% damage between 10% (inclusive) and 100% range. The damage dealt at the half-way point jumped from 77.5% to 82.22% simply because all values along the way jumped a little. Damage starts to decline later, declines faster but at every point besides max range it's still slightly higher. Just the gain over the other formula diminishes with distance. Crucially, though, we inserted another "lever" that a developer could pull to adjust AoE damage across range. This now gives us three: AoE maximum range, damage floor at max range and now cutoff before damage dropoff starts. And the best part here is you an set the cutoff to 0, which would instantly return us to the previous function, in case you don't want to use it.

Link to comment
Share on other sites

I very much like this idea, and think the math behind it is sound: while I'm personally a fan of neither damage falloff on AoE weapons nor self-staggering, I think both can at least be adjusted to provide some sort of risk-reward mechanism, though as the OP assesses, either part of the mechanism needs to work very differently: the damage component ought to have a "sweet spot" in its more central area in order for AoE weapons to still have anti-crowd capabilities, whereas the self-stagger is already being tuned by DE to only be at its strongest in cases of "extreme inaccuracy", even though the implementation still has a ways to go before delivering that. Currently, the falloff in both cases seems linear, which so far has led to a damage dropoff that feels too harsh to allow explosives to adequately damage multiple enemies at a time, and a self-stagger falloff that isn't sufficient in preventing players from severely interrupting themselves with shots in only minor proximity. Thus, softening damage falloff and accelerating self-stagger dropoff would both be much more conducive to responsive explosive weapons.

Edited by Teridax68
Link to comment
Share on other sites

2 hours ago, Teridax68 said:

Currently, the falloff in both cases seems linear, which so far has led to a damage dropoff that feels too harsh to allow explosives to adequately damage multiple enemies at a time, and a self-stagger falloff that isn't sufficient in preventing players from severely interrupting themselves with shots in only minor proximity. Thus, softening damage falloff and accelerating self-stagger dropoff would both be much more conducive to responsive explosive weapons.

While I don't have a source for this, that has indeed been my experience as well - damage and self-stagger falloff appears linear, which is very restrictive. Quadratic damage dropoff can "load" the dropoff to either end and solve a lot of these issues. While this doesn't solve the issue of "dropff exists" 🙂 it does allow us to minimise its impact. I've used a concave parabola for damage dropoff, which means damage stays higher for a longer distance around the centre, but then drops off more rapidly towards the edges. It's easier to catch tightly-packed enemies with a single shot, but less effective trying to shoot at a dispersed crowd. I've used a convex barabola for self-stagger dropoff, which means self-stagger drops drastically right off the bat, then levels off and decreases gradually towards the cutoff point.

What I didn't do but really should have is account for dropoff which starts below 100% at 0 range. That's worth investigating, though it's going to make the function EVAN UGLIER 🙂 Ralistically, I'd have to toy with a in f(x)= x(x + b)^2 + c. B and C define the point of extremum which is not going to move, but the parabola would need to "spread" by a precise amount.

Link to comment
Share on other sites

Self stagger addendum:

In various conversations both here and elsewhere, a thought recurs: What if we didn't want full self-stagger even at point blank range? Could self-stagger start at some lower value, some cap that it can never exceed regardless of circumstances? Could my proposed formula account for this AND simultaneously account for the cutoff? Yes. The answer is yes, though the formula grows ever uglier. Specifically, the formula would look like this:

final_stagger = (cap/cutoff^2)*(range - cutoff)^2

Here, "cap" refers to the highest amount of self-stagger (as a percentage of the maximum possible) that an AoE could apply at point-blank AoE range. "Cutoff" is the range past which no self-stagger will happen relative to the AoE's maximum range. "Range" is simply the range from an AoE's centre to the player as a proportion of that AoE's maximum range. With that said, let's pull a few examples. Let's say we're firing an attack which deals only 80% of maximum self-stagger at its centre and loses all stagger by 80% of its maximum range. At a range of 0 (centre of the AoE), the self-stagger dealt would be (0.8/0.8^2)*(-0.8)^2 = (0.8*0.8^2)/0.8^2 = 0.8, or 80%. At 80% range, the self-stagger dealt would be (0.8/0.8^2)*(0.8 - 0.8)^2 = (0.8/0.8^2)*0 = 0, so no self-stagger. So the formula meets the criteria we set for it, but what happens at the half-way point to the cutoff? What happens at 40%? Well, then the self-stagger would be (0.8/0.8^2)*(0.4 - 0.8)^2 = (1/0.8)*(-0.4)^2 = 0.16/0.8 = 0.2, or 20% self-stagger.

If you noted that the values in this revised formula are all exactly 80% of the values of the previous self-stagger formula, you would be correct. Effectively all we did was attach a multiplier at the front of everything, which is always going to be somewhere between 0 and 1. We kept the same point of extremum (where the function reaches 0 and starts rising again) but splayed the parabola a bit, which caused every value to drop to 80% of its old value. So yes - this approach doesn't just cap self-stagger, but also alters the rate of decline (by reducing it slightly). Wecould have simply hard-capped it by stating that "if self-stagger > 0.8, then self-stagger = 0.8" and flattened the curve. I'm not entirely sure which is "better," but I personally find this to be more consistent as it keeps the rate of decline proportionate.

In any case, this was just an attempt to include an extra variable in the function and make it that much more flexible. If such a cap isn't needed, then one can simply set the cap to a value of 1 and it's effectively removed from the function, in practical terms.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...