Skip to content

calcArmorPieceHit⚓︎

This event is raised just after determining which armor piece, if any, was hit with an attack. The slots can be modified, to draw focus onto specific armor slots.

The following table is used by default to determine what armor piece is hit:

Roll (1-100) Slot Fallback
1-29 Cuirass None
30-34 Shield Cuirass
35-39 Shield Left Pauldron
40-49 Left Pauldron None
50-59 Right Pauldron None
60-69 Greaves None
70-79 Helmet None
80-89 Boots None
90-94 Right Gauntlet Right Bracer
95-100 Left Gauntlet Left Bracer
--- @param e calcArmorPieceHitEventData
local function calcArmorPieceHitCallback(e)
end
event.register(tes3.event.calcArmorPieceHit, calcArmorPieceHitCallback)

Tip

This event can be filtered based on the reference.baseObject event data.

Tip

An event can be claimed by setting e.claim to true, or by returning false from the callback. Claiming the event prevents any lower priority callbacks from being called.

Event Data⚓︎

  • attacker (tes3reference): Read-only. A shortcut to the attacker mobile's reference.
  • attackerMobile (tes3mobileActor): Read-only. The mobile who is doing the hitting.
  • fallback (number): A secondary slot to check for equipment on, if no armor is found using the primary slot.
  • mobile (tes3mobileActor): Read-only. The mobile who is being hit.
  • projectile (tes3mobileProjectile, nil): Read-only. The projectile used that is hitting the given reference. This is nil for all melee combat.
  • reference (tes3reference): Read-only. A shortcut to the mobile's reference.
  • slot (number): The primary slot that is targeted.