Jump to content
Sign in to follow this  
Hom-Sha-Bom

Defense Speed (Warning: Math Inside)

Recommended Posts

So, Defense Speed scales differently for every defense.

I've only done the math on 4 towers, and this is what I've found:

  • Earthshatter Tower: 1 DS = 1/50% Attacks Per Second (APS) Increase
  • Lightning Strikes Aura: 1 DS = 1/75% APS Increase
  • Flame Aura: 1 DS = 2/25% APS Increase, but capped at +67% APS (only takes 834 DS to reach cap)
  • Flamethrower Tower: 1 DS = 1/10% APS Increase, capped at +400% APS (takes 4000 DS to reach cap)


How I got these numbers:

I assumed each point in Defense Speed was increasing the number of attacks per second by some value, so I did some testing and calculating to figure it out, starting with Earthshatter because larger numbers will have smaller rounding errors.

So the base Attack Rate of Earthshatter is 5.0s, invert this number (1 / 5) to get the APS: 0.2

I equipped a Relic with 1272 DS, and that brought the attack rate down to 3.99s
New APS: 1 / 3.99 = 0.250626...
APS added by 1272 DS: 0.250626... - 0.2 = 0.050626...
Percent of APS Increased by 1272 DS: 0.050626... / 0.2 = 25.313283...%
Each Point of DS increases APS by: 25.313283... / 1272 = 0.019900...%

This is a weird number to deal with, so it's probably off by a little due to rounding. So I try another Relic and see if I can find a pattern.

I equip a Relic with 1942 DS, the Attack Rate was brought down to 3.6s
New APS: 1 / 3.6 = 0.277777...
APS added by 1942 DS: 0.277777... - 0.2 = 0.077777...
Percent of APS Increased by 1942 DS: 0.077777... / 0.2 = 38.888888...%
Each point of DS increased APS by: 38.888888... / 1942 = 0.020025...%

So it seems to increase Attacks Per Second by around 0.02% per point of Defense Speed. Testing this value against my other Relics returned correct results. This is the value for Earthshatter.


I did the same calculations for Lightning Strikes Aura, Flame Aura, and Flamethrower to get the numbers posted above.

Share this post


Link to post
Share on other sites

Trendy, you are doing Defense Speed wrong.

You're making faster defense scale better with DS, but so much better that you're forced to put an arbitrary cap on attack rate. Problem is, that cap is not consistent.

Flame Aura can only achieve +67% DPS from just 834 DS. Any more DS is wasted.

Flamethrower Tower can achieve +400% DPS from 4,000 DS. Any more DS is wasted.

Earthshatter doesn't seem to have a cap, but it scales much worse with DS than the above. It would take 20,000 Defense Speed to reach +400% like the Flamethrowers can get. A max value fully upgraded Chaos V Orb can't even get half way there.

Lightning Strikes Aura doesn't seem to have a cap, but scale much worse with DS. It won't be able to achieve +400% DPS from Speed, that would require 30,000 Defense Speed. A max value fully upgraded Chaos V Orb can't even get a third of the way there.


Just make Defense Speed scale at the same rate for all defenses. It will be so much easier to balance, you won't need arbitrary speed caps, and you will thank me later.


Zimmermann you are right about the Flame Aura's attack rate being capped too high

Share this post


Link to post
Share on other sites

Reached the cap on my flamers at 0.2 attacks/sec without even trying (It's a secondary stat).


Wish we had softcaps like in DD1.

Share this post


Link to post
Share on other sites


@Ratiasu quote:

Reached the cap on my flamers at 0.2 attacks/sec without even trying (It's a secondary stat).


Wish we had softcaps like in DD1.

I can get 0.15 on flamethrowers without a speed relic... I am only going by the tooltip though. Am I missing something? I did use the speed shard tho...

edit* you are just talking about speed stat not the shard, sorry.


I couldn't agree more with OP, please just standardize its not fun having 4000 points of your relic wasted. Not only are you hurting the base stats of a tower, but you are nerfing the impact their gear has too. getting awesome loot that you only use less then 1/5 of a stat is not cool.

Share this post


Link to post
Share on other sites

if they dont fix it they just need to get rid of orbs, its a waste of loot when as you said 4000 points of your relic are wasted. They have already said they are adding more chaos levels which means unless something changes speed as a secondary stat will cap many towers anyway. 

Share this post


Link to post
Share on other sites


@stuffymonster quote:

if they dont fix it they just need to get rid of orbs, its a waste of loot when as you said 4000 points of your relic are wasted. They have already said they are adding more chaos levels which means unless something changes speed as a secondary stat will cap many towers anyway. 

I am wasting 4000 points on a medallion (my medallion is 4803) by the sounds of things, and thats with 0/20 attack speed in ascension points ;'(

Share this post


Link to post
Share on other sites

Honestly ive never been the biggest fan of how they do the math on attack speed.  this time interval method seems overly convoluted.  To my mind it would be easier to have the tooltip show attacks per second.  That would also be easier to scale.  even if a towers attack was 0.11/sec and each point of speed only increased it by 0.01/sec would be much simpler.

At least to my not math friendly mind it seems that way.

Share this post


Link to post
Share on other sites
@Hom-Sha-Bom quote:

So, Defense Speed scales differently for every defense.

I assumed each point in Defense Speed was increasing the number of attacks per second by some value, so I did some testing and calculating to figure it out, starting with Earthshatter because larger numbers will have smaller rounding errors.

You need to consider the base speed value of each defense.

For earthshatter the base speed is 5000, and it's base APS is 0.2.  So it makes sense that adding 1942 DS for a total of 6942 will give it 0.2*6942/5000 = 0.27768 APS.  This agrees with your results.

Lightning strikes has a base speed stat of 7500, flame aura has 1250 and flamethrower has 1000, giving rise to the percentage increases you've observed.  It's actually very consistent when you use the right formulas and constants.

Share this post


Link to post
Share on other sites
@Norexthorson quote:

Honestly ive never been the biggest fan of how they do the math on attack speed.  this time interval method seems overly convoluted.  To my mind it would be easier to have the tooltip show attacks per second.  That would also be easier to scale.  even if a towers attack was 0.11/sec and each point of speed only increased it by 0.01/sec would be much simpler.

At least to my not math friendly mind it seems that way.

It actually is scaling on attacks per second, it's just being displayed as time interval. They are just inverse of each other. and it's easy to convert between the two. 1 / attacks per second = seconds per attack. 1 / seconds per attack = attacks per second.

So 5 seconds per attack = 1/5 attacks per second.
1/5 attacks per second = 1 / (1/5) = 5 seconds per attack.

I haven't played DD1 in so long, so I'm not positive, but I think it worked the same way there. It works the same way in games like Dota 2 as well.

Share this post


Link to post
Share on other sites


@Ratiasu quote:

Reached the cap on my flamers at 0.2 attacks/sec without even trying (It's a secondary stat).


Wish we had softcaps like in DD1.

Oh, the cap is 0.2? I thought I heard it was 0.1. I'll update the post with that cap.

Share this post


Link to post
Share on other sites


@Zimmermann quote:


@Ratiasu quote:

Reached the cap on my flamers at 0.2 attacks/sec without even trying (It's a secondary stat).


Wish we had softcaps like in DD1.

I can get 0.15 on flamethrowers without a speed relic... I am only going by the tooltip though. Am I missing something? I did use the speed shard tho...

edit* you are just talking about speed stat not the shard, sorry.


I couldn't agree more with OP, please just standardize its not fun having 4000 points of your relic wasted. Not only are you hurting the base stats of a tower, but you are nerfing the impact their gear has too. getting awesome loot that you only use less then 1/5 of a stat is not cool.

There's a Speed shard for towers?

Share this post


Link to post
Share on other sites


@tdb quote:
@Hom-Sha-Bom quote:

So, Defense Speed scales differently for every defense.

I assumed each point in Defense Speed was increasing the number of attacks per second by some value, so I did some testing and calculating to figure it out, starting with Earthshatter because larger numbers will have smaller rounding errors.

You need to consider the base speed value of each defense.

For earthshatter the base speed is 5000, and it's base APS is 0.2.  So it makes sense that adding 1942 DS for a total of 6942 will give it 0.2*6942/5000 = 0.27768 APS.  This agrees with your results.

Lightning strikes has a base speed stat of 7500, flame aura has 1250 and flamethrower has 1000, giving rise to the percentage increases you've observed.  It's actually very consistent when you use the right formulas and constants.

I am considering the base speed value. I included all of the formulas I used just so you can see where I am using the base speed value.

What you're saying is absurd. You can't just multiply the seconds between attacks by 1000 and say that is its base speed stat. Just think about what you're saying. By that logic a defense that attacks once every 7.5 seconds has a higher base speed than a defense that attacks once every 2 seconds. That's not true. Once every 7.5s is much slower than once every 2s.

Share this post


Link to post
Share on other sites
@Hom-Sha-Bom quote:

I am considering the base speed value. I included all of the formulas I used just so you can see where I am using the base speed value.

What you're saying is absurd. You can't just multiply the seconds between attacks by 1000 and say that is its base speed stat. Just think about what you're saying. By that logic a defense that attacks once every 7.5 seconds has a higher base speed than a defense that attacks once every 2 seconds. That's not true. Once every 7.5s is much slower than once every 2s.

Yet that is what I see when I go to the inventory screen and look at the defense speed stats for different defenses.  Do I need to post screenshots?

Share this post


Link to post
Share on other sites

i think we can agree that trendy needs to fix essentially everything about their game, all the scalars, the caps, just, geez, everything is so horribly janky.

Share this post


Link to post
Share on other sites
@tdb quote:

Yet that is what I see when I go to the inventory screen and look at the defense speed stats for different defenses.  Do I need to post screenshots?

No, you don't.

Earthshatter's Attack Rate is 5s. Let's say its ATK DMG is 120,000, its Crit DMG is 50,000, and its Crit Chance is 10%. The Earthshatter's DPS = (ATK DMG + Crit DMG * Crit Chance) / Attack Rate = (120,000 + 50,000 * 0.1) / 5 = 25,000 DPS.

Then let's add 1,000 Defense Speed. The new Attack Rate is 4.166.... I'm just going to write it as (25/6) to get a more precise value instead of rounding it. The new DPS = (120,000 + 50,000 * 0.1) / (25 / 6) = 30,000 DPS.

From 25k to 30K, that's an increase of 20% DPS.


Flamethrower's Attack Rate is 1s. Let's say its ATK DMG is 4,800, its Crit DMG is 2,000, and its Crit Chance is 10%. Its DPS = (4,800 + 2,000 * 0.1) / 1 = 5,000.

Then add 1,000 Defense Speed. The new Attack Rate is 0.5. The new DPS = (4,800 + 2,000 * 0.1) / 0.5 = 10,000.

From 5k to 10k, that's an increase of 100% DPS.


So how do you consider a 20% increase for one defense but 100% increase for another defense to be consistent? That base number that you see is the amount of defense speed that you need to double the DPS. So, fine, that part is consistent. But it creates inconsistent results across the board. It's consistently inconsistent.



Share this post


Link to post
Share on other sites

Ok yeah, when you put it like that the effect of defense speed on DPS isn't very consistent.  I just meant that there's nothing weird about the math.

It is a shame that this makes the DPS of slow towers more difficult to scale than fast ones.

Share this post


Link to post
Share on other sites


@tdb quote:

Ok yeah, when you put it like that the effect of defense speed on DPS isn't very consistent.  I just meant that there's nothing weird about the math.

It is a shame that this makes the DPS of slow towers more difficult to scale than fast ones.

Yeah, the slow defenses who you might want to put speed on the most, benefit the least, and the fast ones benefit the most but they benefit so much that arbitrary caps are placed on them.


They can completely eliminate this problem by changing every defense to have 1,000 base Speed across the board, while leaving every defense's base attack rate the same as it is today.

Then every 1,000 Defense Speed will increase the Attacks Per Second, and there for Damage Per Second, by 100% for every defense.

And maybe that is too much, but that's how Flamethrower works today. I'm just saying give every defense the same base Speed stat (note: i am not saying the same base attack rate, don't touch attack rate, just fix the base Speed Stat) and it will make damage scale the same for every defense.

Share this post


Link to post
Share on other sites
@Zimmermann quote:

I can get 0.15 on flamethrowers without a speed relic... I am only going by the tooltip though. Am I missing something? I did use the speed shard tho...

edit* you are just talking about speed stat not the shard, sorry.


I couldn't agree more with OP, please just standardize its not fun having 4000 points of your relic wasted. Not only are you hurting the base stats of a tower, but you are nerfing the impact their gear has too. getting awesome loot that you only use less then 1/5 of a stat is not cool.

To explain that... That shard increases defense RATE by 25%. Relics increase defense SPEED. The shard augments the attack rate itself, post attack speed calculation. It's the only thing that can bypass the attack speed cap as far as I'm aware.

But max shard is +25% attack rate... Which is (1-0.25)*Attack rate. Thus .75*.2 = .15

@Hom-Sha-Bom quote:

-snip-

And as far as the attack speed scaling... Yeah, its horrible. Its inconsistent (my biggest complaint) and the attack speed caps really ruin a lot of things. Flame auras especially (and now that they can't electrocute stun enemies forever, really not sure why its still such a high cap?).

BUT. Its not as easy a fix as you think sadly... An effective scaling model without caps basically HAS to have logarithmic growth, so that you still get something for increases and investments early, but it slows down drastically later. And it HAS to slow down drastically later if there is no cap. Each .1 seconds off the attack rate is worth more than the last, growing in value exponentially.

But creating a curve that has long term potential for growth... without completely ruining any rewards for investing in it... Well its actually a lot harder than you'd think.

Then consider how understandable that is for the player base... The number of people that probably don't realize what any of what I said means, let alone implies, then trying to understand how attack speed affects them? Becomes an interesting and problematic issue...

Edit:

you're name is impossible to reference hom... you break the 'at' reference with your dashes lol

Share this post


Link to post
Share on other sites
@xArcAngel quote:

But creating a curve that has long term potential for growth... without completely ruining any rewards for investing in it... Well its actually a lot harder than you'd think.

Various power curves with exponent between 0.5 and 1.0 work reasonably well.  Logarithm is a bit extreme.  In cases where you might want to cap the effect an inverse exponential curve can be used.

For example, suppose we wanted to cap the attack rate to five times its initial value.  We'd use a formula like APS = a*(5-4*exp(-x*log(2)/1000)) where a is the initial attack rate and x is the speed stat (with a base value of zero).  The effect is that every 1000 points in the stat brings you closer to the gap by half.  With 1000 points you'll have three times the base value, 2000 points gives four times the attack rate, 3000 points gives 4.5 times, etc.  Every additional point provides a benefit but you can never get over (or even reach) five times the base value.

Power curves allow infinite growth, but the rate of growth still gets slower the higher your stat gets.  A formula of APS=a*sqrt(x/130+1) gives similar growth to the above inverse exponential formula up to about 2000 stat, after which it grows noticeably faster.  At 3120 stat you'll have five times the attack rate, at 8190 stat eight times and at 12870 stat ten times.  Every time you quadruple your stat your attack rate will double.

I would recommend using an inverse exponential curve in cases where uncapped growth could be game breaking, such as critical hit chance or damage reduction.  Also for attack speed if there are secondary effects with a fixed duration that could break game balance if made permanent.  Power curve is appropriate when there aren't such hard limits but it's desirable to discourage players from getting too high for performance or other reasons.  Linear scaling works well for simple values like damage or health.

Share this post


Link to post
Share on other sites
@tdb quote:
@xArcAngel quote:

But creating a curve that has long term potential for growth... without completely ruining any rewards for investing in it... Well its actually a lot harder than you'd think.

Various power curves with exponent between 0.5 and 1.0 work reasonably well.  Logarithm is a bit extreme.  In cases where you might want to cap the effect an inverse exponential curve can be used.

For example, suppose we wanted to cap the attack rate to five times its initial value.  We'd use a formula like APS = a*(5-4*exp(-x*log(2)/1000)) where a is the initial attack rate and x is the speed stat (with a base value of zero).  The effect is that every 1000 points in the stat brings you closer to the gap by half.  With 1000 points you'll have three times the base value, 2000 points gives four times the attack rate, 3000 points gives 4.5 times, etc.  Every additional point provides a benefit but you can never get over (or even reach) five times the base value.

Power curves allow infinite growth, but the rate of growth still gets slower the higher your stat gets.  A formula of APS=a*sqrt(x/130+1) gives similar growth to the above inverse exponential formula up to about 2000 stat, after which it grows noticeably faster.  At 3120 stat you'll have five times the attack rate, at 8190 stat eight times and at 12870 stat ten times.  Every time you quadruple your stat your attack rate will double.

I would recommend using an inverse exponential curve in cases where uncapped growth could be game breaking, such as critical hit chance or damage reduction.  Also for attack speed if there are secondary effects with a fixed duration that could break game balance if made permanent.  Power curve is appropriate when there aren't such hard limits but it's desirable to discourage players from getting too high for performance or other reasons.  Linear scaling works well for simple values like damage or health.

Fair enough. Suppose that's a mental fault of my own (for some reason I naturally associate logs as the inverse of exponential... when its not...).

But still, as you mentioned with the effect durations, it presents a problematic balance concern thats still not very easy to answer with a healthy curve in mind.

Share this post


Link to post
Share on other sites
@xArcAngel quote:

But still, as you mentioned with the effect durations, it presents a problematic balance concern thats still not very easy to answer with a healthy curve in mind.

Yeah, unfortunately there isn't a formula for calculating how much fun players will have with a particular design.

PS. 1337 post!

Share this post


Link to post
Share on other sites

We need a common starting point for all defenses before the one-off defenses that do things like freeze, stun, and bubble, can be balanced. Otherwise you're using a measuring stick that you don't know the size of. You're results are going to be wrong. 

And there is absolutely no reason at all for defenses that have no other side effects and only deal damage to scale differently with speed. Unless you just want one to be inherently worse than the other. That is not good game design for 1 thing to arbitrarily be worse than the other.

Share this post


Link to post
Share on other sites
@tdb quote:
@xArcAngel quote:

But still, as you mentioned with the effect durations, it presents a problematic balance concern thats still not very easy to answer with a healthy curve in mind.

Yeah, unfortunately there isn't a formula for calculating how much fun players will have with a particular design.

PS. 1337 post!

And there in lies the difficulty lol. If only we could... Also, grtz.

@Hom-Sha-Bom quote:

We need a common starting point for all defenses before the one-off defenses that do things like freeze, stun, and bubble, can be balanced. Otherwise you're using a measuring stick that you don't know the size of. You're results are going to be wrong.

Agreed.

Share this post


Link to post
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
Sign in to follow this  

×
×
  • Create New...