Myst42 Posted August 31, 2022 Share Posted August 31, 2022 (edited) I can't find any good explanations on how to work with this and I dont know what's going wrong. Most internet tutorials are about making a character have a schedule, like work, go to sleep, do default sandbox, but even though one day, I'll probably need those for projects, right now, what I needed is a Combat Override. Basically, the thing is, magic. I can't figure out the reason why, but some types of magic seem hardcoded to be used in combat, while others are not.One can create a custom fireball that looks blue or green, and NPCs might use it, but anything more complex like a heal or a special cloak spells and NPCs will never use it. The only way to bypass this and force them to use magic, is AI packages, as a lot of healer followers have proven.So I made one, and made an NPC use a custom version of the Sun Cloak aura from Dawnguard.The problem is that I did a simple UseMagic package, set up the spell, the conditions to use it (CombatTarget has Keyword Undead == 1, and the other being that the spell is already active, to not get stuck in a cast loop), and later I discovered the flag "Must Complete" makes it so the spell is used on battle and package gets re-evaluated once the spell has been cast, so the NPC immediately resumes combat. Added it to an Alias as tutorials suggested and...It worked like a charm when I did this on LE, it was absolute perfection and everything I ever wanted it to be. But now, porting to SE, and SE doesnt give a damn about my AI combat override package. At first, I thought it might be my installed combat mods, but when I tried it on a "clean" install, it did absolutely nothing either. It's like the package doesn't even exist. Instead of an NPC using Sun Cloak aura, I just get a regular melee fighter. So does anybody know the reason for this huge discrepancy between games? Is there anyone here versed in messing with AI packages that could help? Why does this work on LE and not on SE? All the Wiki documentation I found about it was for LE Edited August 31, 2022 by Myst42 Link to comment Share on other sites More sharing options...
cumbrianlad Posted August 31, 2022 Share Posted August 31, 2022 No idea why LE works and SE doesn't. Could you post the exact spell/package conditions? I did an invisibility cloak on a dwemer spider follower that it used as soon as the player entered 'stealth mode'. That was scripted, I think. I could take a look and see if it's of any use to you. It was a few years back, so I don't recall the details off-hand. I'm just thinking, it's similar. A set of spells Dwemer spiders never use, in response (in this case) to a player action, rather than an enemy type being present... still, we'll see. I had a lot of trouble with that 'stealth spider', so I may dig up something relevant. It wouldn't use it's numerous stealth spells, I do remember that... aaargh, damn you stupid stealth spider! It's simple, I crouch, you go invisible, got it? Most of my hair has grown back in now (: I'll take a look now. Hope you get some straight answers before I get back here. Link to comment Share on other sites More sharing options...
Myst42 Posted August 31, 2022 Author Share Posted August 31, 2022 (edited) No idea why LE works and SE doesn't. Could you post the exact spell/package conditions? I did an invisibility cloak on a dwemer spider follower that it used as soon as the player entered 'stealth mode'. That was scripted, I think. I could take a look and see if it's of any use to you. It was a few years back, so I don't recall the details off-hand. I'm just thinking, it's similar. A set of spells Dwemer spiders never use, in response (in this case) to a player action, rather than an enemy type being present... still, we'll see. I had a lot of trouble with that 'stealth spider', so I may dig up something relevant. It wouldn't use it's numerous stealth spells, I do remember that... aaargh, damn you stupid stealth spider! It's simple, I crouch, you go invisible, got it? Most of my hair has grown back in now (: I'll take a look now. Hope you get some straight answers before I get back here. There's both of them. One to only use the spell in the presence of Undead, the other to check if the spell is already active (which was to make sure the package doesnt get used unless the cloak is actually off) I've dome my share of scripting and I guess I could come up with an elaborate way to make my NPC cast it, but I wanted to figure out how to make this work with packages... after all they're part of the base game and the creation kit so they should literally be how the game is built, and they should work... but it's really hard to find people who knows how to use them Edited August 31, 2022 by Myst42 Link to comment Share on other sites More sharing options...
thumbincubation Posted August 31, 2022 Share Posted August 31, 2022 This is not my strong point, but would the value 1 mean it's checking to use the sun cloak only if the sun cloak is already in use, rather than not in use? I would have expected a zero, or is that what the != does? Link to comment Share on other sites More sharing options...
Myst42 Posted August 31, 2022 Author Share Posted August 31, 2022 This is not my strong point, but would the value 1 mean it's checking to use the sun cloak only if the sun cloak is already in use, rather than not in use? I would have expected a zero, or is that what the != does?!= means different fromI could've also used == 0 but both should work... I'll try that just in case it's some dumb broken thing, but I dont think it makes a difference. Link to comment Share on other sites More sharing options...
Sphered Posted September 1, 2022 Share Posted September 1, 2022 In case you are working with non-human npcs, nodes/behavior and cast type particularly matter. I have a draugr follower for example, and he casts flames in his combat pack. He only casts this though, if I assign lefthand-only version of flames. If I change that to either hand, or ofc right hand, he no longer will use this spell at all from his package To a lesser extent, such quirks apply with human npcs too so def play with different cast types if you are certain your conditions are correct. Not sure why you would observe a difference in SE vs LE though. I suspect SE could have reverted/defaulted a certain setting or condition somewhere, but thats total speculation Link to comment Share on other sites More sharing options...
maxarturo Posted September 1, 2022 Share Posted September 1, 2022 (edited) I can't be accurate due to the nature of your issue, and by this I mean that it's a conversion and I don't have all the necessary data. But, what I can tell you is that this is very familiar to the issues some users have encounter when converting one of my mods. Those users had played the original SLE version, so they knew the mod very well. When they converted the mod to SSE some parts broke connection and they needed some guidance to re-apply / re-create them, here is a simple exampe: - In one cell there is a 'kind' of a laser alarm trigger that plays a loud alarm sound, spawns the guardians, and a bunch of other things, etc... When the user played the converted version the alarm trigger worked as intended but the alarm sound fx would NEVER fired. The solution of this weird issue (and to the other issues of the other users) was to load the mod in CK and retract/remove from the script's property the assigned value (the sound fx ref), then save and exit SSE CK. Then load SSE CK and reassign the removed property, after this when the user played again the mod (with all the same kind of fixes for all the issues he had, and amomg those where some AI package releated), all those things that didn't fire in game worked as it was in the original SLE version. So, my suggestion would be to retract/remove/delete from the converted version your AI package set up > save and exit SSE CK > and recreate the whole set up from scratch in SSE CK. "after all they're part of the base game and the creation kit so they should literally be how the game is built, and they should work..." Not exactly, keep in mind that (and with few words to not go into details): - SLE / original Skyrim was created in Skyrim's CK (or you could say SLE CK). - SSE is a convertion of SLE which was created in SLE CK. - SSE CK is the converted FO4 CK made to work with SSE. - SSE was never created in SSE CK, which actually dosen't exists. * That's why SSE and its CK version requierd so much work to actually make it a playable and moddable game. EDIT Note: This weird 'broke connection' issue was not the same for all users, each one experienced a different issue or issues and there were some that did not have any issues occured by converting the mod. Edited September 1, 2022 by maxarturo Link to comment Share on other sites More sharing options...
cumbrianlad Posted September 1, 2022 Share Posted September 1, 2022 I think Maxarturo may be the closest. I also had the issue with draugr not casting anything other than left hand spells, because of how they are set up. I get that you don't want scripts. It's always better to avoid them if you can. I took a peek at my spider, but I don't think it would help anyway. Those conditions seem fine to me, too and should work as intended. != works fine. Link to comment Share on other sites More sharing options...
maxarturo Posted September 2, 2022 Share Posted September 2, 2022 The factors that make an actor cast or not cast a spell are 3: 1) hkx Behaivior Graph 2) Combat Style and Class 3) The spell cost, priority has always the most expensive. For example: The spriggan will always cast the invisibility spell first when the 'OnCombatStateChange()' event registers as in 'combat state', because it's dectated by the actor's hkx. Another example is with draurgs, they can't dual cast as the player does because they also don't have the necessary animation for that race / type of actors. Link to comment Share on other sites More sharing options...
Recommended Posts