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

Curated user bug reports with enough information to reproduce problem. Moderators will move topics here from Help & Support once a bug has been confirmed and enough information has been provided.
Post Reply
User avatar
Magicono43
Posts: 504
Joined: Tue Nov 06, 2018 7:06 am

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

Post 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.

User avatar
Interkarma
Posts: 5823
Joined: Sun Mar 22, 2015 1:51 am

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

Post 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!

User avatar
Magicono43
Posts: 504
Joined: Tue Nov 06, 2018 7:06 am

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

Post 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.

User avatar
Interkarma
Posts: 5823
Joined: Sun Mar 22, 2015 1:51 am

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

Post 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.

User avatar
numidium3rd
Posts: 75
Joined: Sun Mar 25, 2018 12:34 am
Location: United States

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

Post by numidium3rd »

I made a PR.

User avatar
Magicono43
Posts: 504
Joined: Tue Nov 06, 2018 7:06 am

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

Post 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.

Post Reply