Jump to content

Patrol AI Packages Question


rms827

Recommended Posts

I'm trying to figure out how to make an AI package like he one on Adrianne Avanicci that sends her down to the Bannered Mare for dinner every night. Looking at her in the CK, I see it's a Patrol based AI Package, but I'm not seeing how she knows to head to the Bannered Mare.

 

I'm sure this is pretty simple, BUT all the tutorials I've seen on AI packages are very basic Sandbox in a single area type tutorials. I've yet to find one that would show me how to send a NPC across town and zone into a new area.

Link to comment
Share on other sites

Strange. To verify what you mentioned, I followed Adrienne when she left her house at 8 p.m. for the evening stroll. She walked the same route 4-5 times until she went back to her house at about 12 p. m., but not once she entered the Bannered Mare.

Note: My game is almost unmodded.

Link to comment
Share on other sites

easiest way is to make multiple packages

There is a conditions tab but also a schedule tab, whichever package is at the top takes precedence provided A: the conditions in the condition tab are met and B: it fits the time in the schedule tab

 

You can use that to literally do as much as you want so I'll spell it out anyway cause ... I'll just assume

 

 

Make your regular sandbox or patrol, make a new patrol for her to eat, set the times and make sure it is above the other one, set another tab for her to sleep or something, set the times, set it above the other one

Presto movie magic

 

There is no real downside to stacking the packages unless you start to get too many but then it's just a matter of keeping track of them, the engine just ticks off from top to bottom and grabs the first available (As I am aware) it's not a constant, from what I can tell the engine evaluates packages every 5-15 seconds or so, the only way to immediately get a package to work is call it via script or scene. But that lag time wont matter for a schedule.

Link to comment
Share on other sites

easiest way is to make multiple packages

There is a conditions tab but also a schedule tab, whichever package is at the top takes precedence provided A: the conditions in the condition tab are met and B: it fits the time in the schedule tab

 

You can use that to literally do as much as you want so I'll spell it out anyway cause ... I'll just assume

 

 

Make your regular sandbox or patrol, make a new patrol for her to eat, set the times and make sure it is above the other one, set another tab for her to sleep or something, set the times, set it above the other one

Presto movie magic

 

There is no real downside to stacking the packages unless you start to get too many but then it's just a matter of keeping track of them, the engine just ticks off from top to bottom and grabs the first available (As I am aware) it's not a constant, from what I can tell the engine evaluates packages every 5-15 seconds or so, the only way to immediately get a package to work is call it via script or scene. But that lag time wont matter for a schedule.

 

Making multiple packages and stacking them... THAT part I got. I understand how to schedule each package for a set time block also. I will have to look more into that conditions tab though. :)

 

The part I'm not getting is how do I switch from one set of idle markers in one package to another set of markers in a second package. Lets use a generic guard as an example, since it's a bit closer to what I actually want to recreate. Guard walks a laid out set of patrol idle markers during their duty shift. End of shift, they abandon those idle markers and head to their barracks. Zoning into a guard barracks or a tavern I assume is as simple as treating the door teleporter box like an idle marker. When the shift ends though, how do I get the NPC to follow the second set of idle markers to the inn or barracks?

Link to comment
Share on other sites

The idle/markers are linked to the AI Package.

So for example:
Day Duty AI Package is set to run at 8am for 10 hours.
The Day Duty AI Package is linked to the first Idle/Marker.
That first Idle/Marker is link ref'd to another Idle/Marker and that Idle/Marker is link ref'd to another Idle/Marker.. etc
So the Guard will travel between those Idle/Markers between 8am and 6pm.

Now you add a 2nd Sleep AI Package.
The Sleep AI Package is set to run at 10pm for 6 hours
Sleep AI Package is linked to a Bed inside the barracks.
The guard will sleep in this bed from 10pm to 4am

Now you add a 3rd Sandbox AI Package
The Sandbox AI Package has no time set (runs any time).
Sandbox AI Package is linked to an xmarker that is inside the Tavern.

So now you have your guard that will patrol the Guard idle markers from 8am to 6pm
The Guard will sleep in the Barracks bed from 10pm to 4am
Any time outside of those 2 package times the guard will go to the Tavern and hang out there.

 

This just a brief non specific example.

You can do the same type of thing differently using conditions on the packages or setting conditions based on a global variables or many other game factors.

Link to comment
Share on other sites

OK, cool. I guess I was worried that if I didn't have a specific path laid out to a barracks or tavern that they'd get lost along the way and just end up standing in front of a bush.

 

Sounds like if I'd played around with the AI packages a bit more that I should have seen that I could connect a linked reference to a specific package too. :|

 

 

Thanks for the help everyone. As said in my original post, I was a little lost because all the tutorials I'd seen only covered basic sandboxing AI and I wasn't sure that carried over to a new zone or if there were more tricks involved.

Link to comment
Share on other sites

Having made packages for more than 500 npcs of varying complexity for my world, I can say that a proportion do not work for some of the time. Which is in some cases is quite good because you find them walking randomly between settlements and generally making the place look busy. Guards have a habit of breaking their patrols and walking off and some NPC decide to walk instead of going to bed (but not the same ones and on different nights).

 

The moral of the tale is that if you really have something that a npc must do reliably, then limit them to eat and sleep and one other package only.

Link to comment
Share on other sites

I'll keep that in mind Agerweb. That was pretty much all I needed my Sentries to do anyway, so hopefully it'll all work out. :)

 

 

Mattiewagg, that looks to be exactly the tutorial I need to plug the gaps in my knowledge. Much appreciated.

 

Side rant here, but it frustrates me that I couldn't find that myself. Google seems useless for finding more advanced tutorials like that (at least for me). Everything I've searched for relating to my modding work in the last few months seems to take me to the same basic tutorials (some good, some utter crap) and a parade of usually unrelated YouTube videos and other garbage for Skyrim.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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