Best way to *temporarily* disable processing of NPC

The place for PANPC compatibility patches and discussion of compatibility issues.
Post Reply
Kharos
Posts: 5
Joined: Wed Jun 30, 2021 8:06 pm

Best way to *temporarily* disable processing of NPC

Post by Kharos »

Hi Greslin

What is in your opinion the best way to temporarily (for example, for the duration of a quest) disable processing for a generic NPC? Bonus points if it works for Pack Attack Companion Edition, too. Looking at your code PANPC_KW_NoEnable does not look like it is the way for this; it does not take effect if the spell has already been added to the NPC.

At the moment it looks like the best version is just calling Actor.SetIntimidated(true) at the start and then at the end Actor.SetIntimidated(false). I am not sure what kind of side effects that has though, e.g. other mods handling that NPC differently, too.

I could also try to figure out what spell was added, call Actor.RemoveSpell(..) at the start, and Actor.AddSpell(..) at the end, but I would prefer not to. It is very heavy-handed, and also I have no way to generically find the spell. I would have to test all of them with Actor.HasSpell(..), and this will break if you add more combat tactics in the future.

Kharos

PS: Your code is commented and generally written in a way that makes it easy to read and understand it. Thank you, it makes trying to find a solution for such issues much easier!
User avatar
Greslin
Site Admin
Posts: 90
Joined: Tue Mar 09, 2021 6:09 pm

Re: Best way to *temporarily* disable processing of NPC

Post by Greslin »

Kharos wrote: Wed Jun 30, 2021 8:27 pm Hi Greslin

What is in your opinion the best way to temporarily (for example, for the duration of a quest) disable processing for a generic NPC? Bonus points if it works for Pack Attack Companion Edition, too. Looking at your code PANPC_KW_NoEnable does not look like it is the way for this; it does not take effect if the spell has already been added to the NPC.
I don't believe there's currently a way to do it. KW_NoEnable, as you said, blocks the NPC from enabling in the first place but it doesn't temporarily suspend script operation. I'll put it on my list for things to review in 2.0.
User avatar
Jessicapam
Posts: 38
Joined: Fri Aug 13, 2021 4:22 pm
Location: Colombia
Contact:

-

Post by Jessicapam »

I have a Vader that has a satin finish on the body. I know what to use on a gloss finish Meguiars, can I also use this on a satin finish? If not, what would work best?

Thanks.
Post Reply