In my mod, i'm currently coding units Armors depending of the kind of Damages. For better damage type accuracy, i hooked the damagetable function passed to projectile and beams by switching :
Spoiler: show
from :
- Code: Select all
self.DamageTable.DamageType = weaponBlueprint.DamageType
to :
- Code: Select all
self.DamageTable.DamageType = weaponBlueprint.WeaponCategory
Because WeaponCategories are much accurate ('Missile', 'Artillery', 'Bomb', 'Kamikaze', 'Anti Air', 'Anti Navy', 'Direct Fire', 'Direct Fire Experimental'...), i can make specific armor depending of theses categories.
All works fine, i got some very cool armors, but, by hooking the DamageType, i must do some collateral damages, but i don't know the real impact. Maybe i can do some damage control and at the same time keeping my system.
It seems that some Damage functions are hard coded. I would like to overcharge the functions to add some parameters without touching the Damage.Type data.
But i don't know how ? Some ideas ?
Spoiler: show
I hope you understand me.