So after a long time I have finally figured out how to make this work at least somewhat smoothly. This mod is based on the idea of spontenous casting from 3e (at least I think it was originally from 3e), but the mechanics are quite different. At first I made similar mod for myself, but the way it worked was most inelegant. This one works much better so I dare to post it for anyone interested.
Here's how it works: There are two new innate abilities - spontaneous heal and spontaneous harm (SPHEAL1.SPL and SPHARM1.SPL). When one of these is cast, it changes for 3 rounds all available memorised priest spells to healing/harming spells of the same level (with exception of second level spells, which have no healing/harming counterpart and therefore the first level heal/harm spell is used for them). During this time icons of those spells are changed to the respective heal/harm spell, but the name out of the spell remains (so it's possible to pick certain spell with use of tabulator). Casting sound and animation remains that of the original spell but also necromancy spell animation is added to at least somehow differentiate the spontaneous casting (So there are two animations at the same time, but the necromancy animation is usually more distinctive. This is something I still want to improve). The string still displays casting of the original spell, but spontaneous spell is cast. During those 3 rounds an icon is displayed on the character portrait (unused icons of assasination for harming and evasion for healing). After the spontaneous spell is successfully cast, then the 3 round period for spontaneous casting immediatelly ends (even if hasn't yet been 3 rounds) and normal spellcasting is restored.
Here is the important note: If the spontaneous spell is cast at the end of the 3 round period, which will end during its casting, then the original spell will be cast. This is something I tried to prevent, but the solution happened to be too complicated to implement. So it's basically important not to choose spells too long (or pause game). I could extend the 3 round period, but as I tried it was enough. That is all I think.
Mechanics of this mod are simple. Every priest spell is given additional melee ability at level 21 (for healing) and 22 (for harming) and the two innate abilities only give casting level bonus for priest spells (to cast at level 21 or 22). This shouldn't effect anything else.
Few last things. I don't know how rewriting dialog.tlk exactly works (I'm not using Weidu, just Near Infinity), so I'm not sure transfer new strings (other then copying the entire dialog.tlk, which is a bad solution). Therefore I used for this mod already existing strings (Heal and Harm) for the two innate abilities. If anyone knows a simple method to implement new strings, please share.
Also I only assigned the new abilities to the three priest kits (spontaneous healing for priest of Lathlander, spontaneous harming for priest of Talos and both for priest of Helm), but it will work with anyone who can cast priest spells, so you can assign these two spells to any one of them (use kitlist.2da to identify the clab file of the class and kit and type GA_SPHEAL1 or GA_SPHARM1 to the respective clab files).
Another thing is that I made this mod to work only to level 13 and first six spell levels (which is more than enough for BG:EE anyway).
Lastly there are two options of this mod. The first option enables to cast converted spells instantly after the use of spontaneous casting ability. The second option removes the cast instantly effect, so the converted spell is cast next round. The second option should simulate certain disadvantage as it lasts one round longer to cast the healing spell, so it's still handy to have some healing spells memorized to use in combat.
Note that this is not a Weidu mod. To use this mod, just copy all files from one of these folders to your override folder. It contains all priest spells patched, so if you have some other mod installed which also patched them, this mod will rewrite them.
So enjoy!
Here's how it works: There are two new innate abilities - spontaneous heal and spontaneous harm (SPHEAL1.SPL and SPHARM1.SPL). When one of these is cast, it changes for 3 rounds all available memorised priest spells to healing/harming spells of the same level (with exception of second level spells, which have no healing/harming counterpart and therefore the first level heal/harm spell is used for them). During this time icons of those spells are changed to the respective heal/harm spell, but the name out of the spell remains (so it's possible to pick certain spell with use of tabulator). Casting sound and animation remains that of the original spell but also necromancy spell animation is added to at least somehow differentiate the spontaneous casting (So there are two animations at the same time, but the necromancy animation is usually more distinctive. This is something I still want to improve). The string still displays casting of the original spell, but spontaneous spell is cast. During those 3 rounds an icon is displayed on the character portrait (unused icons of assasination for harming and evasion for healing). After the spontaneous spell is successfully cast, then the 3 round period for spontaneous casting immediatelly ends (even if hasn't yet been 3 rounds) and normal spellcasting is restored.
Here is the important note: If the spontaneous spell is cast at the end of the 3 round period, which will end during its casting, then the original spell will be cast. This is something I tried to prevent, but the solution happened to be too complicated to implement. So it's basically important not to choose spells too long (or pause game). I could extend the 3 round period, but as I tried it was enough. That is all I think.
Mechanics of this mod are simple. Every priest spell is given additional melee ability at level 21 (for healing) and 22 (for harming) and the two innate abilities only give casting level bonus for priest spells (to cast at level 21 or 22). This shouldn't effect anything else.
Few last things. I don't know how rewriting dialog.tlk exactly works (I'm not using Weidu, just Near Infinity), so I'm not sure transfer new strings (other then copying the entire dialog.tlk, which is a bad solution). Therefore I used for this mod already existing strings (Heal and Harm) for the two innate abilities. If anyone knows a simple method to implement new strings, please share.
Also I only assigned the new abilities to the three priest kits (spontaneous healing for priest of Lathlander, spontaneous harming for priest of Talos and both for priest of Helm), but it will work with anyone who can cast priest spells, so you can assign these two spells to any one of them (use kitlist.2da to identify the clab file of the class and kit and type GA_SPHEAL1 or GA_SPHARM1 to the respective clab files).
Another thing is that I made this mod to work only to level 13 and first six spell levels (which is more than enough for BG:EE anyway).
Lastly there are two options of this mod. The first option enables to cast converted spells instantly after the use of spontaneous casting ability. The second option removes the cast instantly effect, so the converted spell is cast next round. The second option should simulate certain disadvantage as it lasts one round longer to cast the healing spell, so it's still handy to have some healing spells memorized to use in combat.
Note that this is not a Weidu mod. To use this mod, just copy all files from one of these folders to your override folder. It contains all priest spells patched, so if you have some other mod installed which also patched them, this mod will rewrite them.
So enjoy!







