The NWN combat engine is something to behold. Thousands of feats, hundreds of types of effects, dozens of combat states. Much of it has been hand coded (and hardcoded!) such as what weapons are finesse, how animations are tied to actions and "combat flurries".
Much of the engine logic is on the fandom wiki: nwn.fandom.com so if it is missing from here it'll be (mostly) there. Notably here we will update for any NWN:EE specific updates.
These articles will go into detail of the engine mechanics and some of the more or less hidden areas of it and for instance what states are caused by what effects. What is flat footed? how does sneak attack work? When can attacks of opportunity occur for spellcasting, moving and firing in combat? How are rolls determined for concentration checks?