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>
Building OpenMW documentation
Building in Docker (the recommended way)
Preparing Docker image
Run the following commands from OpenMW source directory to build a new Docker image openmw_doc:
cd docs
docker build -t openmw_doc .
cd ..
(or run script docs/prepare_docker_image.sh)
This step needs to be repeated only if any dependencies were changed.
The image is based on Ubuntu 22.04 and installs the system tools and Python packages required to build the documentation. The bundled installation script builds Lua 5.1 and LuaRocks and installs a pinned version of openmwluadocumentor.
Generating HTML
Run the following command from OpenMW source directory to generate the documentation:
docker run --user "$(id -u)":"$(id -g)" --volume "$PWD":/openmw openmw_doc \
sphinx-build /openmw/docs/source /openmw/docs/build
(or run script docs/build_docs.sh)
To view the generated documentation just open docs/build/index.html in a browser.
Building without Docker (an alternative way)
Building documentation without Docker is more complicated as it requires multiple dependencies.
Installation of required python packages
From OpenMW source directory
pip3 install -r docs/requirements.txt
Installation of openmwluadocumentor:
Debian/Ubuntu
sudo apt install luarocks
git clone https://gitlab.com/ptmikheev/openmw-luadocumentor.git
cd openmw-luadocumentor/luarocks
luarocks --local pack openmwluadocumentor-0.2.0-1.rockspec
luarocks --local install openmwluadocumentor-0.2.0-1.src.rock
Windows
- install LuaRocks (heavily recommended to use the standalone package) https://github.com/luarocks/luarocks/wiki/Installation-instructions-for-Windows
git clone https://gitlab.com/ptmikheev/openmw-luadocumentor.gitcd openmw-luadocumentor/luarocks- open "Developer Command Prompt for VS <2017/2019>" in this directory and run:
luarocks --local pack openmwluadocumentor-0.2.0-1.rockspec
luarocks --local install openmwluadocumentor-0.2.0-1.src.rock
Generating HTML
Run the following command from OpenMW source directory to generate the documentation:
sphinx-build docs/source docs/build