Physical Damage [mechanics]

Started 2 May 2021
by gruenesschaf
in Wiki Pages
This is a draft for now, some more sections and some formulas will follow soonish.

What does speccing in a weapon line do?
Speccing in a weapon line gives you access to new styles. Every point, regardless of base skill, bonus skill from items or bonus skill from realm rank, reduces the chance to miss by 0.5% per spec point. Every single skill point in a dual wield line increases your chance to hit with the offhand. For savages every single skill point in h2h raises the chance to have a dual/triple/quad hit.

The soft cap of useful weapon skill for base damage is a total skill of enemy level +2, e. g. 52 against level 50 opponents. Up to this soft cap every point, regardless of the source, raises your minimum and maximum damage, this increase does not affect the damage cap. Every skill point, regardless of the source, up to the soft cap also has an effect on enemy defense (this mechanic is called defense penetration).

Every single skill point raises the damage bonus from styles of that line, the skill soft cap does not apply. This combined with the soft cap above is why in case of dual wield classes popular specs have the modified base weapon spec (e. g. slash, sword, blades) at 52 and then spec 50 in their dual wield line. This results in the same damage as a 50/50 spec against level 50 opponents as long as you only ever use styles from the dual wield line.

For 2h weapons only, every point in the 2h spec (in case of Midgard including sword/hammer/axe) raises the weapon dps (meaning it does also raise the damage cap). This mechanic is called the two handed bonus, the skill soft cap does not apply.

Only for albion 2h specs a 33% damage penalty exists which is nullified once the base weapon skill (e. g. slash in case of 2h sword) is at the soft cap, this mechanic is called the albion dual spec penalty, going beyond the soft cap does not turn this into a bonus, it's at most just nullified. This penalty does not affect the damage cap.

Archer specs have an extra damage multiplier that is not affected by the soft cap and bows also count as two handed weapons.


Swing speed / Quickness
For the swing speed calculation the quickness cap is 250. Going over 250 quickness still increases your evade chance (if your class can evade).

The effective swing speed cap is 1.5 seconds. Overcapping does not result in a damage penalty.

There are 2 forms of haste buffs, haste and celerity, both are functionally equivalent, stacking behavior is additive. Buffs and debuffs are substracted from one another, e. g. +18% haste and -17% haste is the same as having +1% haste. The friar, warden and savage self haste buffs are short duration haste buffs, they can coexist with long duration haste buffs, e. g. with the buff potion haste, the higher of these haste buffs will be active then.

Changes to the effective swing speed, e. g. via haste / quickness, do not change your base damage but do affect the bonus damage done by styles. Stealth opener style bonus damage is not affected by swing speed.

In case of dual wielder, for an attack round where both weapons swing (always in case of berserker, shadowblade) the average of both base weapon speeds is used as the base weapon speed, the swing speed change from this mechanic does not affect the style bonus damage. This mechanic is called the la(/dw/cd) haste effect. E. g. with a 4.0 MH and 2.0 OH you would have the same swing delay as if you had only a single 3.0 weapon after attack rounds where both weapons swing.


Unstyled / Base Damage
Clamped Weapon DPS: Capped at 16.2 at 50, 16.5 at 50 and RR5 -> (1.2 + 0.3 * Level) * (Quality / 100)

Effective Weapon Damage:
var twoHandedBonus = input.TwoHandedBonus.apply ? 1.1 + input.TwoHandedBonus.twoHandedSpec * 0.005d : 1d;

var dps = input.ClampedWeaponDps * input.WeaponSpeed * 10;
dps *= 0.94d + input.WeaponSpeed * 0.03;
dps *= 1 + 0.01 * input.MythicalDps;
dps *= twoHandedBonus;
dps *= 1 + 0.01 * input.MeleeDamage;
dps /= 10;

return dps;


Enemy Armor
Enemy armor is probably the least intuitive part of the whole physical damage stuff. Physical attacks always and only hit a single armor piece which means that single armor piece is the only thing that matters (ignoring stat gains that could affect it) for damage purposes of that one attack.

For the code below, level50BaseAf is 45, this is also called the inherent AF. BonusAF is pretty much toa af, buffDebuff is the final result of spec af and af debuffs. AmorAF is the the actual armor af * quality + 1/5th of potential base af spells of the armor piece that was hit, capped at level * 2 (102 at level 50 and rr5). ItemAbsorb is the absorb value of the hit armor piece: 0 for cloth, 0.1 for leather, 0.19 for studded, 0.27 for chain, 0.34 for plate.
Level 50 RR5 caster with self af up and mp cloth would have 101 armorAf: 51 from the actual armor + 250/5 = 50 from their self af buff. Everyone else at level 50 and rr5 would have 102 armor af in mp armor or with base af. Note that enemy armor is not affected by absorb buffs, those are used later in the damage modifier formula, enemy armor only deals with the actual absorb which only depends on the armor type of the hit piece.

var afBeforeItemAbsorb =
level50BaseAf / 50d * level
+ armorAf
+ buffDebuff / 5d
+ bonusAf / 5d;

return afBeforeItemAbsorb / (1d - itemAbsorb);


Damage Modifier
For players and many mobs the damage modifier cap is 3, we show this damage modifier ingame on every attack as long as /combatinfo has not been disabled. Ingame this modifier is multiplied by 1000 making 3000 the normal cap. High level mobs, especially epic and pve instance mobs but also challenge mode mobs can have a higher cap.

For the code below, weapon skill multiplier is usually 1, that's affected by wskill buffs / debuffs. Stats are either strength / 2, dex / 2 or (strength + dex) / 2 / 2 depending on the weapon. NpcAbsorbFromStats is the absorb value mobs gain from dex and con. ExtraMultiplier is only used in PvE for the level based difference between the target and attacker. Note that this extra multiplier is capped at the player level for pets when they attack other players or pets making higher level pets weaker than those found in the wild. Variance ranges from 0 to 50 and is entirely random, at server launch it was always 25, that's the melee variance.

var targetLevelOrSpec = Math.Min(input.TargetLevel + 1d, input.Spec - 1d);

double damageModifier = input.AttackerLevel == 0 ? .5 : input.AttackerLevel;
damageModifier *= input.DamageTable / 10d * input.WeaponSkillMultiplier;
damageModifier *= 1 + 0.01d * input.Stats * input.WeaponSkillMultiplier;
damageModifier *= 1 + input.RelicBonus / 100d;
damageModifier *= 0.75d + 0.5d * (targetLevelOrSpec / (input.TargetLevel + 1d)) + 0.01d * input.Variance;
damageModifier /= Math.Max(1, input.EnemyArmor);
damageModifier *= 1d - input.AbsorbBuff / 100d;
damageModifier *= 1d - input.NpcAbsorbFromStats / 100d;
damageModifier *= 1d - input.TotalResist / 100d;
damageModifier *= input.ExtraMultiplier;

if (input.AlbionDualSpec.apply)
{
damageModifier *= (2d + Math.Min(1d, (input.AlbionDualSpec.baseWeaponSpec - 1d) / (input.TargetLevel + 1d))) / 3d;
}

if (input.TargetIsSitting)
damageModifier *= 2.5;

return damageModifier;

Actual unstyled damage
With all the requirements out of the way, the actual unstyled damage is then pretty simple: effective weapon damage * damage modifier.
In most cases the damage modifier is capped at 3 (ingame shown as 3000).
The probably most notable fact of the unstyled damage calculation is that haste buffs / debuffs have no effect on it.



Our physical damage is largely based on the formulas found here: https://camelotherald.fandom.com/wiki/Melee_Damage, which in turn are largely based on research / testing done by a player called Vanesyra, example: https://www.ignboards.com/threads/melee-speed-melee-and-style-damage-or-why-pure-grothrates-are-wrong.452406879/ and were then further augmented by our own testing as well as some custom adjustments.
Mon 3 May 2021 12:41 AM by skipari
gruenesschaf wrote:
Sun 2 May 2021 11:18 PM
There are 2 forms of haste buffs, haste and celerity, both are functionally equivalent, stacking behavior is additive. Buffs and debuffs are substracted from one another, e. g. +18% haste and -17% haste is the same as having +1% haste. The friar, warden and savage self haste buffs are celerity.

I assume that is just a typo and those actually count as haste?, else that would mean it should stack with i.e. a buffed haste from something like the combined pot?
Mon 3 May 2021 1:03 AM by gruenesschaf
skipari wrote:
Mon 3 May 2021 12:41 AM
I assume that is just a typo and those actually count as haste?

Yep
Mon 3 May 2021 6:05 AM by Adwaenyth
gruenesschaf wrote:
Sun 2 May 2021 11:18 PM
This is a draft for now, some more sections and some formulas will follow soonish.

What does speccing in a weapon line do?
...Every point, regardless of base skill, bonus skill from items or bonus skill from realm rank, reduces the chance to miss by 0.5% per spec point. ...

Is the miss chance reduced beyond 52 combined skill or is the miss chance at 52 combined skill at its minimum for lvl 50 enemies?
Sun 9 May 2021 11:59 PM by gruenesschaf
Added the enemy armor and damage modifier section which completes the unstyled / base damage part. Next up would be style damage.
Mon 10 May 2021 7:21 AM by Centenario
This is the damage formula:
var targetLevelOrSpec = Math.Min(input.TargetLevel + 1d, input.Spec - 1d);

1double damageModifier = input.AttackerLevel == 0 ? .5 : input.AttackerLevel;
2damageModifier *= input.DamageTable / 10d * input.WeaponSkillMultiplier;
3damageModifier *= 1 + 0.01d * input.Stats * input.WeaponSkillMultiplier;
4damageModifier *= 1 + input.RelicBonus / 100d;
5damageModifier *= 0.75d + 0.5d * (targetLevelOrSpec / (input.TargetLevel + 1d)) + 0.01d * input.Variance;
6damageModifier /= Math.Max(1, input.EnemyArmor);
7damageModifier *= 1d - input.AbsorbBuff / 100d;
8damageModifier *= 1d - input.NpcAbsorbFromStats / 100d;
9damageModifier *= 1d - input.TotalResist / 100d;
10damageModifier *= input.ExtraMultiplier;

This is the AF before absorb formula:
level50BaseAf / 50d * level
+ armorAf
+ buffDebuff / 5d
+ bonusAf / 5d;

I am intrigued by the AF/Absorb Mechanic: I would like to compare a plate wearer (Armsman) and a caster (Sorcerer) to see how much damage mitigation having plate armor give. Will make the try with slash damage since both cloth and plate are neutral to it. Attacker is a Paladin.

I will also try to verify with the formula directly:
Target Level = Min(50+1, 52-1) = 51
1=50
2;*=(19/10)*1;=1.9;
3;*=(1+0.01*STR(250)/2)* 1;=2.25;
4;*=1
5;*=0.75+0.5*(51/(50+1))+0.01*0=0.75+0.5*1+0=1.25
6;/=(armsman=45/50*50+102+0/5+0/5=45+102=147);(sorcerer=45/50*50+51+250/5+0/5=45+51+50=146) i.e. ITEM_USEABLE_AF
6 (absorb); (armsman=147/(1-0.34)=222.73 ; (sorcerer)=95/(1-0)=95
7;*=(armsman=1) (sorcerer=1-0.1=0.9)
8;*=1
9;*=(1-0.26)=0.74
10;*=1

So:
Part 1=
50*1.9*2.25*1*1.25=
267.1875
Part 2 =
(armsman)222.73/1/1/0.74/1=300.99
(sorcerer)95/0.9/0.74=142.64
DAMAGE_MODIFIER=
hitting armsman 267.1875/300.99=0.8877 => 887
hitting sorc 267.1875/142.64=1.873 => 1873

So hitting plate armor vs hitting cloth will result in 1218/887=37.32% more base damage overall.
It was funny yesterday during the event, as a zerk I was hitting casters for around 50-70 damage and the spells were hitting me for 275-350 damage.
Mon 10 May 2021 11:49 AM by Noashakra
I think it would be useful if people could understand how exactly stats influence the damage.
Also, clarification about how MoArms is calculated would be welcomed !
Thanks for the good work.
Thu 10 Jun 2021 4:55 PM by Centenario
@gruenesschaff

I would like to clarify one thing
I see for plate, my AF is 102, my effective AF on 100% when 5L is 102+34 = 136 my total displayed AF is 136*6=816, which it isnt, cause its capped at 683 for plate and 647 for chain.

The absorb value of the hit formula you showed:
var afBeforeItemAbsorb =
level50BaseAf / 50d * level
+ armorAf
+ buffDebuff / 5d
+ bonusAf / 5d;

return afBeforeItemAbsorb / (1d - itemAbsorb);

Means that each piece of plate, would have in AF:
45/50*51=45
+102
=147
+50/5 (buffpot spec AF)
+0 (bonus)
=152
152/(1-0.34)=230 AF for a piece of plate armor.

Then same calculation but for studded, I would get:
45+102+5=152
152/0.81=187 AF

Are you using those values, or effective armor, or capped armor/6?
Thu 10 Jun 2021 6:30 PM by gruenesschaf
Centenario wrote:
Thu 10 Jun 2021 4:55 PM
Are you using those values, or effective armor, or capped armor/6?

Aside from the display af being entirely irrelevant (only the piece actually hit does anything for a given attack), the display AF is a rather weird formula that takes the absorb into account but also the hit chance of that piece, e. g. 40% for the torso, 5% for feet and hands etc.

10 * armorLevel * hitChance/100 * (1 + armorAbsorb * 0.01)
Where armorLevel is the lower of char level (+1 in case of rr5) and the armor level. Armor absorb is e. g. 0.4 * 27 for chain torso. For cloth just half it. E. g. a chain mp torso would be 221 effective af. On top of that comes base af up to the cap effective af that piece / slot would provide at 100% quali and then on top of all of that comes spec af.
This topic is locked and you can't reply.

Return to Wiki Pages or the latest topics