-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Displayed protection values are misleading for multi-material armor in edge cases #78754
Comments
Oh, I see now, this more a presentation issue. Cataclysm-DDA/src/item_factory.cpp Lines 1175 to 1206 in 44b3817
What that window shows is that:
The problem is that item info does not mention what happens in the other 18% cases at all, so I've always been reading that as "well, the other 18% doesn't have any protection at all!". But turns out this is not what it's trying to say... There's a lot of empty space in that window, so perhaps we can fit in some breadcrumb implying that the unaccounted percentage is not lost, but rather "has some intermediate protection values between those two extremes". But I can't think of any way to actually present that right now... |
Yes, displaying all the variants is unreasonable.
|
I am honestly a bit struggling reading through this code in fullness, but the intent is that no, each material is calculated individually: Cataclysm-DDA/src/character_armor.cpp Lines 236 to 238 in 7ba4c09
( The "single roll" concept is also there, but that one determines whether the armor was hit at all. My reading is that it's only "single roll" for technical reasons to stop us flip-flopping between "yeah you hit us" and "no, I lied, you didn't actually" for the same body part. ) Side-note, looking at the code again, I see that we do already have neat infrastructure for displaying intermediate damage values (median, specifically), but it only kicks in when both the high-rolls and the low-rolls are sub-50% likely. It's neat, but does not address my original concern - even if we force-enable it for the suit we'd get displayed something like (specific numbers made up):
which still implies that 19% of the time armor does nothing |
From what I understand, the So I still have doubts about the correctness of the chance calculation. |
The Cataclysm-DDA/src/character_armor.cpp Lines 217 to 221 in 7ba4c09
armor.get_coverage() returns the "coverage" of the amor as seen in the UI for the corresponding (sub)body part. The coverage is 100 for both kevlar jumpsuits and it's 5 for something like a holsterThe |
I would love to see this info moved to a table with clear separators. Hint hint, wink wink? |
I was wrong. I had to run tests in the game to make sure, though.
This option gives little information if the armor coverage is close to 50%. However, you have already noted that:
UPD. And here you can see the error. The armor for the median is equal to 0, although it is not really equal. UPD2. Just noticed.
Maximum armor is obtained 81% of the time. Minimum in 1%. Intermediate in 9 + 9 = 18%. But the game says 80% for maximum armor? A screenshot of the Kevlar suit. |
If I'm not mistaken anywhere, we need something like this:
|
Describe the bug
Specifically for Kevlar Jumpsuit (left):
The armor is made out of (ignoring the weak cloth): Kevlar 1.7mm (100% coverage), Kevlar 1.0mm (90%) and Kevlar 1.0mm (90%), but the protection values displayed imply that only 81% of the body has any protection.
Compare that to Light Kevlar Jumpsuit (right) which has fewer layers (missing an extra Kevlar 1.0mm (90%)), but has much higher coverage (100%).
It looks like some code gets confused about the math somewhere
Attach save file
debug-world-trimmed.tar.gz
Steps to reproduce
Look at a Kevlar Jumpsuit info, get confused.
Expected behavior
81% of high protection and 19% of lower protection, instead of the current 1% + 80%
Screenshots
No response
Versions and configuration
Dark Days Ahead [dda],
Disable NPC Needs [no_npc_food],
Portal Storms Ignore NPCs [personal_portal_storms],
Slowdown Fungal Growth [no_fungal_growth]
]
Additional context
No response
The text was updated successfully, but these errors were encountered: