PJMail Posted October 23, 2021 Share Posted October 23, 2021 Just to confirm my observation. I have an NPC in the same 'friend' faction as me with IgnoreFriendlyHits(true) set, yet if they get caught by the explosive effect of my gun (with Legendary explosive bullets "0x001E73BA"), the 'onhit' event on their script fires (with me being the aggressor and the gun being the weapon) and they eventually die. If I aim directly at them there is no effect, I have to basically aim at their feet, which suggests it is the explosive effect that is not being 'ignored'. This happens if I do "sifh 1" in the console when they are select too, so it was not a faulty call to IgnoreFriendlyHits. Can anyone confirm that damage from explosions cannot be ignored? Does anyone have a fix?Is it possible to change the apparent 'aggressor' perhaps - or do explosions hurt even the aggressor?I once can across a mod that made the artillery explosions not appear to be caused by the player... Link to comment Share on other sites More sharing options...
Evangela Posted October 23, 2021 Share Posted October 23, 2021 I think this makes sense. Explosions aren't things cast by the player, they are placed by the projectile/magic effect. It is only the projectile(the bullet) that matters for ignoring friendly fire. You will have to use additional logic on OnHit to account for explosive damage.like...if akSource as Explosion....stuff Link to comment Share on other sites More sharing options...
PJMail Posted October 23, 2021 Author Share Posted October 23, 2021 (edited) Strangely the 'onhit' event says the 'aggressor' is the player (0x14), the 'source' is the ID of the gun (not the explosive), and the 'projectile' is 'none'.So the onhit acts like I used the gun as a 'blunt instrument'... therefore no 'special logic' is possible, and 'ignore friendly hits' does not 'ignore' friendly 'hits'. Thank you Bethesda. I suspect you are right about only projectile 'hits' being ignored.... Edited October 23, 2021 by PJMail Link to comment Share on other sites More sharing options...
Evangela Posted October 23, 2021 Share Posted October 23, 2021 I'm just winging it here as I don't have the game installed to do my own tests, but I believe an alternative can be obtained using a perk to counter the explosion. Raise the damage resistance of the NPC really high and have this conditioned where it'll be applied if an attacker is the player and the weapon they are using is the gun. Link to comment Share on other sites More sharing options...
PJMail Posted October 23, 2021 Author Share Posted October 23, 2021 (edited) That is an interesting thought, I have not done much in that area so I will investigate - Thanks! Edit: Seems like I can't specify a condition using the 'source' of the explosion damage in an explosive damage reduction Perk for the NPC.I can choose a target condition on a 'mod weapon attack damage' player perk but that does not seem to effect the secondary explosive damage... Edited October 24, 2021 by PJMail Link to comment Share on other sites More sharing options...
Evangela Posted October 24, 2021 Share Posted October 24, 2021 Even if you were able to get around this, the bigger issue is when the NPC turns on the player after taking enough "friendly" explosive damage. Link to comment Share on other sites More sharing options...
niston Posted October 25, 2021 Share Posted October 25, 2021 There's a mod that makes settlers immune to friendly fire; workshop turrets in particular.It works with a perk given to the turrets. It mods incoming weapon damage with multiplier zero when the subject is in workshopnpcfaction. This multiplying by zero appears to work for explosions as the settlers don't seem to take any damage from missile turret hits. Perhaps it could be helpful? Link to comment Share on other sites More sharing options...
PJMail Posted October 25, 2021 Author Share Posted October 25, 2021 @niston - Thanks for confirming this.It is what I had gone with as I already had a Perk on the Player (when they are onboard) so an easy fix. It appeared to work so I had my fingers crossed. One interesting quirk is you can't protect yourself this way - even with 'player' in the conditional on the same Perk.Shooting explosive bullets at my feet still kills me.... Link to comment Share on other sites More sharing options...
Recommended Posts