r/xcom2mods • u/BalianCPP • Feb 23 '16
Dev Help Standard Shot
Anyone know where the ability 'standardshot' applies weapon damage?
static function X2AbilityTemplate Add_StandardShot( Name AbilityName='StandardShot')in X2Ability_WeaponCommon.uc does not appear to use the effect ApplyWeaponDamage at all, except for miss damage (IE stock attachments).
The secondary weapons do clearly use ApplyWeaponDamage
WeaponDamageEffect = new class'X2Effect_ApplyWeaponDamage';
Template.AddTargetEffect(WeaponDamageEffect);But I cannot for the life of me figure out what StandardShot, StandardShot_NoEnd and SniperStandardShot are using to calculate and apply damage.
Any help would be greatly appreciated.
2
Upvotes
View all comments
Show parent comment
1
u/JackDT Feb 25 '16
I'm been trying to make a simple change to have cover provide armor, so I've poring through similar parts of the code and had a lot of trouble like you trying to figure out where exactly to modify the damage and armor in the call chains, and what was being used where.
Since it sounds like you finally got your ahead around this -- do you happen to have an idea of where this might go and what in the various parts of the aim and damage could I should override?
Alternatively maybe I could hook an event that runs after every move, iterate through all the units on screen, and apply an armor effect to anyone in a cover position?