How does damage conversion work exactly?

I was making some builds on grimtools, and then I was curious about how the damage conversion works. I mean, I mostly know how it works, but I don’t know how it works if we convert e.g. physical damage to aether damage and a skill converts a higher percentage to aether damage after use. I had some thoughts about it, but I am not sure how it works, therefore I chose to ask here and additionally post some of my ideas how it can work.

I’ll be talking about converting 10% physical damage to aether, that was added by a component and converting 80% of physical damage to aether into the ability Blitz (Soldier mastery).

The first idea was that the damage is just added to itself, this is:
Your weapon damage deals 100 physical damage, so because of the conversion it deals 90 physical, and 10 aether damage (90% of weapon damage and 10%, respectively), so the skill will deal 90% of the damage in aether damage and 20%
in physical (since we have 10% standard conversation, no matter what we use, and 80% conversion in the skill I used). But then it kinda didn’t make sense to me, because it would increase the damage by 10% (we’d deal 110 damage when the weapon has 100 damage). So I thought the damage is calculated like this:

SkillDmg = WeaponDamage * 0.8 -> AetherDamage = 80 damage
MainHandDmg = PhysicalDamage * 0.2 = 20 damage
ConvertedDmg = WeaponDamage * 0.1 -> Aether = 10 damage
PhysicalDamage = 100 - (SkillDmg + ConvertedDmg) = 10
So the the damage will be 90% in Aether and only 10% in physical.

Now, I was a bit confused, because our physical damage is reduced by 10% due to the conversion, but aether damage is increased by 10% of the physical damage, so the formula is:

AetherDamage = PhysicalDamage * 0.1
PhysicalDamage = PhysicalDamage * 0.9

So, therefore, if the skill takes the weapon damage as the stat in the second inventory page, the conversion in the skill will be:

PhysicalDamage * 0.8 + AlreadyConvertedAetherDamage + PhysicalDamage * 0.18

Why? Our physical damage is 100, but the conversion from weapon (which we added via a component) reduces it by 10% and adds it to aether, therefore the physical damage equals 90% of the damage we had in the beginning, then, the ability converts the 90% to aether by 80% of its current value, which would be 72% of the current physical damage, which would give us 72 damage. Now, add up the numbers and subtract them from 100.

SkillDamage + InitialConvertedDamage
72 + 10 = 82
100 - 82 = 18

So, we deal 82 aether and 18 physical damage.

Now, I had another idea, because the last conversion I posted was kinda… wrong? So I thought the damage is converted basically like I said before, but added otherwise. This is:

100 physical damage -> 10 aether damage = 90 physical damage, 10 aether
SkillDamage = WeaponDamage * 0.8 = 80

90 - 80 = 10 = physical damage
10 physical + 10 aether + 80 aether = 100 damage

So, the initial conversion still persists, skill takes the damage from weapon, ignoring any conversions and other kind of math (therefore, if our weapon deals 100 damage, the ability will deal 80 in aether, but there also is additional 10 aether damage that was converted before, resulting in 90 aether damage already, so the physical damage cannot be 20, because it’d exceed the actual damage, therefore it’s subtracted by the converted aether damage before the ability was used, so: 20 - 10 = 10. Now we have 100 mixed damage.

I still know I am wrong in those, although my thoughts are kind of proper, but not exactly. Could any programmer (from Crate) explain to me how the conversion works exactly? Does the skill take only the weapon damage, does it take the overall already converted damage, does it add up the converted damage from the same type? If the explanation would be rather hard to do, feel free to use some example codes for that.

Hope you didn’t fall asleep reading this topic or I didn’t boil your brain. :stuck_out_tongue:

Greetings!