Lemecc Posted May 5, 2024 Share Posted May 5, 2024 (edited) I'm having trouble with vanilla non-human sandboxing on NPCs I've added in a mod. I've added a bunch of animals, all with the workshopnpc script on them, and none of them are crazy custom. In fact they're all dogs and cats and Brahmin. They're set to template from WorkshopBrahmin, WorkshopCat, and WorkshopDog in every single aspect except from base data (so they can have unique names). In a few rare cases they aren't actually the dog or cat race, but those ones are fine, I'm not actually having trouble with them - those are performing the way I want. I've placed these dogs/cats/Brahmin in vanilla settlements, linked them to the workshop via WorkshopItemKeyword, and to the location center marker with WorkshopLinkHome. I've done the same with a human settler in the past and he sandboxes completely fine, absolutely no issues at all. The animals are definitely acknowledged as part of the workshop in-game, as their benefits are registering (additional defense rating, bonus happiness, etc). No changes to cells, precombines, or navmeshes. However the dogs and cats in particular don't seem to want to move more than five paces from their original CK placement, with the sole exception of if the game teleports them to somewhere else in the settlement after I fast travel. They will then stay within five paces of whereever they've been teleported. However, just to make things extra confusing and complicated for me, in one settlement (Hangman's Alley), the cat I've added actually seems to be very happy to wander further out from the spawn point. So far this is the only location where the cat seems to legitimately sandbox around. In all locations I've added animals, there are plenty of furniture idles they can use (vanilla ones, with the correct keywords) well-within their max radius, but with the sole exception of the Hangman's Alley cat, they seem to ignore anything unless I place the furniture right under their nose. I don't know if Hangman's Alley is just a fluke given that the settlement is very small, but otherwise I don't really see anything there that would change the cat's behaviour. I've taken a look at the associated WorkshopCatSandbox etc packages, and they all look fine. I wondered at first if I'd need to write a custom package for them, but I don't see how I'd write anything that differed from the vanilla packages - plus I don't understand enough about writing packages to want to do that when vanilla ones should suffice. I've tried both not having any packages added to the animals, and allowing the game to presumably handle it with the defaultpackageslist, and I've tried explicitly adding the relevant cat/dog/brahmin packages to them. Neither method has made any difference. Basically I can't figure out why my added animals all seem to work perfectly fine with the sole exception of refusing to wander around any settlement and access relevant keyword furniture more than a couple meters away from them. Especially when the human settler has no problem. I feel like I must be missing something intensely obvious, because everything else looks completely in-order to me. Could anybody shed any light on what I'm missing, or if there's any particular extra things that need to be done when it comes to cats/dogs/brahmin? Thank you! Edited May 5, 2024 by Lemecc extra clarification Link to comment Share on other sites More sharing options...
rsm000rsm Posted May 5, 2024 Share Posted May 5, 2024 Try adding WorkshopSandboxDefault [PACK:00038C0E] to their packages. If that doesn't work, take a look at Animal Rescue at Fallout 4 Nexus - Mods and community (nexusmods.com) as a guide to building a custom animal sandbox package. 1 Link to comment Share on other sites More sharing options...
Lemecc Posted May 5, 2024 Author Share Posted May 5, 2024 1 hour ago, rsm000rsm said: Try adding WorkshopSandboxDefault [PACK:00038C0E] to their packages. Many thanks - I only had time to boot up the game for an extremely quick non-conclusive test, but I left one dog same as the vanilla WorkshopDog, and gave another dog next to it WorkshopSandboxDefault. The WorkshopSandboxDefault dog was suddenly more interested in exploring a fair bit further out from their original spawn point whereas the untouched dog continued to pace on the spot. Beats me still why they aren't behaving like their vanilla counterparts when they are basically duplicates of WorkshopDog/WorkshopCat/etc, but if the fix turns out to be as easy as just pointing them to this particular package, I'll be happy! I'll give this a proper more thorough test tomorrow, and hopefully it'll sort out my issue or at least provide a workaround that is as good as solving it. Link to comment Share on other sites More sharing options...
rsm000rsm Posted May 5, 2024 Share Posted May 5, 2024 50 minutes ago, Lemecc said: Many thanks - I only had time to boot up the game for an extremely quick non-conclusive test, but I left one dog same as the vanilla WorkshopDog, and gave another dog next to it WorkshopSandboxDefault. The WorkshopSandboxDefault dog was suddenly more interested in exploring a fair bit further out from their original spawn point whereas the untouched dog continued to pace on the spot. Beats me still why they aren't behaving like their vanilla counterparts when they are basically duplicates of WorkshopDog/WorkshopCat/etc, but if the fix turns out to be as easy as just pointing them to this particular package, I'll be happy! I'll give this a proper more thorough test tomorrow, and hopefully it'll sort out my issue or at least provide a workaround that is as good as solving it. I'm not 100% certain of this, but I believe the WorkshopNPC script is supposed to apply that package automatically, but apparently, it doesn't always get applied. I had to manually add the sandbox to my Recruitable Minutemen to get them to properly sandbox at a settlement once recruited, which seems to have done the trick since I haven't received any reports to the contrary. Hopefully it'll work for your animals, too. 1 Link to comment Share on other sites More sharing options...
SKKmods Posted May 6, 2024 Share Posted May 6, 2024 Had a similar issue with Multiracial Workshop Actors (Settlers). (2) Most multiracial actors do not have idle animations for workshop work objects (farming, guarding, scavenge station). Rather than standing frozen in place they are configured to wander around looking busy. Calling with the bell can cause them to stop updating AI movement packages after being called until they are commanded or unload. If ((ThisActor as SKK_MWACustomActorScript).bRaceHasWorkshopIdles == false) (ThisActor as Actor).AddToFaction(pWorkshopNoPackages) ;Package freeze in position when they are assigned to work objects this keeps them sandboxing Else (ThisActor as Actor).RemoveFromFaction(pWorkshopNoPackages) Endif 1 Link to comment Share on other sites More sharing options...
Lemecc Posted May 6, 2024 Author Share Posted May 6, 2024 Thanks SKK! I think I understand what that script is doing, especially since I note that the "WorkshopSandboxDefault" package has a condition involving the WorkshopNoPackages faction. I'm not actually sure where I'd apply something similar though. Would that be in the base NPC entry? I've had a bit of success making a duplicate of WorkshopSandboxDefault, then tweaking the values to be more appropriate for dogs/cats/etc. With my new custom package, my dogs do seem to wander more, idle more (sit down, sniff walk), and use special furniture (lie down, jump up) more, which is ideal. They seem to prefer remaining in furniture over getting out of it and attacking an aggressive NPC (like an attacking Super Mutant, for example), though they will eventually exit the furniture and join the fight, so I think some funkiness may be happening there. In contrast, the CC dogs - which of course I don't touch - won't sandbox well or use furniture apart from dog houses, but will run at aggressive NPCs as soon as they're able to. I'm beginning to wonder if vanilla non-Dogmeat behaviour is just totally borked and I never really noticed before. Nevertheless, I feel like I'm at least getting closer to what I'd like. The rest of the animals I've added can pace as dumbly as they like (it's not like they have vanilla furniture they can use anyway), but as the dogs and cats are intended to be working farm animals, I definitely want them to wander and interact with special furniture more realistically. Link to comment Share on other sites More sharing options...
SKKmods Posted May 6, 2024 Share Posted May 6, 2024 Adding the actor to faction WorkshopNoPackages (either on ther ActorBase form or via script to the in game ObjectReference) blocks any of the WorkshopParent applied packages from asserting priority on therir package stack, so either their default or your added package will be active. Having a script which dumps the current package is super helpful fir this stuff: Debug.Trace("SKK_GetActorInfo CurrentPackage," + (ThisRef as Actor).GetCurrentPackage() ) 1 Link to comment Share on other sites More sharing options...
Lemecc Posted May 6, 2024 Author Share Posted May 6, 2024 Wow, that's great SKK, thanks so much for the help and explanation! I'll try that out, and with any luck be able to fine-tune their packages in just the way I want. Link to comment Share on other sites More sharing options...
Lemecc Posted May 7, 2024 Author Share Posted May 7, 2024 Just want to thank you both again. SKK, giving them the WorkshopNoPackages faction seems to be working a treat, which has encouraged me to try and make more bespoke sandbox packages rather than just copying a vanilla one. I've now managed a couple of basic ones that make the farm animals actually appear to doing the sort of thing that working animals should be doing; patrolling, hunting, and during certain hours actually playing. That's a massive improvement over vanilla for me (The poor CC dogs seem like zombies in comparison now, maybe I ought to make a patch), not one I had originally thought about making but it really goes with the spirit of my mod and I wouldn't have figured it out without the encouragement, so thanks! Link to comment Share on other sites More sharing options...
Recommended Posts