Introduction[]
In this entry into the AQ Game mechanics series, I’ll be talking about Elemental Compensation or “Elecomp”. Elecomp is absolutely vital to the modern game, yet isn’t included in the standard player turn model. In this post, I’ll go through what Elecomp is, as well as how to calculate it.
If you don't care for the fine print, here is a handy calculator to work it out for yourself. Otherwise, read on if you want to know all the gorey details (trust me, this one gets rough fast)...
Visit the Content Hub for other parts of this series
What is Elecomp?[]
The player is normally assumed to defend against a monster’s base element and attack with its polar opposite, based on the Elemental Wheel. For example, if the player were fighting a Fire-element monster, they would be expected to defend against Fire and attack with Ice. However, sometimes this isn't possible. For example, the skill of the Angel of Souls armour is locked to dealing Darkness damage. As the armour also defends primarily against Darkness, it means you are defending and attacking with the same element, rather than the opposite.
Elecomp is a compensatory modifier that is inherently built into the attacks which forcibly violate the above assumption. This means the Angel of Souls' skill above already contains elecomp. Elecomp is applied to any elemental combination, just so long as they aren't on opposite ends of the Elemental Wheel (i.e. Defend = Water, Attack = Dark? Good for elecomp, Defend = Light, Attack = Dark? No, they oppose one other). The compensation will, however, vary depending on how closely the attack and defence elements are aligned. It is important to emphasise that elecomp is only built into attacks that force the player to break this assumption. For example, the player can both attack and defend with the same element using items like Psycho Candy Hearts, which follow the player's weapon element, but you're not going to receive elecomp on the attack if you do. In this scenario, you're not being forced to break the assumption, you're doing it of your own volition.
This compensation comes in multiple different forms, depending on the type of attack:
- Weapon-Based Skills: Reduced Skill cost [E.g., The Angel of Souls above]
- Spell-Based Skills and Spells: Increased Damage [E.g., Pyromancer Bloodmage. Check the analysis section at the bottom and you'll notice that elecomp is applied]
- Regular Attacks: Increased Damage [E.g., Svadilfari's Oath]
If you're confused by these terms, I discuss the differences between Weapon and Spell-type skills elsewhere in this blog series.
How is Elecomp Calculated?[]
The Short Answer: It's complicated. Very complicated,
The Long Answer: When calculating the elecomp of a skill attached to an armour, numerous characteristics of the armour are taken into account. To explain how this works, we’ll do it for the Level 150 Angel of Souls armour.
The crucial modifier in the elecomp calculation is Compensation_Mod. This is calculated as:
Compensation_Mod = ( Damage_Taken_Mod / Damage_Dealt_Mod ) * Blocking_Mod * Armour_Lean_Mod / 0.9
We'll go through each of these in turn, starting with the simplest - Armour_Lean_Mod:
Armour_Lean_Mod = ( ( [Armour_Lean] - 1) / 2 + 1)
Armour lean refers to the modifier on your armour (FD = 0.8, N = 1, FO = 1.25). Spellcaster lean armours use Neutral modifiers (N=1). Angel of Souls is a Fully Offensive (FO) armour, which means its modifier is 1.25:
Armour_Lean_Mod = ( ( 1.25 - 1) / 2 + 1) = 1.125
FD and N numbers would be 0.9 and 1 respectively.
The next easiest is Blocking_Mod:
Blocking_Mod = ((85 – [Average Armour Defence] + [Expected Armour Defence]) / 85)
Things get a little bit trickier here, as we have to start getting involved with expected defences. This varies depending on your level:
Expected Armour Defense = round ( ( 0.5 * PwrLvl – 0.5) / 3 ) + 25
PwrLvl here refers to the item's Power Level. For regular items, this is the level of the item itself. Guardian items are 3 levels higher than their standard level. Z-token items are 10 levels higher. As the level 150 version of Angel of souls is Guardian, its power level is 153:
Expected Armour Defense = round ( ( 0.5 * 153 – 0.5) / 3 ) + 25 = 50.33 Blocking_Mod = (85 - 50 + 50.33) / 85 = 1.00
The next two modifiers are much more tricky because we have to calculate them for each of the 8 standard elements. Damage_Taken_Mod can be calculated as:
Damage_Taken_Mod = [$Element resistance with expected shield] / [Expected Resistance with Expected Shield]
$Element just refers to the element we're currently calculating for. To make things simple, we'll go through with fire and I provide numbers for the other elements. To calculate the above, we need to know what the expected armours and shields should defend against:
Expected Armour = Round( Round( 0.0015 * PwrLvl * PwrLvl- 0.6 * PwrLvl ) - 4 * PwrLvl / 150 ) Expected Shield = -0.00000948 * PwrLvl ^ 3 + 0.003356 * PwrLvl ^ 2 - 0.426364 * PwrLvl - 4 * PwrLvl / 150
We've already establish the PwrLvl of Angel of souls is 153. It has a Fire resistance of 90%. Adding these to the above formulas:
Expected Armour = Round( Round ( 0.0015 * 153 * 153 - 0.6 * 153 ) - 4 * 153 / 150 ) ) = -61 (%) Expected Shield = -0.00000948 * 153 ^ 3 + 0.003356 * 153 ^ 2 - 0.426364 * 153 - 4 * 153 / 150 = -24.7 (-25%) Damage_Taken_Mod = ( 90 - 25 ) / ( 100 - 61 - 25 ) = 4.64
The 90% Fire resistance fits into the first component of the Damage_Taken_Mod formula, where we take the base fire resistance and then add an expected shield. The other numbers are:
Fire: 4.64 Water: 3.21 Wind: 3.21 Ice: 1.36 Earth: 3.21 Energy: 4.64 Light: 4.64 Darkness: 1
Ok, one more to go! Damage_Dealt_Mod is calculated as:
Damage_Dealt_Mod = ( [$Element Monster Expected Resistance to $Skill_element] / [Top Expected Resistance] )
The Angel of Souls skill element is Darkness. The monster's top resistance is always assumed to be 130. The rest are assumed based on the elemental wheel:
- Base element is assumed to be 70%
- Allied elements are assumed to be 85%
- Neutral elements are assumed to be 100%
- Poor elements are assumed to be 115%
- Opposing elements are assumed to be 130%
Since it's a dark skill, the base is Darkness, allied to Earth and Water, Neutral to Fire and Ice, Poor to Wind and Energy, and Opposed to Light. Since we're dealing with Fire, that number is 1:
Damage_Dealt_Mod = 100 / 130 = 0.77
The other elements are:
Fire: 0.77 Water: 0.65 Wind: 0.88 Ice: 0.77 Earth: 0.65 Energy: 0.88 Light: 1 Darkness: 0.54
So, to run through our final formula to calculate Compensation_Mod for Fire, our calculation is:
Compensation_Mod = ( Damage_Taken_Mod / Damage_Dealt_Mod ) * Blocking_Mod * Armour_Lean_Mod / 0.9 Compensation_mod = ( 4.64 / 0.77 ) * 1 * 1.125 / 0.9 = 7.53
We have to do that for all the elements:
Fire: 7.53 Water: 6.17 Wind: 4.56 Ice: 2.21 Earth: 6.17 Energy: 6.59 Light: 5.8 Darkness: 2.31
Our final Compensation_Mod value is the minimum result from this calculation. In this case, that's 2.21
Spell-Based Elecomp[]
We're still not done! We now have to take this number and translate it into a damage modifier for Spells and Spell-type skills. We need to perform one further transformation:
Elecomp = 5 * ([Compensation_Mod] / (4 + [Compensation_Mod])) Elecomp = 5 * ( 2.21 / ( 4 + 2.21 ) ) = 1.78
THAT is our final score!
Weapon-Based Elecomp[]
To calculate weapon-based elecomp, a cost reduction, we need to do a few extra things:
Cost_Elecomp_Mod = Compensation_Mod * 0.9 / Armour_Lean_Mod Hyperbole_Mod = 5 * ( Cost_Elecomp_Mod / (4 + Cost_Elecomp_Mod ) ) Cost_Mod = (2 / Hyperbole_Mod – MRM_Mod) / 1.25
Luckily, we've already calculated all the numbers we need for this set of transformations and just need to follow it through:
Cost_Elecomp_Mod = 2.21 * 0.9 / 1.125 = 1.77 Hyperbole_Mod = 5 * ( 1.77 / (4 + 1.77 ) ) = 1.53 Cost_Mod = ( 2 / 1.53 – 1) / 1.25 = 0.246
This is our final cost modifier!
Angel of souls' baseline attack costs 100% melee to use (348 HP). With the above modifier, it should cost 86 HP. You'll notice that this isn't actually what happens - this is because the armour suffers from the HP Cost problem I mentioned in a previous blog post.
Have a go for yourself! This calculation is approximate based on user input, but should give you the numbers you need. The resulting numbers are multipliers. The spell-based multiplier increases your damage output. The weapon-based multiplier reduces the cost of your attack.
Additional Information[]
In case anyone wanted to reverse-engineer the elemental compensation available on current items, the table below provides ratios to calculation Compensation_Mod. Unfortunately, I can only provide the numbers for damage compensation, as reverse-engineering elecomp to cost involves armour lean! These numbers also work for Weapon-based elecomp, just don't forget you also need to multiply the result by *Armour_Lean_Mod/0.9
Back to top.
Appendix[]
Below is a list of elecomp and respective Compensation_mod values. Ratio represents the ratio between these two figures.
Elecomp | Compensation_Mod | Ratio |
1.551724 | 1.8 | 1.16 |
1.557659 | 1.81 | 1.162 |
1.563574 | 1.82 | 1.164 |
1.569468 | 1.83 | 1.166 |
1.575342 | 1.84 | 1.168 |
1.581197 | 1.85 | 1.17 |
1.587031 | 1.86 | 1.172 |
1.592845 | 1.87 | 1.174 |
1.598639 | 1.88 | 1.176 |
1.604414 | 1.89 | 1.178 |
1.610169 | 1.9 | 1.18 |
1.615905 | 1.91 | 1.182 |
1.621622 | 1.92 | 1.184 |
1.627319 | 1.93 | 1.186 |
1.632997 | 1.94 | 1.188 |
1.638655 | 1.95 | 1.19 |
1.644295 | 1.96 | 1.192 |
1.649916 | 1.97 | 1.194 |
1.655518 | 1.98 | 1.196 |
1.661102 | 1.99 | 1.198 |
1.666667 | 2 | 1.2 |
1.672213 | 2.01 | 1.202 |
1.677741 | 2.02 | 1.204 |
1.68325 | 2.03 | 1.206 |
1.688742 | 2.04 | 1.208 |
1.694215 | 2.05 | 1.21 |
1.69967 | 2.06 | 1.212 |
1.705107 | 2.07 | 1.214 |
1.710526 | 2.08 | 1.216 |
1.715928 | 2.09 | 1.218 |
1.721311 | 2.1 | 1.22 |
1.726678 | 2.11 | 1.222 |
1.732026 | 2.12 | 1.224 |
1.737357 | 2.13 | 1.226 |
1.742671 | 2.14 | 1.228 |
1.747967 | 2.15 | 1.23 |
1.753247 | 2.16 | 1.232 |
1.758509 | 2.17 | 1.234 |
1.763754 | 2.18 | 1.236 |
1.768982 | 2.19 | 1.238 |
1.774194 | 2.2 | 1.24 |
1.779388 | 2.21 | 1.242 |
1.784566 | 2.22 | 1.244 |
1.789727 | 2.23 | 1.246 |
1.794872 | 2.24 | 1.248 |
1.8 | 2.25 | 1.25 |
1.805112 | 2.26 | 1.252 |
1.810207 | 2.27 | 1.254 |
1.815287 | 2.28 | 1.256 |
1.82035 | 2.29 | 1.258 |
1.825397 | 2.3 | 1.26 |
1.830428 | 2.31 | 1.262 |
1.835443 | 2.32 | 1.264 |
1.840442 | 2.33 | 1.266 |
1.845426 | 2.34 | 1.268 |
1.850394 | 2.35 | 1.27 |
1.855346 | 2.36 | 1.272 |