[b34] bad resistance calculation

Where bugs go to lie down and rest

Moderator: Moderator

Message
Author
lukep
Sher'Tul Godslayer
Posts: 1712
Joined: Mon Mar 14, 2011 10:32 am
Location: Canada

[b34] bad resistance calculation

#1 Post by lukep »

I have a Yeek Doomed that is not getting the full effect of Harkor'Zun's Gauntlets. It is getting about +7% resist physical and +15% resist acid from them, instead of +10 and +20, respectively.
Some of my tools for helping make talents:
Melee Talent Creator
Annotated Talent Code (incomplete)

edge2054
Retired Ninja
Posts: 3756
Joined: Fri May 28, 2010 4:38 pm

Re: [b34] bad resistance calculation

#2 Post by edge2054 »

When you stack resist all with regular resistance you get diminishing returns.

Talonj
Higher
Posts: 54
Joined: Sun Sep 04, 2011 9:23 am

Re: [b34] bad resistance calculation

#3 Post by Talonj »

The fact that this isn't told to the player anywhere is still a bug... At least I didn't read that anywhere.

Final Master
Sher'Tul
Posts: 1022
Joined: Fri May 21, 2010 8:16 pm
Location: Inside the minds of all
Contact:

Re: [b34] bad resistance calculation

#4 Post by Final Master »

?? When did that happen? And frankly, why? With con being nerfed, why do this as well?
Final Master's Character Guides
Final Master's Guide to the Arena
Edge: Final Master... official Tome 4 (thread) necromancer.
Zonk: I'd rather be sick than on fire! :D

edge2054
Retired Ninja
Posts: 3756
Joined: Fri May 28, 2010 4:38 pm

Re: [b34] bad resistance calculation

#5 Post by edge2054 »

Final Master wrote:?? When did that happen? And frankly, why? With con being nerfed, why do this as well?
Five months ago. It was in a change log. But yeah the tooltips could probably say so.

Here another way of looking at it....
[11:29] drquicksilver suppose the attack was supposed to do 200 damage
[11:29] drquicksilver resist all reduces it to 160 (20%)
[11:29] drquicksilver then resist specific reduces it to 120 (25% off of 160)
[11:29] drquicksilver which is, indeed, 40% total
[11:29] drquicksilver multiplicative stacking is "logical" to my mind.
The diminishing returns formula simplifies this so when resistance is actually called it can just check your total resist of that type.

For those that want the specifics...

Where a and b equal resist all and resist type. (for those who don't know lua math.min means it takes the lower of the two values)

Code: Select all

	local r = math.min(100 * (1 - (1 - a) * (1 - b)), (self.resists_cap.all or 0) + (self.resists_cap[type] or 0))

Grey
Loremaster
Posts: 3517
Joined: Thu Sep 23, 2010 10:18 pm
Location: London, England
Contact:

Re: [b34] bad resistance calculation

#6 Post by Grey »

Then the tooltip for resist all simply needs to say something along the lines of "Stacks multiplicatively with other sources" or "Applied before other resistances are calculated".
http://www.gamesofgrey.com - My own T-Engine games!
Roguelike Radio - A podcast about roguelikes

lukep
Sher'Tul Godslayer
Posts: 1712
Joined: Mon Mar 14, 2011 10:32 am
Location: Canada

Re: [b34] bad resistance calculation

#7 Post by lukep »

In that case, I think that the display should be changed, from:
Resist all: 30%
Resist Physical: 37%

to:
Resist all: 30%
Resist Physical: 10%


or something like that. This would clearly show the relationship, at the cost of requiring some calculations to be done by the player.
Some of my tools for helping make talents:
Melee Talent Creator
Annotated Talent Code (incomplete)

Talonj
Higher
Posts: 54
Joined: Sun Sep 04, 2011 9:23 am

Re: [b34] bad resistance calculation

#8 Post by Talonj »

None of those explainations make any sense to me.

In the irc explanation, is the character supposed to have 40% resist physical? So are you trying to imply that resist all does -NOTHING- because natural resistances, if higher, will be substituted?

Or does the character have 20% resist all, and 25% resist physical, and the display simply shows 40%?

An example without explanation of what the example is actually an example of is... not an example.

edge2054
Retired Ninja
Posts: 3756
Joined: Fri May 28, 2010 4:38 pm

Re: [b34] bad resistance calculation

#9 Post by edge2054 »

Sorry Talonj.

Say you have 20% resist all and 10% acid resistance and get hit for 1000 acid damage.

After resist all you take 800 (-1000 * 0.2 or 200).

After acid resist you take 720 (-800 * 0.1 or 80).

In other words, resist all and elemental resist are like an onion. They're not really additive. Your acid resist will only reduce the damage that gets past your resist all. You don't check each by themselves and then add the reduction together.

I like Luke's suggestion. But I think we'd need a way to communicate how the resist cap works too. The player doesn't really have a type based resist cap it's just converted into that for ease of digestion. What you really have is a resist all cap that can be modified by type. Your resist all cap is 70 and when you increase an elemental resist cap you're actually giving yourself the value as an added bonus to your resist all cap when resisting that damage type.

So cap resists = 70. Physical resist + resist all = 140 (70 each / 91% resistance total after diminishing returns). Increasing your resist physical cap at this point will directly increase the percentage you resist because the formula takes the lower of the two values. In other words 91% or 70%, which ever is lower. If we add 5% to the 75% it's now 91% or 75%.

So if we changed it to lukes display without figuring out a better way to explain it to players they may hit something like 60% resist all / 60% resist physical and think that adding more resists is still doing them good because of the 70% resist cap display (it's not, they're total resist at this point is 84% and adding 5% more to either of their resists would do nothing; but adding 5% to their resist cap would increase the amount of damage they're resisting directly by 5%).

Maybe the resist cap could be converted to be more honest as well? So you'd have resist all cap and then the rest of the resists would have blank fields that would add (+5% cap for this damage type) or something when you raised your caps.

Rectifier
Archmage
Posts: 386
Joined: Mon Aug 29, 2011 8:06 am

Re: [b34] bad resistance calculation

#10 Post by Rectifier »

I read this and got more confused edge :s

Grey
Loremaster
Posts: 3517
Joined: Thu Sep 23, 2010 10:18 pm
Location: London, England
Contact:

Re: [b34] bad resistance calculation

#11 Post by Grey »

Yeah, well done Edge ;)
http://www.gamesofgrey.com - My own T-Engine games!
Roguelike Radio - A podcast about roguelikes

Gliktch
Thalore
Posts: 146
Joined: Mon Sep 05, 2011 10:07 am

Re: [b34] bad resistance calculation

#12 Post by Gliktch »

Perhaps if Resist All were renamed something like Damage Absorption or Total Damage Reduction (anything like that which doesn't use the word Resist) it could be easier to make it clear?

Just spitballing here..

As I understand it from this thread, if I have the following resists:

All: 10%
Acid: 60%
Fire: 25%
Cold: 43%

And I get hit with 100 acid, 100 fire, 100 cold, then my damage taken would be:

Acid: 100dmg - (100 x 0.60) = 40, 40 minus (40 x 0.1) = 36dmg
Fire: 100dmg - (100 x 0.25) = 75, 75 minus (75 x 0.1) = 67.5dmg
Cold: 100dmg - (100 x 0.43) = 57, 57 minus (57 x 0.1) = 51.3dmg

I hope that this is both correct and understandable :)

Grey
Loremaster
Posts: 3517
Joined: Thu Sep 23, 2010 10:18 pm
Location: London, England
Contact:

Re: [b34] bad resistance calculation

#13 Post by Grey »

Correct. It also doesn't make a difference if you apply the resist all first instead.

I don't see why we don't have them just stack normally. It's much clearer and damage wise doesn't make a huge difference.
http://www.gamesofgrey.com - My own T-Engine games!
Roguelike Radio - A podcast about roguelikes

edge2054
Retired Ninja
Posts: 3756
Joined: Fri May 28, 2010 4:38 pm

Re: [b34] bad resistance calculation

#14 Post by edge2054 »

Aside from my first example last night, all my other ramblings where in relation to lukep's suggested change.

ie.

resist cap - 70
resist all - 30
acid resist - 10 (+5 resist cap)


All I was really trying to get at is that if we changed the display over the luke's suggestion we'd want to break down the resist cap into a more honest approach. Because with his suggestion 40 resist all and 40 acid resist would be over the cap.

Rectifier
Archmage
Posts: 386
Joined: Mon Aug 29, 2011 8:06 am

Re: [b34] bad resistance calculation

#15 Post by Rectifier »

I don't care what you guys do so long as I don't have to integrate some function to figure it out.

Post Reply