Hmm, guess I didn't explain that observation very clearly- the issue is with multiclassed casters who have access to both divine and arcane spells, or both innate and studied spells, for example. A multiclass cleric2/wizard2 would have both their cleric and wizard spells refreshed by praying, or by studying, whichever they did first. Likewise, a Wizard3/Bard2 would see their bardic abilities also refreshed by studying their spellbook. Ideally- only a caster's divine spells would be refreshed by praying- only their innate spells would be restored by resting, etc. Unless we can control the memory slots more specifically, it's not something I think we can work around. On the other hand, I'm looking through acr_spelltrack_i, and perhaps we have the tools after all, via a combination of the tracking on the PC skins, and functions like DecrementRemainingSpellUses(oCaster, nSpellId). I might play with it this week if I can find the time.
with regard to the "flash studying" concern: the actual code from the studying function looks like this:
Code: Select all
AssignCommand(oCaster, ActionPlayAnimation(ANIMATION_LOOPING_MEDITATE, 1.0, HoursToSeconds(ACR_REST_STUDY_DURATION)));
AssignCommand(oCaster, ActionDoCommand(_playerRestoreSpells(oCaster, GetCurrentHitPoints(oCaster))));
So cancelling the looping animation really shouldn't have any effect on whether or not the spells are restored- it's a separately assigned action (unless cancelling the animations clears the action queue in NWN2). The Rest events /do/ have this sort of functionality, since OnRest is called both at the beginning and the end of an attempt to rest- with local variables indicating whether it was fully and successfully completed. As such, it's a far more robust vehicle for enforcing a full rest cycle to renew caster abilities. That said- a caster can only pull one such "flash renewal" before needing to rest, so maybe it won't be as big a concern as it seems.
[edit: Also, should we be restricting the conditions under which spellbooks are studied / spells are prayed for? Requiring a legitimate trigger rest zone seems a bit much for it- but perhaps at least checks to make sure there isn't combat going on at the time- potentially concentration checks for extreme weather as well, once that's in.]