Files
2026-11-17 15:31:09 -05:00

18 KiB

Ashlar devlog

Newest entries first. The ashlar-build scheduled task and interactive sessions both append here.

2026-11-17 (afternoon run)

  • Got the lock right away. Available memory stayed at 2.0 to 2.3 GB for 15 minutes (Firefox, the desktop app, Element and GNOME hold most of it), under the 4 GB rule, so nothing was built. Second run in a row skipped this way; planning only.
  • #30 tree is still uncommitted. One fix to it: camera/first_person.lua doesn't step the springs when dt is 0 (the turn and fall rates divide by it) but still reapplies the current offsets, so nothing pops.
  • Split #9 Lua UI into #40 window kit (scalable layout, shared widgets, fallback setting), #41 inventory, #42 journal and quest log, #43 dialogue (needs live-dialogue bindings) and #44 map (needs map texture bindings). Each replaces its MyGUI window through I.UI.registerWindow.
  • Next: build and test the #30 tree (docker/ashlar-build.sh, then SCENARIO=presence docker/ashlar-run.sh and a default boot), commit with Closes #30. Then #31 to #34 (#7 animation).

2026-11-17 (early run)

  • Got the lock right away. Available memory stayed at 3.7 GB for over 25 minutes (Firefox, Chrome and the desktop app hold most of it), under the 4 GB rule, so nothing was built and no code was committed.
  • #30 first-person presence: implementation written and left uncommitted in the working tree for the next run. Engine: the first-person neck controller takes an extra rotation and offset (mwrender/viewmodel.cpp), and Lua gets camera.set/getFirstPersonViewModelRotation and ...Offset. Lua: camera/first_person.lua (weapon sway and the landing and take-off dip) with the math in camera/presence.lua. There's a new First Person Presence settings group with Reduce Motion as the master switch, and head bobbing is on by default (height 2, roll 0.1). Camera interface v3. Tests are in testcamerapresence.cpp and testviewmodel.cpp, plus SCENARIO=presence with scripts/ashlar_presence_summary.py. Docs are in CAMERA.md and SCENARIOS.md.
  • Lesson: the neck controller's offset and rotation are in object root space (the character's own frame), not world space, so the view model offset must not be rotated by yaw.
  • Split #8 controller support into #36 default gamepad layout, #37 analog stick curves, #38 menu and dialogue navigation audit, and #39 radial quick-select.
  • Next: build and test the #30 tree (docker/ashlar-build.sh, then SCENARIO=presence docker/ashlar-run.sh and a default boot), fix what fails, and commit with Closes #30. Then #31 to #34 (#7 animation).

2026-11-16 (afternoon run)

  • Got the lock right away. Available memory was 3.9 GB at the start and passed 4 GB within a minute; the default JOBS=3 MEMORY=6g build was fine.
  • #29 third-person camera, 53e3d92496: built and tested the tree left by the early run. components-tests 1644 passed (8 new), openmw-tests 637 passed. SCENARIO=camera passed 5/5 in three runs. The wall pulls the camera from 192 to 95 at once, it eases back out in about 0.64 s (44 to 46 frames), and aim mode reaches weight 1 with the FOV at 0.9 of base and the target distance at 134.4. The default boot is clean.
  • Lesson: docker/ashlar-run.sh reused player_storage.bin from earlier runs, so the new Lua setting defaults never applied and 4 of 5 camera checks failed. The script now deletes the stored Lua settings before each run. Real profiles keep their old values too (noted in docs/ashlar/CAMERA.md).
  • #35 (bug, opened and closed this run), 76d1796e6c: valid .dae files intermittently failed with "Extra content at the end of the document", including the Game Template's own player body. OSG's dae plugin seems to hand collada-dom an unterminated buffer. loadNonNif now appends a NUL to .dae input. That gave zero failures in four runs, against one or two per run before. Earlier scenario screenshots with an error-marker player were this bug.
  • Feel of the camera (offset, ease-out, aim framing, standing preview) needs Eric's playtest.
  • Next: #30 first-person presence, then #31 to #34 (#7 animation).

2026-11-16 (early run)

  • Got the lock right away. Available memory stayed at 2 to 2.9 GB for over 15 minutes (Firefox, opencode and the desktop app hold most of it), under the 4 GB rule, so nothing was built and no code was committed.
  • #29 third-person camera: implementation written and left uncommitted in the working tree for the next run. Defaults on for the shoulder view, auto shoulder switch, standing preview, deferred preview rotation, move 360, smooth view change and [Game] smooth movement. New collision ease-out (collisionEaseOut, 0.15 s half-life, 60 u/s minimum speed) and aim mode (aimMode, distance 0.7, FOV 0.9, shoulder view kept for ranged weapons and spells). Math in camera/ease.lua with tests in components_tests/lua/testcameraease.cpp; SCENARIO=camera with scripts/ashlar_camera_summary.py; docs in docs/ashlar/CAMERA.md.
  • Split #7 into #31 smooth transitions on by default, #32 speed-matched locomotion blending, #33 two-bone IK solver and #34 foot placement.
  • Next: build and test the #29 tree (docker/ashlar-build.sh, then SCENARIO=camera docker/ashlar-run.sh), fix what fails, commit with Closes #29. Then #30.

2026-11-15 (afternoon run)

  • Got the lock right away. Host memory had about 4 GB available at the start and 2 GB during the build; the default JOBS=3 MEMORY=6g build (about 250 steps after header changes) finished without trouble.
  • #28 ledge mantling, 9e28969629. New [Game] mantling (on), mantle max height 1.1 and mantle duration 0.4 s. Jumping or falling into a wall while moving towards it (within 60 degrees) makes the movement solver cast the player's shape up, across the edge and down. A walkable surface above the feet, within reach and with headroom gets climbed along that checked path, with no animation needed and no fall damage. Lua: self.controls.mantle (false vetoes) and the AshlarMantle local event. The rules are in mwphysics/mantle.cpp; the casts are tryMantle in movementsolver.cpp.
  • Decisions: the climb state lives on MWPhysics::Actor (not saved) and moves through ActorFrameData, so the climb steps at the physics rate. Who may start a climb (setting, player, Lua veto, not knocked down or recovering) is decided on the main thread in prepareSimulation, so no settings are read on physics threads. Logging and the Lua event happen there too, on the frame after the sync. The climb crosses just above the ledge if a second cast shows that is clear, or at the top of the probe if not. A move of over 30 units off the path (scripts, teleports) cancels the climb.
  • Lesson: the Game Template has no box or wall mesh. A hand-written COLLADA box (docker/scenarios/mantle/meshes/ashlar_ledge.dae, CC0) works: it renders, gets collision from its triangles, and setScale makes it a taller wall.
  • New SCENARIO=mantle: 1 climb (46.4 up from mid-jump) ending 81 units up on the 80-unit ledge, 0 with the Lua veto, and 0 at a 240-unit wall. The highest plain jump was 37.5.
  • Tests: build OK, components-tests 1636 passed, openmw-tests 637 passed (18 new). The default boot is clean.
  • Feel (reach, duration, and whether Jump should be needed) needs Eric's playtest.
  • Next: #29 third-person camera defaults and polish, then #30.

2026-11-15

  • Got the lock right away. Host memory was 3 to 5 GB available; builds ran at the default JOBS=3 MEMORY=6g without trouble.
  • #26 movement acceleration, f3bb0753c7. New [Game] movement acceleration (on), movement acceleration time 0.15 s, movement deceleration time 0.1 s and movement air control 0.3. The ramp is in mwmechanics/movementramp.cpp and runs after upstream's smooth movement.
  • Decisions: the ramp works in the actor's own frame, so mouse turning and AI steering are never delayed. A reversal slows down through zero, then uses the leftover time to speed up, which keeps the result independent of frame rate. NPCs and creatures ramp up but stop at once, so they can't overshoot a path point. On a jump frame, the horizontal request is recovered from the normalized vector, so a jump doesn't dip the ramp.
  • #27 sprint, a691315db7. Engine action 52 (input.ACTION.Sprint, self.controls.sprint), Left Alt and D-pad up, because L3 is already Sneak (noted on #8). Speed is 1.4x run speed, it drains 10/s on top of running (halved at Athletics 100), and it needs 10% fatigue to start. Use cancels it until Sprint is released. The rules are in mwmechanics/sprint.cpp.
  • Lesson: a sprint rule of "ends at zero fatigue" never fires. Fatigue regenerates a little each frame, so while running it sits just above 0. The sprint now ends below 1% of max. The new scenario caught this.
  • Lesson: the Game Template start is close to the sea. A long straight run ends up swimming, which ends a sprint. The scenario's sprint phases now teleport back to the spawn point (global script) and run in a circle.
  • New SCENARIO=movement (docs/ashlar/SCENARIOS.md). Results: full speed after 0.150 s, stop after 0.101 s, reversal after 0.25 s, sprint at 1.40x run speed until fatigue reached 9.9/1000, no sprint starting at 5% fatigue, and Use cancelling a sprint.
  • Tests: build OK, components-tests 1636 passed, openmw-tests 619 passed (23 new). The default boot is clean, and input_v3.xml has both new binds. The combat scenario after #26 gave 12 player blocks, 6 parries and 12 NPC blocks, with no script errors.
  • Feel for both needs Eric's playtest.
  • Next: #28 ledge mantling.

2026-11-14 (afternoon run)

  • Waited about 15 minutes for the project lock (held by tidewall-build). Host memory had about 3 GB available at build time, under the 4 GB guideline; the build was a small ccache rebuild and finished without trouble, and memory was at 6 GB for the scenario run.
  • #25 combat scenario phases, 70b7ea51e8. The duel now runs block, parry (shield unequipped, Block held with the blade), attack, ignorestagger (the duelist's own hit handler sets ignoreStagger), tired (player fatigue held at 5%) and capped (held at 25%, full wind-ups). The engine logs Ashlar stamina: ... too tired to attack once per press for any actor, and ... attack strength X capped to Y; logging only, no behavior change. The run script counts the new events, and the scenario's default run time is 150 s.
  • Tests: build OK, components-tests 1636 passed, openmw-tests 596 passed (no new unit tests; logging only). Scenario run: 13 player blocks, 6 parries, 13 NPC blocks, 8 refused attacks, 4 capped attacks (to 0.625, as the formula predicts at 25% fatigue), 5 ignoreStagger hits with 0 duelist flinches in the window. Default boot unchanged and clean.
  • Decision: the duelist's handler relies on handlers running last-added first (aux_util.callEventHandlers), so it runs before the built-in data-mw combat handler that applies stagger.
  • Split #6 movement and camera into #26 acceleration curves, #27 sprint, #28 mantling, #29 third-person camera defaults and polish, and #30 first-person presence.
  • Next: #26 movement acceleration.

2026-11-14

  • Got the lock right away. Host memory started at 3 to 4 GB available and was 6 to 7 GB by build time.
  • #24 headless combat test content, bc600b3359. SCENARIO=combat docker/ashlar-run.sh loads docker/scenarios/combat, which is our own CC0 Lua content. A "Test Duelist" is cloned from the template's player record and given a shield and blade on marker_error.dae. It fights the player, who holds Block for 12 s and then attacks. The engine logs each block as Ashlar block: ... at verbose level, and the run prints counts. Two runs gave 6 and 7 player blocks and 5 and 11 NPC AI blocks. Documented in docs/ashlar/SCENARIOS.md.
  • #22 hit reactions, 2c5f6e4e7d. New [Game] hit reactions setting, on by default. A connecting melee hit queues a 0.1 to 0.7 s flinch, scaled by damage over max health and by strength. It starts when the Lua stagger sets hit recovery, so ignoreStagger prevents it. A block 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 a reaction, a wind-up is interrupted and no attack starts. The rules are in mwmechanics/hitreaction.cpp. Block resolution moved into resolveMeleeBlock for NPCs and creatures.
  • Decisions: the reaction timer and pending flinch are transient CreatureStats fields. Hit animations are untouched, and the timer carries the effect where the content has no animations. Durations are constants, not settings, until Eric's playtest says what to tune.
  • Lesson: local scripts must set dynamic stats (health, fatigue) on self. A global script gets "Allowed only in local scripts for 'openmw.self'".
  • Tests: build OK, components-tests 1636 passed, openmw-tests 596 passed (7 new). The combat scenario showed 55 flinches, 8 interrupted player wind-ups and 7 duelist staggers, with no errors. The default boot is clean.
  • Also fixed a stray "ai active blocking" doc line that had ended up under "attack fatigue cap".
  • Opened #25 to add parry, low-stamina and ignoreStagger phases to the scenario. #5 stays open for Eric's playtest and #23.
  • Next: #25 (small), then #6 movement and camera. Split #6 into sub-issues first.

2026-11-13 (afternoon run)

  • Waited about 35 minutes for the project lock (held by vitals-build), then a few more for host memory to reach 4 GB before building.
  • #21 stamina-driven attacks, 28d5d076a0. With real time combat on, the attack's fatigue cost is paid in prepareHit, when the swing is released (melee, ranged and thrown), and applyFatigueLoss no longer charges on the hit. The base cost scales from half at no wind-up to full at full wind-up; the weapon part keeps the classic weight * strength * fWeaponFatigueMult. New [Game] attack fatigue threshold (0.1): no weapon attack starts below it or at zero fatigue. The player gets "You are too tired to attack." once per press, and combat AI doesn't wind up until fatigue recovers. New [Game] attack fatigue cap (0.5): below it, the strongest attack falls linearly to 0.25 strength at zero fatigue. The rules are in mwmechanics/stamina.cpp.
  • Decisions: spells and lockpicks are exempt, and god mode skips the rules. The message is hard-coded English, because no GMST fits; localize it with the Lua UI work. mAttackWindUp keeps the uncapped wind-up and only mAttackStrength is capped.
  • Tests: build OK, components-tests 1636 passed, openmw-tests 589 passed (11 new). The headless boot is clean. Not exercised end to end; the Game Template has no hostile melee actor (#24). Feel and the default values need Eric's playtest.
  • Next: #24 headless combat test content, which makes #19 to #22 checkable without a playtest, then #22 hit reactions.

2026-11-13

  • Waited about an hour for the project lock (held by vitals-build).
  • An interactive session on 11-12 had already added weapon parries and the raised-shield pose (78f1f9516d, #23 awaiting Eric's look).
  • #20 NPC and creature blocking, 4e152c7c4e. New [Game] ai active blocking setting, on by default, used with real time combat. NPCs and creatures use the player's stance and arc rules and get no roll. Combat AI raises the stance when an enemy in front of it winds up a melee attack within 1.5x reach. It rolls once per wind-up (10% to 90% by Block skill plus a fifth of agility, times fatigue), reacts in 0.6 to 0.15 s, holds 0.5 s after the wind-up, caps a block at 2 s with a 1 s retry pause, and doesn't attack while blocking. The logic is in mwmechanics/aiblock.cpp.
  • Decision: AI blocks use a separate, unsaved CreatureStats::mAiBlockHeld that Actors clears every frame before AI runs. A block then can't outlive the combat package, and Lua block requests aren't overwritten.
  • Tests: build OK, components-tests 1636 passed, openmw-tests 578 passed (12 new). The headless boot is clean. No NPC block happened in a run, because the Game Template has no shields or hostile melee actors. Opened #24 for CC0 headless combat test content.
  • Next: #21 stamina-driven attacks, or #24 first if it's quick. It would make #19 to #22 testable without a playtest.

2026-11-12 (afternoon run)

  • #19 player active blocking, 9be251af0a. With real time combat on, the player holds the new Block action (engine action 51, Lua input.ACTION.Block and self.controls.block; defaults are middle mouse and D-pad down) to raise a block stance. It needs a shield and a drawn weapon. In the stance, no attacks start, movement drops to [Game] block stance speed (0.5), and melee hits inside the block arc are always blocked. Fatigue cost falls with Block skill, to half at 100. Without the stance the player doesn't block. NPCs and creatures keep the roll until #20. The rules are in mwmechanics/activeblock.cpp.
  • Decision: the stance is stored as a transient CreatureStats::mBlockHeld (not saved), so #20 can set it for NPCs through the same Lua control. Lua doesn't suppress Use itself; the engine refuses to start attacks in the stance, so behavior with the setting off is unchanged.
  • Tests: build OK, components-tests 1636 passed, openmw-tests 564 passed (6 new). The headless boot is clean, and input_v3.xml gets the new defaults. A blocked hit wasn't exercised end to end, because the Game Template has no shield or hostile melee actor. That needs test content or Eric's playtest, as does feel.
  • Opened #23 for a visible raised-shield pose while in the stance.
  • If upstream adds an action 51, renumber A_Block when rebasing.
  • Next: #20 NPC and creature blocking. Consider writing small CC0 test content (a shield and a hostile melee NPC) so blocks can be verified headlessly.

2026-11-12

  • #3 performance baseline: added docker/ashlar-bench.sh and scripts/ashlar_bench_summary.py. The GPU run uses SDL's offscreen driver with NVIDIA EGL, so it is headless. Baseline on the RTX 5060 Ti at 1080p: about 624 mean FPS and 283 1% low over three 60-second runs, within 2%. The method and numbers are in docs/ashlar/BENCHMARK.md.
  • Build and both unit test suites pass (558 tests).
  • #4 CI is still blocked on the shared runner (DevOps/software-infrastructure#58).
  • Split #5 into #19 player active blocking, #20 NPC and creature blocking, #21 stamina-driven attacks and #22 hit reactions.
  • Next: #19.