Jump to content

[Scripts] How to check if NPC is a mage or necromancer?


Nymra

Recommended Posts

Posted

Ok, so I am checking for Vampires via a Formlist with all the Vampire Races (which might actually NOT catch vampires added by mods using a different race I guess?)

 

BUT:
Is there a way to check if an NPC that is a normal race, nord etc. is a Mage or a Necromancer? (like for example if a bandit group has a mage in it, or if the human next to the skeletons is a necromancer)

I thought about checking for stats like Mana or equiped spells, but that seems not very accurate to me. 

 

Via a keyword or something I missed entirely?? Anybody has a reliable method, that ideally also works for NPC added by other mods? 

or are all necromancers in a certain faction for example? while I guess bandit mages will be in bandit faction like other bandits :( 

Posted
21 minutes ago, Nymra said:

Ok, so I am checking for Vampires via a Formlist with all the Vampire Races (which might actually NOT catch vampires added by mods using a different race I guess?)

 

BUT:
Is there a way to check if an NPC that is a normal race, nord etc. is a Mage or a Necromancer? (like for example if a bandit group has a mage in it, or if the human next to the skeletons is a necromancer)

I thought about checking for stats like Mana or equiped spells, but that seems not very accurate to me. 

 

Via a keyword or something I missed entirely?? Anybody has a reliable method, that ideally also works for NPC added by other mods? 

or are all necromancers in a certain faction for example? while I guess bandit mages will be in bandit faction like other bandits :( 

 

I'd guess the best way (though not necessarily a great way) would be to check the class of the actorbase.  There are relatively few "mage" classes used by bandits and warlocks, so adding those to a formlist for quick comparison might be an option.

 

Depending on how performant you want it to be, another class-based option would be a quest looking for actors of a particular class within the area.  Could use a chain of "OR" conditions for the classes.

 

Neither method seems great, tbh.

Posted

If something is a vampire you simply check for the "Vampire" keyword. 420 times faster and easier than looking up 69 races and works with mods adding custom vampire races

 

If something is a necromancer: Only necromancers have a raise dead spell. A "necromancer" isnt a defined expression or object, its just somethin you identify a NPC as, if that NPC raises other (dead) NPC; - so you simply check if that someone is a Necromancer if he has those (subjectively defined) character traits associated with what your (subjective) opinion considers a Necromancer

Dont argue with the subjective part pls, Im just trying to get the point across that the game doesnt know what a Necromancer is

 

Posted
6 minutes ago, Scrab said:

If something is a vampire you simply check for the "Vampire" keyword. 420 times faster and easier than looking up 69 races and works with mods adding custom vampire races

 

aye, thx! 

 

6 minutes ago, Scrab said:

If something is a necromancer: Only necromancers have a raise dead spell. A "necromancer" isnt a defined expression or object, its just somethin you identify a NPC as if that NPC raises other (dead) NPC; - so you simply check if that someone is a Necromancer if he has those (subjectively defined) character traits associated with what your (subject) opinion considers a Necromancer

Dont argue with the subjective part pls, Im just trying to get the point across that the game doesnt know what a Necromancer is

 

yeah, I was afraid that it is basically like that, meaning the game does not know. checking for the spell then (always something new to learn), nice :) 

 

Posted
42 minutes ago, Seijin8 said:

 

I'd guess the best way (though not necessarily a great way) would be to check the class of the actorbase.  There are relatively few "mage" classes used by bandits and warlocks, so adding those to a formlist for quick comparison might be an option.

 

Depending on how performant you want it to be, another class-based option would be a quest looking for actors of a particular class within the area.  Could use a chain of "OR" conditions for the classes.

 

Neither method seems great, tbh.

 

ah, forgot about classes and actorbase. will try that, thx.

I just need to check the actors I already have in my quest if a mage is present. 

Posted
19 hours ago, ChrisHPZ said:

Hi Nymra, hope you're doing well. I just remembered the following mod which might provide the information you're looking for. If this doesn't work, all I can suggest is to look over your mod based NPC's in the Creation Kit. Hope this helps, and continued thanks for Naked Defeat ?

 

https://www.nexusmods.com/skyrimspecialedition/mods/19250

 

aah, I think mfg console is the LE counterpart. almost forgot about this, yeah, great idea to just also do some checks in game. thx! 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...