Jump to content

NPC Schedule Time Lag


Recommended Posts

Idk why is it so but npc in my mod don't follow their own schedules precisely.

Ex.:

I've arranged a "travel" package to the marker (in exteriors) at 5 AM and staying there for 2 hours. Npc Sleep Package was arranged from 22 PM to 4 AM.

But in fact the character sleep for 5:30 or similar (everytime time lag is different) and only after that he asleeps and goes to the point. I have to check the location (custom tavern) where NPC sleeps to make him go to the marker.

I've checked his packages for several times and every time he has arrived to the point at different time: 5:40; 6:25; 7:20 (!), etc.

I don't understand what I did wrong. Some schedules work precisely, some do not. 

I've tried to change "energy" to 100 points  in AI menu of every NPC but it doesn't change anything.

Please, any advice will be helpfull.

 

Link to comment
Share on other sites

"Energy" was what I was going to suggest as this has the greatest impact.

But the game does not process all AI packages at the same time because it does everything in sequence, so if you have other heavy scripts, they may be delaying processing of AI packages.

Besides that, not all actors are being processed all the time, that would certainly kill the game.  See this Wiki link about scheduling of script processing. I found it also applies to AI. If you want your NPC to be very punctual, make him/her a quest item (tick "Quest Item" box in the NPC window). There is still no guarantee of absolute punctuality, but it should improve it.

There is simply no guarantee that a certain actor will reach a certain point at a particular time. If this is important, use "moveto" from a script to put that actor there when it's needed.

In addition, NPCs may be delayed if they engage in "fallout behaviour" such as stopping to chat with other NPCs. Tick "No fallout behaviour" on the travel package that brings the NPC to the final destination.

Edited by LenaWolfBravil
  • Like 1
Link to comment
Share on other sites

Something I use extensively while testing and troubleshooting AI packages is the console command getcurrentpackage.

 

Open the console while the NPC is onscreen and click on them so that their refID is displayed. Type in the command and hit Enter and the ID of the package will be displayed.

I generally get the package from before the time of the package I want them to execute and then once the time of my package has passed I issue the console command again. You can get the ID numbers of the vanilla packages and yours by double clicking the collapsed column just right of the first column in their AI packages list.

  • Like 1
Link to comment
Share on other sites

6 hours ago, LenaWolfBravil said:

"Energy" was what I was going to suggest as this has the greatest impact.

But the game does not process all AI packages at the same time because it does everything in sequence, so if you have other heavy scripts, they may be delaying processing of AI packages.

Besides that, not all actors are being processed all the time, that would certainly kill the game.  See this Wiki link about scheduling of script processing. I found it also applies to AI. If you want your NPC to be very punctual, make him/her a quest item (tick "Quest Item" box in the NPC window). There is still no guarantee of absolute punctuality, but it should improve it.

There is simply no guarantee that a certain actor will reach a certain point at a particular time. If this is important, use "moveto" from a script to put that actor there when it's needed.

In addition, NPCs may be delayed if they engage in "fallout behaviour" such as stopping to chat with other NPCs. Tick "No fallout behaviour" on the travel package that brings the NPC to the final destination.

Thank you very much! I try to tick it. Hope it'll work for quest guys.

I have made several in-game notes about daily routine for quest purposes. These lags make these notes useless :)) 

Moveto maybe very harsh, it just teleports a person to the marker, right? Very specific procedure. I tried to arrange a more subtle and immersive experience...

PS Now I understand why different shops in my custom settlement have opened themselves not precisely  at 8 AM...

PPS Energy, if   Oblivion Fan Wiki is correct (I see the same in english wiki, but can't find it for now), is about NPC's speed (?) when they travel to marker or patrolling. Smth like that.

 

Link to comment
Share on other sites

4 hours ago, Striker879 said:

Something I use extensively while testing and troubleshooting AI packages is the console command getcurrentpackage.

 

Open the console while the NPC is onscreen and click on them so that their refID is displayed. Type in the command and hit Enter and the ID of the package will be displayed.

I generally get the package from before the time of the package I want them to execute and then once the time of my package has passed I issue the console command again. You can get the ID numbers of the vanilla packages and yours by double clicking the collapsed column just right of the first column in their AI packages list.

Thank you!

You mean this helps to see precisely a hiatus between packages?

Link to comment
Share on other sites

Yes ... if your package is supposed to start at 6pm you see what package is running before it rolls past 6 and the check again right after the hour ticks over (or wait a minute or two in game time). If it changes to your package ID then you know something other than an AI package could be interfering (example a script).

If it doesn't switch to your package ID you need to find what is stopping your package from triggering.

For example I use conditions a lot and sometimes I have a brain cramp with them where it's my condition stopping the package from starting when that isn't what I  intended under the current in game conditions.

You can also examine the vanilla package they're executing before yours to see what conditions or flags it has set (example must complete).

The game parses thru the listed packages from top to bottom each cycle, and if two packages have the same time then the upper one will always execute unless it fails any conditions that are set (then the lower one with the same time gets a chance).

The system that Bethesda provided is powerful when well understood and implemented ... but it's also easy to shoot your own foot (get me to take off my shoes for you some time).

  • Like 1
Link to comment
Share on other sites

2 hours ago, ArtemSHikoff said:

Thank you very much! I try to tick it. Hope it'll work for quest guys.

I have made several in-game notes about daily routine for quest purposes. These lags make these notes useless :)) 

Moveto maybe very harsh, it just teleports a person to the marker, right? Very specific procedure. I tried to arrange a more subtle and immersive experience...

PS Now I understand why different shops in my custom settlement have opened themselves not precisely  at 8 AM...

PPS Energy, if   Oblivion Fan Wiki is correct (I see the same in english wiki, but can't find it for now), is about NPC's speed (?) when they travel to marker or patrolling. Smth like that.

 

In my experience none of the vanilla merchants open right on the hour ... some can be nearly an hour late.

  • Like 1
Link to comment
Share on other sites

14 hours ago, Striker879 said:

In my experience none of the vanilla merchants open right on the hour ... some can be nearly an hour late.

I've experienced it only when used Oblifall Openening Hours. In vanilla I've just never noticed this behaviour. Thus, I was really surprised when this thing occured in my mod.

 

Link to comment
Share on other sites

14 hours ago, Striker879 said:

Yes ... if your package is supposed to start at 6pm you see what package is running before it rolls past 6 and the check again right after the hour ticks over (or wait a minute or two in game time). If it changes to your package ID then you know something other than an AI package could be interfering (example a script).

If it doesn't switch to your package ID you need to find what is stopping your package from triggering.

For example I use conditions a lot and sometimes I have a brain cramp with them where it's my condition stopping the package from starting when that isn't what I  intended under the current in game conditions.

You can also examine the vanilla package they're executing before yours to see what conditions or flags it has set (example must complete).

The game parses thru the listed packages from top to bottom each cycle, and if two packages have the same time then the upper one will always execute unless it fails any conditions that are set (then the lower one with the same time gets a chance).

The system that Bethesda provided is powerful when well understood and implemented ... but it's also easy to shoot your own foot (get me to take off my shoes for you some time).

Get it now 🙂

Thank you, yeah I often tick "must complete" box to make sure it WILL be done :))

Link to comment
Share on other sites

The trick with flags is to only use those that are absolutely needed (and the same goes for conditions).

  • Like 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

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