Follow-up from #19 and #20. The Game Template has no shields and no hostile melee actors, so blocking, parries and (soon) stamina attacks and hit reactions can only be checked by unit tests and Eric's playtests.
Work
Write a small test content file of our own (CC0, no third-party assets) that the headless run can load on top of the Game Template. It needs a shield item, a melee weapon, and a hostile melee NPC with a shield placed near the start position. It reuses Game Template meshes.
Add an opt-in mode to docker/ashlar-run.sh (for example SCENARIO=combat) that loads it, and a Lua test script that has the NPC and the player fight for a few seconds and logs block, parry and hit events to stdout.log.
Never use commercial game data.
Acceptance
A headless run shows at least one NPC block and one player block (via self.controls.block) in the log. The default boot is unchanged.
The method is documented in docs/ashlar/.
Follow-up from #19 and #20. The Game Template has no shields and no hostile melee actors, so blocking, parries and (soon) stamina attacks and hit reactions can only be checked by unit tests and Eric's playtests.
**Work**
- Write a small test content file of our own (CC0, no third-party assets) that the headless run can load on top of the Game Template. It needs a shield item, a melee weapon, and a hostile melee NPC with a shield placed near the start position. It reuses Game Template meshes.
- Add an opt-in mode to `docker/ashlar-run.sh` (for example `SCENARIO=combat`) that loads it, and a Lua test script that has the NPC and the player fight for a few seconds and logs block, parry and hit events to `stdout.log`.
- Never use commercial game data.
**Acceptance**
- A headless run shows at least one NPC block and one player block (via `self.controls.block`) in the log. The default boot is unchanged.
- The method is documented in `docs/ashlar/`.
claude
added this to the 2. Feel milestone 2026-11-13 09:31:59 +00:00
docker/scenarios/combat/: our own CC0 Lua content, no new assets. The global script creates a shield and a short blade (both on meshes/marker_error.dae) and spawns a "Test Duelist" NPC in front of the player. The NPC's record is cloned from the template's player record, so it uses the template body and animations. Each actor's local script toughens it (5000 health and fatigue, Block and Short Blade 100) and equips the kit. The duelist runs a normal Combat AI package against the player. The player holds self.controls.block from 2 s to 14 s, then attacks every 1.4 s until 40 s. Both sides log hits through I.Combat.addOnHitHandler.
SCENARIO=combat docker/ashlar-run.sh mounts the scenario read-only, adds it to openmw.cfg, defaults BOOT_SECONDS to 120, and prints the scenario log plus player and NPC block counts. The default boot is unchanged.
Engine: each successful shield block or parry now writes a verbose Ashlar block: <blocker> blocked <attacker> with shield|weapon, stance|roll, damage through N line (MWMechanics::logBlock).
Docs: docs/ashlar/SCENARIOS.md.
Tests
Build OK. components-tests 1636 passed, openmw-tests 589 passed. No unit test was added, because the only engine change is a log line.
Two scenario runs: 6 and 7 player shield blocks (all in the held stance, 0 damage), and 5 and 11 NPC AI shield blocks of about 19 player swings. Unblocked hits did 2.5 to 4.4 damage both ways. The screenshot shows both actors with the placeholder kit. No Lua or engine errors.
Default boot: clean screenshot, no scenario lines, no errors.
Not covered yet
Parries (weapon block without a shield) and the low-fatigue attack rules from #21. Fatigue is held at 5000, so stamina never runs low. Both are easy to add as more phases or scenarios later.
Feel still needs Eric's playtest.
Done in `bc600b3359`.
**What changed**
- `docker/scenarios/combat/`: our own CC0 Lua content, no new assets. The global script creates a shield and a short blade (both on `meshes/marker_error.dae`) and spawns a "Test Duelist" NPC in front of the player. The NPC's record is cloned from the template's player record, so it uses the template body and animations. Each actor's local script toughens it (5000 health and fatigue, Block and Short Blade 100) and equips the kit. The duelist runs a normal `Combat` AI package against the player. The player holds `self.controls.block` from 2 s to 14 s, then attacks every 1.4 s until 40 s. Both sides log hits through `I.Combat.addOnHitHandler`.
- `SCENARIO=combat docker/ashlar-run.sh` mounts the scenario read-only, adds it to `openmw.cfg`, defaults `BOOT_SECONDS` to 120, and prints the scenario log plus player and NPC block counts. The default boot is unchanged.
- Engine: each successful shield block or parry now writes a verbose `Ashlar block: <blocker> blocked <attacker> with shield|weapon, stance|roll, damage through N` line (`MWMechanics::logBlock`).
- Docs: `docs/ashlar/SCENARIOS.md`.
**Tests**
- Build OK. components-tests 1636 passed, openmw-tests 589 passed. No unit test was added, because the only engine change is a log line.
- Two scenario runs: 6 and 7 player shield blocks (all in the held stance, 0 damage), and 5 and 11 NPC AI shield blocks of about 19 player swings. Unblocked hits did 2.5 to 4.4 damage both ways. The screenshot shows both actors with the placeholder kit. No Lua or engine errors.
- Default boot: clean screenshot, no scenario lines, no errors.
**Not covered yet**
- Parries (weapon block without a shield) and the low-fatigue attack rules from #21. Fatigue is held at 5000, so stamina never runs low. Both are easy to add as more phases or scenarios later.
- Feel still needs Eric's playtest.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Follow-up from #19 and #20. The Game Template has no shields and no hostile melee actors, so blocking, parries and (soon) stamina attacks and hit reactions can only be checked by unit tests and Eric's playtests.
Work
docker/ashlar-run.sh(for exampleSCENARIO=combat) that loads it, and a Lua test script that has the NPC and the player fight for a few seconds and logs block, parry and hit events tostdout.log.Acceptance
self.controls.block) in the log. The default boot is unchanged.docs/ashlar/.Done in
bc600b3359.What changed
docker/scenarios/combat/: our own CC0 Lua content, no new assets. The global script creates a shield and a short blade (both onmeshes/marker_error.dae) and spawns a "Test Duelist" NPC in front of the player. The NPC's record is cloned from the template's player record, so it uses the template body and animations. Each actor's local script toughens it (5000 health and fatigue, Block and Short Blade 100) and equips the kit. The duelist runs a normalCombatAI package against the player. The player holdsself.controls.blockfrom 2 s to 14 s, then attacks every 1.4 s until 40 s. Both sides log hits throughI.Combat.addOnHitHandler.SCENARIO=combat docker/ashlar-run.shmounts the scenario read-only, adds it toopenmw.cfg, defaultsBOOT_SECONDSto 120, and prints the scenario log plus player and NPC block counts. The default boot is unchanged.Ashlar block: <blocker> blocked <attacker> with shield|weapon, stance|roll, damage through Nline (MWMechanics::logBlock).docs/ashlar/SCENARIOS.md.Tests
Not covered yet