FunkyKoala54 Posted August 12 Share Posted August 12 Is it possible to add a condition to the NPC's combat logic? Specifically, to prevent an unarmed NPC from searching and using a dropped weapon if they know a bound weapon spell. The condition itself should be simple but I cannot find which package to modify or if it is related to a package. Any help, tips, or keywords for research would be greatly appreciated. The few leads found so far are informative, yet irrelevant. Link to comment Share on other sites More sharing options...
soupdragon1234 Posted August 13 Share Posted August 13 Unless its a combat override package that would be a no, combat is handled directly by the game engine its not something exposed via AI packages other than combat override and they're quite limited in scope i.e. typically used to flee instead of fighting i.e. Run for your Lives, etc Link to comment Share on other sites More sharing options...
FunkyKoala54 Posted August 13 Author Share Posted August 13 I hoped that was not the case, but the lack of references made me think otherwise. Thank you for your reply and time! Link to comment Share on other sites More sharing options...
PeterMartyr Posted August 14 Share Posted August 14 yes it is possible.. but it may not be what you expect https://ck.uesp.net/wiki/Combat_Style I have also altered the procedure in packages then used them for combat override in alias https://ck.uesp.net/wiki/Category:Procedures however.. as stated above it may be what you expect, but you can decrease the likelihood of them picking it up, it won't be generic, and will be specific to NPC in Alias https://ck.uesp.net/wiki/UseWeapon_(Procedure) maybe restrict them to a certain weapon type? Or combat style since they are unarmed, that prefers unarmed even. Or a mix of the above.. then clear the alias OFC What said @soupdragon1234 said is true, combat is directed by the Game Engine, regarding how combat is handled, but you set the rules, and the playing field, there is also the AI Data https://ck.uesp.net/wiki/AI_Data_Tab aggression and confidence in battle Link to comment Share on other sites More sharing options...
FunkyKoala54 Posted August 14 Author Share Posted August 14 That's a shame, the best result in testing had the NPCs conjure and fight with weapons until they had to recast. Once the spell timed out, they would run something akin to the Acquire Procedure. Maybe trying to find a dropped weapon. If nothing was located or once you removed the item, they would be all good until another duration ended. When I get some free time again, I'll see if I can re-evaluate the issue and find a bypass for it. In any case, Thank you for the help! @PeterMartyr Link to comment Share on other sites More sharing options...
xkkmEl Posted August 14 Share Posted August 14 A couple years back, I wanted to make an NPC that would use exclusively a bound bow. In the end, I scripted it, listening to OnCombatStateChanged and OnEquip/Unequip events to place a non playable bound bow and force equip it when combat started, and to undo when it ended. In this approach, the bound weapon spell is never actually cast though. Link to comment Share on other sites More sharing options...
soupdragon1234 Posted August 15 Share Posted August 15 I did create a combat quest for want of a better word once, for npc's that would normally run away they were given a target to attack i.e. like one of the sparring dummy packages that the Companions use instead of a dummy it was a real target and listened for the oncombatstatechanged event I think it was which would normally be when they ran away, reset their combat state which returned them to the target and continued until the target npc was dead. It was clunky but it worked but it was for a small number of npc's I don't think I'd like to do that en masse there were a lot of script events firing Link to comment Share on other sites More sharing options...
FunkyKoala54 Posted August 17 Author Share Posted August 17 I agree, anything going forward would have to target a small pool of actors and be a standalone version of the bound weapon spells. The author of Xelzaz made a video that would be helpful with what has been mentioned. This is where I am leaning at the moment: - Mainly have the same setup, but the global variable would need a default off value and combat styles for each bound weapon. (ex: -1 = Disable, 0 = Default, 1 = Spellsword, 2 = Dual-wield, 3 = Twohanded, 4 = Archer) - Copy the spells and effects from the original bound weapons, and change them to a constant ability, which might lead to copying the weapons and their enchantments. - Then have an ActiveMagicEffect script that will toggle the weapon depending on events related to the actor. - If possible, add fragments to add and remove bound weapon spells related to the package. Then add a Conj level condition to the dialogue for the appropriate level of spell. If anything it could be used as a template for NPC use. Thank all of you for the help and sharing your experiences! Link to comment Share on other sites More sharing options...
Recommended Posts