NPC's training magic - Part two

Post » Fri May 04, 2012 2:43 pm

After having literally followed the instructions given to me, I still haven't been able to get the NPC's to cast their magic at the target. I really am out of options now, especially since I have even made the AI-package look exactly like the relevant AI-package from MGMageApprentice5, who casts a fire spell at a target in the upper practice room of the Arcane University. Is there anyone out there with the almighty solution to this problem?

Additional information:

-The NPC's are supposed to cast their spell all day long, like 24/7.
-I've tried different package flags and none of them made it work.
-The unique spells cost no magicka to cast.

=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=

Original topic "NPC's training magic" and the only response I got:



"I have a bit of a problem with three NPC's I created. They are supposed to cast magic at a target but somehow they simply won't do that. I tried lots of different things with the AI packages but I can't get it to work.

About the spells:

Frost damage spell - Range: Target
Fire damage spell - Range: Target
Shock damage spell - Range: Target

Each NPC casts a different spell, either frost, fire or shock damage. The spell itself has been created for the individual NPC so no other actors make use of it.


The NPC's are supposed to cast their own unique spell at a target specifically asigned to them. However, the base ID of the targets is the same: TargetHeavy01

The NPC's are supposed to walk to their own xMarkerHeading before they will cast their spell at their target.

I've tried all different options in te AI Packages "Cast Magic" and "Use item at" of which the last one is used by some apprentices at the Arcane University.


All in all, it comes down to this: How can I create a properly working AI package for NPC's to cast a spell at a target?"

- - - - - - - - - - - - - - - - - -

"They don't even need a unique spell. You can use the standard ones.

Steps:
1. Add a spell to the NPC's SpellList. You might have done this already.
2. Make your targets persistent references. Since you have more than one of the same type, it will be easier if you give them reference editor ID's.
3. Place an xMarkerHeading in front of each target. Give each a reference editor ID.
4. For each xMarkerHeading, set the XTarget data to the target it should be linked with (the one it's pointing at).
5. Define the NPC's AI package. It's a Use Item At package. Define the schedule as you like. The location is Near Reference and the reference is the xMarkerHeading. The target is the spell. You can define an Object ID that uses a standard spell like StandardFireDamageTarget3Journeyman or your custom spell. OR you can simply select a Object Type and set it to Spells: Range Target or Spells: School Destruction. Lots of options. Have a look at the various NPC's that practice spells like Mraaj Dar or the Mages
Guild apprentices."

=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=
User avatar
Kellymarie Heppell
 
Posts: 3456
Joined: Mon Jul 24, 2006 4:37 am

Post » Fri May 04, 2012 7:24 am

When you check your NPC's in game, what exactly is happening?
Are you checking them on a clean save?
Have you tried to console EVP them? (so they re-evaluate their package)
User avatar
Amber Hubbard
 
Posts: 3537
Joined: Tue Dec 05, 2006 6:59 pm

Post » Fri May 04, 2012 9:51 am

@ Hanaisse


1:

When I see these NPC's in-game, they're sometimes out of place but always just standing around doing nothing. And by "Out of place" I mean they're not always in their starting positions. However, they are always in the right interior cell of the building I added them to, and that cell is made up of only one part. There are no additional cells linked to the Imperial University. You can speak to them and ask about rumours, since I haven't added unique dialogue, nor will I ever do that for the students. Apart from that, nothing happens at all. And I have followed the instructions given to me.


2:

I assume that by clean save, you mean a save without mods. Does that mean I have to deactivate everything except the mod that adds these NPC's or is starting a new game good enough?


3:

And what is that talk about console EVP? Never heard of that.
User avatar
ijohnnny
 
Posts: 3412
Joined: Sun Oct 22, 2006 12:15 am

Post » Fri May 04, 2012 2:30 pm

No, no, a clean save would mean only de-activating your mod that you're building. Make sure you move your character away from the cell, de-activate your mod, go back in game, save in a new slot, exit the game then re-activate your mod and return to your cell. It should have reset.

You could also just try moving far away from your cell to any interior location, wait out 3 days, then return to see if it has reset. Maybe try this first.

The EVP - open console, click on one of your NPC's, type evp, close console. It makes them re-evaluate their packages to kick start them into doing something.
User avatar
ashleigh bryden
 
Posts: 3446
Joined: Thu Jun 29, 2006 5:43 am

Post » Fri May 04, 2012 1:08 pm

I never saw that console command before on any website. But I guess I can give it a try. After that, I might try the 3-days waiting routine, depending on what you mean by far away since most of the area surrounding the Imperial City is affected by my mod. I guess any of the other cities is good enough. I'd probably try the clean save thing last.

I'll probably update this topic with my findings tomorrow since it's close to midnight in my country. And before you ask: No, there's not something evil lurking in the dark. :biggrin:
User avatar
Ashley Clifft
 
Posts: 3468
Joined: Thu Jul 26, 2007 5:56 am

Post » Fri May 04, 2012 1:51 pm

@ Hanaisse

It seems you had the almighty solution to my problem. The console command EVP seems to have solved the entire issue. As soon as it was used on the three NPC's, they started casting their spell. I waited 5, 4 and 3 hours and each time the waiting ended, they still casted their spell. I then exited the Imperial University 15 minutes before midnight and re-entered one minute after midnight. They still casted their spell. Then I fast-traveled to the Waterfront District and waited a roughly estimated 36 hours, and afterwards, I saved my game at 8:15 AM in the game time. Then I returned to the Imperial University, and guess what? The NPC's were still casting their spell.

Believe me, you have just saved a part of my mod project. If I really couldn't have fixed it before v1.0 was essentially finished, I would most likely have given permission to the first volunteer to fix the problem. But I'd much rather release a mod that I know is fully functioning. Thanks again!


To the forum moderators: This topic can be closed. At last, the problem is solved.
User avatar
Margarita Diaz
 
Posts: 3511
Joined: Sun Aug 12, 2007 2:01 pm


Return to IV - Oblivion