Are Custom Spells & Enchantments Currently A Thing Or Just WIP?

For all talk about quest development - creation, testing, and quest system.
Post Reply
User avatar
Magicono43
Posts: 1139
Joined: Tue Nov 06, 2018 7:06 am

Are Custom Spells & Enchantments Currently A Thing Or Just WIP?

Post by Magicono43 »

So, "cast classicspell spell on _foe_" is obviously a thing, but I found using the VSCode quest extension that "cast Customspell custom spell on _foe_" is also something that comes up as an option, which is very cool. But, I don't know how to specify a custom spell or if there is a way to define one somehow. Is this currently just a WIP system in the questing system, or am I missing something? There some seems to be a few references to using "CustomKeys" for custom spells in the questing actions C# scripts, but I don't know where to go from there.


Here is what I have observed in the environment:
Untitledawd.png
Untitledawd.png (39.7 KiB) Viewed 2133 times

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Are Custom Spells & Enchantments Currently A Thing Or Just WIP?

Post by Interkarma »

It has been ages since I built this. I think it's operational but can't promise anything. :) Here's the high concept:

Classic spells are mapped using tags in Quests-Spells table. These spell IDs are immutable and must always match classic.

Custom spells allow matching to a new spell bundle registered by a mod using its custom key. A built-in example of this is MageLight, which is registered using EntityEffectBroker.RegisterCustomEffectDemo(). A mod could write and register its own spell bundles and custom effects this way.

Dunno if MageLight will work on an enemy. Try the following and see what happens:

Code: Select all

cast MageLight-Inferno custom spell on _foeName_

User avatar
Magicono43
Posts: 1139
Joined: Tue Nov 06, 2018 7:06 am

Re: Are Custom Spells & Enchantments Currently A Thing Or Just WIP?

Post by Magicono43 »

Interkarma wrote: Wed Aug 12, 2020 11:51 pm It has been ages since I built this. I think it's operational but can't promise anything. :) Here's the high concept:

Classic spells are mapped using tags in Quests-Spells table. These spell IDs are immutable and must always match classic.

Custom spells allow matching to a new spell bundle registered by a mod using its custom key. A built-in example of this is MageLight, which is registered using EntityEffectBroker.RegisterCustomEffectDemo(). A mod could write and register its own spell bundles and custom effects this way.

Dunno if MageLight will work on an enemy. Try the following and see what happens:

Code: Select all

cast MageLight-Inferno custom spell on _foeName_
Ah OK, so you have to make your own spell bundle and register it, sort of like registering a custom item and such, that makes more sense. I was thinking you could do some crazy string of characters and define a custom spell right in the quest scripting language or something, lol. I'll give it a try, thanks for the answer, was afraid nobody would know the answer :lol:

User avatar
Magicono43
Posts: 1139
Joined: Tue Nov 06, 2018 7:06 am

Re: Are Custom Spells & Enchantments Currently A Thing Or Just WIP?

Post by Magicono43 »

So I just tested this in a "test" quest and it appears to throw an exception, here is what the output_log gave:

Code: Select all

QuestResourceBehaviour.CastSpellQueue() could not find custom spell offer with key: MageLight-Inferno, exception: GetCustomSpellBundleOffers: Bundle key 'MageLight-Inferno' not found
This was the quest action I used when the foe was first hurt:

Code: Select all

_daedrothhit_ task:
	injured _daedroth_
	say 1060
	cast MageLight-Inferno custom spell on _daedroth_
	cast Heal spell on _daedroth_
	cast Heal spell on _daedroth_
	cast Free_Action spell on _daedroth_

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Are Custom Spells & Enchantments Currently A Thing Or Just WIP?

Post by Interkarma »

Thanks for letting me know. Custom spell probably not being linked up somewhere internally. There's been so little modding around custom spells and effects, this is fairly new ground.

I need to review this in any case down the track, as custom spells aren't yet exposed to item maker or to enchantment system fully yet.

User avatar
Magicono43
Posts: 1139
Joined: Tue Nov 06, 2018 7:06 am

Re: Are Custom Spells & Enchantments Currently A Thing Or Just WIP?

Post by Magicono43 »

Interkarma wrote: Thu Aug 13, 2020 12:21 am Thanks for letting me know. Custom spell probably not being linked up somewhere internally. There's been so little modding around custom spells and effects, this is fairly new ground.

I need to review this in any case down the track, as custom spells aren't yet exposed to item maker or to enchantment system fully yet.
I understand, it's definitely untreaded ground compared to other systems that have been modded quite a lot, also from my sifting through parts of the code, spell bundles are quite a bit more complex than a lot of things to comprehend generally. Would love to see this getting full support eventually though, I think custom spells could make some very interesting "boss" type enemies for quests. After even just trying with some of the vanilla spells, a few strategic buffs can really make some much more difficult default enemies ;)

Post Reply