Medical - Use leftover bandage effectiveness
When merged this pull request will:
- Change bandaging to use leftover bandage effectiveness on other wounds in same limb.
Example: Applying Packing Banage on limb with 1 Medium Velocity Wound (bandage effectiveness of 1.5) and 1 Small Velocity Wound (bandage effectiveness of 2) in the same limb.
Medium velocity will be closed but bandage still has 33% of its effectiveness (1.5 - 1 / 1.5). 0.66 (2 * .33) Small Velocity will be closed afterwards. Repeat while bandage still has left over effectiveness or there are still wounds in the same limb. Diff is best viewed in IDE, me and Git don't get along.
Anything outstanding that needs to be addressed with this?
I haven't seen this PR before, thanks for bringing it to attention.
I am not sure I like this. If I have 2 separate wounds on my arm I wouldn't expect 1 bandage to cover both, they probably are not close enough.
Maybe a setting, but then it seems to be too close to just general effectiveness factor at that point.
By that logic, shouldn't bandage effectiveness be capped at 1x for any wound? I understand 2x Velocity Wounds as being two separate gunshot wounds, not one really large wound, and I suspect the same for most of the userbase.
If the _amountOf property of wounds is to be interpreted as amount of wounds and not severity, then this is an extension of current functionality. If that's not the case, then you'd be right, but I'd say some variable names need to be changed around the codebase. My justification for this PR was the comment on line 30 of fnc_bandageLocal, which implies effects of this PR were originally intended, but either weren't finished/figured out on time for the Medical Rewrite's release.
Hmm, I see, you are probably right. I'll bring this up internally and see if we can get a positive answer from someone more familiar with medical specifically. Your justification seems correct to me though.
I am not sure I like this. If I have 2 separate wounds on my arm I wouldn't expect 1 bandage to cover both, they probably are not close enough. Maybe a setting, but then it seems to be too close to just general effectiveness factor at that point.
By that logic, shouldn't bandage effectiveness be capped at 1x for any wound? I understand 2x Velocity Wounds as being two separate gunshot wounds, not one really large wound, and I suspect the same for most of the userbase.
Well, you could argue that these wounds could be close together. If we go by severity, maybe a bandage capable of treating 1 large wound could then be applied over 3 small ones. Improbable, but not impossible. I believe that this could be a setting, especially useful for those seeking a more softcore experience, who still wish to use ACE's depth without the.. uhh.. involved labor, if that makes any sense. I feel that both approaches make sense and could be argued in their own ways. If we go by realism, I would go by the 1x cap, for playability, accessibility, and choice, a setting for the multi-use could be argued for, as well.
Of course, as a non-coder, I genuinely have no idea how easy or hard it would be to implement this, take it with a grain of salt.
We need to test how this effects ace_medical_treatment_fnc_getBandageTime as it uses the results of findMostEffectiveWound
If we are "doing more" with the same bandage we should have to increase bandage time.
We need to test how this effects
ace_medical_treatment_fnc_getBandageTimeas it uses the results offindMostEffectiveWoundIf we are "doing more" with the same bandage we should have to increase bandage time.
Bandage time returns same as it would without this PR. If logic is "more wounds = more time", then that logic should be changed to be (_amount min _effectiveness) * _bandageTime, with _bandageTime being the time for each size category (4, 6 and 8 seconds) instead of current implementation which uses linearConversion with range _effectiveness.
IRL if the wounds are close enough together and the banage is large enough you could cover multiple wounds with one bandage. For us the problem is that there's no way to know if a wound is adjacent to another wound.
I wouldn't mind capping effectivemess at 1, but I think we would also have to look at capping the number of each size of wounds that each body part can receive, and combining smaller wound types into larger ones when that makes sense. For example, give arms something like a max of 8 small, 4 medium, and 2 large wounds. If a unit already has a 2 medium wounds and would normally get another medium wound, have a chance to change one into a large wound instead, giving them 1 medium and 1 large wound.
What I'd rather do is refactor wounds entirely with HashMap, do away with the size categories and use severity based on the damage that caused the wound instead (ie, 5.56 makes a single Velocity Wound with severity 2.3, while .50 BMG makes a single Velocity Wound with severity 6), esp. since with #8278 high damage is more likely to cause multiple wounds. This'd allow for mostly keeping current getBandageTime logic, simplify iteration over wounds where it's needed (stitching, bandaging, and reopening) and deal away with the need to even have this PR, since then we could just say that a bandage addresses a single wound and that's it.
_amountOf is intended to represent percentage of wound taking effect, not a count of sub-wounds or similar.
I think we can go ahead with this change, bandaging and wounding involves some abstraction and I know for sure when we rewrote medical we intended to allow bandages to effect multiple wounds as part of that abstraction.
Edit: There's almost certainly discussion of this somewhere in old PRs. There should be one for when I first introduced the bandage time function somewhere that might have relevant discussion.
git why