Repository navigation
Rework body armor to resolve through ACE plate damage - #378
Merged
Merged
Conversation
Worn armor layers are virtual ACE plates ({ Material, Armour, Normal,
Coverage, OnHit }) resolved per layer by ACE.ResolveArmorLayer on top of
ACE.CalcDamage, so body armor gets material effectiveness, LOS angle
modifier, overmatch and shatter for free. Adds hidden Aramid material,
passes HitPos/Dir through the damage chain for position-based coverage,
ricochets off the armor surface normal, and applies the damaged-prop
rule for worn thickness. Seat drivers resolve through the same path.
Hits that real body armor stopped or weakened deal nothing below
ace_bodyarmor_min_damage (default 4 HP); HL2 suit armor is exempt.
Includes a LuaJIT self-test for layer resolution and the damage floor.
KemGus
marked this pull request as ready for review
November 2, 2026 11:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #376
Summary
Improvement on squishy damage, a long coming improvement.
What changed exactly:
Damage to players and bones.
A bone threshold (skull 3.6 mm, ribs 2 mm) decides whether a 'wound' happens at all.
on top of that, the wound grows with caliber, plus damage from the energy left in the body.
A hit the bone stops still deals energy damage.
Body armor uses ACE plates:
The ACE_GetBodyArmor hook returns layers made of an ACE material and a thickness.
ACE.ResolveArmorLayer runs each layer through the existing ACE.CalcDamage, so slope, material effectiveness, the --penetration roll and ceramic shatter come from ACE's own code.
A stopped round still causes blunt trauma, set per material (BluntTransfer).
New material: Aramid (Kevlar). It's hidden from the armor tool and meant for body armor only.
Ricochets off body armor use the armor's surface instead of the player's hitbox. Bare flesh never ricochets.
HL2 suit armor is now an Aramid layer: 7 mm at 100 points. It also covers the head above 75 points, and the limbs above 50 at a quarter of the thickness. It loses points for the energy it absorbs, and the engine's own armor handling is turned off during the hit so it doesn't apply twice.
Seat drivers are protected by the seat's own material through the same code. Which means that a thicker seat no longer makes you immune to any damage.
New convar ace_bodyarmor_min_damage (default 4): hits that real body armor stopped or let through deal nothing below this many HP. Suit armor doesn't count. Made it for a more prolonger gameplay. it is in a global file.
Why:
Body armor reuses ACE's plate code instead of being a separate system.
dev has a bug: every player's chest gets a flat 3 mm of armor even with 0 suit armor, so 9x19 does 0 HP to the chest.
On dev, 100 suit armor makes a player immune to 9x19, 5.56 and 7.62x39 to the head and chest.
How it was tested:
Tables
Setup to state: ACE.SquishyDamage called the way a ace bullet impact calls it. Penetration is ACE's own mm RHA.
hl2 suuit armor points lost per hit, starting at 100
Additional notes:
Not in this PR
ACE_GetBodyArmorhook added here)AI disclosure
Used AI under supervision and my orchestration a->b. Ready to answer any question!