- 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>
OSG's dae plugin copies the stream into an unterminated buffer and
collada-dom parses it as a C string, so valid files intermittently failed
with "Extra content at the end of the document" and fell back to
marker_error. Read .dae streams into a string with a NUL appended before
handing them to the plugin. Other formats are unchanged.
Closes#35
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
docker/ashlar-bench.sh boots the Game Template with fixed video settings,
records OpenMW's per-frame profiler trace, and summarizes it with a new
stdlib-only script. By default it renders on the NVIDIA GPU through EGL and
SDL's offscreen driver, so no window opens. docs/ashlar/BENCHMARK.md holds the
method and the first RTX 5060 Ti baseline.
Closes#3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
Morrowind.ini has no Clouds_Maximum_Percent for Ashstorm or Blight, so
esmfallbacks.lua passed 0 and the weather binding threw, aborting the
rest of generateDefaultWeathers. Clamp to a tiny positive value, which
keeps the old C++ behavior of swapping cloud textures immediately.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Set MORROWIND_DATA to a Data Files folder to play it, mounted read-only,
with its own settings and saves.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gitea only falls back to .github/workflows when a commit has no
.gitea/workflows. Adding a small Linux-only workflow here stops
upstream OpenMW's macOS, Windows and full Ubuntu workflows from
queueing on the shared runner, without editing upstream's files.
The workflow checks the Docker build scripts on pushes to main that
touch docker/ or the workflow itself, with a concurrency group and a
10-minute timeout. ASHLAR.md notes that refs without .gitea/workflows,
such as upstream tags, still fall back to .github.
Refs DevOps/software-infrastructure#34
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pipx was retired from EPEL 9 for security reasons, so the Almalinux_Generic
job fails to install it: https://gitlab.com/OpenMW/openmw/-/jobs/17843176178
$ dnf install -y git binutils gcc-toolset-13 ccache cmake unzip pkg-config p7zip p7zip-plugins pipx mesa-libGL-devel libxkbcommon-devel mesa-libEGL-devel fontconfig
Extra Packages for Enterprise Linux 9 - x86_64 39 MB/s | 20 MB 00:00
Extra Packages for Enterprise Linux 9 openh264 7.6 kB/s | 2.5 kB 00:00
Package binutils-2.35.2-72.el9.x86_64 is already installed.
No match for argument: pipx
Error: Unable to find a match: pipx