AI Travel and Sandbox

Post » Sun Aug 29, 2010 3:48 pm

I'm trying to find a way to allow my NPC's to sandbox and move inside public buildings or just go inside them in general. I have a guard rotation I setup but the guards never leave their homes to go to their posts. The NPC's I have sandboxing outside won't go in buildings I want them for guard posts either.

I have established Navmesh in all the locations, with green triangles near the doors, all the teleport markers are present, nothing locked, It's just as if the NPC's don't see the doors or something.

I want the NPC's to sandbox like Megaton, moving in and out of buildings, going to bed, etc. Is there something I'm missing?
User avatar
Thema
 
Posts: 3461
Joined: Thu Sep 21, 2006 2:36 am

Post » Sun Aug 29, 2010 9:57 am

They should have more than one package on each NPC.
Each package should have time of day conditions, and such.

Leo Stahl moves from interior to exterior to another interior and back.
You may wish to take a look at how his packages are set up.
User avatar
Laura Simmonds
 
Posts: 3435
Joined: Wed Aug 16, 2006 10:27 pm

Post » Sun Aug 29, 2010 5:35 pm

Yes, but one package can take an NPC out of one door in one location and through another one and into another location. Are you saying that your NPCs just won't exit any location and enter another at all?

Michele is right that if you want to establish elaborate schedules for your NPCs like in Megaton your NPCs will need several packages. However, if even one travel package to go from Point A (say where the NPC is sleeping) cannot get him/her to walk through a door and through another door and into another building (say where he/she will eat) then you have another issue going on.

Also, an NPC who is sandboxing outside won't go inside a building, If you want him to go inside you need use something like a travel package to get him inside the building and then have him do stuff in there. So you might do something like have him sandboxing outside, then have set up a trigger somewhere/somehow than sends him into a travel package that sends him through the door and another trigger that sends him back into a sandbox package once inside the building so he sandboxes in there and a reversal of all of that to get him back out again or into a different package that travels him somewhere else for dinner time or sleepy time or whatever.
User avatar
SaVino GοΜ
 
Posts: 3360
Joined: Mon Sep 17, 2007 8:00 pm

Post » Sun Aug 29, 2010 1:15 pm

Thanks I'll take a look at those options.

What I have setup now is, one NPC for example:

0600 - 1800 stand guard BuildingA with reference of Chair1
1900 - 0400 sleep Home with reference of Bed1
0400 - 0500 sandbox Home with reference of CellHome

The end result is that NPC stays in Home and doesn't leave at all. I've tried changing some of the flags to force the NPC to move even if someone was around and "must complete", but no luck. I just noticed that I do however have the 0600-1800 Guard package set as GUARD with no travel package to BuildingA, so maybe that's the issue? And if so then a package would be needed to travel back to Home after 1800? The sandbox at Home and sleeping works great, but that's it.

I just looked over the BillyCreel packages in Megaton and didn't really see much different then what I got other then it's more elaborate with eatching and such.


Just for note, I am able to get NPC's out the buildings or into them if I initiate combat, launching some rockets at them they scurry around and sometimes end up outside or inside but that's it and it's almost as if it's by mistake.


Here is my actual mod if you want to take a look at it and see if you notice anything jacked up that might be causing the issue, http://www.fallout3nexus.com/downloads/file.php?id=14856
User avatar
noa zarfati
 
Posts: 3410
Joined: Sun Apr 15, 2007 5:54 am

Post » Sun Aug 29, 2010 1:01 pm

I was unclear. I was using a travel package as an example of the most simplistic and direct package I could think of that would move a NPC from one location to another and if your NPCs won't move from point A to point B in a travel package then something is up. They can absolutely go from Guard to Sleep to whatever. It's the transitions that need to be managed properly. How are you doing that? Are you doing it in the results scripts?

When I was talking about travel pkgs combined with sandbox packages that was for that particular scenario. NPCs won't go through exterior doors when they sandbox and it sounded to me like you wanted them to go in and out of a building while sandboxing, which sounds great, and is totally doable, and not that big of a deal, it just needs more than a sandbox package alone to make it work.

You don't need the "if PC is around" flag unless you have a store. Apparently that is designed specifically for shopkeeper NPCs. Must complete is pretty useful, and I think pretty much a must have in these cases where you want them to go and be independently successful and you are not directing their activity through dialogue along the way.
User avatar
Craig Martin
 
Posts: 3395
Joined: Wed Jun 06, 2007 4:25 pm

Post » Sun Aug 29, 2010 8:04 am

Well I managed to get it to work for the most part. I added in a package inbetween "transitions" so now they are told to move from A to B and then the follow-on package at point B kicks in and so on in reverse order.

My next issue is somewhat complex,

What I'm wanting within their packages is to eat and sit at computers, so I have several markers (not X's) placed around (ComputerOfficeChairRuined, Sit, etc.) and I've noticed that when I try to reference the computer chair markers it won't let me and only allows me to use the chairs that don't say Office and Computer, only the computer ones. Basically, I can't seem to direct my NPC's to sit at a desk and type on a computer cause the markers are not selectable for a reference. The same goes for the sitting markers I place where I put food and wanted them to eat.

To get around that issue I made them Sandbox, however the result isn't 100% what I'm looking for because after about 10 minutes or so they wonder off away from the marker, even though I have wander disabled in the flags. Ideally I'd like them to sit at the desk for "X" amount of time and then go eat for "X" amount of time then go sleep for "X" amount of time and repeat.
User avatar
Andres Lechuga
 
Posts: 3406
Joined: Sun Aug 12, 2007 8:47 pm

Post » Sun Aug 29, 2010 2:35 pm

I know nothing about building physical spaces and not much more about the things that go in them (markers, furniture, etc and how they work). But I didn't want to just walk out of the thread in the middle of the conversation. I know that if you give the chair a name in the reference field (making it a reference) and make it persistent you will be able to reference it in your package. I do not know the pros/cons of making it persistent.

Also, when I said above that the "must complete" flag is very useful, I didn't say this: You shouldn't use it with a Sandbox package. They cannot be completed so it is invalid for the package.
User avatar
~Amy~
 
Posts: 3478
Joined: Sat Aug 12, 2006 5:38 am

Post » Sun Aug 29, 2010 6:58 am

Use a patrol package instead of a sandbox. For the 'sandbox' stuff, you need to make sure you are using a furniture (not a static) object. To make then use a computer, it is the chair and not the computer that does this, therefore it must be a 'computerchair01L' for example. They will sit and type even if a comp is not present. I usually set up a patrol package,(make sure your "blue figure" is visible with the m key---that's what you're selecting, not the chair) set all my items the npc will use as persistant references, link my npc to the first one and give it a patrol time from the patrol tab of the object, then I link that object to the next one, etc. To add the eat function into the routine, you would have to change your patrol package into an eat package with a persistant object (chair/stool) as a location and set a time to eat duration in the schedule tab. The sleep function would also then be a separate package with a location and a schedule. Then you would have them move back to a patrol package, and so on. For the guard stuff, set up a patrol package and link idlemarkers (persistant checked). You can also stipulate in the patrol package, weapon drawn, etc. or you can chose idlemarkers for guards.
It can get kind of involved if you want them to do a lot of stuff.
Hope this helps.
User avatar
koumba
 
Posts: 3394
Joined: Thu Mar 22, 2007 8:39 pm

Post » Sun Aug 29, 2010 6:05 pm

Well I managed to get it to work for the most part. I added in a package inbetween "transitions" so now they are told to move from A to B and then the follow-on package at point B kicks in and so on in reverse order.

My next issue is somewhat complex,

What I'm wanting within their packages is to eat and sit at computers, so I have several markers (not X's) placed around (ComputerOfficeChairRuined, Sit, etc.) and I've noticed that when I try to reference the computer chair markers it won't let me and only allows me to use the chairs that don't say Office and Computer, only the computer ones. Basically, I can't seem to direct my NPC's to sit at a desk and type on a computer cause the markers are not selectable for a reference. The same goes for the sitting markers I place where I put food and wanted them to eat.

To get around that issue I made them Sandbox, however the result isn't 100% what I'm looking for because after about 10 minutes or so they wonder off away from the marker, even though I have wander disabled in the flags. Ideally I'd like them to sit at the desk for "X" amount of time and then go eat for "X" amount of time then go sleep for "X" amount of time and repeat.


Examine how Bethesda got Dad to sit in his chair in the CG03 quest. I emulated this and it worked well for me in my Phalanx quest where I needed Robert to sit at his desk and hold a conversation with the player (and Sylvan to sit down, then get back up and greet player afterward).
User avatar
no_excuse
 
Posts: 3380
Joined: Sun Jul 16, 2006 3:56 am


Return to Fallout 3