Jump to content

Question: Is it possible to have NPC use illusion magic?


Recommended Posts

Posted (edited)

I've set up a custom draugr based on the vanilla record EncDraugr05TemplateBossEbony template.

In vanilla Skyrim, this draugr have the ability to cast the crDraugrFrostCloak "Draugr Frost Cloak" spell.

I've modified the crDraugrFrostCloak effect so that it now uses a magical effect such as Calm (see the screenshot).

 

What I observe in-game:


- The draugr casts the Calm cloak spell on itself, indicated by the green flash.
- Nearby NPCs are affected by the cloak spell and also flash green (which is what I expect, given the illusion FX color used in the effect record)


What I do not observe is the Calm effect actually working on NPCs. All entities—horses, chickens, guards, and farmers—continue to attack the draugr, even though they are visibly affected by its Calm cloak spell.


Is what I am trying to do futile? Is it even possible to have NPCs cast Illusion magic (such as Calm) in this way, without scripts?

spell.png

mgef.png

Edited by FrostVeils
Posted (edited)

The effect may be caster-dependent, and the enemy logic might not be set up to use Illusion spells in the first place (or at least not able to use them in a consistently reasonable way).

 

It's clearly possible for enemy NPCs to use any spell, but the question then becomes whether or not using that spell is practical for an NPC.

 

Study the Magic Effects and any scripts that may be attached to the MGEF (you'll probably need to use CK for this). This will likely tell you what's going on.

 

EDIT: Also, you're Area is 1 and 0. That's VERY small, and probably why it doesn't seem to affect the other creatures - because the AOE isn't actually reaching them. Try increasing the area to 30 or 50 and see if that changes anything.

 

You can also try adding a debug script that fires whenever it hits something so you can get better testing data and figure out what's not working.

 

Also, Calm effects are immediately removed if they are damaged, so it could be an issue of getting hit immediately after being calmed.

Edited by NymphoElf
Posted

I wouldn't be surprised if the calm spell archetype was hardcoded to only relate to the player. I mean can anyone think of a situation in the vanilla Skyrim game where an npc uses a calm spell? I can't. Was this used in Oblivion or Morrowind?

 

If the calm archetype can't be used, I'd create a script to mimic the functionality of a calm spell. The trick with this is most likely going to be to figure out how the factions should be set up, especially if there's multiple draugrs casting this spell and they can't share friends.

 

AddToFaction (add everyone involved to a faction that is friendly with its own members)

EvaluatePackage (might be needed)

StopCombat (on both the calmed target, and the caster)

Posted (edited)
17 hours ago, NymphoElf said:

It's clearly possible for enemy NPCs to use any spell, but the question then becomes whether or not using that spell is practical for an NPC.

 

Study the Magic Effects and any scripts that may be attached to the MGEF (you'll probably need to use CK for this). This will likely tell you what's going on.

 

EDIT: Also, you're Area is 1 and 0. That's VERY small, and probably why it doesn't seem to affect the other creatures - because the AOE isn't actually reaching them. Try increasing the area to 30 or 50 and see if that changes anything.

 

You can also try adding a debug script that fires whenever it hits something so you can get better testing data and figure out what's not working.

 

Also, Calm effects are immediately removed if they are damaged, so it could be an issue of getting hit immediately after being calmed.

Actually, the area is too large. It seems the “area” parameter works differently with cloak spells—the radius isn’t defined by area at all, but by magnitude. My problem was that every NPC in the cell was affected by the Calm Cloak spell. Lowering the magnitude fixed that. The NPCs were still not calmed, though they were visually affected by the Calm Cloak spell.

This is interesting too: “Calm effects are immediately removed if the target takes damage, so it could be that they’re being hit right after being calmed.”

Maybe, as you said, this is something scripted within the Calm effect itself that involves the player.

Anyway, I’ve had the draugr use a paralyze spell instead. That works quite well.
 

16 hours ago, traison said:

I wouldn't be surprised if the calm spell archetype was hardcoded to only relate to the player. I mean can anyone think of a situation in the vanilla Skyrim game where an npc uses a calm spell? I can't. Was this used in Oblivion or Morrowind?

Yeah I agree... I mean...it's unlikely that I would be the first to make it happen. If its possible, it would be numberous of mods out there already doing it.

 

 

 

 

anyway...thanks for tips and help to both of yah!

Edited by FrostVeils

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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