ruddycray Posted February 14, 2020 Posted February 14, 2020 I'm about tearing my hair out on this one. I've created a quest in my mod where a character walks to a spot, casts a spell at the player, and then casts another spell with a scripted effect. To do these, I created two UseMagic packages. Often, everything works exactly as intended. But equally often, the caster will just stand there with her fists in the air, and the quest gets stuck. Sometimes, loading a saved game from before she starts doing that will fix the problem, and sometimes it won't. Sometimes, resetting the quest and starting it again will fix it, and sometimes it won't. The caster definitely has the spell in her spell list. I confirmed it with both scripts and console commands, and the spells are on her ActorBase, not added through aliases. These are the settings I have on the package: Location - Near Self, radius 500 SPELL - TAPTrainingFortifyMagicRegen (a custom spell) target - 'PlayerRef' in '(none)' HoldWhenBlocked - true CastTimeMin - 2 CastTimeMax - 3 CooldownTimeMin - 1 CooldownTimeMax - 3 NumToCastMin - 1 NumToCastMax - 65535 DualCast - false Even weirder, there's a different package for a different NPC who also casts a spell at the player that exists in the current release of the mod that always seems to work, but when I tried editing the NumToCastMax value on it, it started doing the same thing as the broken one above. Anybody have any suggestions what might be wrong or even how to go about figuring this out? Because right now I feel like I've tried everything I know to try.
ruddycray Posted February 14, 2020 Author Posted February 14, 2020 Also, I already tried stripping down my mod load to a pretty minimal set, just to rule out weird mod interactions: Skyrim.esm Update.esm Dawnguard.esm HearthFires.esm Dragonborn.esm Unofficial Skyrim Special Edition Patch.esp SexLab.esm SkyUI_SE.esp FNIS.esp CBBE.esp RaceMenuMorphsCBBE.esp The Ancient Profession.esp Alternate Start - Live Another Life.esp
ruddycray Posted February 16, 2020 Author Posted February 16, 2020 I also tried setting the spell to the vanilla Firebolt spell instead of my custom spell, and it eventually happens with that one, too. For now, I'm just working around it. I'm setting a timer, and if the character hasn't cast the spell by the time it expires, I'll just apply the intended effect with a potion through a script. If I ever figure out what's going wrong here, I'll update this post in case anyone else runs into the same problem.
ruddycray Posted April 30, 2021 Author Posted April 30, 2021 In case anyone ever encounters something like this, I think I've finally figured out what I did wrong here. It looks like the problem was setting NumToCastMax to 65535. I think I was trying to do that as a way for the NPC to try again if she missed, but it doesn't look like that's what that value actually does. It isn't documented what it does do, and I still don't know for sure, but when I set it to 1, the spell seems to work every time.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.