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>
Files in this directory describe OpenMW API for Lua Development Tools (LDT).
*.doclua files are taken (with some modifications) from LDT distribution and are distributed under MIT license.
Openmw-specific docs (openmw/*.lua) are under GPLv3 license.
To get a Lua IDE with integrated OpenMW documentation and code autocompletion do the following:
- Install and run LDT.
- Press
File/New/Lua Projectin menu. - Specify project name (for example the title of your omwaddon)
- Set
Targeted Execution EnvironmenttoNo Execution Environment, andTarget Grammartolua-5.1. - Press
Next, choose theLibrariestab, and clickAdd External Source Folder. Then specify there the path to this directory. - Press
Finish.