Why won't this NPC use the spell i gave him?

Post » Mon Jun 18, 2012 6:09 am

I created a 'summon dragon' spell. The player can equip it an use it just fine, but when i give it to an NPC and then start attacking, he wont use the spell!

Even if i make it a zero cost lesser power he won't use it.
I tried giving him the fus-ro-dah shout, and he uses that against the player. So i turn my 'summon dragon' spell into a shout, assign it to him, and again, no dice.

Why won't the NPC use what i gave him!!??

This is making me so sad....
User avatar
Milad Hajipour
 
Posts: 3482
Joined: Tue May 29, 2007 3:01 am

Post » Mon Jun 18, 2012 6:42 am

Short answer:
- The NPC knows what "Fus Ro Dah" does but doesn't know what this 'summon dragon' spell is.

If you give them healing spell, they will use it, cuz the engine 'knows' it, and the AI 'knows' it. They just dont know the new, custom spell :P, unless you 'tell' them when to use it
User avatar
MISS KEEP UR
 
Posts: 3384
Joined: Sat Aug 26, 2006 6:26 am

Post » Mon Jun 18, 2012 8:50 am

hokay, so, How do i 'tell' them to use it? Can it be done with a package override? or is this something you can't do without acess to the source code?
User avatar
Beth Belcher
 
Posts: 3393
Joined: Tue Jun 13, 2006 1:39 pm

Post » Mon Jun 18, 2012 11:32 am

There are few ways to do it
- Add a small side property to custom spell. For instance, if that a buff spell, you might want to include the 'healing effect' of 1pt to that spell. NPC will tend to cast them when they are wounded. Add a small hp dmg to the spell, NPC may try to use in like any other destruction spell.
- The better way yet with no side effects is via Scripting :tongue:. But very complicated......You can script 'force' NPC to equip that spell of yours, and he may use it :smile:

EquipSpell(Spell akSpell, int aiSource)

Or even better if you could program the AI to use that spell in some combat situation
User avatar
xxLindsAffec
 
Posts: 3604
Joined: Sun Jan 14, 2007 10:39 pm

Post » Mon Jun 18, 2012 3:19 pm

so are you able to get them to say the words when they are shouting?
User avatar
roxxii lenaghan
 
Posts: 3388
Joined: Wed Jul 05, 2006 11:53 am

Post » Mon Jun 18, 2012 4:55 pm

well, that still didn't work. But on the bright side: i was able to get him to summon the dragon by hacking it in with scripts. Just doesn't look as good as the spell i made. Stupid NPC's ><
User avatar
Harry-James Payne
 
Posts: 3464
Joined: Wed May 09, 2007 6:58 am

Post » Mon Jun 18, 2012 2:16 pm

my guess is that it is related to the NPC's combat style, try editing it to include that spell as the first one they cast (combat style is listed on the "AI data" page of an Actor)
User avatar
Jason Rice
 
Posts: 3445
Joined: Thu Aug 16, 2007 3:42 pm


Return to V - Skyrim