IMPORTANT: note about Upgrading to beta.96:
Installation: remove or delete your old MetaPrepa folder. Unzip beta.96 to MyDocs->Override. IF YOUR PC ALREADY HAS A ROD THIS WILL DESTROY IT ALONG WITH ALL BOOKS AND PAGES. A message should appear telling you to rerun the 'mrop' setup from the game console. Probability of this causing insurmountable problems in the module you are currently playing: < 1%
- beta.96 has a workaround for the "Persistent Haste" bug. If Persistent Haste (or perhaps other metamagic buffs) was prepared in Instant-cast mode, and another preparation followed it instantly, the NwN2 executable drops its metamagic-variable and so the buff was cast without being Persistent. The workaround is to add a half-second delay between casts; note that the mode "Instantly" has been changed to "Fast" to reflect that ( the mode "As Actions" has not been changed ).
technotes: A new variable, "MROP_FAST_DELAY", has been added to the rod-object. It is set by default to 0.5f seconds. A new script has been added to the package, 'mrop_setdelay', and can be used at the console to change the delay (or just check what it is currently set to). Details can be found in the header of that script-file.
Since the bug is a timing-related issue it could manifest differently on different computers. If you find that your computer can handle a shorter delay, or needs a longer delay, the float-variable on the rod-object can be changed either with the 'mrop_setdelay' script or by editing the rod-object with the toolset (or a GFF editor). The latter method would assign a new default value that automatically takes effect if and whenever a new Rod is created IG, while the former method needs to be redone every time a new Rod is created. Personally I think the 0.5 sec delay adds a nice spice to Fast buffing and isn't quite the "slap in the face" that Instant-mode used to be; however, the delay can still be set to 0.0 sec if desired.
- other changes: refactored/ optimized many functions. A new bug(s) could have crept in during this process, so I'll leave ver.beta.95 available since it seems very stable (other than the Persistent Haste bug).
All of Kaedrin's PrC Pack (v.1.41.4) functions that are relevant have been broken out and added to #includes that are now integral to the MetaPrepa pack, meaning that all scripts contained herein may be re-compiled without recourse to the kPrC Pack itself. Note that these functions have been altered and are not Kaedrin's responsibility here, but yours and mine ( kevL's ). Credit and thanks to Kaedrin and I hope he sees fit to release the source-code to any future versions of the kPrC.
@brief MetaPrepa is a set of scripts and blueprints that provide for automatic buffing in Neverwinter Nights 2. It is based on Lost Creation's Rod of Preparation, which is based on Loudent's Rod of Full Party Buffing, with the major difference being that MetaPrepa is able to prepare metamagic spells. By placing the Rod into Learn mode, buffs that are cast are immediately written as Pages into a spellcaster's Book of Preparation, so that when the Rod is in Play mode the preparations get recast as they originally were.
The spells that can be prepared are identified from a list of buffs via scripting. The only feats that can be prepared currently are Bardic Inspirations. Animal Companion and Summon Familiar can also be prepared, but they are problematic in that any buffs that were prepared for pets will not recognize the pets as valid targets, unless the pets were summoned prior to the rebuffing sequence. A few other feats such as a few Stormlord feats are also accepted as valid buffs. See the included ReadMe - or the source code - for more detailed information.
Some buffs, notably those cast from subradials (eg, Protection from Evil) will be set to CasterLevel 10 to get around the fact that the caster doesn't technically have such subradial spells memorized, but only its Master entry in Spells.2da (eg, Protection from Alignment). Clerical Domain buffs will be set similarly, again because a Cleric does not technically know the spells. If you wish to get around this you should cast these buffs normally.
MetaPrepa has advanced handling for buffs that are cast on items, so that after the spell is applied initially the Rod will seek out the same item among party members and attempt to re-apply its buff automagically. Also, informational as well as error messages are shown to the player.