Real-time melee combat: physical hit detection, blocking and stamina #5

Open
opened 2026-11-09 16:13:19 +00:00 by claude · 7 comments
Member

Replace the dice-roll hit model with an optional real-time model: swing traces against the target, active blocking, stamina-driven attacks and hit reactions. Build on the Lua combat interfaces in files/data/scripts/omw/combat.

Replace the dice-roll hit model with an optional real-time model: swing traces against the target, active blocking, stamina-driven attacks and hit reactions. Build on the Lua combat interfaces in `files/data/scripts/omw/combat`.
claude added this to the 2. Feel milestone 2026-11-09 16:13:19 +00:00
Author
Member

Step 1: physical hits, implemented locally and not yet committed because GPG signing timed out.

  • New [Game] real time combat setting, on by default. Melee (NPCs and creatures) and projectiles that connect always hit.
  • The classic hit chance becomes a damage multiplier clamped to [0.25, 1], so skill, agility, luck, fatigue and evasion still matter.
  • Unit tests pass, including 3 new ones for the multiplier.
  • A headless A/B test with Morrowind data (mudcrabs vs. the player in god mode) showed classic 0 of 2 attacks hit and real-time 2 of 2. That confirms the code path, but the sample is far too small for balance. This needs a hands-on playtest.

Known side effect: the player now trains weapon skills on every connecting hit, so skills will rise faster than in classic mode.

Remaining for this issue: active blocking, stamina-driven attacks and hit reactions.

**Step 1: physical hits**, implemented locally and not yet committed because GPG signing timed out. - New `[Game] real time combat` setting, on by default. Melee (NPCs and creatures) and projectiles that connect always hit. - The classic hit chance becomes a damage multiplier clamped to [0.25, 1], so skill, agility, luck, fatigue and evasion still matter. - Unit tests pass, including 3 new ones for the multiplier. - A headless A/B test with Morrowind data (mudcrabs vs. the player in god mode) showed classic 0 of 2 attacks hit and real-time 2 of 2. That confirms the code path, but the sample is far too small for balance. This needs a hands-on playtest. **Known side effect:** the player now trains weapon skills on every connecting hit, so skills will rise faster than in classic mode. **Remaining for this issue:** active blocking, stamina-driven attacks and hit reactions.
Author
Member

Step 1 (physical hits) is committed and pushed as 27e35b3ac8. It still needs a hands-on playtest.

Step 1 (physical hits) is committed and pushed as `27e35b3ac8`. It still needs a hands-on playtest.
Author
Member

Breakdown of the remaining work, in order:

  • #19 (5a) Active blocking for the player
  • #20 (5b) Active blocking for NPCs and creatures (after #19)
  • #21 (5c) Stamina-driven attacks
  • #22 (5d) Hit reactions

Step 1 (physical hits, 27e35b3ac8) is done and still needs a hands-on playtest. This epic closes when all four are closed.

Breakdown of the remaining work, in order: - #19 (5a) Active blocking for the player - #20 (5b) Active blocking for NPCs and creatures (after #19) - #21 (5c) Stamina-driven attacks - #22 (5d) Hit reactions Step 1 (physical hits, 27e35b3ac8) is done and still needs a hands-on playtest. This epic closes when all four are closed.
Author
Member

#19 (player active blocking) is done in 9be251af0a and needs a playtest. Added #23 (visible block stance pose) to this epic. Next: #20.

#19 (player active blocking) is done in `9be251af0a` and needs a playtest. Added #23 (visible block stance pose) to this epic. Next: #20.
Author
Member

#20 (NPC and creature blocking) is done in 4e152c7c4e and needs a playtest. Opened a follow-up for headless combat test content, so blocks can be checked without a playtest. Still open: #21 stamina-driven attacks, #22 hit reactions, #23 block stance pose (awaiting Eric's look).

#20 (NPC and creature blocking) is done in `4e152c7c4e` and needs a playtest. Opened a follow-up for headless combat test content, so blocks can be checked without a playtest. Still open: #21 stamina-driven attacks, #22 hit reactions, #23 block stance pose (awaiting Eric's look).
Author
Member

#21 (stamina-driven attacks) is done in 28d5d076a0. It adds a cost on release, an attack fatigue threshold and a low-fatigue strength cap, for the player and the AI, and it needs a playtest. Still open: #22 hit reactions, #23 block stance pose (waiting for Eric to look), and #24 headless combat test content.

#21 (stamina-driven attacks) is done in `28d5d076a0`. It adds a cost on release, an attack fatigue threshold and a low-fatigue strength cap, for the player and the AI, and it needs a playtest. Still open: #22 hit reactions, #23 block stance pose (waiting for Eric to look), and #24 headless combat test content.
Author
Member

Status: all four planned steps are in. #19 player blocking, #20 NPC blocking, #21 stamina attacks and now #22 hit reactions (2c5f6e4e7d) are closed. #24 added a headless duel (SCENARIO=combat docker/ashlar-run.sh) that shows shield blocks (player and AI), flinches, interrupted wind-ups and staggers end to end on the Game Template, without commercial data. Parries, the low-stamina rules and ignoreStagger aren't exercised by it yet; that's #25.

This stays open for Eric's hands-on playtest of the whole melee loop, and for #23 (block stance pose, waiting on Eric's look). Settings to try: [Game] real time combat, block stance speed, weapon block damage, ai active blocking, attack fatigue threshold, attack fatigue cap and hit reactions.

Status: all four planned steps are in. #19 player blocking, #20 NPC blocking, #21 stamina attacks and now #22 hit reactions (`2c5f6e4e7d`) are closed. #24 added a headless duel (`SCENARIO=combat docker/ashlar-run.sh`) that shows shield blocks (player and AI), flinches, interrupted wind-ups and staggers end to end on the Game Template, without commercial data. Parries, the low-stamina rules and `ignoreStagger` aren't exercised by it yet; that's #25. This stays open for Eric's hands-on playtest of the whole melee loop, and for #23 (block stance pose, waiting on Eric's look). Settings to try: `[Game] real time combat`, `block stance speed`, `weapon block damage`, `ai active blocking`, `attack fatigue threshold`, `attack fatigue cap` and `hit reactions`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Gaming/ashlar#5