Jump to content

NPCs not moving on cold load boot


Recommended Posts

I am working on a mod which involves using AI Packages (TravelToLinkedRef) and I am having issues when I load a game after closing the game.

It work properly if I do a QuickSave and QuickLoad in the same play session. It also works properly if I move away (cells unloaded) and return to the same place (cell loaded).

But in the situation where I saved, closed the game and loaded, the NPC is stuck. It won't move. I tried a few things and it did not fix it. But, after seeing it stuck, if I fast travel and return, it resumes working again.

 

How it is setup:

  • Travel Package template with TravelToLinkedRef package group. Location type, set to Near linked reference which has a custom keyword that I set to an instantiated XMarker that I control.
  • Has a condition to activate.

Solutions I tried:

  • Disabling and re-enabling the AI for the actor
  • Disabling and re-enabling the Marker
  • Disabling and re-enabling the Actor
  • Moving up the actor
  • Destroying and recreating the Marker and setting again the linkedRef
  • Disabling the package by changing the ActorValue used in the condition

 

I am sure there were other things I tried and I don't remember. I've been having this issue for some time.

Has anyone ever faced a similar situation? Any tips on how to fix it?

 

Thanks,

OldBard

Link to comment
Share on other sites

I found some clues. The wild life in the area are also not moving, and, if shot, are not fighting back.

Wildlife further away does not seem to be affected.

Could it be something related to the path in the terrain? It is in an outpost in the middle of nowhere. I am not sure if there is any path / navmesh set on those areas.

Link to comment
Share on other sites

I thought this was going to point me in the direction of an amount of AI limit, but I was wrong. I tried it on a empty moon and had the same issue althought there were no other actors in there but the one I was setting up to travel.

So, no idea what's going on yet.

Link to comment
Share on other sites

What is the persistence state of the actors via script property, quest alisas, abPromoteParentRefr & etc ?

Click on 'em in the console and see if they have [PP] or [EP] tags.

With procedural generation garbage collection non persistent actors can do odd things between sessions.

Link to comment
Share on other sites

On 6/11/2024 at 4:53 AM, SameOldBard said:

I am working on a mod which involves using AI Packages (TravelToLinkedRef) and I am having issues when I load a game after closing the game.

It work properly if I do a QuickSave and QuickLoad in the same play session. It also works properly if I move away (cells unloaded) and return to the same place (cell loaded).

But in the situation where I saved, closed the game and loaded, the NPC is stuck. It won't move. I tried a few things and it did not fix it. But, after seeing it stuck, if I fast travel and return, it resumes working again.

The game features a very robust navmesh generation which is not completely polished yet. In some cases, NPCs (including both companions and wild life) can get stuck after loading a save or arriving at a procedually generated location.  Fast traveling then reentering the area indeed solves things which leads me to believe it's a vanilla game bug. Sometimes, waiting a few minutes helps too.

By the way, there's a somewhat related AI bug too: upon arriving at a "crowded" location, NPCs may stand still for ~20 seconds before their AI packages activate. Normally, most NPCs should be 3D loaded at their package location (i.e. MoveToPackageLocation().

Link to comment
Share on other sites

3 hours ago, SKKmods said:

What is the persistence state of the actors via script property, quest alisas, abPromoteParentRefr & etc ?

Click on 'em in the console and see if they have [PP] or [EP] tags.

With procedural generation garbage collection non persistent actors can do odd things between sessions.

I am using a RefCollectionAlias to set the actors / control their AIs. Those specifically were spawned just for the test. So I will check with normal specialists and non constelation followers to check if there is any change to them.

For the LinkedRef of the marker used for the AI Package, I am setting abPRomoteParentRefr to true. Should I test it as false just in case?

Their tags before and after loading the save game is [PP].

I will test with the non constelation companions as I mentioned in the meantime.

And thank you very much for helping here SKK.

Link to comment
Share on other sites

1 hour ago, LarannKiar said:

The game features a very robust navmesh generation which is not completely polished yet. In some cases, NPCs (including both companions and wild life) can get stuck after loading a save or arriving at a procedually generated location.  Fast traveling then reentering the area indeed solves things which leads me to believe it's a vanilla game bug. Sometimes, waiting a few minutes helps too.

By the way, there's a somewhat related AI bug too: upon arriving at a "crowded" location, NPCs may stand still for ~20 seconds before their AI packages activate. Normally, most NPCs should be 3D loaded at their package location (i.e. MoveToPackageLocation().

The navmesh issue seems like a good reason for the issue I am having. Also, waiting is not helping they regain their movement.

I will try calling the MoveToPackageLocation on game load to see if it helps.

Once again, thanks for all the help LarannKiar.

Link to comment
Share on other sites

On 6/18/2024 at 8:29 AM, SameOldBard said:

The navmesh issue seems like a good reason for the issue I am having. Also, waiting is not helping they regain their movement.

I will try calling the MoveToPackageLocation on game load to see if it helps.

Once again, thanks for all the help LarannKiar.

It did not. They just teleported a bit closer to the target.

Link to comment
Share on other sites

Teleporting to target == no clear path.

Its 99% of the reason Fallout 4 attackers seem to spawn inside settlements (they dont, just teleport to package destination inside the players finely constructed path blocking walls).

Try to throw Debug.Traces on the actors in the error condition with PathToReference() to see if the return is true or not.


; Note: this method doesn't return until the goal is reached or pathing
; failed or was interrupted (by another request for instance)
; Return values (see above):
; 0 - Success
; 1 - Failure
; 2 - Stopped
; 3 - Cleared
int Function PathToReference(ObjectReference aTarget, float afNormalizedSpeed, float afNormalizedRotationSpeed, float afTargetRadius=-1.0, bool abHardRadius=false) native
 

Note: function was buggy as hell in Fallout4, dunno if it actually works on Starfield, so let us know !

Link to comment
Share on other sites

  • Recently Browsing   0 members

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