I am a middelman again between two developers, and im interested to make this working aswell
Originally Posted by QuadroTony
what about to show some stats in persents? like this
like Garkin did
Originally Posted by Garkin
Originally Posted by QuadroTony
Garkin
can you told me - this value also must be shown in %?
and how to calculate this percents for it?
Rating for spell penetration and armor penetration should be the same. The Apprentice mundus stone grants 5% of spell penetration which is for VR14 character 3200 spell penetration rating.
if(statType == STAT_CRITICAL_STRIKE or statType == STAT_SPELL_CRITICAL)then
percentage = GetCriticalStrikeChance(value, true)
elseif(statType == STAT_SPELL_RESIST or statType == STAT_PHYSICAL_RESIST)then
percentage =(value - 100)/((GetUnitLevel("player") + GetUnitVeteranRank("player"))*10)-- value -100 because all characters starts with base value 100 armor/spell penetration.
elseif(statType == STAT_SPELL_PENETRATION or statType == STAT_PHYSICAL_PENETRATION)then
percentage = value /((GetUnitLevel("player") + GetUnitVeteranRank("player"))*10)
Hey QuadroTony,
I'm not sure if the formula proposed by Garkin is right. I'm afraid it isn't for Physical Resistance and Spell Resistance. Explanation follows:
My equipped armor (all pieces at vet rank 2, heavy):
hand - Gauntlets of Vampire's Kiss - 938,
chest - Whitestrake's Cuirass - 1876,
legs - Whitestrake's Greaves - 1854,
head - Whitestrake's Helm - 1641,
shoulders - Whitestrake's Pauldron - 1854,
feets - Whitestrake's Sabatons - 1641
waist - Girdle of Vampire's Kiss - 703
Armor sum: 10507 - that's also Physical Resistance value (so your assumption that armor is now named Physical Resistance is right)
My Spell Resistance is 11812 (10507 armor + 1305 bonus from Whitestrake's Set)
Now I will spend 1 champion point at The Lord - Heavy Armor Focus: "Increases Your Physical Resistance by 1% while wearing 5 or more pieces of heavy armor.". After that my Physical Resistance increased to 10612, 10612 - 10507 = 105 which is 1% of 10507.
Now let's calculate it using Garkin's formula (I'm at vet rank 6):
1% of Physical Resistance = (50 + 6) * 10 = 560, not true, should be 105
10507 / 560 = 18.76%, 10612 / 560 = 18.95%, 18.95 - 18.76 = 0.19%, so my Physical Resistance increased by 0.19%, that's wrong, you can't calculate it like that.
[Edit]
Another test with "Defending" trait on a weapon ("Increases Physical and Spell Resistance by 4%"). Before 10507, after 10927, increased by 420 = 4% of 10507.
[Edit 2]
Yet another test with "Sharpened" trait on a weapon ("Increases Armor and Spell Penetration by 6%"). For this test I'm naked, all champion points reset, all skills reset. At this point my Armor Penetration and Focus Rating are 100. After equipping the weapon - nothing changes.
Another try, now with a plain Cuirass (1972 armor, no trait, no enchantment). My base Armor Penetration and Focus Rating are again 100. After equipping the weapon - 119 and 119.
Another try with 3 pieces of Whitestrake's Set (1305 Spell Resistance bonus), Physical Resistance: 5349, Spell Resistance: 6654. Base Armor Penetration and Focus Rating are again 100. After equipping the weapon - 153 and 166.
So it looks like with the weapon equipped it adds 1% of Spell Resistance to Focus rating and 1% of Physical Resistance to Armor Penetration. Again Garkins formula fails bacause (AP) 153/((50+6)*10) = 0.27%
[Edit 3]
Upgraded the weapons, now it says: "Increases Armor and Spell Penetration by 8%" but it shows same values as before: 153 and 166.
My conclusion: I can't use Garkins formula because I can't confirm that values it produces are accurate. My test with Armor and Spell Penetration shows that there is another variable that need to be taken into account. Of course there is also a chance that the values returned by stats funcions are wrong, but then we can't invent formulas based on wrong data.