Skyrim Special Edition
0 of 0

File information

Last updated

Original upload

Created by

SomethingObscure

Uploaded by

SomethingObscure

Virus scan

Safe to use

About this mod

It's dawn at your favorite Inn, and everyone's been here all night. Now they are all trying to leave at once. Oh no.

Requirements
Permissions and credits
Changelogs

You've just had a restful night at the inn.  You wake up and discover that everyone's been partying at the bar all night, and are now all stampeding towards the exit door, causing a traffic jam that takes ten minutes to clear up.  It doesn't have to be this way.


This mod runs invisibly in the background. Whenever you sleep, it takes stock of all of the NPCs around you, so that when you wake up, they're all be where they'd actually be at that hour.  Your mornings may now actually be peaceful.  This will always be true when sleeping or waiting in any inn.  

Spoiler:  
Show

  • The mod's script uses an SKSE function to find all NPCs in the cell with you at the time you've gone to bed and assign them to a list.  When you wake up, the list is read, and each NPC is moved to where their current AI package wants them to be. 
  • That said, here's some notes:
    • Technically, the NPC is moved twice. First they're sent to a holding cell. This is done because most AI packages begin with a travel sequence, which always have the start location at the NPC themselves.  The holding cell ensures that the start location is not the Inn.
    • Next, the NPC evaluates their AI package. The travel sequence begins.
    • Finally, they're moved to their AI package start position. The travel sequence began in an unloaded cell, so it's skipped, and the NPC is moved directly to the location where their package wants them to be, depending on the time of day.
    • A failsafe double checks to make sure they're not still in the holding cell. If they are, they're moved to their default position, and the game system takes over. In all of my tests, this has never happened.
    • The script only puts the NPC where they want to be.  So if the Innkeeper is standing next to your bed when you go to sleep, they'll still be there when you wake up.
    • Current followers are ignored by the script.  They'd just be put right back where they were, so it's a waste if processing time.
    • If there's a very large number of NPCs in the Inn, which is certainly possible in a normal modded game, and you're using a mod which makes sleep happen much faster, you may see some NPCs being teleported after you wake up.  The script has to move each NPC one at a time, so it may not be through with everyone by the time you're out of bed!



SKSE is required. The archive contains a single ESP-FE plugin and BSA archive. The plugin contains only new records and a few simple scripts.


This should work with all Inns, all beds, all ways you can sleep, and with all NPCs.
  • If you're using Engine Fixes (and you should be!) setting the sleep speed down to 10% is ok, but if you have a huge number of NPCs in the Inn, you'll probably be awake before the script finishes queuing them into the list, so you'll be able to see them all poof to the holding cell one by one.  For more modest NPC counts (10 - 20) setting it to 30% sleep speed should be fine.
  • Mods like AI Overhaul and Immersive Citizens are supported and encouraged.  It will make it more likely that the NPC has a place go go in the morning, leading to a quieter Inn when you wake up.
  • That said, mods that add a very large number of NPCs to the Inns at night, like Skyrim Belongs to the Nords, will take a very long time to process, so even without Engine Fixes it's likely that the script is still queuing up the NPCs after you've woken up, so you'll be able to see them poof away one by one. That's not immersive!
  • Having Skyrim Souls RE - Updated running doesn't make any discernible difference.





What if the NPC is lost forever?
They won't be. Even if I teleported them to the holding cell and left them there, their AI package would still take over and eventually they'd move back to where they want to be.  The only case where they'd be stuck is if they have no AI Package at all, and if that's true they're not a finished NPC.  However, the script checks to see if they're still in there, and moves them to where they were just standing a second ago, so everyone's safe.




Creation Kit Fixes, SSEEdit, SKSE, and being convinced that this should work even though my first four attempts were disasters.
This mod uses Chesko's General Purpose Array Functions.


I originally had the idea for this mod some time in 2018.  After making 
Tidy Up, many pointed out that Clean Up worked on the entire cell at once. I didn't want to make Tidy Up work that way, but after looking at how Clean Up used SKSE to scan the cell for references of a specific type and then run a function on each, I realized that I should try to use that new knowledge to achieve my old wish.  So, thanks IronDusk33!

Sthaagg was a huge help in leveling up this mod to version 1.1. Thank you so much!