Other user's assetsAll the assets in this file belong to the author, or are from free-to-use modder's resources
Upload permissionYou are not allowed to upload this file to other sites under any circumstances
Modification permissionYou must get permission from me before you are allowed to modify my files to improve it
Conversion permissionYou are not allowed to convert this file to work on other games under any circumstances
Asset use permissionYou must get permission from me before you are allowed to use any of the assets in this file
Asset use permission in mods/files that are being soldYou are not allowed to use assets from this file in any mods/files that are being sold, for money, on Steam Workshop or other platforms
Asset use permission in mods/files that earn donation pointsYou are not allowed to earn Donation Points for your mods if they use my assets
Author notes
This author has not provided any additional notes regarding file permissions
File credits
This author has not credited anyone else in this file
Donation Points system
This mod is opted-in to receive Donation Points
Changelogs
Version v4.06
Fixed the issues that the update position functions not working when sleep to level up. ( Survival Mode )
Version v4.05d
Attempt to fix the issues that the update position functions not working when sleep to level up. ( Survival Mode )
Version v4.05c
Enable update position for ghost and silence NPC.
Version v4.05b
Fix an issue that the function of checking if AI package has changed didn't called before update NPC position in V4.05.
This issue caused the sick or wounded npcs not lie down on their beds.
Version v4.05
using a more effective and underlying function to update the actor's AI position. It now working faster and has higher compatibility with other mods.
Version v4.03c
Reconstruct the source codes one more time to make it more readable, more concise, and more OOP. ( The previous version really quite a mess up) Not any featues changed or added.
Version v4.03
Fix a CTD Issue that occus when update a non-persistence actor's positions. Fix it by skip the update of non-persistence actor.
Version v4.02a
Manage to update the "Later In NPC"( entered the current loaded cell after an hour) positions after sleeping and waiting, Now the AI process update of sleeping and waiting are completely fix.
Fix a issue that may caused incompatibility issue with other mod that has features relate to sleeping.
Version v3.02a
Rewrite the source codes to make them less messy and more readable for future development.
Source codes of this project is already uploaded and downloadable.
Version v3.01b
Fix a issue that, the AI position updating functions will not work again anymore in the game's current session once a abnormal occurred.
Optimize the updating function code that may improve the performance.
Version v3.01a
Create a checking function to check if the npc AI package was changed after wait \ sleep before update it position.
Two major benefits bring by this function:
1. Will prevent unnecessary position update function calling on an npc that have not changed it AI destination.
For example, if a city guard will guard the gate for a whole day, let's assume that will be 12 hours he will stay at his postion . Then if you wait 3 hours in front of him, the position updating function will not running on him. In the previous version , the function will run on him.
2. Allow update npc's position when it wake up from sleeping.
In the previous veriosn, updating function won't run on a sleeping NPC, now it will work.
Version v2.12
Fix a CTD Issue that occurs sometime in exterior cell : CTD when calling "MoveTo PackageLocation" Function from VM after move npc to it editor location . Fix method : Use only "Move To Nearest Navmesh Position" when in exterior to reset actor AI.
Will not move actor to it editor location to reset it AI when it editor location marker is located in the same cell with itself. ( Will use Move To Nearest Navmesh Position" instead)
Will not update a tempory actor ( with ID "ffxxxxx") after fast travel end.
Version v2.10
Add a "Move To Nearest Navmesh Position" function to allow reset AI of NPCs which has not an Editor Location Ref Marker.(For example, some Npcs in Raven Rock, Windhelm)
Add a INI setting option in mod's "AIProcessFix Settings.ini" file, named "EnableUpdateModAddNPCs". Which allow you to disable the plugin pos updating functions's running on NPCs added by mods.
Combine the fix patch from V2.04a & V2,04b
Version v2.04b
Do some minor adjustment based on V2.04a, try to make the fix work better.
Version v2.04a
Remove a line of redunat codes which will cause the "menumode state" fix patch in V2.04 doesn't work during sleeping. (A Code writing mistake.)
Version v2.04
Will not shut down the game when catch the abnormal that the game is not in menumode when sleeping/waiting process running. Instead it will just skip the functions running.
Version v2.03
Fixed a minor issue : sometimes NPCs current AI Action won't work properly after updating (for example, actor's using furniture animation didn't play).
Add a checking function to check if the game is currently in Menu Mode( Is the game paused?) before start any sleeping/waiting function. Report back to me if that conflict with any other Menu Mode modification Mod.
Version v2.02
Add a safety check before calling a actor's editor location pointer, prevent the CTD issue occurred when the editor location pointer is null.
Version v2.01
Version 2.01 could be called as a "Remake" of this mod.
In V2.01 Update, I use a completely new set of functions to reset an npc's AI state, and remove all the old method functions that used "disable" and "enable" to reset a NPC's AI state.
This new set of functions will let the plugin performs in a much more stable and effective, as well as will compelety fix some issues that caused by the old method.
Known Issues that fixed by this update includes:
1. Npcs were disabled and disappered after waiting or sleeping.
2. Npcs with "Enable State Parent"(for instance, City Guards) can't get their positions updating correctly due to the limitation of disable and enable functions.
Version v1.42
Remove a condition check of WaitSleepMenu opening added in v1.41 to prevent a fake abnormal caught up happened in some case (which will lead to a CTD)
Version v1.41
Combine the fix patch from v1.33a
make some optimize to improve the plugin's performance, increase the updating pos success chance and fix a issue that may caused actors missing in v1.33a patch.
Version v1.33a
Try to fix the crash issue when autosave or manual save that caused by the misorder callback event functions triggered.
Make a warning message box that would pop up when abnormal issue caught.
Version v1.33
Fix a issue that may cause the callback events trigger order incorrect which could result as a CTD when updating NPC's position
Fix a issue that cause functions running on a not loaded cell's NPC due to the incorrectly coding.
Change the files folder structure, add a "data" folder.
Version v1.31
Fix the issues when reset an actor which has enable state children, its children objectrefs may got disabled.(That's happend for the carriage)
Create a circular logging system for the plugin that allows you store up to 3 backup files circularly for the mod log.
Version v1.21
Updating pos functions will not running on any temporary NPC (ID is "FFxxxxxx") that created by world encounter or summon spell to prevent potential CTD Issues.
Double check Is the NPC was deleted before run any function on it.( won't run any function if that npc was deleted)
Fix a coding mistake that may cause memory leaking.
For AE Users: https://www.nexusmods.com/skyrimspecialedition/mods/57618?tab=description
Version 4.02a - Completely Fix the Issues after Waiting and Sleeping!
Version 4.02a completely fix the issue that NPC AI process position not update after waiting and sleeping! Read this article for detail : https://www.nexusmods.com/skyrimspecialedition/articles/2656
Issue Descriptions:
Maybe you already find out an old issue in vanilla skyrim game which is always bothering you - Some NPCs daily life schedule positions could not be updated correctly once you make a waiting\ sleeping \ fast travel lasting longer than one hour.
That’s due to a skyrim’s game engine limitation which could only update a NPC’s AI process position for one hour at most if that NPC ‘s loaded in current loaded cells (a high AI Process one).
Therefore, you probably meet the issue that when you waiting or sleeping in an Inn all night, the NPCs won't go home, instead they still stay at the inn the next morning.
That may even cause the NPCs blocking the door when they leave the Inn if you have installed some AI Overhaul Mod. (“Immersive citizens”, for example) Because such mod will cause many NPCs visit the Inn at night.
Besides, the loaded NPCs in the fast travel destination will not update their daily life schedule positions due to the same reason.
Mod Features:
To this, I try to fix such game engine limitation in source code’s degree through a DLL plugin.
The plugin will detect every waiting\ sleeping \ fast travel in game, and calculate the lasting time of this waiting\ sleeping \ fast travel.
If the lasting time is longer than the Minimum Trigger Hours (2 hours by default, can modify in the INI File ), the updating position function will trigger and all the humandio character NPCs who matches the conditions will be updated the position by the mod's functions,sending them to the correct place in the correct time.
(1) Download and Install the mod files with mod manager.
(2) Disable all the auto save options triggerd when sleep, wait, fasttravle in game, include auto save options that added by mods. (Not necessary, but recommended)
INI Setting:
Go to Data\SKSE\Plugins\MaxsuAIProcessFixFiles, check the INI file for in game setting modifications.
Compatibility Issues:
Fully Compatible with:
Fully compatible with AI Overhaul SSE or any AI Overhaul Mod that doesn't include any AI Package added by "Quest Alias".
To create a patch for your AI Overhaul Mod, see this article: https://www.nexusmods.com/skyrimspecialedition/articles/2463
Incompatible with:
(1) Incompatible with Closing Time, my mod already did all the things instead of it.
(2) Incompatible with SOT CASM's "Save When Sleeping" and "Save When Fast Traveling" function. You should turn these two option off in SOT CASM's MCM. Also, Incompatible with any mod that trigger a game saving in the process of sleeping\waiting or fast travle.
Mod Limitations and Issues:
(1) NPCs may have a visibly “fade in” effect for a second when their positions got updating by the mod’s function. Some NPCs may teleport in front of you by coincidentally.
(2) Mod function only works and runs for humanoid character type NPCs, not works for animal or creatures NPCs.
(3) Not works for NPCs in scene (during dialogue, for example). Not works for NPC who has quest alias AI package (exclude AI Overhaul mod’s package). Not works for NPCs in combat.
(4) Sometime the updating positions of several NPCs may be fail, this may happen when you have too many NPCs stayed in a cell. It also relate to your CPU Performance, the higher the performance, the lower fail chance.
Q&A:
Question: Would that mod cause NPC's Quest Process be Broken?
Answer: The mod's function will not runs on any NPC who in a quest AI Process, therefore you should not worry about it.
Question: I have meet some issue in game need to report to you, what should I do?
Answer: Firstly, quit the game to the desktop and don't re-start it. Then, go to "C:\Users\Administrator\Documents\My Games\Skyrim Special Edition\SKSE" folder, find the log file "MaxsuAIProcessFix.log" and store it well. When you come here to report your issues, please send me the log file at the same time. Since I can't collect the detail information withoout the log files.
If you meet CTD Issues, go there and post your issues follwing the instructions: https://www.nexusmods.com/skyrimspecialedition/mods/40261/?tab=forum&topic_id=9204218
Credit:
kassent for helping me find out the address of two pivotal function and show me have to use them.