MissEvelyn wrote: ↑Sat Apr 09, 2022 12:44 pm
What I would love - and I know this is asking a lot - is for the new spontaneous spells to work similar to how the traditional NWN spontaneous spells work. Meaning you just drag them from the Cleric spell list to the hotbar and they automatically become cast as (S) spontaneous spells, similar to how Cure Wounds spells already work.
It would be a quality of life improvement over using the Radial menu, which is already clogged up with so many new things. But, I suspect there was a good reason new spontaneous spells weren't implemented that way in the first place.
This is more of a technical note and response both to self and to other future devs should they decide to take over cleric domain design.
We currently have two approaches to spontaneous casting for vancian spellbooks:
1. NWN’s vanilla approach: dragged from spellbook to the hotbar and automatically spontaneously cast if there are no existing spell slots memorized for that spell.
Pro:
very intuitive and easy to use on the user end
Con:
to make this happen, due to hardcoded nature of its functions, this must be done through .2da edits and will require Hak changes
It is also independent of domains and will apply to the entirety of the class instead of just a specific domain.
Every spell that we want to add for spontaneous casting will need to be manually placed in the .2da, which meant this is best for generic spontaneous spell casts rather than bulk and nuanced spontaneous spellcasting
2. Our current scripted approach (method developed and pioneered by a previous dev, Peppermint) is an NWNX hack and function that adds an dynamic ability to mimic the spell to be spontaneously cast and remove spellslot upon being cast.
Pro:
Doesn’t require .2da edit, can be done entirely through script.
Can be utilized for nuanced and bulk addition of spontaneous spellcasting with ease
Overall a better and easier method on the development end
Con:
inconvenient to use on the player end
Isn’t supported as nicely as the vanilla NWN spontaneous spellcasting do
Discussion:
Method 1 is best done for generic spells that applies to the entirety of the class rather than nuanced conditions based on domains. The latter is best done through method 2 even if at the expense of the player-side convenience.
However, given that method 2 was developed before developers had access to haks in general, we can potentially come up with a hybrid alternative, pending more internal discussion, testing, and feedback.
We first look at the domain spells that are unique to domains and are not offered through general cleric spellbook. Examples are Moon domain’s moonbeam and displacement.
Those spells can then be added for spontaneous casting on the .2da side. For those clerics that do not have access to the spells, they should not be able to spontaneously cast them. For those that took moon domain and has access to the spell, they can spontaneously cast the spell, and therefore it is easier on the user end. This will require further testing, of course.
We can manually do this for a handful of unique domain spells, but we will then face problems of inconsistent user-end access to these spontaneous spells where some can do this and some spells can’t.