Jump to content

Unpredictable travel times for actors with travel AI package


onspey

Recommended Posts

I have an actor assigned to a quest alias. This alias adds an AI package with a 'travel' procedure to the actor. There's also a objective marker pointing to the actor's position on the map. Once forced into the alias, the actor starts moving as they should. If I follow them, they'll continue to walk to their destination, taking however long it takes to actually walk there. All seems to work.


However, if I instead leave them and - for example - enter an interior cell, the actor's behavior becomes really erratic. As soon as the actor is unloaded, they will almost instantly jump to the travel procedure's destination reference; literally reaching the other side of Skyrim within a couple of in-game minutes, which severely harms immersion for the purposes of the mod I'm working on.


I've never worked with traveling NPCs before, hence I'm unsure whether this is the expected engine behavior or whether the way I set things up is flawed. If someone more knowledgeable could shed some light on this for me, I would greatly appreciate it.

Link to comment
Share on other sites

Expected engine behavior. Also, keep in mind for every real time minute, 30 minutes pass in Skyrim. So, while you've spent 5 real time minutes in an interior cell, your NPC traveled for 2-1/2 hours. If you fast travel, NPC AI packages don't always play as expect either.

Link to comment
Share on other sites

Thanks for the input.

 

I did some experiments with different time scales and there seems to be a correlation. The LOWER time scale is set, the FASTER NPCs seem to travel (in unloaded cells, purely by nav mesh). I tried different values between 60:1 and 1:1. At 60, travel speed almost seems what the player could achieve. At 20:1 (vanilla), travel speed is bearable, although much faster than the player can run. But at 5:1 (the setting I normally use), NPCs simply race across the map (even worse at 1:1).

 

So it seems, the engine is applying some 'correction' factor depending on the time scale setting. This might be a bug, as I can't imagine this to be the intended behavior.

 

Now I'll need to think about some way to work around this issue.

Link to comment
Share on other sites

Yeah if you want you can add a global variable or other condition to keep npcs from doing something too early. Script-wise I do believe RegisterForUpdateGameTime() factors in timescale so you could look into using that to throttle certain things happening too soon

Link to comment
Share on other sites

After trying a lot of different approaches with package conditions and procedures, I came to the conclusion that it's simply not worth it trying to fight the game engine. Seems to me Bethesda put priority on getting actors where they need to be, rather than ensuring the realism/plausibility of how the actor gets there.

 

My plans were to achieve some sort of emergent behavior with quasi-autonomous NPCs doing stuff on their own in the world, which is working for the most part. But it looks like I will need to resort to gas lighting the player to some degree and implement some way to simulate travel time by delaying informing the player that an actor has arrived at location X.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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