Generalized Durability, Damage Reduction Equation, & Regeneration Formula in Diep.io

Note : It's recommended to read my earlier posts, if you didn't have it already, to understand this one, cause I wanna keep this one short.

Today I give you the generalized expressions for health, durability and damage reduction. But before that I'm gonna define some symbols we will mess around with.

Let's start with Durability {D}:

We know form lw318 the durability formula for tanks and bullets.

for tanks : D = 1/4 * MH * BS

for bullets : D = Bf * DM * PP

Our goal is now to find an expression which includes both of the above equations. We could for example try to rewritte the durability with damage per loop and see what happens.

D = 1/4 * MH * BS

the DPL of tanks are :

DPL = 20 * BS

→ BS = DPL/20

plugging this in and rewritte MH as GH gives us

D = 1/80 * DPL * GH

This is the general durability for every tank and shape in the game

Now we need to check if we can reach the same formula from the bullet durability :

(3) D = Bf * DS * PP

In order to rewritte this we use the other two formulas about bullets :

(1) BP = 20 * Pf * PP with Pf = Bf/Df

and

(2) DPL = 4 * Df * DS

rewritting (1) :

BP = 20 * Bf/Df * PP

→ PP = BP * Df / (20 * Bf)

rewritting (2) :

DS = DPL / (4 * Df)

Now again plugging everything into (3) gives us :

D = Bf * DPL / (4 * Df) * BP * Df / (20 * Bf)

→ D = Bf * DPL * BP * Df / (4 * Df * 20 * Bf)

You can see that Df and Bf cancels out and 20 * 4 = 80 in the denominator :

D = 1/80 * DPL * BP and with BP = GH

→ D = 1/80 * DPL * GH

We got the same expression as before but this time for bullets. This means we've found an general equation for the durability of an object in the game.

To get the general health equation just rewritte the upper one :

GH = 80 * D / DPL

The general health is inverse proportional to the DPL.

"What's the point of this?", you may ask. Before those equations we needed to know actual stat numbers for bullets damage and bullet penetration to calculate the health of object. This is especially difficult for bosses since we can't see their stat table. With the new equations we only need to now how much damage they deal per loop and how durable the projectiles are. You can get the durability by comparing it to something we can calculate the duability of.

Moving on to the general damage reduction equation. I already posted on the wikia the damage reduction equation for tanks and shapes but it's not general enough cause bullets have an different one.

To get the general we simply use the fundamental equation of collision mechanics :

GH_L = GH'' * DPL'' / DPL

With increased DPL the damage we take from an opponent decreases. So we wanna see how the ratio between the damage we receive behaves, if we have the lowest possible DPL or simply base DPL (DPL°) and if we have higher DPL's.

We're basically interested in that term :

GH_L / GH_L°

This is the ratio between the damage taken. It can never be greater than 1 cause GH_L° > GH_L. The reason for this is that the we take the most damage (GH_L°) if we have the lowest possible DPL (DPL°). With that in mind let's begin.

First we express GH_L° and GH_L :

GH_L° = GH'' * DPL'' / DPL°

GH_L = GH'' * DPL'' / DPL

The ratio between those two would be :

GH_L / GH_L° = (GH'' * DPL'' / DPL) / (GH'' * DPL'' / DPL°)

→ GH_L / GH_L°= (DPL° * GH'' * DPL'') / (DPL * GH'' * DPL'')

GH'' and DPL'' cancels so we're left with :

GH_L / GH_L° = DPL° / DPL

Now the general damage reduction equation is just :

dr = 1 - DPL° / DPL

The reason for the 1 - is simple. I'll demonstrate it with an example.

Let's take an basic bullet with D = 17,5S ← S for squares

It will deal 175HP damage to a square but only 70HP damage to a tank with 0 body damage points. I we take the ratio with GH_L° = 175 and GH_L = 70 we get 70 / 175 = 0.4. It means that the tank would only receive 40% of the damage the square would.

But the damage reduction is 60% hence 1 - 0.4 = 0.6. That's why we need to take 1 - DPL° / DPL to get the damagereduction of an object.

Last I clarify what the base DPL° is supposed to mean. Based on what you use as point of reference the equation will change. It's logical to use for the tank and shapes the lowest possible DPL that you can find in the game. That of an square or triangle with DPL = 8HP. But if you choose your DPL° as that of your tanks with 0 body damage points you end up with a new relation between the DPL's. I choose in case of tanks/shapes the lowest possible and for bullets as a reference point an 0dm and 0bp basic bullet

damage reduction tanks/shape :

dr = 1 - DPL° / DPL with DPL = 20 * BS and DPL° = 8HP

→ dr = 1 - 8 / (20 * BS)

→ dr = 1 - 4 / (10 * BS) ← the one from the wikia

damage reduction bullets :

dr = 1 - DPL° / DPL with DPL = 4 * Df * DS and DPL° = 7

→ dr = 1 - 7 / (4 * Df * DS)

with basic's Df = 2.5 :

→ dr = 1 - 7 / (10 * DS)

Sidenote : Damage reduction is just a sideeffect of the collision mechanics in the game. Nothing really takes less damage due to a reduction it's just because of a higher DPL.

For all of you who haven't seen it yet :

RR = 1/30 * MH * (0.03 + rr * 0.12)

This is the regeneration per second. The Hyperregeneration always accurs after 30s of normal regeneration. The above formula tells you how much you regenerate until the 30s are over. If you have 0 rr you get 3% of your health back in that time. For every extra point put into RR you gain +12% to the 3% you already have.

Small funfact: If you're playing a smasher with 9 rr or more you will never have the hyperregen cause you will regenrate your entire health faster than in 30s.