Can anyone explain the damageAlter To... mechanics in more details, please? I understand the meaning of each parameter but need to know how they work.
How do all "To..." parameters apply? Are they treated as a separate attacks one after another? If not, do they apply before or after armor applied? Do they use same resistance?
Another question is whether Stun reduced by armor?
I am trying to make thermal shock bomb deliver HE damage as well so it is more deadly in hands of aliens. Also I want this HE damage to affect human and tanks alike. What is the most elegant way to achieve it with OXCE parameters? Any suggestions appreciated.
Thank you for hints.
Some side note.
I know that OXCE introduces another 10 damages types in addition to vanilla ones. I don't think using them helps me in this particular case but if anyone thinks that may be easier with them, please share your thoughts.
As far as my observation goes, this is the order of operations when a weapon hits a unit:
1. Raw damage is calculated based on weapon power and random type
2. This is applied to any shield the target may have, modified by the shield's damage type resistances. Anything excess to taking down the shield goes on. Certain damage types may entirely ignore certain shield types.
3. Remaining damage is modified by the armor's damage type vulnerability
4. Armor is permanently degraded by Remaining Damage times Armor_Pre-Damage modifier
5. Remaining damage is compared to hit plate's remaining armor value multiplied by armor effectiveness value. Any excess of remaining damage goes on.
6. Remaining damage is applied to the various statistics, multiplied by the To_X, where X is any particular statistic.
As for stun damage, the damage type named Stun (or Freeze in TFTD) by default has To_Stun=1 and To_Health=0, while other damage types usually have To_Stun=0.1 and To_Health=1.
I don't know how exactly the game differentiates between explode-on-impact explosives hitting a unit and bullets hitting a unit, but I am fairly certain thermal shock bomba are considered explosives.