Zorkaz Posted August 15, 2020 Share Posted August 15, 2020 What do I have to set in the AI data so an NPC seeks the player from somewhere in the world? Link to comment Share on other sites More sharing options...
SKKmods Posted August 15, 2020 Share Posted August 15, 2020 Its the actor AI package. It can get rather complicated if you want to spawn the stalker outside of the active uGrids (10K game units to be safe). Follow Player packages will teleport the actor to the player if unloaded or over the specified follow range. Travel packages are good if the actor and target are in the loaded uGrids. If either are unloaded then the package seems to need a fixed point target destination. Specifying a moving target by setting Location:Player or a LinkedRef keyword to the player tends to cause the actor to move to where the player was when the package initialised. I have messed about with switching packages on player movement and/or updating the linkedref but the results were inconsistent and not up to UX quality standards. I even tried using an xmarker placeholder (for optional mapmarker) and moving that XY (requires math to calculate delta XY path angle) on a filthy timer, only spawning an actor when inside the active uGrids and then switching back to an xmarker when unloaded. Messy. There are a couple of stalker type mods, like marked for termination, take a look. Link to comment Share on other sites More sharing options...
Zorkaz Posted August 15, 2020 Author Share Posted August 15, 2020 Thanks for the info SKK50. I know there are some stalking mods out there but they additionally had another issue which is that they teleported to you when you slept. So even a locked door wouldn't keep them out. "Follow Player" isn't an option then. But I suppose I can just look at Edward from the Cabot House quest. Link to comment Share on other sites More sharing options...
SKKmods Posted August 15, 2020 Share Posted August 15, 2020 The sleeping thing is simple to handle. RegisterForPlayerSleep() and switch the AI package stack to Travel to Actor's current location (effectively hold position without the stupid hold position package) from OnPlayerSleepStart to OnPlayerSleepStop. Basic state management. Link to comment Share on other sites More sharing options...
Zorkaz Posted August 15, 2020 Author Share Posted August 15, 2020 Thanks. I haven't even begun with it, but I already have some ideas how to handle it. If I find an excellent one I'll post it for reference Link to comment Share on other sites More sharing options...
SKKmods Posted August 15, 2020 Share Posted August 15, 2020 Standby for some annoying and unpredictable stuff to happen. It can take a while to manifest :( Link to comment Share on other sites More sharing options...
Recommended Posts