Myst42 Posted October 21, 2020 Share Posted October 21, 2020 I fell like such a brainlet, can anyone help me organize the proper conditions I want?I'm trying to make an AI package, the goal is to make certain NPCS use a custom spell (to enable beast race auto morphing) What I want is:If (NPC Race != BeastRace AND CombatState == 1 AND (Player Health <= 50% OR NPC health <= 50%)) OR (NPC Race == BeastRace AND CombatState == 0 AND SomeGlobal == 0) I'm confused as hell, but basically, it's the same spell that I want used on 2 occasions. When health is low and NPC is human and in combat, I want them to change. Alternatively, if the combat is over and they're in beast form, i want them to revert.I wanted to also ensure a way to make the change permanent if one controls a certain global, basically disabling the "revert" condition block But either way I can't for the life of me make sense of how the hell do complex conditions even fork on the CKAny help? Link to comment Share on other sites More sharing options...
IsharaMeradin Posted October 21, 2020 Share Posted October 21, 2020 I could be wrong... I think two AI packages would work best. One to transform into the beast and one to revert back. For the package to transform into beast:NPC Race != BeastRace ANDCombatState == 1 ANDNPC health <= 50% ORPlayer health <= 50% AND For the package to revert back:NPC Race == BeastRace ANDCombatState == 0 ANDSomeGlobal == 0 AND Link to comment Share on other sites More sharing options...
Myst42 Posted October 21, 2020 Author Share Posted October 21, 2020 (edited) I could be wrong... I think two AI packages would work best. One to transform into the beast and one to revert back.I tried that, but the character is getting stuck after the first trasnformation.Just stands there doing nothing To be honest, I'm having enormous amounts of trouble with this concept, and not just because of the conditions. The entire package system is driving me insane.There is a 100% chance a lot more is gong wrong here other than just conditions. For starters, I can't ge the character to use the power as a voice item. If used as left handed spell, it's fine, but try to put it on voice, and the character gets stuck when it should happen.Next, I'm not entirely sure GetGombatState is even working properly. As I set it, it should wait for combat, and morph, then when combat ends, revert. But the 2 package combination just causes it to morph one time, and get stuck; expecting the second package, I presume, which it really shouldn't, since GetCombatState is not yet 0 Another thing that causes me doubts is that beast races are not very fond of spells. IE Vampire lord needs the "sneak" animations to cast and I've never seen a werewolf do a cast animation.The way to do it as intended, is voice spells like lesser powers, but once again, that only gives me stuck characters. I'm not sure if maybe the only way to do this is by designing a completely new "package tempate". I'm just using the "UseMagic" as template bor both change and revert packages, but maybe this needs a more ellaborate approach to AI design. And finally, I can't really tell if perhaps this could be because of how am I assigning the packages to the NPCs, since I'm not doing it directly, I'm using an Alias, on a similar way from what this mod does. No clue if that also means in the event of succeeding with my mod, it's conna be incompatible with that one. Anyway, maybe I can leave the thing here for the moment... it's a simple minimod for now, only 2 aliases on the quest, Serana and Uthgerd., because she's a perfect test subject for a companion that can easily be acquired near the game start (assuming one has an alternate start mod like lorkhan's Realm". What I did was star game, go get Uthgerd, take her to some fighting area, get hit so that health drops below 90% (only for testing now) and transformation package should kick in.I think I made a big mistake trying to do this. Scripting, I can handle now, but AI packages are entirely new ground to me. The cherry of the pie is I just found out reverse race changes on NPCs are giving me CTDs. Not even the mod or the scripts. SetRace command from VL to human is auto CTD.I was expecting to ellaborate on race transform scripting, and make it more proper, same as when player changes. But if the very core of the race transform system (meaning SetRace command) is corrupt, then this is futile.Maybe I shouldn't be doing this. Edited October 21, 2020 by Myst42 Link to comment Share on other sites More sharing options...
Recommended Posts