Hardcode09
From NWN1 Custom Content Guide
Issue
Cannot determine the actual dice roll result for spell resistance, saving throws, and attack rolls. If you wanted to implement your own additions to combat (auto fail on 1, for example), you can't get the raw dice value rolled to see what it was.
- Rendarkin Monday, 29 March 2004 09:06AM
Discussion
Attack rolls (most melee actions for that matter) are truly hardcoded. Only some saves where related to other hardcoded areas of the game i.e. quivering palm are hardcoded in the same way.
The engine functions of ResistSpell() and xSave() can be duplicated by scripting. You'll notice wrapper functions are used for these script functions (um nw_i0_spells methinks) in included files as well (plus it fires the miss or saved visual effects), but to make a change that will take you'll need to recompile the scripts that call that include and pack into the module, hak or override (last one being icky). Spell resist is pretty straightforward to do script-wise, saves are a lot thornier (many rules + exceptions to check for--a great deal of work). Perhaps a custom system for a few circumstances and default to xSave() for everything else will help getting around the more annoying aspects of these functions.
Bio has patched this code a lot...vanilla version is pretty good now. If it weren't for breaking spell resist recently, I'd probably go for them as is. Lokey
Lokey 22:16, 24 Feb 2005 (GMT)
