Commit Graph
475 Commits
Author SHA1 Message Date
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 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 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
unknown ecfac52f75 Address feedback 2026-10-27 19:45:33 +01:00
Alexei Kotov 7a9a87cb25 Merge branch 'nolaunchershadows' into 'master'
Remove launcher shadow settings

See merge request OpenMW/openmw!5549
2026-10-22 05:20:47 +03:00
Gonzo b46ae89646 Fix a small typo 2026-10-21 06:16:02 -06:00
Alexei Kotov d8a884271d Add shadow planes computation method to the in-game settings 2026-10-20 05:54:16 +03:00
Alexei Kotov 8975471d8e Remove launcher shadow settings 2026-10-20 05:54:16 +03:00
Thomas Portal 14f1506354 Warm likely effects before first use 2026-09-14 22:44:35 +02:00
Evil Eye 35c9d6ebe9 Merge branch 'audio-sound-warming' into 'master'
Warm streamed sounds before first use

See merge request OpenMW/openmw!5500
2026-09-05 21:03:50 +00:00
Thomas Portal 62dc7eb099 Warm streamed sounds before first use 2026-09-03 18:45:32 +02:00
Alexei Kotov a042cd34d8 Merge branch 'audio-head-cache' into 'master'
Cache sound file heads so sound starts do not wait for storage

See merge request OpenMW/openmw!5499
2026-08-26 23:41:45 +03:00
AnyOldName3 aba2ba0cec Merge branch 'fiveoclockshadow' into 'master'
In-game shadow settings (#9301)

Closes #9301

See merge request OpenMW/openmw!5442
2026-08-25 22:10:48 +00:00
Cody Glassman d6859f7490 Merge remote-tracking branch 'origin/master' into remove_refraction_omg 2026-08-24 20:11:50 -07:00
Alexei Kotov ca26c7369e In-game shadow settings PoC
Only works if shadows are initially enabled
2026-08-23 02:58:11 +03:00
Cody Glassman a6c0b9563b Merge remote-tracking branch 'origin/master' into begone_wench_i_mean_materials 2026-08-15 16:20:13 -07:00
Cody Glassman 0cbc8158de remove refraction scale setting 2026-08-15 07:29:05 -07:00
Thomas Portal 9ec49cfb47 Cache sound file heads so sound starts do not wait for storage 2026-08-15 14:37:08 +02:00
Thomas Portal ec26c52123 Run Lua GC in parallel with the rest of the frame 2026-08-10 11:27:27 +02:00
Cody Glassman 8da72387d4 add serializer and fix the cs 2026-08-08 10:52:57 -07:00
Alexei Kotov 9f33cf0672 Merge branch 'anisotropy2xcombo' into 'master'
Turn the anisotropy slider into a combo box

See merge request OpenMW/openmw!5426
2026-07-18 16:27:08 +03:00
Alexei Kotov 2236b3cb3e Turn the anisotropy slider into a combo box 2026-07-15 20:55:45 +03:00
Alexei Kotov e4af6e7141 Always try to load NIF files regardless of the version 2026-07-15 02:16:02 +03:00
AnyOldName3 4c7d411d07 Merge branch 'terrainintersection' into 'master'
Add setting to control interaction of focus ray with terrain (#8822)

Closes #8822

See merge request OpenMW/openmw!5367
2026-06-26 23:05:20 +00:00
JarrydandAlexei Kotov 75bd8a8c6f Add joystick mouse emulation mode indicator circle 2026-06-23 03:20:36 +03:00
Alexei Kotov 767150f618 Tint owned focused objects in item view menus (#9157) 2026-06-21 01:56:55 +03:00
Alexei Kotov 52b951f811 Add setting to control interaction of focus ray with terrain (#8822)
This changes the default behavior to one that matches Morrowind
2026-06-20 17:06:28 +03:00
Cody Glassman d7be10259e add clustered volume shading 2026-06-02 17:29:25 -07:00
Alexei Kotov e6a44f5726 Merge branch 'todd_has_enlightned_me' into 'master'
Expose light radius multiplier (#9053)

Closes #9053

See merge request OpenMW/openmw!5294
2026-06-03 02:30:41 +03:00
Cody Glassman 1de987ce47 update settings 2026-05-20 11:07:03 -07:00
thoth-33andAlexei Kotov a4b32fce1f Consistency Fix for L2/R2 in Controller Menus Feature 2026-05-06 04:29:11 +03:00
Cody Glassman 44a7cd8aa2 expose light radius multiplier 2026-04-24 14:59:01 -07:00
Alexei Kotov d2fbd32a1b Merge branch 'profiler_be_gone' into 'master'
Disable Lua profiler by default

See merge request OpenMW/openmw!5097
2026-04-04 02:07:51 +03:00
Cody GlassmanandAlexei Kotov 2b3e24953b Disable Lua profiler by default 2026-04-04 02:07:47 +03:00
Alexei Kotov ff793637a4 Avoid referring to the original engine as MW in PPL description 2026-03-22 15:20:00 +03:00
Alexei Kotov 66f15114a9 In-game checkbox for Clamp Lighting and layout tweaks
Use autosizing and tweak the layout to Fit the fourth checkbox
Correct the documentation version of force PPL description
Shorten the German max lights translation
2026-03-22 15:19:14 +03:00
Cody GlassmanandSarah Sunday e53536a3ec Remove exclusive FFP mode 2026-03-15 14:13:19 -05:00
Alexei Kotov f3c1df883c Re-enable swish sound for throwing weapons (#8926) 2026-01-14 23:03:15 +03:00
Alexei Kotov 3f6ecc4de1 Merge branch 'shield_sheath' into 'master'
Fix shield equip and unequip animations, add docs for shield sheathing feature

See merge request OpenMW/openmw!4936
2025-10-11 09:13:30 +03:00
Andrei Kortunov d9b441ccaa Fix shield equip and unequip animations, add docs for shield sheathing feature (bug 8734) 2025-10-04 16:07:15 +04:00
Dave CorleyandAlexei Kotov fd7e6b6bcb DOC: Document data-local 2025-10-03 00:28:26 +03:00
AnyOldName3 44a14f9a88 Fix #8681, too 2025-08-25 16:37:03 +01:00
AnyOldName3 8dc93e8e55 Document Flatpak paths 2025-08-25 01:04:20 +01:00
Andrew Lanzone 8e76a0ab06 Merge branch 'master' of https://gitlab.com/OpenMW/openmw 2025-08-04 16:44:12 -07:00