UI hit chance doesn't count graze band or crit promote

This is to elevate certain bug reports so Long War 2 developers can interact with players.
sectoidfodder
Posts: 21
Joined: Sat Jan 28, 2017 6:00 am

UI hit chance doesn't count graze band or crit promote

Postby sectoidfodder » Sun Jan 29, 2017 9:07 pm

Pretty sure this should be a bug, since the UI attempts to factor in the contribution from dodge demotes, but not graze band or crit promotes.

Example: 70% weapon hit, 60% weapon crit, +/-10% graze band. Shot breakdown should be 36% crit, 36% hit, 8% graze, 20% miss. UI instead shows "70% to hit" and "36% to crit." The hit chance reflects neither the crit+hit sum (72%) nor the crit+hit+graze sum (80%).

Example with dodge: 20% dodge added to the above. Shot breakdown should be 29% crit, 36% hit, 13% graze, 22% miss. UI instead shows "68% to hit" with a "dodge -2%" modifier that represents the graze->miss demote, when the actual hit chance should be 78%.

sectoidfodder
Posts: 21
Joined: Sat Jan 28, 2017 6:00 am

Re: UI hit chance doesn't count graze band or crit promote

Postby sectoidfodder » Mon Jan 30, 2017 11:54 pm

I believe I've found the problem:

Code: Select all

StandardAim.m_ShotBreakdown.FinalHitChance = StandardAim.m_ShotBreakdown.ResultTable[eHit_Success] + Adjustments.DodgeHitAdjust;
StandardAim.m_ShotBreakdown.ResultTable[eHit_Crit] = Adjustments.FinalCritChance;
StandardAim.m_ShotBreakdown.ResultTable[eHit_Success] = Adjustments.FinalSuccessChance;
StandardAim.m_ShotBreakdown.ResultTable[eHit_Graze] = Adjustments.FinalGrazeChance;
StandardAim.m_ShotBreakdown.ResultTable[eHit_Miss] = Adjustments.FinalMissChance;


FinalHitChance is what the UI displays, and right now all it does is take the pre-graze-band hit chance and subtract dodge demote, which is wrong. Hopefully the actual shot roll doesn't use FinalHitChance, because then the actual hit calculation would be off (rather than just the UI display).

Something like this should work:

Code: Select all

StandardAim.m_ShotBreakdown.ResultTable[eHit_Crit] = Adjustments.FinalCritChance;
StandardAim.m_ShotBreakdown.ResultTable[eHit_Success] = Adjustments.FinalSuccessChance;
StandardAim.m_ShotBreakdown.ResultTable[eHit_Graze] = Adjustments.FinalGrazeChance;
StandardAim.m_ShotBreakdown.ResultTable[eHit_Miss] = Adjustments.FinalMissChance;
StandardAim.m_ShotBreakdown.FinalHitChance = Adjustments.FinalSuccessChance + Adjustments.FinalCritChance + Adjustments.FinalGrazeChance;

Amineri
Long War Dev
Posts: 221
Joined: Wed Nov 11, 2015 7:34 pm

Re: UI hit chance doesn't count graze band or crit promote

Postby Amineri » Sat Feb 04, 2017 9:20 pm

I'm pondering what to do with this.

You are correct that crit in general reduces the graze band chances, so using hit + crit + 1/2 (graze) the displayed value is no longer accurate. However, increasing the displayed hit chance (while mathematically correct in some sense) is also misleading in some sense because the chance to miss has not been altered.

sectoidfodder
Posts: 21
Joined: Sat Jan 28, 2017 6:00 am

Re: UI hit chance doesn't count graze band or crit promote

Postby sectoidfodder » Sun Feb 05, 2017 7:14 am

Graze band alters the chance to miss though, so I think the current UI is already misleading because showing crit + hit + half graze isn't really intuitive. We're not arbitrarily weighing crit vs hit, so why only half graze? It makes the most sense to me if the UI just shows total crit+hit+graze chance, which is conveniently what existing hit chance display mods assume FinalHitChance is.

The shot wing will need an extra line like "graze band +10%" so the modifiers add up properly. Though short of explicitly showing graze chance (or crit + hit + graze and crit + hit side-by-side) I can't think of a good way to convey to the player that it's also making full damage less likely, and isn't some sort of difficulty handicap.


Return to “Elevated Bug Reports”

Who is online

Users browsing this forum: No registered users and 1 guest