Having trouble with AI Packages

Post » Mon Nov 19, 2012 8:25 am

Whenever I create an AI package, I have no problems getting the NPC to do what I want them to do if it is the same cell they start in, but If I want them to, say, go inside a house and go to sleep, then they simply stand there and stare. I have the Navmesh all done, and I have tried telling the NPC to activate in sequence, to travel to a specific place, created multiple activate triggers to get them to just go through the load doors into the right cell, nothing has worked. I have looked at the NPCs in the game, and copied when Bethesda did, and it still doesn't work. Any help would be appreciated, thanks!
User avatar
Harinder Ghag
 
Posts: 3405
Joined: Wed Jan 17, 2007 11:26 am

Post » Mon Nov 19, 2012 12:15 am

Starting simply first: are the times, conditions, etc. all correct? Are the packages in order of importance from top to bottom? You may have to tell the NPC via script to evaluate their AI packages periodically to be sure they are doing what they are supposed to be doing, when they are supposed to be doing it. Also I have no idea what you are trying to do but it sounds complicated with activate triggers and such, maybe over my head.
User avatar
Carlos Rojas
 
Posts: 3391
Joined: Thu Aug 16, 2007 11:19 am

Post » Mon Nov 19, 2012 11:24 am

What I am trying to do is have an NPC schedule where during the day, he is on one level of a castle, sitting on a throne, and eating at various points (in world Space A), and at night he goes to sleep in world space C, going back and forth every day. In order to get from worldspace A to C, he needs to go through World Space B. All of these are interior worldspaces, with navmesh all made up.

I can get him to do whatever I want when the current trigger is telling him to do something in his starting worldspace (ive tried both A and C), but as soon as the package starts to get him to travel to another worldspace and do something there, he freezes up. Then continues correctly as soon as the package tells him to do something in the editor worldspace.

For instance, If I start him in worldspace A (the bottom floor/throne room/ dining room), He correctly goes into the dining room at 8 to eat, go back out into the throneroom and sits on the throne from 9-1900, then eats at 1900. When the package tells him to go upstairs at 2000, he freezes for however long the trigger lasts for. If I set the trigger to only last for an hour, then he starts to sandbox, but if the trigger lasts for 11 hours, he stands still the whole time. If I place him upstairs in the editor, he sleeps correctly, but during the day he stands still, but sleeps at night.

Maybe there is some way I do not know about to get NPCs to go between worldspaces and continue on the other side. I think the references and such are all correct, because wherever I place him, he does what he is supposed to do in that space. I wouldn't think it would be complicated, as almost all NPCs in the game travel between worldspaces regularly, to travel in and out of buildings, but I could be wrong. Thanks!
User avatar
Juliet
 
Posts: 3440
Joined: Fri Jun 23, 2006 12:49 pm

Post » Mon Nov 19, 2012 12:22 pm

Do you mean WORLDSPACE, or do you mean CELL?

I have never tried to do travel between worldspaces (though I should imagine it would work, if there was a door? But I don't know for a fact that it does work)

If you mean cells not workspaces, post and I'll try to help you figure it out (could be ownership of the cell, house or bed in question ...)
User avatar
Joanne Crump
 
Posts: 3457
Joined: Sat Jul 22, 2006 9:44 am

Post » Mon Nov 19, 2012 11:29 am

Ah sorry your right, it is a cell, and all of them are in the interior worldspace. I would appreciate any help greatly.
User avatar
N3T4
 
Posts: 3428
Joined: Wed Aug 08, 2007 8:36 pm

Post » Mon Nov 19, 2012 9:31 am

I'm sort of reaching here (and, indeed, over my head) but could it help using Location aliases? I'm assuming your using pretty basic packages. Hmm what about just stripping it down to the basics and see if you can get him to move from one cell to the other at all?
User avatar
NAkeshIa BENNETT
 
Posts: 3519
Joined: Fri Jun 16, 2006 12:23 pm

Post » Mon Nov 19, 2012 4:41 am

I'm sort of reaching here (and, indeed, over my head) but could it help using Location aliases? I'm assuming your using pretty basic packages. Hmm what about just stripping it down to the basics and see if you can get him to move from one cell to the other at all?

Yes I am using package templates. The ones I am using are ones that were used by bethesda for NPCs for the game, so unless there is something major I am missing with those, the packages might be fine. I know I could get him to go from one cell to the other by activating the door, because I have tried it previously, but that would clutter up the AI packages so much, and it cant be needed because bethesda didn't use those that I noticed.

I have tried using a simple "travel" package and placed the target in the other cell, and it has not worked. To be honest, when I look at other Actors, their packages all seem be working just by using "travel" packages, but there is something I am missing because mine aren't. I don't know enough about AI modding to know what a lot of AI actions "do" besides the end result, so I don't know if the "travel" package is coded to allow it to figure out that it needs to go through one or more cell transfers to get to its end destination.

Usually when I tell it to travel to another cell, I select a target of a certain static object, say a bed, or a table. That works fine when the game starts him in the same cell, but otherwise not. Do you think I may need to reference something else?
User avatar
yessenia hermosillo
 
Posts: 3545
Joined: Sat Aug 18, 2007 1:31 pm

Post » Sun Nov 18, 2012 11:47 pm

  • DOORS - Are they LOCKED? Does the NPC have a KEY? Have you checked the relevant "Locks/Unlocks Doors" option in the packages?
  • What is the OWNERSHIP of the DESTINATION CELL?
  • What is the OWNERSHIP of the DESTINATION DOOR?
  • If you are sending the character direct to an item of FURNITURE (like a bed, or a throne, or a chair/stool) what is the OWNERSHIP of the Object?

If an NPC or Faction owns any of that lot, then your character will not be allowed to use them, and so will refuse any package commands (and probably just stand around shrugging shoulders). You need to place your character in any owning Factions (or make the character own the furniture itself, etc)
User avatar
Max Van Morrison
 
Posts: 3503
Joined: Sat Jul 07, 2007 4:48 pm

Post » Mon Nov 19, 2012 9:43 am

  • DOORS - Are they LOCKED? Does the NPC have a KEY? Have you checked the relevant "Locks/Unlocks Doors" option in the packages?
  • What is the OWNERSHIP of the DESTINATION CELL?
  • What is the OWNERSHIP of the DESTINATION DOOR?
  • If you are sending the character direct to an item of FURNITURE (like a bed, or a throne, or a chair/stool) what is the OWNERSHIP of the Object?
If an NPC or Faction owns any of that lot, then your character will not be allowed to use them, and so will refuse any package commands (and probably just stand around shrugging shoulders). You need to place your character in any owning Factions (or make the character own the furniture itself, etc)

The only doors that I have placed so far transport to another cell, but the actor must go through them in order to reach the desired destination. Is there something special that I have to do to get him to do that? I have not put any "activate" commands (to activate the doors) so far, because upon looking at bethesda's Actor packages, they do not have them, and it might add about 4 possibly unneeded triggers per actor, but if in your experience they are needed, I can try adding them. The doors are not locked, and I have unchecked all locks/unlocks doors that I could find. None of the targets, or cells, or anything that is being referenced is owned by anybody. Whenever I place him in a cell in the editor, all triggers that reference something in that cell work correctly, so it seems to be a problem transferring cells.
User avatar
Etta Hargrave
 
Posts: 3452
Joined: Fri Sep 01, 2006 1:27 am

Post » Mon Nov 19, 2012 4:26 am

The only doors that I have placed so far transport to another cell, but the actor must go through them in order to reach the desired destination. Is there something special that I have to do to get him to do that? I have not put any "activate" commands (to activate the doors) so far, because upon looking at bethesda's Actor packages, they do not have them, and it might add about 4 possibly unneeded triggers per actor, but if in your experience they are needed, I can try adding them. The doors are not locked, and I have unchecked all locks/unlocks doors that I could find. None of the targets, or cells, or anything that is being referenced is owned by anybody. Whenever I place him in a cell in the editor, all triggers that reference something in that cell work correctly, so it seems to be a problem transferring cells.
I would need to test this. I have never tried to get a package to run across multiple interior cells. I don't see why it wouldn't work, but you never know. It will take me a while to rig up a test. (But I would be surprised if this failed, because I don't remember other people complaining about this functionality and someone must have done something similar by now?!)

What are you using as the "Travel To"? If it is a piece of furniture, have you tried using a LOCATION instead (or an xMarker)?? Worth a shot.


I'll get back to you when I've tested ...


And ... make sure NOTHING is owned. If you cloned/copied anything (cell included) then it might be. Ownership rights are a killer for this sort of thing!

ooo and NAVMESH: Do the "triangles" - that sit on the floor in front of a placed door - sit nicely on your navmesh ... just give them a little fiddle to check that they are ...
User avatar
мistrєss
 
Posts: 3168
Joined: Thu Dec 14, 2006 3:13 am

Post » Mon Nov 19, 2012 10:52 am

Thanks! I have checked, nothing is owned (and the unrelated things that were, I disabled for good measure). I have tried targeting different pieces of furniture, as well as an xMarker. I also tried telling him to go to a location 1 cell away (so there was only 1 cell transition), didnt work. Any information you have would be much appreciated

Edit: Maybe I missed something in the Navmesh, but I dont understand you part about the navmesh. I havent done anything special with the navmesh in front of the doors, they connect to the door, but is there some sort of special selection to say "this is a cell transition"?

Edit: Success!! mostly. I successfully got him to travel from one cell to another. While the navmesh was in place, I had not finalized it (hence, no green triangles). I need to adjust his packages because all of my fidgeting with it has screwed with it, but he now regularly travels from one cell to another ( I havent tried 1 package going between multiple cells, but it should work). I believe that that was the main problem, and it should be fixed now. I appreciate the help greatly!!
User avatar
LuBiE LoU
 
Posts: 3391
Joined: Sun Jun 18, 2006 4:43 pm


Return to V - Skyrim