Letting NPC's use 'Harmony' or other illusion spells

Post » Wed Jun 20, 2012 5:06 am

From combing other threads I've dealt with the fact that followers in general won't use awesome illusion spells like 'Harmony' that stop combat by charming everyone in a huge radius.

But they DO use the spell 'paralyze'

So i figured I'd piggyback on this to make a spell that casts paralyze on the target, but also creates an Area-of-effect that calms all enemies in a huge radius, just like Harmony.

Here is the spell i created:
http://imgur.com/Glpjg

Since paralyze is an aimed spell and not cast on self, i couldn't use the magic effect 'InfluenceAggDownFFSelfArea250' (the magic effect Harmony uses) i had to use 'InfluenceAggDownFFAimedArea' but okay, that's cool, i'll just tweak the params so it works on creatures and people up to lvl 100 in a radius of 250.

Now when i get into battle my follower casts this 'paralyze/harmony' spell and i see the enemy it was cast on fall to the floor, and a huge AOE visual effect, but enemies within the radius of the paralyzed enemy are not charmed, they continue attacking as if nothing happened.

I noticed 'InfluenceAggDownFFSelfArea250 ' has a script that adds targets to the 'CharmFaction' so i went ahead and put the same script on the 'InfluenceAggDownFFAimedArea' magic effect, this still doesn't work.

I'm at my wits end here trying to make a harmony spell that an NPC can use, if anyone has any suggestions/comments please, please chime in!
User avatar
Brentleah Jeffs
 
Posts: 3341
Joined: Tue Feb 13, 2007 12:21 am

Post » Wed Jun 20, 2012 4:37 pm

I just tried using the spell as the player. When equipped the spell description clearly says 'Targets that fail to resist are paralyzed for 10 seconds. Creatures and people up to level 100 won't attack for 120 seconds'

When i fire it at a bunch of guards in a city, the one it hits falls over paralyzed, and a big green AOE visual effect goes off, but none of the surrounding guards is calmed, they all keep attacking.
User avatar
Tanya Parra
 
Posts: 3435
Joined: Fri Jul 28, 2006 5:15 am

Post » Wed Jun 20, 2012 12:18 pm

shot in the dark: perhaps the paralyze effect needs to have an area as well
User avatar
Hot
 
Posts: 3433
Joined: Sat Dec 01, 2007 6:22 pm

Post » Wed Jun 20, 2012 5:35 am

shot in the dark: perhaps the paralyze effect needs to have an area as well

Yeah try taking the paralyze effect out of the paralyze spell and cast it yourself. If that works, then thank you, you have just broadened our understanding of the very strange spell and magic effect interaction :smile:.

In that case, you will have to attach a script to the paralyze spell and have it cast the charm spell. Or ask "Il Ducey" about how he set up his NPC-Spells.

can you put a debug message on the charm faction scrip like this:
Event OnEffectStart(Actor akTarget, Actor akCaster)akTarget.AddToFaction(CharmFaction)akCaster.StopCombat()akTarget.StopCombat()if bMakePlayerTeammate  akTarget.SetPlayerTeammate(true, false)endifstring stringtarget = aktarget as stringdebug.messagebox("Target: " + stringtarget + " was charmed.")EndEvent

"Stringtarget" will likely only return an ID, but you can count the messages to see on how many targets the effect was started. If the number of boxes that pop up match the number of targets, then your effect fires fine and the problem lies somewhere else.
User avatar
Claire Lynham
 
Posts: 3432
Joined: Mon Feb 12, 2007 9:42 am

Post » Wed Jun 20, 2012 6:36 am

Thanks Cronos, i'll give that a try later today.

Last night i gave up and assumed that 'InfluenceAggDownFFAimedArea' just doesn't work, i made a healing spell (casts on self) and that way i could use harmony's 'InfluenceAggDownFFSelfArea250' magic effect, and it works just fine at charming people. Of course, i still can't get my follower to cast the spell voluntarily, and had to resort to scripts to force her to use it :(
User avatar
Rach B
 
Posts: 3419
Joined: Thu Mar 08, 2007 11:30 am

Post » Wed Jun 20, 2012 8:08 am

One easy way I've discovered to make an NPC cast a spell they otherwise wouldn't is to attach another spell effect that does 5 damage or so.
User avatar
Dean
 
Posts: 3438
Joined: Fri Jul 27, 2007 4:58 pm

Post » Wed Jun 20, 2012 7:47 am

Strange, now I have a similar Problem. my script magic effect, fire and forget, self, area 250, just wont apply to anyone but myself.

Also, I get a CTD in the CK everytime I try to delete a magic effect from the spell.
User avatar
Stephani Silva
 
Posts: 3372
Joined: Wed Jan 17, 2007 10:11 pm


Return to V - Skyrim