Skip to content

Rework body armor to resolve through ACE plate damage - #378

Merged
Ally-for-Hire merged 1 commit into
ACE-Project-Team:devfrom
KemGus:feature/flesh-damage
Nov 4, 2026
Merged

Ally-for-Hire merged 1 commit into
ACE-Project-Team:devfrom
KemGus:feature/flesh-damage

Conversation

@KemGus

@KemGus KemGus commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

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:

  • Basically a lot of bots spawned in local server and played around with it.
  • Besides that, created a local test
  • Created a comparison list that will help get this pr merged :)

Tables

Setup to state: ACE.SquishyDamage called the way a ace bullet impact calls it. Penetration is ACE's own mm RHA.

Round (pen) Hit dev, no suit branch, no suit dev, 100 suit branch, 100 suit
9x19 (3.2 mm) head 5.6 13.0 0 13.0
chest 0 12.1 0 5.2
arm / leg 10.6 / 14.7 11.1 / 15.6 1.3 / 1.8 7.5 / 10.6
5.56x45 (6.7 mm) head 46.5 84.4 0 18.9
chest 11.5 40.8 0 12.3
arm / leg 13.4 / 18.1 17.9 / 25.1 2.7 / 3.6 17.9 / 25.1
7.62x39 (6.8 mm) head 72.5 100.7 0.4 22.0
chest 29.8 47.8 2.1 15.1
arm / leg 16.1 / 21.8 21.2 / 29.6 3.2 / 4.3 21.2 / 29.6
7.62x51 (8.1 mm) head 86.9 169.0 17.4 61.9
chest 36.8 59.3 7.4 35.4
arm / leg 20.1 / 26.8 26.6 / 37.3 4.0 / 5.4 26.7 / 37.3

hl2 suuit armor points lost per hit, starting at 100

Round (pen) Hit dev branch
9x19 (3.2 mm) head / chest 0 / 0 13 / 13
arm / leg 6 / 8 5 / 5
5.56x45 (6.7 mm) head / chest 0 / 0 26 / 26
arm / leg 11 / 15 7 / 7
7.62x39 (6.8 mm) head / chest 2 / 9 29 / 29
arm / leg 13 / 18 8 / 8
7.62x51 (8.1 mm) head / chest 70 / 30 41 / 41
arm / leg 17 / 22 11 / 11

Additional notes:

  • On dev, ACE never changes hl2 suit points. The points dev loses come from the engine's own armor handling, so a hit ACE scores as 0 HP costs the suit nothing.
  • The branch is more lethal: 7.62x39 and 7.62x51 headshots now kill a 100 HP player in one shot.
  • hl2 suit armor barely changes rifle damage to limbs on the branch, because the limb layer is only 1.75 mm.

Not in this PR

  • Wearable helmet/vest (next PR, uses the ACE_GetBodyArmor hook added here)

AI disclosure

Used AI under supervision and my orchestration a->b. Ready to answer any question!

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
KemGus marked this pull request as ready for review November 2, 2026 11:14
@Ally-for-Hire
Ally-for-Hire merged commit 1e4f0fe into ACE-Project-Team:dev Nov 4, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants