cumbrianlad Posted February 12, 2020 Share Posted February 12, 2020 Hi. I want my player home to be family friendly. I've done this before with no issues, but this one is giving me a problem with the AI packages of the wife and kids. I intended the house to be used with the 'Custom Family Home' mod, since I've always used it successfully in the past. That is how I'm testing it. It appears to work fine, in that Ysolda and the 2 kids move to the place and use their idle markers, say all the right lines, etcetera. Where it goes awry is that at some time in the morning, they all swim off across Lake Honrich towards nearby Riften. Ysolda makes it across the lake, goes past Faldar's Tooth (good job I cleared that before moving the family in) and almost makes it to Riften stables before turning back. She gets stuck in the lake trying to get home for an hour or so (she's not a strong swimmer and the return leg involves swimming against the current). She then behaves as she should until the following morning. The children can't swim as fast as Ysolda, so they drift on the current right away and get stuck somewhere near the southern part of the lake. There they remain until you fast travel to the house at night, only to find them asleep in their beds. Other than this mysterious fetish that they all have of trying to swim across the lake and go to Riften each morning, they use their idle markers and behave as they should for the short time they're at home and not asleep. The kids I've even found inside a dungeon that connects the cellar to the Ragged Flagon, even though the trapdoors at either end have the 'DefaultNoFollowDoorScript' on them. Twice, I've found one of them in the Ragged Flagon itself, only to be greeted with "Ma, you're home!", which is odd to say the least. (I never told them I was Guild Master. Brynjolf must have blabbed :wink: ). That is probably a separate issue. If they weren't attempting to get to Riften, they wouldn't sometimes enter the dungeon. I should say that I moved them all into vanilla 'Honeyside' prior to using the power to move them to my home. This made sense so that the kids' dialogue was less immersion-breaking. When I release my mod, I want to recommend doing this and using another mod to move them. This may be an issue with the 'Custom Family Home' mod. When I've used it on another of my homes, it was in a beautified (and more practical) Severin Manor. I used Ysolda and she never did this. Alternatively, it could be how I've set up the player home. I used this guide: https://forums.nexusmods.com/index.php?/topic/2131429-make-your-home-multiple-adoption-friendly/ Maybe I missed a step? Has anyone encountered similar issues? Any ideas are gratefully received! Link to comment Share on other sites More sharing options...
cumbrianlad Posted February 13, 2020 Author Share Posted February 13, 2020 Forget half of what I wrote before! i've just spent the entire day testing different scenarios. The upshot is that 'Custom Family Home' is not to blame. My last test involved building the Falkreath 'Hearthfires' home, getting a steward, moving the family there and then moving them all to my custom home. They all turned up and then trooped off in a line to swim across Lake Honrich' to Riften. None of them had ever been anywhere near the place before. I'm dreading this, because if true, my entire mod is totally sc****d. The only thing I can think of is that the cellar in the home is linked via a series of dungeon cells, to the Ragged Flagon in Riften. Can this link possibly be the cause of this weird AI behaviour? Link to comment Share on other sites More sharing options...
cumbrianlad Posted February 14, 2020 Author Share Posted February 14, 2020 Well, from desperation comes inspiration. If that's not a phrase it should be. I'm posting this in case anyone else gets a similarly baffling scenario. I was right about the trapdoors. For some reason still unbeknown to me, the NPCs were attempting to access the house by walking a couple of miles to the Flagon and from there they intended to walk through a couple of miles of enemy infested territory in order to emerge in the cellar. I followed them to prove it. Why they preferred this route rather than walking a couple of meters to the front door is beyond me. Typical screw*d-up Skyrim AI, I put it down to. The solution (and yes it works fine, now) was to add a script fragment at the end of the dungeon quest. The fragment disables the entrance trapdoors in the Ragged Flagon, once the player has found the basement entrance at the opposite end. Next I added a push-button in the cellar with a linked reference to an x-marker. The x-marker is the enable parent of the two trapdoor activators and a static version (opposite to parent) of the cellar trapdoor. I then added the 'DefaultToggleLinkedRefScript' to the button, making sure that it did not disable itself when done and linked the button to the x-marker. Completing the dungeon quest now disables both load doors at the Flagon end. Pushing the button disables the pair of load doors at the cellar end. Using the 'Custom Family Home' spell now moves the family, steward and housecarl and they behave themselves perfectly. I tried the button to disable the cellar end first, but the NPCs still went to Riften. The only way to cure the issue was to disable all doors at both ends of the underground access from the Flagon to the cellar. I only need to add a line to my 'Welcome' book to instruct players to disable the cellar entrance before moving the family there. Link to comment Share on other sites More sharing options...
maxarturo Posted February 14, 2020 Share Posted February 14, 2020 (edited) 1) Npcs will always use the shortest route to their destination target. Unless their AI packages dictates them to use 'Preferred Path Only'. If the shortest route from room A to room C is the path through Riften, then that's the route that ALL npcs will follow. 2) Npcs will always do what their packages line of order dictates them to. 3) And in your case from what i can just imagine since i don't have a clue on how you have build your mod is that, you have a NavMesh problem, either you have not NavMeshed one part or you have forgotten to 'Finalize' the connected cells. * Not having load doors connected can also be the reason, but this is more obvious to detect since you can see the door marker. 4) In some occasions 'Collision' can be the culprit, by blocking either one of the 'load doors' forbids the npc to use it. 5) If the load doors have 'Ownership' and the npcs are not member of that 'Faction' they won't be able to use the door. Edited February 15, 2020 by maxarturo Link to comment Share on other sites More sharing options...
cumbrianlad Posted February 19, 2020 Author Share Posted February 19, 2020 Thanks Maxarturo. I'm looking at alternatives to how I'm setting up the dungeon entrances. I'm just replying here so that you don't think I'm being rude and ignoring you. All the cells were checked using 'Check Navmesh', to eliminate any problem triangles. I then used the 'pathing' check to see that the NPCs that would be using it could navigate it. Then I 'Found cover edges' and finalized. After disabling the trapdoors in and out of the dungeon, the family used all the doors in the house as they should, without me needing to do anything with the navmeshes. None of the house doors have ownership, though the front door does have a location reference type 'BYOHhouseFrontDoor'. The collision comment is an interesting one. I'll double check that. It could be that some items I've added to the interior are affecting the use of the doors. Link to comment Share on other sites More sharing options...
maxarturo Posted February 19, 2020 Share Posted February 19, 2020 You are not obligated to respond. Even the most experienced modders can encounter issues by the simplest things, and been to confident with your knowledge and abilities can worsen a lot a simple situation. I had a similar issue a few month back with one cell that is a Market, npcs that lived in the Market/house wouldn't get out to execute their every day life/packages, and npcs that were outside couldn't get in the Market. In the end it turned out to be just a simple problem, i had forgotten to Finalize one cell and the exterior Load Door was blocked by a vanilla F**** U* mesh collision. Link to comment Share on other sites More sharing options...
cumbrianlad Posted February 19, 2020 Author Share Posted February 19, 2020 Thanks for that Maxarturo. I had to laugh about the vanilla navmesh part! Some of it is really bad. It explains a lot of the weird behaviour of NPCs in the vanilla game. Link to comment Share on other sites More sharing options...
NexBeth Posted February 20, 2020 Share Posted February 20, 2020 Does your house use the multiple adoptions mod? If so, did you carefully implement all the details that are required to make the home family-ready? This kind of behavior for family members results from missing something in setting that up. Are followers also having this problem too? Link to comment Share on other sites More sharing options...
cumbrianlad Posted February 26, 2020 Author Share Posted February 26, 2020 Nexbeth, I've only just noticed your reply. Sorry. I've set it up to use multiple adoptions using the modders read-me that comes with it. I've checked and double-checked that it's right. I suppose I could still have missed something. I've now added a mechanism to swap the load doors in and out of the dungeon for static versions. As soon as that's done, the family and housecarl behave exactly as they should. I also ran a test using the mod 'Custom Family Home'. That doesn't rely on the x-markers, location reference types, idle markers etcetera. The player stands in certain designated spots and the references are created by casting a spell each time. The extra idle markers set up for multiple adoptions make that mod better. It only moves the spouse and up to 2 children. The exact same scenario resulted. I've used a few player homes personally but rarely used either mod because I generally don't like the family part of the game, so I've no real 1st hand experience. What I can say is that none of my custom homes have ever had a cellar connecting to a dungeon with a vanilla interior on the other end! I'll run through the checklist for multiple adoptions again, but it works fine once the load doors are disabled. Link to comment Share on other sites More sharing options...
cumbrianlad Posted February 26, 2020 Author Share Posted February 26, 2020 I'm adding this to avoid a total word wall. I seem to vaguely recollect reading somewhere a long while ago that the game finds it easier to handle families if the house is all one cell. Mine isn't. It's 2 cells. The ground floor has a front and back door out to the exterior cell. A trapdoor links the ground floor to the cellar. I stuck a BYOHcellar loc ref type on that... maybe I shouldn't have. The child room and housecarl room are in the cellar, with all the crafting rooms. The spouse bed, dining table, cooking etc is on the ground floor. The cellar has a second trapdoor that exits directly into the exterior cell. It also has a trapdoor down into the dungeon. Once inside the dungeon, you need to pass through 3 cells, each with load doors connecting them. At the end of the 3rd cell is a trapdoor that exits inside the Ragged Flagon. I wonder if all the doors messes up the AI? Link to comment Share on other sites More sharing options...
Recommended Posts