Page 45 of 51

Re: [Engineer] The Workshop (builds, guides, and discussion)

Posted: Tue Mar 14, 2017 6:32 am
by Karast
Azarael wrote:If you're going to question the combat calculations, familiarise yourselves with viewtopic.php?f=11&t=879 and demonstrate that something is wrong using calculated result vs expected result.
That's what I am working on Aza! No disrespect intended but the numbers feel fishy especially ability to ability. The post talks clearly about melee dps, but does not talk about ranged dps, and as we all know on live engi was a mess with abilities that took contribution from many different stats on live.

Hopefully I will have a nice spreadsheet for you all. But is there a clearer explanation of the WS calculations in game? If I read this thread correctly. The only mention that thread has for WS is the brief phrase (ArmorMitigation =
TargetArmor%*(1-WeaponSkillArmorPenetration%)
Which would mean that if I had 75% armor mitigation, and the enemy 30% penetration from WS then my final armor mitigation should be around 45% unless if I am missing something? As we all know, that is simply not the case right now, and it is very easy to test.

Is there more going on?

Re: [Engineer] The Workshop (builds, guides, and discussion)

Posted: Tue Mar 14, 2017 10:26 am
by Azarael

Code: Select all

        private static void CheckArmorReduction(Unit caster, Unit target, AbilityDamageInfo damageInfo, bool toPrecalc)
        {
            float damageTypeResistance;

            float secondaryStat = caster.StsInterface.GetTotalStat(Stats.WeaponSkill);
            float pen = Math.Min(1f, secondaryStat / (7.5f * caster.EffectiveLevel + 50f) * 0.25f + caster.StsInterface.GetBonusStat(Stats.ArmorPenetration) * 0.01f);
            float penRes = target.StsInterface.GetBonusStat(Stats.ArmorPenetrationReduction) * 0.01f;

            if (penRes > pen)
                pen = 0;
            else pen -= penRes;

            int originalResistance = target.StsInterface.GetTotalStat(Stats.Armor) - damageInfo.GetArmorPenetrationForLevel(caster.EffectiveLevel);

            if (originalResistance <= 0)
                damageTypeResistance = 0;
            else
            {
                damageTypeResistance = originalResistance / (caster.EffectiveLevel * 44f) * 0.4f;
                damageTypeResistance *= 1f - pen;
                damageTypeResistance *= 1f - damageInfo.ArmorResistPenFactor;

                if (damageTypeResistance > 0.75f) //puts in hard cap for physical mitigation of 75%
                    damageTypeResistance = 0.75f;
            }

            if (toPrecalc)
            {
                damageInfo.PrecalcMitigation += (ushort)(damageInfo.PrecalcDamage * damageTypeResistance);
                damageInfo.PrecalcDamage -= (ushort)(damageInfo.PrecalcDamage * damageTypeResistance);
            }

            else
            {
                damageInfo.Mitigation += (ushort)(damageInfo.Damage * damageTypeResistance);
                damageInfo.Damage -= (ushort)(damageInfo.Damage * damageTypeResistance);
            }
        }
And yes, this is a separate function called by autoattack, ability damage, DoTs, whatever. There is only one place where this penetration is handled.

Re: [Engineer] The Workshop (builds, guides, and discussion)

Posted: Tue Mar 14, 2017 11:22 am
by Glorian
What is caster.effectivelevel ?

40 on a lvl 40 char?

Re: [Engineer] The Workshop (builds, guides, and discussion)

Posted: Tue Mar 14, 2017 11:37 am
by Azarael
EffectiveLevel is your career rank, or your bolstered rank if under bolster.

Re: [Engineer] The Workshop (builds, guides, and discussion)

Posted: Tue Mar 14, 2017 11:40 am
by Karast
Azarael wrote:

Code: Select all

        private static void CheckArmorReduction(Unit caster, Unit target, AbilityDamageInfo damageInfo, bool toPrecalc)
        {
            float damageTypeResistance;

            float secondaryStat = caster.StsInterface.GetTotalStat(Stats.WeaponSkill);
            float pen = Math.Min(1f, secondaryStat / (7.5f * caster.EffectiveLevel + 50f) * 0.25f + caster.StsInterface.GetBonusStat(Stats.ArmorPenetration) * 0.01f);
            float penRes = target.StsInterface.GetBonusStat(Stats.ArmorPenetrationReduction) * 0.01f;

            if (penRes > pen)
                pen = 0;
            else pen -= penRes;

            int originalResistance = target.StsInterface.GetTotalStat(Stats.Armor) - damageInfo.GetArmorPenetrationForLevel(caster.EffectiveLevel);

            if (originalResistance <= 0)
                damageTypeResistance = 0;
            else
            {
                damageTypeResistance = originalResistance / (caster.EffectiveLevel * 44f) * 0.4f;
                damageTypeResistance *= 1f - pen;
                damageTypeResistance *= 1f - damageInfo.ArmorResistPenFactor;

                if (damageTypeResistance > 0.75f) //puts in hard cap for physical mitigation of 75%
                    damageTypeResistance = 0.75f;
            }

            if (toPrecalc)
            {
                damageInfo.PrecalcMitigation += (ushort)(damageInfo.PrecalcDamage * damageTypeResistance);
                damageInfo.PrecalcDamage -= (ushort)(damageInfo.PrecalcDamage * damageTypeResistance);
            }

            else
            {
                damageInfo.Mitigation += (ushort)(damageInfo.Damage * damageTypeResistance);
                damageInfo.Damage -= (ushort)(damageInfo.Damage * damageTypeResistance);
            }
        }
And yes, this is a separate function called by autoattack, ability damage, DoTs, whatever. There is only one place where this penetration is handled.
Is this value the same for all physical damage? As in the same formula for AA, ability, and dots? Just from some easy testing it gets a bit wonky. On the same mob I can use AA / Blunderbuss / Gunblast, and get very different mitigation values with the same WS.

For example,
AA 125 (60 mitigated) for a total of 185 which is about ~32.3%
BB 344 (118 mitigated) for a total of 462 which is about ~25.6%
GB 721 (335 mitigated) for a total of 1056 which is about ~31.8%

On the same mob, with the same WS, what do we see such variation between mitigation values?

Right now my head math tells me that 40 WS is about 1.2-1.3% damage increase, which seems constant on all melee abilities I have tested so far. But ranged abilities get funky.

Re: [Engineer] The Workshop (builds, guides, and discussion)

Posted: Tue Mar 14, 2017 11:42 am
by Azarael
You realize that the mitigated value includes Toughness, right?

Re: [Engineer] The Workshop (builds, guides, and discussion)

Posted: Tue Mar 14, 2017 11:47 am
by Karast
Azarael wrote:You realize that the mitigated value includes Toughness, right?
yes.

Then is toughness mitigating abilities at different levels as well? Do instants, dots, casted, and melee / ranged get different values?

Re: [Engineer] The Workshop (builds, guides, and discussion)

Posted: Tue Mar 14, 2017 11:59 am
by Azarael
Toughness opposes the offensive stat, and the coefficient for the main stat varies between auto-attacks and abilities, and also between different abilities. The coefficient on AoE abilities is usually half the coefficient on direct abilities, so all of your examples have wildly varying coefficients.

Re: [Engineer] The Workshop (builds, guides, and discussion)

Posted: Tue Mar 14, 2017 12:01 pm
by Glorian
A question on math and have here.
Penetration is calculated as the following?


Original code:
float pen = Math.Min(1f, secondaryStat / (7.5f * caster.EffectiveLevel + 50f) * 0.25f + caster.StsInterface.GetBonusStat(Stats.ArmorPenetration) * 0.01f);

Simplified for lvl 40
//(7.5f * caster.EffectiveLevel + 50f) == ((7,5 * 40)+50) == 350

Simplified
//Operation with brackets. Penetration is: ( Weaponskill / (350 * 0,25) ) + ( Armor Penetration *0,01 )


End of simplification
// (Weaponskill / 87,5) + ( Armor Penetration *0,01 )

Re: [Engineer] The Workshop (builds, guides, and discussion)

Posted: Tue Mar 14, 2017 12:10 pm
by Karast
Azarael wrote:Toughness opposes the offensive stat, and the coefficient for the main stat varies between auto-attacks and abilities, and also between different abilities. The coefficient on AoE abilities is usually half the coefficient on direct abilities, so all of your examples have wildly varying coefficients.
good to know! thanks.

all in all though this makes WS wildly inefficient to stack. A 25% ignore tactic is pretty much the same as stacking around 800 WS. It's huge!