Getting the attributes of an npc

Post » Thu Jul 07, 2011 12:12 pm

Is there any function to read any given attribute from an npc? For example, personality, or stealth, or whatever? I seem to recall there was, thought that might be in Morrowind...
User avatar
Darlene Delk
 
Posts: 3413
Joined: Mon Aug 27, 2007 3:48 am

Post » Fri Jul 08, 2011 12:22 am

If there weren't, a good percentage of mods wouldn't exist today :D

The basic functions are GetAV , which returns the total active magnitude of the attribute, and GetBaseAV , which returns the base magnitude, a.k.a disregarding any 'buffs' to it, but there are OBSE equivalent functions which allow even more specific calculations

http://cs.elderscrolls.com/constwiki/index.php/Category:Actor_Values, if you can make sense of it you will be able to manipulate actor values with security, and even use OBSE functions like GetAVMod for total control of what you want to calculate.
User avatar
Davorah Katz
 
Posts: 3468
Joined: Fri Dec 22, 2006 12:57 pm

Post » Thu Jul 07, 2011 12:01 pm

Thank you very much, migck! Exactly what I was looking for! :celebration:
User avatar
Annick Charron
 
Posts: 3367
Joined: Fri Dec 29, 2006 3:03 pm

Post » Thu Jul 07, 2011 10:48 pm

Of course, the one thing to watch for is "abilities", which affect the player's base value, but not an NPCs value.

(ie, Skeleton Key will alter the player's base security, but not an NPC's value).

In my case, I'm still trying to figure out how to detect the "temporary" abilities that come from the skeleton key, the dwemer forge, etc, as compared to the "static" ones, like the Grey Prince's Training, and treat those differently.
User avatar
Tanika O'Connell
 
Posts: 3412
Joined: Fri Jan 26, 2007 1:34 am


Return to IV - Oblivion