Page 1 of 1

[0.10.24] Enemies And Unarmed Attacks Not Benefiting From Bonus Or Phobia Traits [RESOLVED 0.10.27]

Posted: Wed Jul 15, 2020 9:57 pm
by Magicono43
So before I make a proper bug report, I would like to confirm if this is intended behavior or not.

So, while doing some testing for my combat overhaul mod, I noticed that the way the "GetBonusOrPenaltyByEnemyType" method in "FormulaHelper.cs" works is that only the player will ever be checked for having the "Bonus" or "Phobia" trait in their character career. While enemy entities, even human NPCs, like the Assassin, won't be checked for these traits. This includes the vampire and vampire ancient monsters.

The other thing is that the way "GetBonusOrPenaltyByEnemyType" is called, it only ever gets called if the attacker is using a weapon of some kind, otherwise it gets skipped by earlier. This means that unarmed attack of any kind, including from the player don't get factored in for the bonus or phobia check.

Is this intended? If not, i'll make a proper bug report post with more details.

Re: [0.10.24] Enemies And Unarmed Attacks Not Benefiting From Bonus Or Phobia Traits

Posted: Thu Jul 16, 2020 1:41 am
by Interkarma
The GetBonusOrPenaltyByEnemyType() formula itself if entity-agnostic. It would be possible to query this in the enemy attack process. Considering some classic enemies do have these traits, I agree this should be checked and applied to enemies also.

I see the logic flaw where formula is only called by weapon attack handler. I would consider this a bug also.

Happy to move this to bug reports as it stands, it's very clear and describes the issues well. Cheers!

Re: [0.10.24] Enemies And Unarmed Attacks Not Benefiting From Bonus Or Phobia Traits

Posted: Thu Jul 16, 2020 1:52 am
by Magicono43
Interkarma wrote: Thu Jul 16, 2020 1:41 am The GetBonusOrPenaltyByEnemyType() formula itself if entity-agnostic. It would be possible to query this in the enemy attack process. Considering some classic enemies do have these traits, I agree this should be checked and applied to enemies also.

I see the logic flaw where formula is only called by weapon attack handler. I would consider this a bug also.

Happy to move this to bug reports as it stands, it's very clear and describes the issues well. Cheers!
Glad to hear, though I have a feeling some people might be surprised by the damage assassins and vampires can put out after this change, especially higher level players against assassins. But that's just part of the experience in fighting these sorts of enemies, lol.

Re: [0.10.24] Enemies And Unarmed Attacks Not Benefiting From Bonus Or Phobia Traits

Posted: Thu Jul 16, 2020 2:03 am
by Interkarma
Yes, and I'm open to feedback on the first question. If it makes these already powerful enemies too powerful, then I won't make that change.

Only applying bonuses/phobia when player attacks with weapons should definitely be fixed though. Otherwise hand-to-hand characters won't experience these traits if selected during character build.

Re: [0.10.24] Enemies And Unarmed Attacks Not Benefiting From Bonus Or Phobia Traits

Posted: Sun Sep 13, 2020 9:57 pm
by numidium3rd
I made a PR.

Re: [0.10.24] Enemies And Unarmed Attacks Not Benefiting From Bonus Or Phobia Traits

Posted: Sun Sep 13, 2020 10:06 pm
by Magicono43
numidium3rd wrote: Sun Sep 13, 2020 9:57 pm I made a PR.
I'm glad you put that note that it would break any mods that changed that method, because I would never have been able to tell otherwise, lol.