245 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 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 4dda556716 Keep Block when another script overrides combat controls
The built-in player controls cleared self.controls.block whenever combat
controls were not allowed, which also wiped a block requested by a
script that called I.Controls.overrideCombatControls(true).

Refs #19

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 16:13:10 -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
blagish 44903310fc Spellcasting interface version bump 2026-10-15 15:33:35 +04:00
blagish b90f7aff4a Don't roll consumed ingredient effects twice 2026-10-15 15:33:35 +04:00
Dave Corley 0a520521cd CLEANUP: Save state mutation should be gated behind a function and not contextually mutable 2026-09-04 11:19:32 -05:00
Alexei Kotov 44c14fe735 Merge branch 'projectile-onhit-handlers' into 'master'
Magic projectile onhit handler

Closes #9265

See merge request OpenMW/openmw!5483
2026-08-26 03:55:50 +03:00
jvoisin 7d626a9919 Merge branch 'showmessage_event_arg' into 'master'
ShowMessage event now supports showInDialogue argument too

See merge request OpenMW/openmw!5538
2026-08-24 19:03:59 +00:00
Mads Buvik Sandvei 07f06eecb5 Review comments 2026-08-24 19:13:16 +02:00
Mads Buvik Sandvei 0e4d7156ba More review comments 2026-08-24 00:14:36 +02:00
Mads Buvik Sandvei e2b73d51f1 Merge branch 'master' into projectile-onhit-handlers 2026-08-23 23:49:56 +02:00
Mads Buvik Sandvei 09d94551d9 Review comments 2026-08-23 21:43:35 +02:00
gbtb c88fd1ea68 ShowMessage event now supporst showInDialogue argument too 2026-08-22 18:21:29 +10:00
LeanandEvil Eye 63ba859f69 Added nil check to iterateAndFilterAiSequence. If the filterPackages wrapper passes a callback that returns nil, no packages will be removed. Adjusted removePackages to return an explicit boolean if argument is nil. All previous functionality was retained. 2026-08-21 23:15:29 +02:00
Mads Buvik SandveiandEvil Eye b75c2eada6 Combat global 2026-08-20 15:38:37 +00:00
Mads Buvik Sandvei 6644b6de1d Review comments 2026-08-13 21:50:30 +02:00
Mads Buvik Sandvei 480e9b3395 Include hitNormal information 2026-08-06 22:38:05 +02:00
Mads Buvik Sandvei 88f11c5130 Magic Projectile on hit handler 2026-08-06 21:48:31 +02:00
Dave CorleyandEvil Eye 108eb1d6b8 CLEANUP: Alphabetize eventHandlers in worldEventHandlers yes really 2026-08-03 16:51:12 +02:00
Dave CorleyandEvil Eye 9383b93a4f CLEANUP: Refactor ToggleSaveState to SetSaveState to be more async friendly 2026-08-03 16:51:12 +02:00
Dave CorleyandEvil Eye ba4b40e668 FEAT: Add an eventHandler in global scope to switch save states for objects 2026-08-03 16:51:12 +02:00
Mads Buvik Sandvei 32e95533ad Remove unused 2026-07-31 19:50:33 +02:00
Mads Buvik Sandvei 15853f0278 Move unpressing button back to mouseRelease 2026-07-31 19:41:41 +02:00
Mads Buvik Sandvei c8ed4101c8 Replace mouseRelease with mouseClick 2026-07-31 19:35:09 +02:00
Mads Buvik Sandvei 180293d326 Make input renderer use an actual button with highlighting, and a minimum size 2026-07-30 22:07:17 +02:00
Mads Buvik SandveiandAlexei Kotov 4d71e1580c Update comment. Move Magic lock/open success messages to Mechanics 2026-07-30 00:42:35 +03:00
Mads Buvik SandveiandAlexei Kotov 0651038d97 Also treat negative values as truthy 2026-07-30 00:42:34 +03:00
Mads Buvik SandveiandAlexei Kotov 1342d1f7c3 Check for any non-zero global variable, instead of specifically 1. And check for nil 2026-07-30 00:42:34 +03:00
Mads Buvik SandveiandAlexei Kotov 4d7ae80957 Move unlockAttempted to crimes.lua and implement reading global variable 2026-07-30 00:42:34 +03:00
Mads Buvik SandveiandAlexei Kotov eff957ac6b Document the isReflect parameter 2026-07-30 00:42:34 +03:00
Mads Buvik SandveiandAlexei Kotov 2b9edcab61 Fix doc 2026-07-30 00:42:34 +03:00
Mads Buvik SandveiandAlexei Kotov 3ad5daf348 Dehardcode apply magic effects 2026-07-30 00:42:34 +03:00
MathiasandClaude Fable 5 4f93c2460e Clamp out-of-range values in the number settings renderer (#9183)
Previously the number renderer silently discarded input outside the
min/max range and restored the stored value, forcing users to guess the
limits. Clamp to the nearest bound instead.

The integer check runs before clamping so that non-integer input is
still rejected for integer settings rather than accepted whenever it
happens to clamp to an integral bound.

The focusLoss handler now always stores the resolved value - the clamped
number, or the previous value when the input cannot be parsed. Writing
the setting is what rebuilds the widget, so a value that clamps onto the
value already stored would otherwise leave the raw text on display.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 08:56:49 +02:00
Alexei Kotov 39c1c415d9 Merge branch 'lua-api-attack-strength' into 'master'
Add "windUp" To Lua API for OnHit

See merge request OpenMW/openmw!5320
2026-07-23 15:07:39 +03:00
Cole Green b86b305358 Resolve review comments - set default to -1.f and document it can be -1 in Lua refs 2026-07-22 10:26:37 -05:00
nox7 bec9d72a4f Implement attack windUp, add to Lua API 2026-07-22 10:26:37 -05:00
nox7 e6aff6ebd1 Lazy-load settings page elements 2026-07-21 19:27:01 -05:00
Mads Buvik SandveiandAlexei Kotov 7bd9242eb9 Add support for passing records and record IDs to the combat interface where appropriate 2026-07-12 17:06:17 +03:00
Alexei Kotov 9e4d36920c Lua API revision bump
Stagger state bindings and stagger application dehardcoding
2026-07-08 20:03:44 +03:00
mxorkandAlexei Kotov 870b08422a tweak; merge applyKnockedDown/applyHitRecovery into applyStagger 2026-07-08 20:00:45 +03:00
mxorkandAlexei Kotov 4c597b1e11 squash; add docs, rename applyKnockdown to applyKnockedDown for consistency 2026-07-08 20:00:45 +03:00
Alexei Kotov e1d75a65a5 Merge branch 'perfectlystill' into 'master'
Disable player controls processing during paralysis (#9101)

Closes #9101

See merge request OpenMW/openmw!5323
2026-06-11 16:52:03 +03:00
hemaris-tr db97a9305c Decrease max maxDistance to fit min view distance 2026-05-25 01:52:16 +00:00
hemaris-tr 54d0e1a64e Restrict maxDistance to be ≥30 and ≤7168 2026-05-25 01:52:16 +00:00
hemaris-tr 213017ab8c Define 3rd person camera max distance setting 2026-05-25 01:52:16 +00:00
hemaris-tr 6e9b4c3b4b Replace hardcoded local maxDistance with a setting 2026-05-25 01:52:16 +00:00
Alexei Kotov 1b3931eabb Disable player controls processing during paralysis (#9101) 2026-05-14 10:52:01 +03:00
Alexei Kotov 8cb4a80f07 Bump Combat interface version 2026-05-11 05:29:19 +03:00
Evil Eye d27691dbe9 Add additional parameters to onHit to disable default behaviour 2026-04-27 17:00:22 +02:00