Jump to content

Getting Spell School


Recommended Posts

Hello all!

 

I am fairly new to modding and navigating and learning the mess Bethesda calls the Creation Kit has not been a fun ride.

 

I have now hit a roadblock. I need to figure out how to determine a Spell's school of magic in my script.

 

I searched the reference pages on the wiki and found Spell's GetNthEffect under the Skyrim SE heading, thinking it meant Skyrim Special Edition. So I thought to use this to get the string of the spell's skill:

Spell.GetNthEffectSpellEffect(0).GetAssociatedSkill()

Then I started getting the compiler complaining it could not find the GetNthEffect function. Looked into the SPELL script and, indeed, it only had the 3 vanilla Skyrim functions. It was here I realized that Skyrim SE was not referring to Skyrim Special Edition, but Skyrim Script Extender, which from what I've found, is not in a usable state for Skyrim Special Edition.

 

So I am at a loss. Can someone point me in the right direction?

 

Thanks!

Link to comment
Share on other sites

If those functions are not working in SKSE64, then you're stuck, unless you want to torture yourself by making properties ofevery spell in the game and making a string array/formlist to return a magic school string based on the equipped spell. Maybe someone knows a less mind-(and fingers) torturing way to do it. Interesting to note is that Bethesda did make the keywords, but for some reason never added to the magic effects/spells and chose to instead add the schools "under the hood" to the magic effects(hardcoded it).

Edited by Rasikko
Link to comment
Share on other sites

I went ahead and jurry-rigged a multi-dimensional array to hold all the vanilla spells and their stats I was interested in, using the "first" "dimension" as my spells that held their form IDs. Translating those to integers was fun. My fingers were not happy with me, but it works. Unfortunately, because of this my mod will not work with other mods that add spells without manually adding those spells to my conglomerate arrays.

Edited by Kalm1234
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...