Guinefort1 Posted February 25, 2020 Share Posted February 25, 2020 Hi everyone, I've run into a problem with my latest project getting the NPC AI to lock and open the doors properly. Which is extra weird since I got that to work without a hitch in my most recent release. Anyway, here is the problem: - The AI is supposed to lock the doors at night and open in the morning, which is seems to obey during the first day, but waiting through the 24 day cycle and into the next morning, the assigned NPC is not unlocking the door like they are supposed to, it just says locked- I have ensured that the details are assigned correctly (the door is assigned a key, the NPC has the key, the NPC AI says to lock/ unlock the door at the beginning/end of a certain routine, the door ownership is assigned to the character doing the locking/unlocking)- The only thing I can think of is that this mod contains multiple cells within the house, so the NPC may not even be in the same cell as the door they are supposed to be locking at the relevant time. I never encountered this problem with my previous mod, since the interior was a single cell. Maybe this is causing it? Any help would be appreciated. Link to comment Share on other sites More sharing options...
mixxa77 Posted February 25, 2020 Share Posted February 25, 2020 (edited) - The only thing I can think of is that this mod contains multiple cells within the house, so the NPC may not even be in the same cell as the door they are supposed to be locking at the relevant time. I never encountered this problem with my previous mod, since the interior was a single cell. Maybe this is causing it? That sounds very likely to be the cause. The lock/unlock doors is only applied to the cell the NPC is in at the time of lock/unlock. You could try and use travel packages specifically meant to lock/unlock the "main" cell or even all cells by using once per day flags on packages created specifically for that purpose (LockRoom1, LockRoom2, etc.), say lock/unlock when at location and set as location a marker in the cell or the cell itself that you want locked/unlocked, which would theoretically make the NPC cycle through the cells locking and unlocking them. Maybe it's also just the UI not updating. I have had it happen that the UI displays the door as locked but when activating it, I was able to go through as usual. Edited February 25, 2020 by mixxa77 Link to comment Share on other sites More sharing options...
Guinefort1 Posted February 26, 2020 Author Share Posted February 26, 2020 Thanks for the advice! I switched the locking routine to a different NPC (one who wasn't traveling between interior cells) and checked the once-per-day and must-complete boxes for the subroutine. That has done the trick in my tests. Link to comment Share on other sites More sharing options...
Recommended Posts