Incredible work! Thank you so much for spending the time and digging around the game code and extrapolating the formula for this. Content creators have always said that stacking defense beyond 4k was potentially pushing diminished returns and it's starting to look like they were pretty close to right on. Looks like it's fairly wasteful to build over 4.2k defense in most situations.
I really makes me wonder, specifically with my CB team, how much damage is truly being mitigated. I use 2 champs with 60% defense up so it never drops off. For someone like Rhazin, who I have built with 3400 defense (gets to ~3850 with the buff). Would it be worth trying to squeeze out that extra ~300 or so??
For someone like Rhazin, who I have built with 3400 defense (gets to ~3850 with the buff). Would it be worth trying to squeeze out that extra ~300 or so??
60% buff increases 3400 def to 5440. So there's not much to gain as damage reduction giving him more defense.
But champions like Rhazin who do damage based on def may benefit considerably from the extra def.
But to answer that we need to find the formula to calculate damage from skills and check if it's a linear increase or some other formula that also produces diminishing returns the higher you go.
Actually they're calculated off battle stats. There's a slight difference there, given that actual stats can change during battle (with certain skills etc.)
Just compare the damage Defense-based champion deal with/without Def buff. It's rougly 160% of the base damage, which would indicate the Buff applies to total stats.
Content creators have always said that stacking defense beyond 4k was potentially pushing diminished returns and it's starting to look like they were pretty close to right on.
On the contrary, this suggests that there isn't a magic number for where you should stop, it will depend on base hp/def on the champion.
Interesting take. The way I understood it (especially looking at the first graph) it appears that boosting Defense from 4200 to 6500 will only net you about a 4% reduction in damage. That seems pretty diminished to me.
t boosting Defense from 4200 to 6500 will only net you about a 4% reduction in damage.
The graph says it's 4 PP, which when going from 20% to 16% damage taken is a 20% damage reduction.
That seems pretty diminished to me.
It is, but it's diminishing gradually, the formula is made so that each point is ever so slightly worse than the previous one, meaning that while it's diminishing you cannot put a number on when it's no longer worth it to invest into, it will depend on your available gear and the champion.
That makes a ton of sense. You're definitely right, ANY additional defense is beneficial to all champs. I was just talking about the 'good enough' threshold where I wouldn't keep trying to get those high numbers. I'm ok with mitigating ~80% of incoming damage at 4200 Def. That's all I was trying (apparently very poorly) to convey :)
And suddenly Wurlim seems better: strengthen buff removes 25% of the damage received after defense, so, if you already have 85% mitigation, he would pushes it to 88,75%, being better in most high end teams than def up.
Can I ask, how have you found the game code? Unpacked the apk? I didn't know it produced that readable code. I'm a coder myself and I'd like to read raid's code.
Since Raid uses Unity, the gameplay is all likely implemented using scripting. I haven't ever looked into the specifics, but it wouldn't surprise me that it's possible to extract at least some of that.
Sweet! The community knows 4k-4.5k is the ideal amount of defense to aim for at end-game... but it's really cool to see why that is!
For where I'm currently at in the game... I really like seeing this, too, because seeing where the curve starts to level off a little tells me that if at all possible, getting my guys closer to 2k defense will really help my survival since it's somewhat in reach and gains level off a bit after that.
If we assume that the maximum Percentage you can get from artifacts is 324% (180% from bottom row, and 36% substat for each Helmet,Shield,Ring,Banner) then we can conclude that to reach the desired 4.240 DEF we would need a Champion to have at least 1.000 Base Defense (in FULL 324% DEF Gear).
Further assuming that the "cost" of getting such gear doubles with each aquired piece. The imagined cost of this full DEF gear would be at 2^7 = 128
This leads to the conclusion that getting a 1.500 Base DEF to our desired 80% Mitigation we would need 3 DEF Pieces (180%) and thus creating a "cost" of 8.
While doing the same for a 1000 Base DEF Champion would require a whopping cost of 128.
In my eyes getting any Champion with a lower Base Defense than approximately 1.300 to the desired 80% would require insane amount of ressources.
Of course I am neglecting buffs and auras.
On a side Note:
If you have a Champion with a 33% DEF AURA and a constant 60% DEF UP you would only need a mere 2000 Defense to reach the 80%.
Awesome! Now I can decide based on how munch defense all my team has if it's worth putting a Def Up champion or not. Also, the calculators are going to be accurate!
That's pretty cool. I am studying Software Development and I find it interesting to dig in a game's source code to find out, how the developers implement stuff. I wanted to try that with raid to find out how turnmeter works or what multipliers certain abilities have, but I assumed, it's all server-side and I can't access that code. Would be fascinating to learn, how you did it.
My Maulie with 5349 is way overkill. I see a way to drop that to about 4200 while giving me additional 9K HP and 35-40 speed - seems like a no brainer. Guess I will give that a try tomorrow during the Artifact event. Fortunately, I don't have anyone else above 4200.
Given how much Increase Def I run, 4200 may still be too high.
Valk is a very rare, (and now we can see why she's a Lego, besides the obvious) exception. Although the defense past 4k is diminished return territory, her shield isn't, since it's based on her defense. So it sort of balances. She may be the only exception though.
Huh, I always just thought it was just (DEF / 600) * HP = EHP.
Your results are somewhat close up until ~75% DR but still a sizeable difference. Dunno how the last dude who tested it found the above heuristic formula. Notably, your results show a slight, accelerating diminishing return on EHP gain as defense rises, with an absolute cap of 85%, whereas the above formula is strictly linear. I think what that didn't take into account is the apparent absolute cap of 85% damage reduction.
Also curious how yoiu think this affects gearing strategies, if at all. The nature of DMG% reduction largely offsets the apparent diminishing returns from increased defense, for example, the difference between 50% DR and 75% DR is equivalent to the difference between 98% and 99% DR, in terms of the amount of damage a champion can survive (i.e. the 25% damage taken is half of 50% damage taken, likewise 1% damage taken is half of 2% damage taken, meaning you can survive twice as much damage despite only going up 1% DR).
Or to put it another way, the absolute value of the damage mitigated with a 1% DR gain will always be the same, but the value of that amount of damage reduction varies considerably in terms of the total damage a champion can survive.
So there seems to be some initially low but accelerating diminishing returns in terms of gain in EHP from an equivalent amount of defense as current defense rises. It takes 1330 defense to halve damage from 0% DR (0% to 50% DR, or 100% damage taken to 50% damage taken), compared to 1880 defense to halve damage from 50% DR (50% to 75% DR, or 50% damage taken to 25% damage taken). This effect accelerates to infinity as you approach 85% DR. To halve the damage taken from 32% to 16% requires over 4000 addtional defense and to go from just 16% to 15% appears to be impossible.
General sense I'm getting is to not even consider dimishing returns until ~3200 defense, then consider them somewhat up until about ~4200 defense, and basically only go beyond that if you have a defense champ you want to deal more damage.
It's different because you cannot use interpolation of points to exactly predict a logarithmic function. That's why we have derivatives and integration. The method they used is still valid to theorize with "rough" data.
24
u/clintstoner13680 May 21 '20
Incredible work! Thank you so much for spending the time and digging around the game code and extrapolating the formula for this. Content creators have always said that stacking defense beyond 4k was potentially pushing diminished returns and it's starting to look like they were pretty close to right on. Looks like it's fairly wasteful to build over 4.2k defense in most situations.
I really makes me wonder, specifically with my CB team, how much damage is truly being mitigated. I use 2 champs with 60% defense up so it never drops off. For someone like Rhazin, who I have built with 3400 defense (gets to ~3850 with the buff). Would it be worth trying to squeeze out that extra ~300 or so??
7
u/gpfaca May 21 '20
And suddenly Wurlim seems better: strengthen buff removes 25% of the damage received after defense, so, if you already have 85% mitigation, he would pushes it to 88,75%, being better in most high end teams than def up.
lul
6
u/alt-find-user-name May 21 '20
Can I ask, how have you found the game code? Unpacked the apk? I didn't know it produced that readable code. I'm a coder myself and I'd like to read raid's code.
4
u/Caeremonia May 21 '20
Where did you get the source code?
2
u/CheTranqui May 21 '20
Sweet! The community knows 4k-4.5k is the ideal amount of defense to aim for at end-game... but it's really cool to see why that is!
For where I'm currently at in the game... I really like seeing this, too, because seeing where the curve starts to level off a little tells me that if at all possible, getting my guys closer to 2k defense will really help my survival since it's somewhat in reach and gains level off a bit after that.
Thanks for the analysis and sharing the data!
2
u/adammaxis Demonspawn May 21 '20
Excellent work! I've updated my Damage Calculator to factor in this datamined damage mitigation formula.
2
u/MaxMeng77 May 22 '20 edited May 22 '20
Absolute Pog. I've tested the formula with my 1006 data points. They say the formula is correct. XD
3
u/salaraj May 21 '20 edited May 21 '20
This is really interesting.
If we assume that the maximum Percentage you can get from artifacts is 324% (180% from bottom row, and 36% substat for each Helmet,Shield,Ring,Banner) then we can conclude that to reach the desired 4.240 DEF we would need a Champion to have at least 1.000 Base Defense (in FULL 324% DEF Gear).
Further assuming that the "cost" of getting such gear doubles with each aquired piece. The imagined cost of this full DEF gear would be at 2^7 = 128
This leads to the conclusion that getting a 1.500 Base DEF to our desired 80% Mitigation we would need 3 DEF Pieces (180%) and thus creating a "cost" of 8.
While doing the same for a 1000 Base DEF Champion would require a whopping cost of 128.
In my eyes getting any Champion with a lower Base Defense than approximately 1.300 to the desired 80% would require insane amount of ressources.
Of course I am neglecting buffs and auras.
On a side Note:
If you have a Champion with a 33% DEF AURA and a constant 60% DEF UP you would only need a mere 2000 Defense to reach the 80%.
1
u/Shyiro64 May 21 '20
Awesome! Now I can decide based on how munch defense all my team has if it's worth putting a Def Up champion or not. Also, the calculators are going to be accurate!
1
u/Snootet May 21 '20
That's pretty cool. I am studying Software Development and I find it interesting to dig in a game's source code to find out, how the developers implement stuff. I wanted to try that with raid to find out how turnmeter works or what multipliers certain abilities have, but I assumed, it's all server-side and I can't access that code. Would be fascinating to learn, how you did it.
1
u/MassiveClingOn May 21 '20
My SS has 4063 defence then her aura on top
Shall I drop her defence now so her aura takes her to 4000.
1
u/skipjack_sushi May 21 '20
4200 it is then.
Edit: lol numbers.
1
u/KiraGR May 21 '20
Thanks, this is a great help. It is especially important for Clan boss tuned champions since they won't get defense down.
1
u/lordb4 Seer May 21 '20
My Maulie with 5349 is way overkill. I see a way to drop that to about 4200 while giving me additional 9K HP and 35-40 speed - seems like a no brainer. Guess I will give that a try tomorrow during the Artifact event. Fortunately, I don't have anyone else above 4200.
Given how much Increase Def I run, 4200 may still be too high.
1
u/derplololol May 21 '20
Also wondering how you access the code. Did you decompiled the Android version?
1
u/Disidente76 May 22 '20
Valk is a very rare, (and now we can see why she's a Lego, besides the obvious) exception. Although the defense past 4k is diminished return territory, her shield isn't, since it's based on her defense. So it sort of balances. She may be the only exception though.
1
u/theDEVIN8310 May 22 '20
Does damage done by defense champions scale this exact same way?
1
u/voyaging May 22 '20 edited May 22 '20
Huh, I always just thought it was just
(DEF / 600) * HP = EHP.Your results are somewhat close up until ~75% DR but still a sizeable difference. Dunno how the last dude who tested it found the above heuristic formula. Notably, your results show a slight, accelerating diminishing return on EHP gain as defense rises, with an absolute cap of 85%, whereas the above formula is strictly linear. I think what that didn't take into account is the apparent absolute cap of 85% damage reduction.
Also curious how yoiu think this affects gearing strategies, if at all. The nature of DMG% reduction largely offsets the apparent diminishing returns from increased defense, for example, the difference between 50% DR and 75% DR is equivalent to the difference between 98% and 99% DR, in terms of the amount of damage a champion can survive (i.e. the 25% damage taken is half of 50% damage taken, likewise 1% damage taken is half of 2% damage taken, meaning you can survive twice as much damage despite only going up 1% DR).
Or to put it another way, the absolute value of the damage mitigated with a 1% DR gain will always be the same, but the value of that amount of damage reduction varies considerably in terms of the total damage a champion can survive.
So there seems to be some initially low but accelerating diminishing returns in terms of gain in EHP from an equivalent amount of defense as current defense rises. It takes 1330 defense to halve damage from 0% DR (0% to 50% DR, or 100% damage taken to 50% damage taken), compared to 1880 defense to halve damage from 50% DR (50% to 75% DR, or 50% damage taken to 25% damage taken). This effect accelerates to infinity as you approach 85% DR. To halve the damage taken from 32% to 16% requires over 4000 addtional defense and to go from just 16% to 15% appears to be impossible.
General sense I'm getting is to not even consider dimishing returns until ~3200 defense, then consider them somewhat up until about ~4200 defense, and basically only go beyond that if you have a defense champ you want to deal more damage.
1
u/TrashNotTrash45 May 22 '20
Just a heads up that SALT stole your post and used it to make a trash clickbait video, might want to take action.
1
u/Turangaaa May 21 '20
Very nice work!
1
u/xNukkinFutzx May 21 '20
Great job, thanks!
0
u/[deleted] May 21 '20
This is what the defense mitigation formula was estimated to be, I'm too lazy to look right now but how accurate was it to the actual one?