» Wed Sep 15, 2010 5:06 am
Here are are some observations regarding Auto Calculate Stats NPCs and what spells are available to them:
Obviously the spell has to have Auto Calculate Cost checked in the CS.
An Auto-Calc NPC will always try to own the most powerful spells, going from most powerful to least powerful. This is based on casting cost, not on a spell's effects/duration, etc, which is why a lot of NPC seem to have rather useless spells, e.g. casting Absorb Personality [Ranged] against a Daedric Battle-Axe wielding PC is rather silly.
Here are some of the GMSTs that help determine spell ownership:
fAutoSpellChance:
This is the minimum % casting chance an NPC needs for a particular spell in order to own it. This is based on his Auto-Calc stats. So, if it is set to 80.0000 (default value), an NPC will need at least an 80% chance of casting this spell. You can see the NPC's cast chance in the CS. This is why most non-caster NPCs (smugglers, acrobats, etc) never cast anything. Their Spell skills are so low (in the Class definitions) that all auto-calc spells never reach this setting's minimum.
iAutoSpellTimesCanCast:
Even though an NPC might have a high enough casting chance to own a spell, he/she will not own it if the NPC cannot cast it iAutoSpellTimesCanCast number of times based on the NPC's max magicka. By default iAutoSpellTimesCanCast = 3. So, if an NPC has 200 magicka, he/she will never own a spell which costs 70 magicka points, since 70 x 3 = 210 (greater than NPC's 200 max magicka), even if it passes the fAutoSpellChance requirement. Set it to 2 and suddenly that 70 point spell is available to the NPC.
iAutoSpellAlterationMax, iAutoSpellConjurationMax, iAutoSpellRestorationMax, iAutoSpellIllusionMax, iAutoSpellDestructionMax, iAutoSpellMysticismMax:
These are just the maximum amount of spells that an NPC might have from each School. So if you set iAutoSpellDestructionMax = 0, no auto-calc NPC will ever own a Destruction spell. If you set it to 3, the NPC will try to own the top 3 costliest Destruction spells that pass the fAutoSpellChance and iAutoSpellTimesCanCast requirements. However, there are rare cases, which I haven't been able to fully understand, in which this is not exactly true. For example, you might set the max spells for Destruction to 2, Mysticism to 2, and everything else 0. The NPC will still own a total of 4 spells, and they will never be from any spell school set to 0, but 3 might be Destruction spells and 1 Mysticism. Or you might get 4 Destruction and 0 Mysticism. Why? No exactly sure, but it is rare.
iAutoSpellAttSkillMin:
This one's a little hard to figure out, but basically it seems to work like this: if one of the spells selected (passes the above requirements) affects attributes or skills (absorb, drain, damage, fortify, etc), but not health, magicka, or fatigue, this GMST will help in selecting which particular skill or attribute spell to choose, since a lot of them have the same casting cost. It seems to chose the one that corresponds to your next highest attribute or skill which is equal to or less than this setting. So, if your Mysticism = 64, Long Blade skill = 97, and iAutoSpellAttSkillMin = 64 or less, the skill affecting spell will drain, absorb, etc, Mysticism . If you set iAutoSpellAttSkillMin = 65-97, that spell will now affect Long Blade. There are some bizarre discrepancies in exactly which skill/attribute spells are chosen, but this seems to be the general form.