25095 Commits
Author SHA1 Message Date
claudeandClaude Opus 5.5 53e3d92496 Modern third-person camera defaults, collision ease-out and aim mode
Ashlar checks / tooling (push) Successful in 5s
- Shoulder view, auto shoulder switch, standing preview, deferred preview
  rotation, move 360, smooth view change and [Game] smooth movement are
  on by default.
- Collision ease-out: the camera still snaps in on collision but eases
  back out (0.15 s half-life, 60 u/s minimum speed).
- Aim mode: with a ranged weapon or a spell readied in third person the
  view stays over the shoulder, moves closer and narrows the FOV. Camera
  interface v2 adds getAimWeight and enable/disable functions.
- Pure math in camera/ease.lua with unit tests; SCENARIO=camera with
  PASS/FAIL checks; docs in docs/ashlar/CAMERA.md.
- ashlar-run.sh deletes stored Lua settings before each run so changed
  defaults are tested.

Closes #29

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 15:45:11 -05:00
claudeandClaude Opus 5.5 9e28969629 Add ledge mantling
Ashlar checks / tooling (push) Successful in 5s
New [Game] mantling setting, on by default, with mantle max height (1.1
times the actor's height above its feet) and mantle duration (0.4 s).
When the player jumps or falls into a wall while moving towards it
(within 60 degrees), the movement solver casts the player's collision
shape up, across the edge and down. If it finds a surface flat enough to
stand on, above the feet and within reach, with headroom and room on top,
the player moves up, across and onto it along that checked path. Movement
and jump input are ignored meanwhile, and the climb ends any fall without
fall damage. No animation is needed. A script move or teleport, noclip or
paralysis cancels a climb.

Lua: self.controls.mantle (true by default) vetoes climbs while false,
and the actor's scripts get an AshlarMantle event with the ledge height
when one starts. The engine logs "Ashlar mantle:" lines at verbose level.
Player only; with the setting off nothing changes.

The geometry rules (reach, headroom, room on top, slope, too high, too
low) and the climb path are in mwphysics/mantle.cpp, apart from the
physics calls, with unit tests. The new mantle scenario uses a CC0 box
mesh written for it: the player climbs an 80 unit ledge, doesn't climb it
with the Lua veto, and doesn't climb a 240 unit wall.

Closes #28

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 15:44:40 -05:00
claudeandClaude Opus 5.5 a691315db7 Add a stamina-driven sprint
Ashlar checks / tooling (push) Successful in 9s
New [Game] sprint setting, on by default, with sprint speed multiplier
(1.4 times run speed), sprint fatigue drain (10 per second on top of
running, halved at Athletics 100) and sprint fatigue threshold (0.1 of
maximum fatigue to start). A sprint ends when fatigue falls below 1% of
maximum; regeneration keeps fatigue just above 0 while running, so
exactly 0 is never reached.

Sprint is engine action 52, Lua input.ACTION.Sprint and the player's
'Sprint' Lua action, with self.controls.sprint. Defaults are Left Alt
and D-pad up, because L3 is already Sneak. Sprinting needs forward
movement within 45 degrees, and isn't possible while sneaking, in the
block stance, swimming, levitating, knocked down or paralyzed. Pressing
Use with a weapon or spell ready ends the sprint until Sprint is
released, so no attack starts while sprinting. A sprint counts as
running for animations, Athletics and the running fatigue cost. AI
doesn't sprint. With the setting off the control does nothing.

The rules are in mwmechanics/sprint.cpp with unit tests. The movement
scenario gains sprint, tiredsprint and sprintuse phases, run in a
circle from the start point so the player stays on land.

Closes #27

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 04:12:57 -05:00
claudeandClaude Opus 5.5 f3bb0753c7 Add movement acceleration and deceleration
Ashlar checks / tooling (push) Successful in 6s
New [Game] movement acceleration setting, on by default, with
movement acceleration time (0.15 s), movement deceleration time (0.1 s)
and movement air control (0.3). Movement ramps towards the requested
movement in the actor's own frame, so turning is never delayed.
Reversing slows down through zero before speeding up the other way,
and sideways movement left over from a direction change dies away at
the deceleration rate. NPCs and creatures stop at once so they never
overshoot a path point. With the setting off, behavior is unchanged.

The ramp is in mwmechanics/movementramp.cpp with unit tests, including
frame-rate independence from 1/30 to 1/240 s. A new headless
SCENARIO=movement logs the player's speed as it starts, stops and
reverses.

Refs #26

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 03:35:19 -05:00
claudeandClaude Opus 5.5 70b7ea51e8 Add parry, ignoreStagger and low-stamina phases to the combat scenario
Ashlar checks / tooling (push) Successful in 5s
The headless duel now drops the player's shield and holds Block to parry
with the blade, has the duelist set ignoreStagger on hits it takes for a
window, then holds the player's fatigue below the attack fatigue
threshold and below the attack fatigue cap.

The engine logs refused attacks (once per press, any actor) and capped
attack strength at verbose level as "Ashlar stamina:" lines, and
docker/ashlar-run.sh counts parries, refused and capped attacks, and the
duelist's flinches inside the ignoreStagger window. The scenario's
default run time is now 150 s.

Closes #25

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 15:43:52 -05:00
claudeandClaude Opus 5.5 2c5f6e4e7d Add hit reactions for real time combat
Ashlar checks / tooling (push) Successful in 5s
With [Game] real time combat and the new [Game] hit reactions setting on
(default), melee hits cause short reactions:

- A connecting hit queues a flinch of 0.2 to 0.7 s, growing with damage
  up to a quarter of max health and halved at zero attack strength. It
  starts when the hit's stagger is applied, so Lua's ignoreStagger and
  god mode prevent it.
- A blocked hit or parry makes the blocker recoil for 0.1 to 0.25 s, and
  a blocked blow at 0.75 strength or more staggers the attacker for 0.25
  to 0.6 s.
- During any reaction, an attack wind-up is interrupted and no new attack
  starts. Hit animations still play where the content has them; the
  timer works without them, as on the Game Template.

The rules are in mwmechanics/hitreaction.cpp. The shield block and parry
resolution moves into resolveMeleeBlock, shared by NPCs and creatures.
The combat scenario now counts reactions. Also moves a stray line of the
ai active blocking docs back under that setting.

Closes #22

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 03:50:14 -05:00
claudeandClaude Opus 5.5 bc600b3359 Add a headless combat scenario with a hostile duelist
Ashlar checks / tooling (push) Successful in 6s
SCENARIO=combat docker/ashlar-run.sh loads docker/scenarios/combat on top
of the Game Template: our own CC0 Lua content that gives the player a
shield and blade and spawns a hostile duelist with the same kit, cloned
from the template's player record. The player holds Block, then attacks,
and the run prints block counts. The default boot is unchanged.

The engine now logs each successful shield block or parry at verbose
level ("Ashlar block: ..."), so runs can count them.

Documented in docs/ashlar/SCENARIOS.md.

Closes #24

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 03:30:23 -05:00
claudeandClaude Opus 5.5 28d5d076a0 Make attacks stamina-driven with real time combat
With [Game] real time combat on:
- An attack's fatigue cost is paid when the swing is released, not when
  it lands. The base cost (fFatigueAttackBase plus fFatigueAttackMult
  times encumbrance) scales from half at no wind-up to full at full
  wind-up; the weapon part stays weight * strength * fWeaponFatigueMult.
- No weapon attack can start at zero fatigue or below the new
  [Game] attack fatigue threshold (0.1 of max). The player gets a
  "too tired to attack" message once per press; combat AI waits for
  fatigue to recover instead of winding up. Spells aren't affected.
- Below [Game] attack fatigue cap (0.5 of max), the strongest possible
  attack falls linearly to a quarter strength at zero fatigue.

The rules are in mwmechanics/stamina.cpp, with unit tests. Behavior with
real time combat off is unchanged.

Closes #21

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 16:09:04 -05:00
claudeandClaude Opus 5.5 4e152c7c4e Add active blocking for NPCs and creatures
With real time combat and the new [Game] 'ai active blocking' setting
(on by default), NPCs and creatures block through the same stance and
arc rules as the player instead of the classic roll.

In combat, an actor with a shield ready and its weapon drawn raises the
stance when an enemy in front of it winds up a melee attack within
reach. Whether it reacts is rolled once per wind-up (10% at 0 Block
skill and agility, up to 90%, scaled by fatigue), and its reaction
delay falls from 0.6 s to 0.15 s with skill. It keeps the block up for
half a second after the wind-up ends so it catches the swing, drops it
after two seconds at most so a held wind-up can't pin it, and starts
no attacks while blocking.

The decision lives in mwmechanics/aiblock.cpp. Combat AI sets a
separate, unsaved CreatureStats flag that is cleared every frame before
AI runs, so a block never outlives the combat package and a Lua block
request is left alone. Actors without a shield never block, and a
creature blocks only if it can carry a shield.

Closes #20

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 04:31:38 -05:00
claudeandClaude Opus 5.5 78f1f9516d Let the player block with a weapon, and raise the shield while blocking
Holding Block now works without a shield: with a drawn melee weapon the
player parries melee hits from the front. A parry lets [Game] 'weapon
block damage' (default 0.5) of the damage through, and the weapon takes
the rest as wear. It costs fatigue scaled by Block skill and trains
Block like a shield block. A shield still blocks the whole hit.

While in the stance with a shield, the left arm holds the shield raised
using the shield group's "block start" to "block hit" keys. Animations
without those keys are left alone.

Requested by Eric during a playtest of #19.

Refs #19
Refs #23

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 16:28:09 -05:00
claudeandClaude Opus 5.5 9be251af0a Add active blocking for the player
With [Game] 'real time combat' on, the player blocks by holding the new
Block action instead of relying on the classic block roll. Holding Block
with a shield equipped and the weapon drawn raises the block stance: no
new attacks start, movement slows to [Game] 'block stance speed'
(default 0.5), and every melee hit inside the fCombatBlockLeftAngle to
fCombatBlockRightAngle arc is blocked with no roll. Shield durability,
fatigue loss and Block skill training work as before, but the fatigue
cost now falls with Block skill, to half at 100. Without the stance the
player doesn't block. NPCs and creatures keep the classic roll (#20).

Block is engine action 51, exposed to Lua as input.ACTION.Block and as
the player's 'Block' Lua action, with self.controls.block. Defaults are
the middle mouse button and D-pad down, which nothing else uses. With
the setting off, behavior is unchanged.

The pure rules (arc, stance gate, fatigue scaling) live in the new
mwmechanics/activeblock.cpp with unit tests.

Closes #19

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 16:01:43 -05:00
claudeandClaude Opus 5.5 27e35b3ac8 Add real-time combat: connecting attacks always hit
With the new [Game] 'real time combat' setting (on by default), melee
and ranged attacks that physically connect always hit. The classic hit
chance becomes a damage multiplier clamped to [0.25, 1], so weapon
skill, agility, luck, fatigue and the target's evasion still matter and
average damage stays near classic balance. Applies to NPCs, creatures
and projectiles. Set it to false for Morrowind's hit and miss rolls.

Refs #5

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 14:42:58 -05:00
AnyOldName3 c0790fc755 Merge branch 'fix/uninitialized-save-values' into 'master'
Build and test / Ubuntu (push) Failing after 28m1s
Reusable Windows workflow / windows-${{ inputs.image }} (push) Canceled after 0s
Build and test / Windows (2022) (push) Canceled after 0s
Build and test / MacOS (map[image:macos-26-intel]) (push) Canceled after 0s
Build and test / MacOS (map[image:macos-26]) (push) Canceled after 0s
Reusable MacOS workflow / ${{ inputs.image }} (push) Canceled after 0s
Initialize some uninitialized variables

See merge request OpenMW/openmw!5760
2026-11-09 01:17:30 +00:00
Alexei Kotov 06a88fe992 Merge branch 'fix/navmeshdb-wal' into 'master'
Reduce drive write load to navmesh.db

See merge request OpenMW/openmw!5674
2026-11-08 20:54:12 +03:00
Alexei Kotov 7ae6a16e61 Merge branch 'fix_coverage_build' into 'master'
Fix coverage build

See merge request OpenMW/openmw!5726
2026-11-08 20:52:18 +03:00
blagish 85805434f7 Initialize some uninitialized variables 2026-11-08 00:55:38 +04:00
Alexei Kotov 5b75e3eb22 Merge branch 'esm4-various-fixes-again' into 'master'
Fix various ESM4-related issues and parsing problems

See merge request OpenMW/openmw!5751
2026-11-07 18:59:02 +03:00
Aussiemon 9889b225b1 FONV -> FNV standardization 2026-11-05 15:49:51 -07:00
Aussiemon a3b088c445 Small npc cleanup 2026-11-05 14:43:27 -07:00
Alexei Kotov f2f1f45747 Merge branch 'fix/soultrap-invalid-targets' into 'master'
Remove Soul Trap from targets it can't trap

Closes #4973 and #9435

See merge request OpenMW/openmw!5722
2026-11-06 00:39:21 +03:00
Alexei Kotov f5f869f831 Merge branch 'downloads-are-optional' into 'master'
Make downloads in CMake optional

See merge request OpenMW/openmw!5748
2026-11-06 00:34:48 +03:00
Aussiemon 856ee25c31 Make NPC game format one member variable 2026-11-05 09:35:16 -07:00
Aussiemon 911a3acce2 Better body part texture condition 2026-11-05 09:34:18 -07:00
Aussiemon 5973c82453 Store ESM4 eye records 2026-11-05 09:32:37 -07:00
Aussiemon 7e24f05d05 Fix missing FO3/FNV npcs 2026-11-05 09:32:36 -07:00
Alexei Kotov d0c0fc0e60 Merge branch 'formid-registry-disabled-refs' into 'master'
Formid registry disabled refs

Closes #9224

See merge request OpenMW/openmw!5448
2026-11-05 14:38:02 +03:00
AnyOldName3 274ba04fbc Make downloads in CMake optional 2026-11-04 14:00:11 +00:00
Alexei Kotov 9666b295d1 Merge branch 'esm4-versions' into 'master'
Handle ESM4 classification by game in a better way

See merge request OpenMW/openmw!5732
2026-11-04 01:30:42 +03:00
Aussiemon d5f4fc8dcb Reduce gameformat includes 2026-11-03 01:10:02 -07:00
Aussiemon cda8f4bb9a Change game format masters to span 2026-11-03 00:57:51 -07:00
Aussiemon fd5a37aa65 Move gameformat to its own header 2026-11-03 00:39:52 -07:00
Aussiemon 2300a70589 Make NPC game format one member variable 2026-11-02 23:44:35 -07:00
blagish 8dd5865361 Format the time of day with the Calendar localization 2026-11-02 18:36:12 +04:00
Alexei Kotov 16b14001cf Merge branch 'fiftythree' into 'master'
Bump the version to 0.53.0

See merge request OpenMW/openmw!5736
2026-11-01 11:39:00 +03:00
blagish fd65ff785d Treat negative souls as no soul 2026-11-01 00:03:30 +04:00
blagish 4a7cae7129 Remove Soul Trap from targets it can't trap 2026-11-01 00:03:30 +04:00
Aussiemon 5dc2e29984 Update warning message for VER_094 2026-10-30 14:47:45 -06:00
Aussiemonandjvoisin f830b842be Wording and translation changes
Co-authored-by: jvoisin <julien.voisin@dustri.org>
2026-10-30 14:33:52 -06:00
Aussiemon 983c1e8ad2 Add operators for game format 2026-10-30 13:34:37 -06:00
Alexei Kotov 9db80c64b5 Bump the version to 0.53.0 2026-10-30 20:20:01 +03:00
Aussiemon 0f42bbd997 Add some unit tests 2026-10-30 00:14:09 -06:00
Aussiemon 7360e367c1 Handle previous-masters' game formats and ambiguous lod choice 2026-10-30 00:13:59 -06:00
Aussiemon 337b68fab0 Defensive naming 2026-10-29 19:17:23 -06:00
Aussiemon 1afec0ecb5 Add watchdog unit tests 2026-10-29 18:29:49 -06:00
Aussiemon a514fb7e85 Backup and restore launcher settings when dropped by old versions 2026-10-29 15:41:07 -06:00
Alexei Kotov 62e338219b Merge branch 'moreweatherstuff' into 'master'
Add weathers to openmw.content

See merge request OpenMW/openmw!5723
2026-10-29 09:13:09 +03:00
Alexei Kotov d004b00f5a Merge branch 'fix/default-globals' into 'master'
Restore lost default global variables

See merge request OpenMW/openmw!5724
2026-10-29 09:03:59 +03:00
Aussiemon c2f781d776 Fix uninitialized ESM4 versions in getDistantMeshPattern() 2026-10-28 20:18:59 -06:00
Aussiemon d249e80b21 Fallback for gender in newer games 2026-10-28 19:07:02 -06:00
Aussiemon 418d0edf56 Revise some conditions to use gameformat 2026-10-28 19:07:01 -06:00